summaryrefslogtreecommitdiffstats
path: root/src/H5Pint.c
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2016-01-21 22:31:15 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2016-01-21 22:31:15 (GMT)
commit91aeb766fafbc4c03d98699de4cac590df9c63a3 (patch)
treed0ea24a184746c342f198564adb4fe487cf215c9 /src/H5Pint.c
parent8ca4c2f44b60295ab3f757a9a90ac75ff09cb548 (diff)
downloadhdf5-91aeb766fafbc4c03d98699de4cac590df9c63a3.zip
hdf5-91aeb766fafbc4c03d98699de4cac590df9c63a3.tar.gz
hdf5-91aeb766fafbc4c03d98699de4cac590df9c63a3.tar.bz2
[svn-r28950] - remove META_FLUSH_COLLECTIVELY property for delayed sanity checks from metadata dxpls
- remove H5AC_ind_dxpl_id and use only H5AC_dxpl_id everywhere instead. - remove flush_me_collectively flag from cache entries - add a collective sanity check (MPI_Barrier) for every HDF5 API routine that could possibly touch the file. This is trigerred when the environment variable H5_COLL_API_SANITY_CHECK is set to a non 0 digit. tested on BB-8 with serial and parallel.
Diffstat (limited to 'src/H5Pint.c')
-rw-r--r--src/H5Pint.c26
1 files changed, 21 insertions, 5 deletions
diff --git a/src/H5Pint.c b/src/H5Pint.c
index d80e66d..e16379a 100644
--- a/src/H5Pint.c
+++ b/src/H5Pint.c
@@ -30,6 +30,7 @@
/***********/
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
+#include "H5Fprivate.h" /* File access */
#include "H5FLprivate.h" /* Free lists */
#include "H5Iprivate.h" /* IDs */
#include "H5MMprivate.h" /* Memory management */
@@ -273,13 +274,10 @@ const H5P_libclass_t H5P_CLS_TACC[1] = {{
/* Library property list classes defined in other code modules */
H5_DLLVAR const H5P_libclass_t H5P_CLS_OCRT[1]; /* Object creation */
H5_DLLVAR const H5P_libclass_t H5P_CLS_STRCRT[1]; /* String create */
-H5_DLLVAR const H5P_libclass_t H5P_CLS_LACC[1]; /* Link access */
H5_DLLVAR const H5P_libclass_t H5P_CLS_GCRT[1]; /* Group create */
H5_DLLVAR const H5P_libclass_t H5P_CLS_OCPY[1]; /* Object copy */
H5_DLLVAR const H5P_libclass_t H5P_CLS_FCRT[1]; /* File creation */
-H5_DLLVAR const H5P_libclass_t H5P_CLS_FACC[1]; /* File access */
H5_DLLVAR const H5P_libclass_t H5P_CLS_DCRT[1]; /* Dataset creation */
-H5_DLLVAR const H5P_libclass_t H5P_CLS_DACC[1]; /* Dataset access */
H5_DLLVAR const H5P_libclass_t H5P_CLS_DXFR[1]; /* Data transfer */
H5_DLLVAR const H5P_libclass_t H5P_CLS_FMNT[1]; /* File mount */
H5_DLLVAR const H5P_libclass_t H5P_CLS_ACRT[1]; /* Attribute creation */
@@ -5452,8 +5450,10 @@ H5P_get_class(const H5P_genplist_t *plist)
*-------------------------------------------------------------------------
*/
herr_t
-H5P_verify_apl_and_dxpl(hid_t *acspl_id, const H5P_libclass_t *libclass, hid_t *dxpl_id)
+H5P_verify_apl_and_dxpl(hid_t *acspl_id, const H5P_libclass_t *libclass,
+ hid_t *dxpl_id, hid_t loc_id, hbool_t is_collective)
{
+ MPI_Comm mpi_comm;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -5472,7 +5472,23 @@ H5P_verify_apl_and_dxpl(hid_t *acspl_id, const H5P_libclass_t *libclass, hid_t *
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not the required access property list")
} /* end else */
+#ifdef H5_HAVE_PARALLEL
+ /* If parallel is enabled and the file driver used in the MPI-IO
+ VFD, issue an MPI barrier for easier debugging if the API function
+ calling this is supposed to be called collectively. Note that this
+ happens only when the environment variable H5_COLL_BARRIER is set
+ to non 0. */
+ if(is_collective && H5_coll_api_sanity_check_g) {
+ /* retrieve the MPI communicator from the loc_id or the fapl_id */
+ if(H5F_mpi_retrieve_comm(loc_id, *acspl_id, &mpi_comm) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get MPI communicator")
+
+ /* issue the barrier */
+ if(mpi_comm != MPI_COMM_NULL)
+ MPI_Barrier(mpi_comm);
+ }
+#endif /* H5_HAVE_PARALLEL */
+
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5P_verify_apl_and_dxpl() */
-