diff options
author | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2016-02-11 16:03:44 (GMT) |
---|---|---|
committer | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2016-02-11 16:03:44 (GMT) |
commit | d12a99498608fc23f61ec89ad56e61256428c3e6 (patch) | |
tree | 74718433b64004a430e7310b781df75a997628be /src | |
parent | fba3bbc7bf8e444155a7029f5ac82e1e513eadcc (diff) | |
download | hdf5-d12a99498608fc23f61ec89ad56e61256428c3e6.zip hdf5-d12a99498608fc23f61ec89ad56e61256428c3e6.tar.gz hdf5-d12a99498608fc23f61ec89ad56e61256428c3e6.tar.bz2 |
[svn-r29088] - Add a test for retrieving the property values for the new coll md functions.
- ifdef some code that don't need to be built in parallel
- more minor enhancements
tested on bb-8 with parallel and serial
Diffstat (limited to 'src')
-rw-r--r-- | src/H5Fint.c | 2 | ||||
-rw-r--r-- | src/H5Pfapl.c | 10 | ||||
-rw-r--r-- | src/H5Plapl.c | 7 |
3 files changed, 15 insertions, 4 deletions
diff --git a/src/H5Fint.c b/src/H5Fint.c index 2eb8ab0..1c29fee 100644 --- a/src/H5Fint.c +++ b/src/H5Fint.c @@ -175,6 +175,8 @@ H5F_get_access_plist(H5F_t *f, hbool_t app_ref) #ifdef H5_HAVE_PARALLEL if(H5P_set(new_plist, H5_COLL_MD_READ_FLAG_NAME, &(f->coll_md_read)) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't set collective metadata read flag") + if(H5P_set(new_plist, H5F_ACS_COLL_MD_WRITE_FLAG_NAME, &(f->coll_md_write)) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't set collective metadata read flag") #endif /* H5_HAVE_PARALLEL */ /* Prepare the driver property */ diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c index 43f0574..0010c15 100644 --- a/src/H5Pfapl.c +++ b/src/H5Pfapl.c @@ -178,6 +178,7 @@ #define H5F_ACS_CORE_WRITE_TRACKING_PAGE_SIZE_DEF 524288 #define H5F_ACS_CORE_WRITE_TRACKING_PAGE_SIZE_ENC H5P__encode_size_t #define H5F_ACS_CORE_WRITE_TRACKING_PAGE_SIZE_DEC H5P__decode_size_t +#ifdef H5_HAVE_PARALLEL /* Definition of collective metadata read mode flag */ #define H5F_ACS_COLL_MD_READ_FLAG_SIZE sizeof(H5P_coll_md_read_flag_t) #define H5F_ACS_COLL_MD_READ_FLAG_DEF H5P_USER_FALSE @@ -188,7 +189,7 @@ #define H5F_ACS_COLL_MD_WRITE_FLAG_DEF FALSE #define H5F_ACS_COLL_MD_WRITE_FLAG_ENC H5P__encode_hbool_t #define H5F_ACS_COLL_MD_WRITE_FLAG_DEC H5P__decode_hbool_t - +#endif /* H5_HAVE_PARALLEL */ /******************/ /* Local Typedefs */ @@ -291,9 +292,10 @@ static const unsigned H5F_def_efc_size_g = H5F_ACS_EFC_SIZE_DEF; static const H5FD_file_image_info_t H5F_def_file_image_info_g = H5F_ACS_FILE_IMAGE_INFO_DEF; /* Default file image info and callbacks */ static const hbool_t H5F_def_core_write_tracking_flag_g = H5F_ACS_CORE_WRITE_TRACKING_FLAG_DEF; /* Default setting for core VFD write tracking */ static const size_t H5F_def_core_write_tracking_page_size_g = H5F_ACS_CORE_WRITE_TRACKING_PAGE_SIZE_DEF; /* Default core VFD write tracking page size */ +#ifdef H5_HAVE_PARALLEL static const H5P_coll_md_read_flag_t H5F_def_coll_md_read_flag_g = H5F_ACS_COLL_MD_READ_FLAG_DEF; /* Default setting for the collective metedata read flag */ static const hbool_t H5F_def_coll_md_write_flag_g = H5F_ACS_COLL_MD_WRITE_FLAG_DEF; /* Default setting for the collective metedata write flag */ - +#endif /* H5_HAVE_PARALLEL */ /*------------------------------------------------------------------------- @@ -450,6 +452,7 @@ H5P__facc_reg_prop(H5P_genclass_t *pclass) NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") +#ifdef H5_HAVE_PARALLEL /* Register the metadata collective read flag */ if(H5P_register_real(pclass, H5_COLL_MD_READ_FLAG_NAME, H5F_ACS_COLL_MD_READ_FLAG_SIZE, &H5F_def_coll_md_read_flag_g, NULL, NULL, NULL, H5F_ACS_COLL_MD_READ_FLAG_ENC, H5F_ACS_COLL_MD_READ_FLAG_DEC, @@ -461,6 +464,7 @@ H5P__facc_reg_prop(H5P_genclass_t *pclass) NULL, NULL, NULL, H5F_ACS_COLL_MD_WRITE_FLAG_ENC, H5F_ACS_COLL_MD_WRITE_FLAG_DEC, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") +#endif /* H5_HAVE_PARALLEL */ done: FUNC_LEAVE_NOAPI(ret_value) @@ -3506,6 +3510,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Pget_core_write_tracking() */ +#ifdef H5_HAVE_PARALLEL /*------------------------------------------------------------------------- * Function: H5P__encode_coll_md_read_flag_t @@ -3578,7 +3583,6 @@ H5P__decode_coll_md_read_flag_t(const void **_pp, void *_value) FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5P__decode_coll_md_read_flag_t() */ -#ifdef H5_HAVE_PARALLEL /*------------------------------------------------------------------------- * Function: H5Pset_all_coll_metadata_ops diff --git a/src/H5Plapl.c b/src/H5Plapl.c index 6cb2149..f725435 100644 --- a/src/H5Plapl.c +++ b/src/H5Plapl.c @@ -88,12 +88,13 @@ #define H5L_ACS_ELINK_CB_SIZE sizeof(H5L_elink_cb_t) #define H5L_ACS_ELINK_CB_DEF {NULL,NULL} +#ifdef H5_HAVE_PARALLEL /* Definition for reading metadata collectively */ #define H5L_ACS_COLL_MD_READ_SIZE sizeof(H5P_coll_md_read_flag_t) #define H5L_ACS_COLL_MD_READ_DEF H5P_USER_FALSE #define H5L_ACS_COLL_MD_READ_ENC H5P__encode_coll_md_read_flag_t #define H5L_ACS_COLL_MD_READ_DEC H5P__decode_coll_md_read_flag_t - +#endif /* H5_HAVE_PARALLEL */ /******************/ /* Local Typedefs */ @@ -170,7 +171,9 @@ static const char *H5L_def_elink_prefix_g = H5L_ACS_ELINK_PREFIX_DEF; /* Default static const hid_t H5L_def_fapl_id_g = H5L_ACS_ELINK_FAPL_DEF; /* Default fapl for external link access */ static const unsigned H5L_def_elink_flags_g = H5L_ACS_ELINK_FLAGS_DEF; /* Default file access flags for external link traversal */ static const H5L_elink_cb_t H5L_def_elink_cb_g = H5L_ACS_ELINK_CB_DEF; /* Default external link traversal callback */ +#ifdef H5_HAVE_PARALLEL static const H5P_coll_md_read_flag_t H5L_def_coll_md_read_g = H5L_ACS_COLL_MD_READ_DEF; /* Default setting for the collective metedata read flag */ +#endif /* H5_HAVE_PARALLEL */ /*------------------------------------------------------------------------- @@ -222,11 +225,13 @@ H5P__lacc_reg_prop(H5P_genclass_t *pclass) NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") +#ifdef H5_HAVE_PARALLEL /* Register the metadata collective read flag */ if(H5P_register_real(pclass, H5_COLL_MD_READ_FLAG_NAME, H5L_ACS_COLL_MD_READ_SIZE, &H5L_def_coll_md_read_g, NULL, NULL, NULL, H5L_ACS_COLL_MD_READ_ENC, H5L_ACS_COLL_MD_READ_DEC, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") +#endif /* H5_HAVE_PARALLEL */ done: FUNC_LEAVE_NOAPI(ret_value) |