summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard Warren <Richard.Warren@hdfgroup.org>2017-10-09 20:47:21 (GMT)
committerRichard Warren <Richard.Warren@hdfgroup.org>2017-10-09 20:47:21 (GMT)
commit837624b9cd33e95560377659aede1d065a858726 (patch)
treee680bbaaafa8c40a3f99c72582f13a2479f51a14 /src
parentceab5a51766f3e32d02bc65d59374c79910483bd (diff)
downloadhdf5-837624b9cd33e95560377659aede1d065a858726.zip
hdf5-837624b9cd33e95560377659aede1d065a858726.tar.gz
hdf5-837624b9cd33e95560377659aede1d065a858726.tar.bz2
Add a test for parallel reads of independent files using MPI subgroups
Diffstat (limited to 'src')
-rw-r--r--src/H5FDmpio.h23
-rw-r--r--src/H5Fsuper.c18
2 files changed, 7 insertions, 34 deletions
diff --git a/src/H5FDmpio.h b/src/H5FDmpio.h
index f02afe6..6ee0a1a 100644
--- a/src/H5FDmpio.h
+++ b/src/H5FDmpio.h
@@ -29,29 +29,6 @@
#endif /* H5_HAVE_PARALLEL */
#ifdef H5_HAVE_PARALLEL
-#if 0 /* delete this eventually */
-#define H5FD_GET_MPI_RANK_AND_SIZE(rank,size, f) { \
- (rank) = 0; (size) = 1; \
- if (H5F_HAS_FEATURE((f), H5FD_FEAT_HAS_MPI)) { \
- (rank) = H5F_mpi_get_rank((f)); \
- (size) = H5F_mpi_get_size((f)); \
- } else { \
- int mpi_initialized = 0, mpi_finalized = 0; \
- MPI_Initialized(&mpi_initialized); \
- MPI_Finalized(&mpi_finalized); \
- if (mpi_initialized && !mpi_finalized) { \
- MPI_Comm_rank(MPI_COMM_WORLD, &(rank)); \
- MPI_Comm_size(MPI_COMM_WORLD, &(size)); \
- } \
- }}
-
-#define H5FD_GET_MPI_COMM(comm, f) { \
- if (H5F_HAS_FEATURE((f), H5FD_FEAT_HAS_MPI)) \
- (comm) = H5F_mpi_get_comm((f)); \
- else (comm) = MPI_COMM_WORLD; \
- }
-#endif /* delete this eventually */
-
/*Turn on H5FDmpio_debug if H5F_DEBUG is on */
#ifdef H5F_DEBUG
#ifndef H5FDmpio_DEBUG
diff --git a/src/H5Fsuper.c b/src/H5Fsuper.c
index a34a7fd..a3b1fed 100644
--- a/src/H5Fsuper.c
+++ b/src/H5Fsuper.c
@@ -359,9 +359,6 @@ H5F__super_read(H5F_t *f, hid_t meta_dxpl_id, hid_t raw_dxpl_id, hbool_t initial
/* Find the superblock */
#ifdef H5_HAVE_PARALLEL
-#if 0
- H5FD_GET_MPI_RANK_AND_SIZE(mpi_rank, mpi_size, f);
-#else
if(H5F_HAS_FEATURE(f, H5FD_FEAT_HAS_MPI)) {
if((mpi_rank = H5F_mpi_get_rank(f)) < 0)
@@ -370,9 +367,15 @@ H5F__super_read(H5F_t *f, hid_t meta_dxpl_id, hid_t raw_dxpl_id, hbool_t initial
if((mpi_size = H5F_mpi_get_size(f)) < 0)
HGOTO_ERROR(H5E_PAGEBUF, H5E_CANTGET, FAIL, "can't retrieve MPI communicator size")
}
-#endif
+
/* If we are an MPI application with at least two processes, the
* following superblock signature location optimization is applicable.
+ *
+ * Note:: For parallel applications which don't setup for using the
+ * HDF5 MPIO driver, we will arrive here with mpi_size == 1.
+ * This occurs because of the variable initialization (above) and the
+ * fact that we have skipped actually calling MPI functions to determine
+ * our MPI rank and size.
*/
if ( mpi_size > 1 ) {
MPI_Comm this_comm = MPI_COMM_NULL;
@@ -381,12 +384,6 @@ H5F__super_read(H5F_t *f, hid_t meta_dxpl_id, hid_t raw_dxpl_id, hbool_t initial
if(H5FD_locate_signature(&fdio_info, &super_addr) < 0)
HGOTO_ERROR(H5E_FILE, H5E_NOTHDF5, FAIL, "unable to locate file signature")
}
-#if 0
- H5FD_GET_MPI_COMM(this_comm, f);
- if (( this_comm == MPI_COMM_NULL ) ||
- ( MPI_Bcast(&super_addr,sizeof(super_addr), MPI_BYTE, 0, this_comm) != MPI_SUCCESS))
- HGOTO_ERROR(H5E_FILE, H5E_NOTHDF5, FAIL, "unable to locate file signature")
-#else
HDassert(H5F_HAS_FEATURE(f, H5FD_FEAT_HAS_MPI));
if ( MPI_COMM_NULL == (this_comm = H5F_mpi_get_comm(f)) )
@@ -395,7 +392,6 @@ H5F__super_read(H5F_t *f, hid_t meta_dxpl_id, hid_t raw_dxpl_id, hbool_t initial
if ( MPI_SUCCESS !=
(mpi_result = MPI_Bcast(&super_addr,sizeof(super_addr), MPI_BYTE, 0, this_comm)))
HMPI_GOTO_ERROR(FAIL, "MPI_Bcast failed", mpi_result)
-#endif
}
else {
/* Locate the signature as per per the serial library */