summaryrefslogtreecommitdiffstats
path: root/src/H5Flow.c
diff options
context:
space:
mode:
authorRobert Kim Yates <rkyates@llnl.gov>1998-08-28 23:37:58 (GMT)
committerRobert Kim Yates <rkyates@llnl.gov>1998-08-28 23:37:58 (GMT)
commit1373661a78b7a6d3c7526cd8f80b9ba3460a1d74 (patch)
tree83bd2e2ef70d44c57fa8fd53453aea99067ab10a /src/H5Flow.c
parent96c2b5fec405a2dd4a63b7482a431dfc984523df (diff)
downloadhdf5-1373661a78b7a6d3c7526cd8f80b9ba3460a1d74.zip
hdf5-1373661a78b7a6d3c7526cd8f80b9ba3460a1d74.tar.gz
hdf5-1373661a78b7a6d3c7526cd8f80b9ba3460a1d74.tar.bz2
[svn-r630] Added code to eliminate redundant writes of metadata,
so only proc 0 writes it to disk. The elimination is activated only when the environment variable HDF5_MPI_1_METAWRITE is nonzero; otherwise all processes that opened the file will write the metadata to disk.
Diffstat (limited to 'src/H5Flow.c')
-rw-r--r--src/H5Flow.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/H5Flow.c b/src/H5Flow.c
index eec5714..bd1661a 100644
--- a/src/H5Flow.c
+++ b/src/H5Flow.c
@@ -368,6 +368,7 @@ H5F_low_write(H5F_low_t *lf, const H5F_access_t *access_parms,
* Monday, November 10, 1997
*
* Modifications:
+ * rky 980828 Only p0 writes metadata to disk.
*
*-------------------------------------------------------------------------
*/
@@ -382,14 +383,18 @@ H5F_low_flush(H5F_low_t *lf, const H5F_access_t *access_parms)
assert(lf && lf->type);
/* Make sure the last block of the file has been allocated on disk */
+ /* rky 980828 NOTE
+ * Is this really necessary? Could this be eliminated for MPI-IO files? */
H5F_addr_reset(&last_byte);
if (addr_defined(&(lf->eof)) && H5F_addr_gt(&(lf->eof), &last_byte)) {
last_byte = lf->eof;
last_byte.offset -= 1;
if (H5F_low_read(lf, access_parms, H5D_XFER_DFLT, &last_byte,
1, buf) >= 0) {
- H5F_low_write(lf, access_parms, H5D_XFER_DFLT, &last_byte,
- 1, buf);
+#ifdef HAVE_PARALLEL
+ H5F_mpio_tas_allsame( lf, TRUE ); /* only p0 will write */
+#endif /* HAVE_PARALLEL */
+ H5F_low_write(lf, access_parms, H5D_XFER_DFLT, &last_byte, 1, buf);
}
}
/* Invoke the subclass the flush method */