summaryrefslogtreecommitdiffstats
path: root/src/H5FDmpiposix.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5FDmpiposix.c')
-rw-r--r--src/H5FDmpiposix.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/H5FDmpiposix.c b/src/H5FDmpiposix.c
index 4920ade..8bca0bf 100644
--- a/src/H5FDmpiposix.c
+++ b/src/H5FDmpiposix.c
@@ -224,6 +224,7 @@ static const H5FD_class_t H5FD_mpiposix_g = {
H5FD_FLMAP_SINGLE /*fl_map */
};
+#ifdef OLD_METADATA_WRITE
/* Global var to allow elimination of redundant metadata writes
* to be controlled by the value of an environment variable. */
/* Use the elimination by default unless this is the Intel Red machine */
@@ -232,6 +233,7 @@ hbool_t H5_mpiposix_1_metawrite_g = TRUE;
#else
hbool_t H5_mpiposix_1_metawrite_g = FALSE;
#endif
+#endif /* OLD_METADATA_WRITE */
/* Interface initialization */
#define PABLO_MASK H5FD_mpiposix_mask
@@ -1424,7 +1426,9 @@ H5FD_mpiposix_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
HMPI_GOTO_ERROR(FAIL, "MPI_Barrier failed", mpi_code);
/* Only p<round> will do the actual write if all procs in comm write same metadata */
+#ifdef OLD_METADATA_WRITE
if (H5_mpiposix_1_metawrite_g)
+#endif /* OLD_METADATA_WRITE */
if (file->mpi_rank != H5_PAR_META_WRITE)
HGOTO_DONE(SUCCEED) /* skip the actual write */
} /* end if */
@@ -1498,11 +1502,19 @@ done:
} /* end if */
/* Guard against getting into metadata broadcast in failure cases */
else {
+#ifdef OLD_METADATA_WRITE
/* if only p<round> writes, need to broadcast the ret_value to other processes */
if ((type!=H5FD_MEM_DRAW) && H5_mpiposix_1_metawrite_g) {
if (MPI_SUCCESS != (mpi_code= MPI_Bcast(&ret_value, sizeof(ret_value), MPI_BYTE, H5_PAR_META_WRITE, file->comm)))
HMPI_GOTO_ERROR(FAIL, "MPI_Bcast failed", mpi_code);
} /* end if */
+#else /* OLD_METADATA_WRITE */
+ /* if only p<round> writes, need to broadcast the ret_value to other processes */
+ if (type!=H5FD_MEM_DRAW) {
+ if (MPI_SUCCESS != (mpi_code= MPI_Bcast(&ret_value, sizeof(ret_value), MPI_BYTE, H5_PAR_META_WRITE, file->comm)))
+ HMPI_GOTO_ERROR(FAIL, "MPI_Bcast failed", mpi_code);
+ } /* end if */
+#endif /* OLD_METADATA_WRITE */
} /* end else */
FUNC_LEAVE_NOAPI(ret_value);