summaryrefslogtreecommitdiffstats
path: root/src/H5Dio.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Dio.c')
-rw-r--r--src/H5Dio.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/H5Dio.c b/src/H5Dio.c
index 470b245..a7cb937 100644
--- a/src/H5Dio.c
+++ b/src/H5Dio.c
@@ -830,6 +830,18 @@ H5D__ioinfo_adjust(H5D_io_info_t *io_info, const H5D_t *dset, const H5S_t *file_
} /* end if */
} /* end if */
else {
+ /* Fail when file sync is required, since it requires collective write */
+ if (io_info->op_type == H5D_IO_OP_WRITE) {
+ hbool_t mpi_file_sync_required = FALSE;
+ if (H5F_shared_get_mpi_file_sync_required(io_info->f_sh, &mpi_file_sync_required) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get MPI file_sync_required flag")
+
+ if (mpi_file_sync_required)
+ HGOTO_ERROR(
+ H5E_DATASET, H5E_NO_INDEPENDENT, FAIL,
+ "Can't perform independent write when MPI_File_sync is required by ROMIO driver.")
+ }
+
/* 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
* with multiple ranks involved; otherwise, there will be metadata