summaryrefslogtreecommitdiffstats
path: root/src/H5Dmpio.c
diff options
context:
space:
mode:
authorJordan Henderson <jhenderson@hdfgroup.org>2018-07-26 17:50:26 (GMT)
committerJordan Henderson <jhenderson@hdfgroup.org>2018-07-26 17:50:26 (GMT)
commite1e10743cf342509b5e89b50fc43fb1d52a9c8d2 (patch)
tree4801126aeea3b4ac5960dfa41169a5fe0fe4e6c3 /src/H5Dmpio.c
parent5550fb330a00ef75b6ab6daa6d8dae8bcf832185 (diff)
downloadhdf5-e1e10743cf342509b5e89b50fc43fb1d52a9c8d2.zip
hdf5-e1e10743cf342509b5e89b50fc43fb1d52a9c8d2.tar.gz
hdf5-e1e10743cf342509b5e89b50fc43fb1d52a9c8d2.tar.bz2
Add configure check for MPI_Mprobe and MPI_Imrecv functions
Add line to libhdf5settings file for status of Parallel writes to filtered datasets status Surround Parallel Compression code in MPI_VERSION >= 3 checks Add disabled message for Parallel Compression built w/ MPI-2 Modify Parallel Compression tests to only run the parallel filtered read tests when parallel filtered writes are disabled Update big I/O code to handle being built with MPI-2 Add checks to CMakeLists.txt for MPI_Mprobe and MPI_Imrecv
Diffstat (limited to 'src/H5Dmpio.c')
-rw-r--r--src/H5Dmpio.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/H5Dmpio.c b/src/H5Dmpio.c
index d721ae6..5ebdc06 100644
--- a/src/H5Dmpio.c
+++ b/src/H5Dmpio.c
@@ -229,9 +229,11 @@ static herr_t H5D__mpio_get_sum_chunk(const H5D_io_info_t *io_info,
static herr_t H5D__construct_filtered_io_info_list(const H5D_io_info_t *io_info,
const H5D_type_info_t *type_info, const H5D_chunk_map_t *fm,
H5D_filtered_collective_io_info_t **chunk_list, size_t *num_entries);
+#if MPI_VERSION >= 3
static herr_t H5D__chunk_redistribute_shared_chunks(const H5D_io_info_t *io_info,
const H5D_type_info_t *type_info, const H5D_chunk_map_t *fm,
H5D_filtered_collective_io_info_t *local_chunk_array, size_t *local_chunk_array_num_entries);
+#endif
static herr_t H5D__mpio_array_gatherv(void *local_array, size_t local_array_num_entries,
size_t array_entry_size, void **gathered_array, size_t *gathered_array_num_entries,
hbool_t allgather, int root, MPI_Comm comm, int (*sort_func)(const void *, const void *));
@@ -244,8 +246,10 @@ static herr_t H5D__filtered_collective_chunk_entry_io(H5D_filtered_collective_io
static int H5D__cmp_chunk_addr(const void *chunk_addr_info1, const void *chunk_addr_info2);
static int H5D__cmp_filtered_collective_io_info_entry(const void *filtered_collective_io_info_entry1,
const void *filtered_collective_io_info_entry2);
+#if MPI_VERSION >= 3
static int H5D__cmp_filtered_collective_io_info_entry_owner(const void *filtered_collective_io_info_entry1,
const void *filtered_collective_io_info_entry2);
+#endif
/*********************/
@@ -330,6 +334,18 @@ H5D__mpio_opt_possible(const H5D_io_info_t *io_info, const H5S_t *file_space,
* use collective IO will defer until each chunk IO is reached.
*/
+#if MPI_VERSION < 3
+ /*
+ * Don't allow parallel writes to filtered datasets if the MPI version
+ * is less than 3. The functions needed (MPI_Mprobe and MPI_Imrecv) will
+ * not be available.
+ */
+ if (io_info->op_type == H5D_IO_OP_WRITE &&
+ io_info->dset->shared->layout.type == H5D_CHUNKED &&
+ io_info->dset->shared->dcpl_cache.pline.nused > 0)
+ local_cause |= H5D_MPIO_PARALLEL_FILTERED_WRITES_DISABLED;
+#endif
+
/* Check for independent I/O */
if(local_cause & H5D_MPIO_SET_INDEPENDENT)
global_cause = local_cause;
@@ -2127,6 +2143,7 @@ H5D__cmp_filtered_collective_io_info_entry(const void *filtered_collective_io_in
FUNC_LEAVE_NOAPI(H5F_addr_cmp(addr1, addr2))
} /* end H5D__cmp_filtered_collective_io_info_entry() */
+#if MPI_VERSION >= 3
/*-------------------------------------------------------------------------
* Function: H5D__cmp_filtered_collective_io_info_entry_owner
@@ -2157,6 +2174,7 @@ H5D__cmp_filtered_collective_io_info_entry_owner(const void *filtered_collective
FUNC_LEAVE_NOAPI(owner1 - owner2)
} /* end H5D__cmp_filtered_collective_io_info_entry_owner() */
+#endif
/*-------------------------------------------------------------------------
@@ -2585,8 +2603,12 @@ H5D__construct_filtered_io_info_list(const H5D_io_info_t *io_info, const H5D_typ
/* Redistribute shared chunks to new owners as necessary */
if (io_info->op_type == H5D_IO_OP_WRITE)
+#if MPI_VERSION >= 3
if (H5D__chunk_redistribute_shared_chunks(io_info, type_info, fm, local_info_array, &num_chunks_selected) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to redistribute shared chunks")
+#else
+ HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to redistribute shared chunks - MPI version < 3 (MPI_Mprobe and MPI_Imrecv missing)")
+#endif
*chunk_list = local_info_array;
*num_entries = num_chunks_selected;
@@ -2595,6 +2617,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__construct_filtered_io_info_list() */
+#if MPI_VERSION >= 3
/*-------------------------------------------------------------------------
* Function: H5D__chunk_redistribute_shared_chunks
@@ -2893,6 +2916,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__chunk_redistribute_shared_chunks() */
+#endif
/*-------------------------------------------------------------------------