Skip to content

Commit

Permalink
Allow parallel filters feature for comm size of 1 (#840)
Browse files Browse the repository at this point in the history
  • Loading branch information
jhendersonHDF authored and lrknox committed Aug 5, 2021
1 parent f6e12fd commit 0061341
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/H5Dio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1135,11 +1135,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;
Expand Down

0 comments on commit 0061341

Please sign in to comment.