mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-01-18 15:15:56 +08:00
[svn-r716] Added barrier to H5F_istore_allocate to preclude racing with data writes.
This commit is contained in:
parent
5fcf0dc22e
commit
0db7facffe
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user