summaryrefslogtreecommitdiffstats
path: root/src/H5AC.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/H5AC.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/H5AC.c')
-rw-r--r--src/H5AC.c64
1 files changed, 13 insertions, 51 deletions
diff --git a/src/H5AC.c b/src/H5AC.c
index 34e291d..41fb78d 100644
--- a/src/H5AC.c
+++ b/src/H5AC.c
@@ -76,22 +76,13 @@ static herr_t H5AC__ext_config_2_int_config(H5AC_cache_config_t *ext_conf_ptr,
/* Package initialization variable */
hbool_t H5_PKG_INIT_VAR = FALSE;
-
/*****************************/
/* Library Private Variables */
/*****************************/
/* Default dataset transfer property list for metadata I/O calls */
-/* (Collective set, "block before metadata write" set and "library internal" set) */
-/* (Global variable definition, declaration is in H5ACprivate.h also) */
hid_t H5AC_dxpl_id = (-1);
-
-/* Dataset transfer property list for independent metadata I/O calls */
-/* (just "library internal" set - i.e. independent transfer mode) */
-/* (Global variable definition, declaration is in H5ACprivate.h also) */
-H5P_genplist_t *H5AC_ind_dxpl_g = NULL;
-hid_t H5AC_ind_dxpl_id = (-1);
-
+hbool_t H5_coll_api_sanity_check_g = false;
/*******************/
/* Local Variables */
@@ -172,55 +163,27 @@ done:
herr_t
H5AC__init_package(void)
{
-#ifdef H5_HAVE_PARALLEL
- H5P_genplist_t *xfer_plist; /* Dataset transfer property list object */
- unsigned coll_meta_write; /* "collective metadata write" property value */
-#endif /* H5_HAVE_PARALLEL */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
#ifdef H5_HAVE_PARALLEL
- /* Sanity check */
- HDassert(H5P_CLS_DATASET_XFER_g != NULL);
-
- /* Get an ID for the collective H5AC dxpl */
+ /* Get an ID for the metadata (H5AC) dxpl */
if((H5AC_dxpl_id = H5P_create_id(H5P_CLS_DATASET_XFER_g, FALSE)) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTCREATE, FAIL, "unable to register property list")
- /* Get the property list object */
- if(NULL == (xfer_plist = (H5P_genplist_t *)H5I_object(H5AC_dxpl_id)))
- HGOTO_ERROR(H5E_CACHE, H5E_BADATOM, FAIL, "can't get new property list object")
+ /* check whether to enable strict collective function calling
+ sanity checks using MPI barriers */
+ {
+ const char *s; /* String for environment variables */
- /* Insert 'collective metadata write' property */
- coll_meta_write = 1;
- if(H5P_insert(xfer_plist, H5AC_COLLECTIVE_META_WRITE_NAME, H5AC_COLLECTIVE_META_WRITE_SIZE, &coll_meta_write,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
- HGOTO_ERROR(H5E_CACHE, H5E_CANTSET, FAIL, "can't insert metadata cache dxpl property")
-
- /* Get an ID for the independent H5AC dxpl */
- if((H5AC_ind_dxpl_id = H5P_create_id(H5P_CLS_DATASET_XFER_g, FALSE)) < 0)
- HGOTO_ERROR(H5E_CACHE, H5E_CANTCREATE, FAIL, "unable to register property list")
-
- /* Get the property list object */
- if(NULL == (H5AC_ind_dxpl_g = (H5P_genplist_t *)H5I_object(H5AC_ind_dxpl_id)))
- HGOTO_ERROR(H5E_CACHE, H5E_BADATOM, FAIL, "can't get new property list object")
-
- /* Insert 'collective metadata write' property */
- coll_meta_write = 0;
- if(H5P_insert(H5AC_ind_dxpl_g, H5AC_COLLECTIVE_META_WRITE_NAME, H5AC_COLLECTIVE_META_WRITE_SIZE, &coll_meta_write,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
- HGOTO_ERROR(H5E_CACHE, H5E_CANTSET, FAIL, "can't insert metadata cache dxpl property")
+ s = HDgetenv("H5_COLL_API_SANITY_CHECK");
+ if(s && HDisdigit(*s)) {
+ H5_coll_api_sanity_check_g = (hbool_t)HDstrtol(s, NULL, 0);
+ }
+ }
#else /* H5_HAVE_PARALLEL */
- /* Sanity check */
- HDassert(H5P_LST_DATASET_XFER_ID_g!=(-1));
-
H5AC_dxpl_id = H5P_DATASET_XFER_DEFAULT;
- H5AC_ind_dxpl_id = H5P_DATASET_XFER_DEFAULT;
-
- /* Get the property list objects for the IDs */
- if(NULL == (H5AC_ind_dxpl_g = (H5P_genplist_t *)H5I_object(H5AC_ind_dxpl_id)))
- HGOTO_ERROR(H5E_CACHE, H5E_BADATOM, FAIL, "can't get property list object")
#endif /* H5_HAVE_PARALLEL */
done:
@@ -251,19 +214,18 @@ H5AC_term_package(void)
if(H5_PKG_INIT_VAR) {
#ifdef H5_HAVE_PARALLEL
- if(H5AC_dxpl_id > 0 || H5AC_ind_dxpl_id > 0) {
+ if(H5AC_dxpl_id > 0) {
/* Indicate more work to do */
n = 1; /* H5I */
/* Close H5AC dxpl */
- if(H5I_dec_ref(H5AC_dxpl_id) < 0 || H5I_dec_ref(H5AC_ind_dxpl_id) < 0)
+ if(H5I_dec_ref(H5AC_dxpl_id) < 0)
H5E_clear_stack(NULL); /*ignore error*/
} /* end if */
#endif /* H5_HAVE_PARALLEL */
/* Reset static IDs */
H5AC_dxpl_id = (-1);
- H5AC_ind_dxpl_id = (-1);
/* Reset interface initialization flag */
if(0 == n)