summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorjhendersonHDF <jhenderson@hdfgroup.org>2021-07-20 01:40:28 (GMT)
committerGitHub <noreply@github.com>2021-07-20 01:40:28 (GMT)
commit50a37fde06457ee5e75ea65259c233cb6527bd91 (patch)
tree57d179cc2072a3277059bdb9e19e4d546074017d /src
parent436727dceab2df46ef688f31fa199254e64ec34a (diff)
downloadhdf5-50a37fde06457ee5e75ea65259c233cb6527bd91.zip
hdf5-50a37fde06457ee5e75ea65259c233cb6527bd91.tar.gz
hdf5-50a37fde06457ee5e75ea65259c233cb6527bd91.tar.bz2
Allow parallel filters feature for comm size of 1 (#840)
Diffstat (limited to 'src')
-rw-r--r--src/H5Dio.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/H5Dio.c b/src/H5Dio.c
index 600f08a..d1861c4 100644
--- a/src/H5Dio.c
+++ b/src/H5Dio.c
@@ -810,11 +810,19 @@ H5D__ioinfo_adjust(H5D_io_info_t *io_info, const H5D_t *dset, const H5S_t *file_
io_info->io_ops.single_write = H5D__mpio_select_write;
} /* end if */
else {
+ int comm_size = 0;
+
+ /* Retrieve size of MPI communicator used for file */
+ if ((comm_size = H5F_shared_mpi_get_size(io_info->f_sh)) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get MPI communicator size")
+
/* Check if there are any filters in the pipeline. If there are,
- * we cannot break to independent I/O if this is a write operation;
- * otherwise there will be metadata inconsistencies in the file.
+ * we cannot break to independent I/O if this is a write operation
+ * with multiple ranks involved; otherwise, there will be metadata
+ * inconsistencies in the file.
*/
- if (io_info->op_type == H5D_IO_OP_WRITE && io_info->dset->shared->dcpl_cache.pline.nused > 0) {
+ if (comm_size > 1 && io_info->op_type == H5D_IO_OP_WRITE &&
+ io_info->dset->shared->dcpl_cache.pline.nused > 0) {
H5D_mpio_no_collective_cause_t cause;
uint32_t local_no_collective_cause;
uint32_t global_no_collective_cause;