summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/H5D.c2
-rw-r--r--src/H5Ddeprec.c4
-rw-r--r--src/H5F.c1
-rw-r--r--src/H5L.c2
-rw-r--r--src/H5Lexternal.c25
-rw-r--r--src/H5O.c12
-rw-r--r--src/H5Ocopy.c7
-rw-r--r--src/H5Oprivate.h2
-rw-r--r--src/H5Pint.c44
-rw-r--r--src/H5R.c13
10 files changed, 59 insertions, 53 deletions
diff --git a/src/H5D.c b/src/H5D.c
index 4dccd0d..bcc2888 100644
--- a/src/H5D.c
+++ b/src/H5D.c
@@ -910,7 +910,7 @@ H5Dset_extent(hid_t dset_id, const hsize_t size[])
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no size specified")
/* Private function */
- if(H5D__set_extent(dset, size, H5AC_coll_read_dxpl_id) < 0)
+ if(H5D__set_extent(dset, size, H5AC_dxpl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to set extend dataset")
done:
diff --git a/src/H5Ddeprec.c b/src/H5Ddeprec.c
index f0f4472..1753917 100644
--- a/src/H5Ddeprec.c
+++ b/src/H5Ddeprec.c
@@ -180,8 +180,6 @@ H5Dopen1(hid_t loc_id, const char *name)
{
H5D_t *dset = NULL;
H5G_loc_t loc; /* Object location of group */
- hid_t dapl_id = H5P_DATASET_ACCESS_DEFAULT; /* dapl to use to open dataset */
- hid_t dxpl_id = H5AC_dxpl_id; /* dxpl to use to open datset */
hid_t ret_value;
FUNC_ENTER_API(FAIL)
@@ -194,7 +192,7 @@ H5Dopen1(hid_t loc_id, const char *name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name")
/* Open the dataset */
- if(NULL == (dset = H5D__open_name(&loc, name, dapl_id, dxpl_id)))
+ if(NULL == (dset = H5D__open_name(&loc, name, H5P_DATASET_ACCESS_DEFAULT, H5AC_dxpl_id)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open dataset")
/* Register an atom for the dataset */
diff --git a/src/H5F.c b/src/H5F.c
index 0cbd212..6c34e40 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -472,7 +472,6 @@ H5Fcreate(const char *filename, unsigned flags, hid_t fcpl_id, hid_t fapl_id)
if(TRUE != H5P_isa_class(fcpl_id, H5P_FILE_CREATE))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not file create property list")
-
/* Verify access property list and get correct dxpl */
if(H5P_verify_apl_and_dxpl(&fapl_id, H5P_CLS_FACC, &dxpl_id, H5I_INVALID_HID, TRUE) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't set access and transfer property lists")
diff --git a/src/H5L.c b/src/H5L.c
index efe16aa..dd04990 100644
--- a/src/H5L.c
+++ b/src/H5L.c
@@ -717,7 +717,7 @@ H5Ldelete_by_idx(hid_t loc_id, const char *group_name,
udata.idx_type = idx_type;
udata.order = order;
udata.n = n;
- udata.dxpl_id = H5AC_dxpl_id;
+ udata.dxpl_id = dxpl_id;
/* Traverse the group hierarchy to remove the link */
if(H5G_traverse(&loc, group_name, H5G_TARGET_SLINK|H5G_TARGET_UDLINK|H5G_TARGET_MOUNT,
diff --git a/src/H5Lexternal.c b/src/H5Lexternal.c
index 732eb7b..5d4cb21 100644
--- a/src/H5Lexternal.c
+++ b/src/H5Lexternal.c
@@ -222,6 +222,7 @@ H5L_extern_traverse(const char H5_ATTR_UNUSED *link_name, hid_t cur_group,
char *actual_file_name = NULL; /* Parent file's actual name */
H5P_genplist_t *fa_plist; /* File access property list pointer */
H5F_close_degree_t fc_degree = H5F_CLOSE_WEAK; /* File close degree for target file */
+ hid_t dxpl_id = H5AC_dxpl_id; /* dxpl used by library */
hid_t ret_value = H5I_INVALID_HID; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -245,6 +246,10 @@ H5L_extern_traverse(const char H5_ATTR_UNUSED *link_name, hid_t cur_group,
if(NULL == (plist = H5P_object_verify(lapl_id, H5P_LINK_ACCESS)))
HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID")
+ /* Verify access property list and get correct dxpl */
+ if(H5P_verify_apl_and_dxpl(&lapl_id, H5P_CLS_LACC, &dxpl_id, cur_group, FALSE) < 0)
+ HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access and transfer property lists")
+
/* Get the fapl_id set for lapl_id if any */
if(H5P_get(plist, H5L_ACS_ELINK_FAPL_NAME, &fapl_id) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get fapl for links")
@@ -282,7 +287,7 @@ H5L_extern_traverse(const char H5_ATTR_UNUSED *link_name, hid_t cur_group,
parent_file_name = H5F_OPEN_NAME(loc.oloc->file);
/* Query length of parent group name */
- if((group_name_len = H5G_get_name(&loc, NULL, (size_t) 0, NULL, lapl_id, H5AC_dxpl_id)) < 0)
+ if((group_name_len = H5G_get_name(&loc, NULL, (size_t) 0, NULL, lapl_id, dxpl_id)) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to retrieve length of group name")
/* Account for null terminator */
@@ -297,7 +302,7 @@ H5L_extern_traverse(const char H5_ATTR_UNUSED *link_name, hid_t cur_group,
parent_group_name = local_group_name;
/* Get parent group name */
- if(H5G_get_name(&loc, parent_group_name, (size_t) group_name_len, NULL, lapl_id, H5AC_dxpl_id) < 0)
+ if(H5G_get_name(&loc, parent_group_name, (size_t) group_name_len, NULL, lapl_id, dxpl_id) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to retrieve group name")
/* Make callback */
@@ -328,7 +333,7 @@ H5L_extern_traverse(const char H5_ATTR_UNUSED *link_name, hid_t cur_group,
/* target file_name is an absolute pathname: see RM for detailed description */
if(H5_CHECK_ABSOLUTE(file_name) || H5_CHECK_ABS_PATH(file_name)) {
/* Try opening file */
- if(NULL == (ext_file = H5F_efc_open(loc.oloc->file, file_name, intent, H5P_FILE_CREATE_DEFAULT, fapl_id, H5AC_dxpl_id))) {
+ if(NULL == (ext_file = H5F_efc_open(loc.oloc->file, file_name, intent, H5P_FILE_CREATE_DEFAULT, fapl_id, dxpl_id))) {
char *ptr;
H5E_clear_stack(NULL);
@@ -347,7 +352,7 @@ H5L_extern_traverse(const char H5_ATTR_UNUSED *link_name, hid_t cur_group,
} /* end if */
else if(H5_CHECK_ABS_DRIVE(file_name)) {
/* Try opening file */
- if(NULL == (ext_file = H5F_efc_open(loc.oloc->file, file_name, intent, H5P_FILE_CREATE_DEFAULT, fapl_id, H5AC_dxpl_id))) {
+ if(NULL == (ext_file = H5F_efc_open(loc.oloc->file, file_name, intent, H5P_FILE_CREATE_DEFAULT, fapl_id, dxpl_id))) {
H5E_clear_stack(NULL);
@@ -377,7 +382,7 @@ H5L_extern_traverse(const char H5_ATTR_UNUSED *link_name, hid_t cur_group,
HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't prepend prefix to filename")
} /* end if */
- ext_file = H5F_efc_open(loc.oloc->file, full_name, intent, H5P_FILE_CREATE_DEFAULT, fapl_id, H5AC_dxpl_id);
+ ext_file = H5F_efc_open(loc.oloc->file, full_name, intent, H5P_FILE_CREATE_DEFAULT, fapl_id, dxpl_id);
full_name = (char *)H5MM_xfree(full_name);
if(ext_file != NULL)
break;
@@ -395,7 +400,7 @@ H5L_extern_traverse(const char H5_ATTR_UNUSED *link_name, hid_t cur_group,
if(my_prefix) {
if(H5L_build_name(my_prefix, temp_file_name, &full_name/*out*/) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't prepend prefix to filename")
- if(NULL == (ext_file = H5F_efc_open(loc.oloc->file, full_name, intent, H5P_FILE_CREATE_DEFAULT, fapl_id, H5AC_dxpl_id)))
+ if(NULL == (ext_file = H5F_efc_open(loc.oloc->file, full_name, intent, H5P_FILE_CREATE_DEFAULT, fapl_id, dxpl_id)))
H5E_clear_stack(NULL);
full_name = (char *)H5MM_xfree(full_name);
} /* end if */
@@ -408,7 +413,7 @@ H5L_extern_traverse(const char H5_ATTR_UNUSED *link_name, hid_t cur_group,
if(NULL != (extpath = H5F_EXTPATH(loc.oloc->file))) {
if(H5L_build_name(extpath, temp_file_name, &full_name/*out*/) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't prepend prefix to filename")
- if(NULL == (ext_file = H5F_efc_open(loc.oloc->file, full_name, intent, H5P_FILE_CREATE_DEFAULT, fapl_id, H5AC_dxpl_id)))
+ if(NULL == (ext_file = H5F_efc_open(loc.oloc->file, full_name, intent, H5P_FILE_CREATE_DEFAULT, fapl_id, dxpl_id)))
H5E_clear_stack(NULL);
full_name = (char *)H5MM_xfree(full_name);
} /* end if */
@@ -416,7 +421,7 @@ H5L_extern_traverse(const char H5_ATTR_UNUSED *link_name, hid_t cur_group,
/* try the relative file_name stored in temp_file_name */
if(ext_file == NULL) {
- if(NULL == (ext_file = H5F_efc_open(loc.oloc->file, temp_file_name, intent, H5P_FILE_CREATE_DEFAULT, fapl_id, H5AC_dxpl_id)))
+ if(NULL == (ext_file = H5F_efc_open(loc.oloc->file, temp_file_name, intent, H5P_FILE_CREATE_DEFAULT, fapl_id, dxpl_id)))
H5E_clear_stack(NULL);
} /* end if */
@@ -443,7 +448,7 @@ H5L_extern_traverse(const char H5_ATTR_UNUSED *link_name, hid_t cur_group,
HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't prepend prefix to filename")
/* Try opening with the resolved name */
- if(NULL == (ext_file = H5F_efc_open(loc.oloc->file, full_name, intent, H5P_FILE_CREATE_DEFAULT, fapl_id, H5AC_dxpl_id)))
+ if(NULL == (ext_file = H5F_efc_open(loc.oloc->file, full_name, intent, H5P_FILE_CREATE_DEFAULT, fapl_id, dxpl_id)))
HGOTO_ERROR(H5E_LINK, H5E_CANTOPENFILE, FAIL, "unable to open external file, external link file name = '%s', temp_file_name = '%s'", file_name, temp_file_name)
full_name = (char *)H5MM_xfree(full_name);
} /* end if */
@@ -454,7 +459,7 @@ H5L_extern_traverse(const char H5_ATTR_UNUSED *link_name, hid_t cur_group,
HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "unable to create location for file")
/* Open the object referenced in the external file */
- if((ext_obj = H5O_open_name(&root_loc, obj_name, lapl_id, FALSE)) < 0)
+ if((ext_obj = H5O_open_name(&root_loc, obj_name, lapl_id, dxpl_id, FALSE)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open object")
/* Set return value */
diff --git a/src/H5O.c b/src/H5O.c
index b22528a..dfcfee9 100644
--- a/src/H5O.c
+++ b/src/H5O.c
@@ -231,6 +231,7 @@ hid_t
H5Oopen(hid_t loc_id, const char *name, hid_t lapl_id)
{
H5G_loc_t loc;
+ hid_t dxpl_id = H5AC_dxpl_id; /* dxpl used by library */
hid_t ret_value = FAIL;
FUNC_ENTER_API(FAIL)
@@ -242,8 +243,12 @@ H5Oopen(hid_t loc_id, const char *name, hid_t lapl_id)
if(!name || !*name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name")
+ /* Verify access property list and get correct dxpl */
+ if(H5P_verify_apl_and_dxpl(&lapl_id, H5P_CLS_LACC, &dxpl_id, loc_id, FALSE) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access and transfer property lists")
+
/* Open the object */
- if((ret_value = H5O_open_name(&loc, name, lapl_id, TRUE)) < 0)
+ if((ret_value = H5O_open_name(&loc, name, lapl_id, dxpl_id, TRUE)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, FAIL, "unable to open object")
done:
@@ -724,7 +729,7 @@ H5Oget_info_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type,
loc_found = TRUE;
/* Retrieve the object's information */
- if(H5O_get_info(obj_loc.oloc, H5AC_dxpl_id, TRUE, oinfo) < 0)
+ if(H5O_get_info(obj_loc.oloc, dxpl_id, TRUE, oinfo) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't retrieve object info")
done:
@@ -1345,13 +1350,12 @@ done:
*-------------------------------------------------------------------------
*/
hid_t
-H5O_open_name(H5G_loc_t *loc, const char *name, hid_t lapl_id, hbool_t app_ref)
+H5O_open_name(H5G_loc_t *loc, const char *name, hid_t lapl_id, hid_t dxpl_id, hbool_t app_ref)
{
H5G_loc_t obj_loc; /* Location used to open group */
H5G_name_t obj_path; /* Opened object group hier. path */
H5O_loc_t obj_oloc; /* Opened object object location */
hbool_t loc_found = FALSE; /* Entry at 'name' found */
- hid_t dxpl_id = H5AC_dxpl_id; /* dxpl used by library */
hid_t ret_value = FAIL;
FUNC_ENTER_NOAPI(FAIL)
diff --git a/src/H5Ocopy.c b/src/H5Ocopy.c
index 2bb7a36..0abe69d 100644
--- a/src/H5Ocopy.c
+++ b/src/H5Ocopy.c
@@ -216,6 +216,7 @@ H5Ocopy(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id,
htri_t dst_exists; /* Does destination name exist already? */
hbool_t loc_found = FALSE; /* Location at 'name' found */
hbool_t obj_open = FALSE; /* Entry at 'name' found */
+ hid_t dxpl_id = H5AC_dxpl_id; /* dxpl used by library */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -233,7 +234,7 @@ H5Ocopy(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id,
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no destination name specified")
/* check if destination name already exists */
- if((dst_exists = H5L_exists_tolerant(&dst_loc, dst_name, H5P_DEFAULT, H5AC_dxpl_id)) < 0)
+ if((dst_exists = H5L_exists_tolerant(&dst_loc, dst_name, H5P_DEFAULT, dxpl_id)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to check if destination name exists")
if(TRUE == dst_exists)
HGOTO_ERROR(H5E_OHDR, H5E_EXISTS, FAIL, "destination object already exists")
@@ -244,7 +245,7 @@ H5Ocopy(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id,
H5G_loc_reset(&src_loc);
/* Find the source object to copy */
- if(H5G_loc_find(&loc, src_name, &src_loc/*out*/, H5P_DEFAULT, H5AC_dxpl_id) < 0)
+ if(H5G_loc_find(&loc, src_name, &src_loc/*out*/, H5P_DEFAULT, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "source object not found")
loc_found = TRUE;
@@ -270,7 +271,7 @@ H5Ocopy(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id,
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not object copy property list")
/* Do the actual copying of the object */
- if(H5O_copy_obj(&src_loc, &dst_loc, dst_name, ocpypl_id, lcpl_id, H5AC_dxpl_id) < 0)
+ if(H5O_copy_obj(&src_loc, &dst_loc, dst_name, ocpypl_id, lcpl_id, dxpl_id) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object")
done:
diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h
index 9235d6c..4ce8e59 100644
--- a/src/H5Oprivate.h
+++ b/src/H5Oprivate.h
@@ -763,7 +763,7 @@ H5_DLL herr_t H5O_get_info(const H5O_loc_t *oloc, hid_t dxpl_id, hbool_t want_ih
H5O_info_t *oinfo);
H5_DLL herr_t H5O_obj_type(const H5O_loc_t *loc, H5O_type_t *obj_type, hid_t dxpl_id);
H5_DLL herr_t H5O_get_create_plist(const H5O_loc_t *loc, hid_t dxpl_id, struct H5P_genplist_t *oc_plist);
-H5_DLL hid_t H5O_open_name(H5G_loc_t *loc, const char *name, hid_t lapl_id, hbool_t app_ref);
+H5_DLL hid_t H5O_open_name(H5G_loc_t *loc, const char *name, hid_t lapl_id, hid_t dxpl_id, hbool_t app_ref);
H5_DLL herr_t H5O_get_nlinks(const H5O_loc_t *loc, hid_t dxpl_id, hsize_t *nlinks);
H5_DLL void *H5O_obj_create(H5F_t *f, H5O_type_t obj_type, void *crt_info, H5G_loc_t *obj_loc, hid_t dxpl_id);
H5_DLL haddr_t H5O_get_oh_addr(const H5O_t *oh);
diff --git a/src/H5Pint.c b/src/H5Pint.c
index 12582bb..3c145c5 100644
--- a/src/H5Pint.c
+++ b/src/H5Pint.c
@@ -5463,12 +5463,31 @@ H5P_verify_apl_and_dxpl(hid_t *acspl_id, const H5P_libclass_t *libclass, hid_t *
HDassert(libclass);
HDassert(dxpl_id);
+#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) {
+ MPI_Comm mpi_comm; /* file communicator */
+
+ /* 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 */
+
/* Set access plist to the default property list of the appropriate class if it's the generic default */
if(H5P_DEFAULT == *acspl_id)
*acspl_id = *libclass->def_plist_id;
else {
#ifdef H5_HAVE_PARALLEL
- H5P_coll_md_read_flag_t is_collective; /* Collective metadata read flag */
+ H5P_coll_md_read_flag_t md_coll_read; /* Collective metadata read flag */
H5P_genplist_t *plist; /* Property list pointer */
#endif /* H5_HAVE_PARALLEL */
@@ -5484,34 +5503,15 @@ H5P_verify_apl_and_dxpl(hid_t *acspl_id, const H5P_libclass_t *libclass, hid_t *
HGOTO_ERROR(H5E_PLIST, H5E_BADATOM, FAIL, "can't find object for ID")
/* Get the collective metadata read flag */
- if(H5P_peek(plist, H5_COLL_MD_READ_FLAG_NAME, &is_collective) < 0)
+ if(H5P_peek(plist, H5_COLL_MD_READ_FLAG_NAME, &md_coll_read) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get core collective metadata read flag")
/* If collective metadata read requested and using internal DXPL, switch to internal collective DXPL */
- if(H5P_USER_TRUE == is_collective)
+ if(H5P_USER_TRUE == md_coll_read)
*dxpl_id = H5AC_coll_read_dxpl_id;
#endif /* H5_HAVE_PARALLEL */
} /* 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) {
- MPI_Comm mpi_comm; /* file communicator */
-
- /* 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() */
diff --git a/src/H5R.c b/src/H5R.c
index 04d61cd..f0aafc3 100644
--- a/src/H5R.c
+++ b/src/H5R.c
@@ -541,12 +541,6 @@ H5R_dereference(H5F_t *file, hid_t oapl_id, hid_t dxpl_id, H5R_type_t ref_type,
{
H5D_t *dset; /* Pointer to dataset to open */
- /* Get correct property list */
- if(H5P_DEFAULT == oapl_id)
- oapl_id = H5P_DATASET_ACCESS_DEFAULT;
- else if(TRUE != H5P_isa_class(oapl_id, H5P_DATASET_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not dataset access property list")
-
/* Open the dataset */
if(NULL == (dset = H5D_open(&loc, oapl_id, dxpl_id)))
HGOTO_ERROR(H5E_DATASET, H5E_NOTFOUND, FAIL, "not found")
@@ -602,6 +596,7 @@ H5Rdereference2(hid_t obj_id, hid_t oapl_id, H5R_type_t ref_type, const void *_r
{
H5G_loc_t loc; /* Group location */
H5F_t *file = NULL; /* File object */
+ hid_t dxpl_id = H5AC_dxpl_id; /* dxpl used by library */
hid_t ret_value;
FUNC_ENTER_API(FAIL)
@@ -616,12 +611,16 @@ H5Rdereference2(hid_t obj_id, hid_t oapl_id, H5R_type_t ref_type, const void *_r
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid reference type")
if(_ref == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid reference pointer")
+
+ /* Verify access property list and get correct dxpl */
+ if(H5P_verify_apl_and_dxpl(&oapl_id, H5P_CLS_DACC, &dxpl_id, obj_id, FALSE) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access and transfer property lists")
/* Get the file pointer from the entry */
file = loc.oloc->file;
/* Create reference */
- if((ret_value = H5R_dereference(file, oapl_id, H5AC_dxpl_id, ref_type, _ref, TRUE)) < 0)
+ if((ret_value = H5R_dereference(file, oapl_id, dxpl_id, ref_type, _ref, TRUE)) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTINIT, FAIL, "unable to dereference object")
done: