diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2003-10-28 14:42:31 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2003-10-28 14:42:31 (GMT) |
commit | a47a65885a726e960a11eddbf9c73bfa2b054d11 (patch) | |
tree | 532bc6fd6340006747d0e922db1bb133ef914f8d /src/H5FDmpiposix.c | |
parent | 1e7b213aa26cd2b7c2b23891c2759b2e60166d70 (diff) | |
download | hdf5-a47a65885a726e960a11eddbf9c73bfa2b054d11.zip hdf5-a47a65885a726e960a11eddbf9c73bfa2b054d11.tar.gz hdf5-a47a65885a726e960a11eddbf9c73bfa2b054d11.tar.bz2 |
[svn-r7766] 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.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/H5FDmpiposix.c b/src/H5FDmpiposix.c index a56a18d..4920ade 100644 --- a/src/H5FDmpiposix.c +++ b/src/H5FDmpiposix.c @@ -1379,7 +1379,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); @@ -1404,11 +1403,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) |