summaryrefslogtreecommitdiffstats
path: root/src/H5FDmpiposix.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2003-10-28 14:42:24 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2003-10-28 14:42:24 (GMT)
commitf4240b2639ccdd5f0444f7a8892afb6759da9989 (patch)
treee54d6a6fe4752d4f6a2da81e8c141199ea8b04b3 /src/H5FDmpiposix.c
parent47c3791addd6d6ca4fdc39cbb7555d867f4093a0 (diff)
downloadhdf5-f4240b2639ccdd5f0444f7a8892afb6759da9989.zip
hdf5-f4240b2639ccdd5f0444f7a8892afb6759da9989.tar.gz
hdf5-f4240b2639ccdd5f0444f7a8892afb6759da9989.tar.bz2
[svn-r7765] Purpose:
Code cleanup Description: More collective/independent cleanups to straighten out code contortions. Platforms tested: FreeBSD 4.9 (sleipnir) FreeBSD 4.9 (sleipnir) w/parallel Linux 2.4 (verbena) w/fortran & C++ Solaris 2.7 (arabica) w/64-bit extensions enabled
Diffstat (limited to 'src/H5FDmpiposix.c')
-rw-r--r--src/H5FDmpiposix.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/H5FDmpiposix.c b/src/H5FDmpiposix.c
index 735ea5f..2625208 100644
--- a/src/H5FDmpiposix.c
+++ b/src/H5FDmpiposix.c
@@ -1264,7 +1264,6 @@ H5FD_mpiposix_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
int mpi_code; /* MPI return code */
ssize_t nbytes; /* Number of bytes written each I/O call */
H5P_genplist_t *plist; /* Property list pointer */
- unsigned block_before_meta_write=0; /* Whether to block before a metadata write */
herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5FD_mpiposix_write, FAIL)
@@ -1289,11 +1288,17 @@ H5FD_mpiposix_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
/* Metadata specific actions */
if(type!=H5FD_MEM_DRAW) {
+ unsigned block_before_meta_write=0; /* Whether to block before a metadata write */
+
/* Check if we need to syncronize all processes before attempting metadata write
* (Prevents race condition where the process writing the metadata goes ahead
* and writes the metadata to the file before all the processes have
* read the data, "transmitting" data from the "future" to the reading
* process. -QAK )
+ *
+ * The only time we don't want to block before a metadata write is when
+ * we are flushing out a bunch of metadata. Then, we block before the
+ * first write and don't block for further writes in the sequence.
*/
if(H5P_exist_plist(plist,H5AC_BLOCK_BEFORE_META_WRITE_NAME)>0)
if(H5P_get(plist,H5AC_BLOCK_BEFORE_META_WRITE_NAME,&block_before_meta_write)<0)