summaryrefslogtreecommitdiffstats
path: root/src/H5Fistore.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Fistore.c')
-rw-r--r--src/H5Fistore.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/H5Fistore.c b/src/H5Fistore.c
index 3a54612..dcd1d35 100644
--- a/src/H5Fistore.c
+++ b/src/H5Fistore.c
@@ -1998,6 +1998,9 @@ H5F_istore_get_addr (H5F_t *f, const H5O_layout_t *layout,
*
* Modifications:
*
+ * rky 980923
+ * Added barrier to preclude racing with data writes.
+ *
*-------------------------------------------------------------------------
*/
herr_t
@@ -2092,6 +2095,20 @@ H5F_istore_allocate (H5F_t *f, const H5O_layout_t *layout,
if (carry) break;
}
+ /*
+ * rky 980923
+ * The following barrier is a temporary fix to prevent overwriting
+ * real data caused by a race between one proc's call of H5F_istore_allocate
+ * (from H5D_allocate, ultimately from H5Dcreate and H5Dextend)
+ * and another proc's call of H5Dwrite.
+ * Eventually, this barrier should be removed,
+ * when H5D_allocate is changed to call H5MF_alloc directly
+ * to allocate space, instead of calling H5F_istore_unlock.
+ */
+ if (MPI_Barrier( f->shared->access_parms->u.mpio.comm )) {
+ HRETURN_ERROR(H5E_INTERNAL, H5E_MPI, FAIL, "MPI_Barrier failed");
+ }
+
FUNC_LEAVE(SUCCEED);
}
#endif