summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJordan Henderson <jhenderson@hdfgroup.org>2019-12-02 18:43:49 (GMT)
committerJordan Henderson <jhenderson@hdfgroup.org>2019-12-02 23:05:15 (GMT)
commit874900d39561f97c0a41b7efc59686daa66df95e (patch)
treeb87b7cb2d3ea181fafa8af7001026a077d8c7923
parent0772b975d1d2bfa15aedeb4b6e2c2aac78c61a2f (diff)
downloadhdf5-874900d39561f97c0a41b7efc59686daa66df95e.zip
hdf5-874900d39561f97c0a41b7efc59686daa66df95e.tar.gz
hdf5-874900d39561f97c0a41b7efc59686daa66df95e.tar.bz2
Add OAPL parameter to H5Rcreate_ APIs
-rw-r--r--examples/h5_ref_extern.c2
-rw-r--r--src/H5R.c42
-rw-r--r--src/H5Rdeprec.c1
-rw-r--r--src/H5Rpublic.h6
-rw-r--r--test/objcopy_ref.c12
-rw-r--r--test/trefer.c72
6 files changed, 83 insertions, 52 deletions
diff --git a/examples/h5_ref_extern.c b/examples/h5_ref_extern.c
index 4327a06..17082ba 100644
--- a/examples/h5_ref_extern.c
+++ b/examples/h5_ref_extern.c
@@ -56,7 +56,7 @@ main(void) {
/* Create reference to dataset1 in "refer_extern1.h5" */
file1 = H5Fopen(H5FILE_NAME1, H5F_ACC_RDONLY, H5P_DEFAULT);
- H5Rcreate_object(file1, "dataset1", &ref_buf[0]);
+ H5Rcreate_object(file1, "dataset1", H5P_DEFAULT, &ref_buf[0]);
H5Fclose(file1);
/* Store reference in dataset in separate file "refer_extern2.h5" */
diff --git a/src/H5R.c b/src/H5R.c
index 31b2bcd..70d4749 100644
--- a/src/H5R.c
+++ b/src/H5R.c
@@ -74,7 +74,7 @@
*-------------------------------------------------------------------------
*/
herr_t
-H5Rcreate_object(hid_t loc_id, const char *name, H5R_ref_t *ref_ptr)
+H5Rcreate_object(hid_t loc_id, const char *name, hid_t oapl_id, H5R_ref_t *ref_ptr)
{
H5VL_object_t *vol_obj = NULL; /* Object token of loc_id */
H5I_type_t obj_type; /* Object type of loc_id */
@@ -86,13 +86,22 @@ H5Rcreate_object(hid_t loc_id, const char *name, H5R_ref_t *ref_ptr)
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
- H5TRACE3("e", "i*s*Rr", loc_id, name, ref_ptr);
+ H5TRACE4("e", "i*si*Rr", loc_id, name, oapl_id, ref_ptr);
/* Check args */
if(ref_ptr == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid reference pointer")
if(!name || !*name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name given")
+ if(oapl_id < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list")
+
+ /* Get object access property list */
+ if(H5P_DEFAULT == oapl_id)
+ oapl_id = H5P_LINK_ACCESS_DEFAULT;
+ else
+ if(TRUE != H5P_isa_class(oapl_id, H5P_LINK_ACCESS))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "oapl_id is not a link access property list ID")
/* Get the VOL object */
if(NULL == (vol_obj = H5VL_vol_object(loc_id)))
@@ -117,6 +126,7 @@ H5Rcreate_object(hid_t loc_id, const char *name, H5R_ref_t *ref_ptr)
/* Set location parameters */
loc_params.type = H5VL_OBJECT_BY_NAME;
loc_params.loc_data.loc_by_name.name = name;
+ loc_params.loc_data.loc_by_name.lapl_id = oapl_id;
loc_params.obj_type = obj_type;
/* Get the object token */
@@ -152,7 +162,7 @@ done:
*/
herr_t
H5Rcreate_region(hid_t loc_id, const char *name, hid_t space_id,
- H5R_ref_t *ref_ptr)
+ hid_t oapl_id, H5R_ref_t *ref_ptr)
{
H5VL_object_t *vol_obj = NULL; /* Object token of loc_id */
H5I_type_t obj_type; /* Object type of loc_id */
@@ -165,7 +175,7 @@ H5Rcreate_region(hid_t loc_id, const char *name, hid_t space_id,
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
- H5TRACE4("e", "i*si*Rr", loc_id, name, space_id, ref_ptr);
+ H5TRACE5("e", "i*sii*Rr", loc_id, name, space_id, oapl_id, ref_ptr);
/* Check args */
if(ref_ptr == NULL)
@@ -176,6 +186,15 @@ H5Rcreate_region(hid_t loc_id, const char *name, hid_t space_id,
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "reference region dataspace id must be valid")
if(NULL == (space = (struct H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace")
+ if(oapl_id < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list")
+
+ /* Get object access property list */
+ if(H5P_DEFAULT == oapl_id)
+ oapl_id = H5P_LINK_ACCESS_DEFAULT;
+ else
+ if(TRUE != H5P_isa_class(oapl_id, H5P_LINK_ACCESS))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "oapl_id is not a link access property list ID")
/* Get the VOL object */
if(NULL == (vol_obj = H5VL_vol_object(loc_id)))
@@ -200,6 +219,7 @@ H5Rcreate_region(hid_t loc_id, const char *name, hid_t space_id,
/* Set location parameters */
loc_params.type = H5VL_OBJECT_BY_NAME;
loc_params.loc_data.loc_by_name.name = name;
+ loc_params.loc_data.loc_by_name.lapl_id = oapl_id;
loc_params.obj_type = obj_type;
/* Get the object token */
@@ -234,7 +254,7 @@ done:
*/
herr_t
H5Rcreate_attr(hid_t loc_id, const char *name, const char *attr_name,
- H5R_ref_t *ref_ptr)
+ hid_t oapl_id, H5R_ref_t *ref_ptr)
{
H5VL_object_t *vol_obj = NULL; /* Object token of loc_id */
H5I_type_t obj_type; /* Object type of loc_id */
@@ -246,7 +266,7 @@ H5Rcreate_attr(hid_t loc_id, const char *name, const char *attr_name,
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
- H5TRACE4("e", "i*s*s*Rr", loc_id, name, attr_name, ref_ptr);
+ H5TRACE5("e", "i*s*si*Rr", loc_id, name, attr_name, oapl_id, ref_ptr);
/* Check args */
if(ref_ptr == NULL)
@@ -255,6 +275,15 @@ H5Rcreate_attr(hid_t loc_id, const char *name, const char *attr_name,
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name given")
if(!attr_name || !*attr_name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no attribute name given")
+ if(oapl_id < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list")
+
+ /* Get object access property list */
+ if(H5P_DEFAULT == oapl_id)
+ oapl_id = H5P_LINK_ACCESS_DEFAULT;
+ else
+ if(TRUE != H5P_isa_class(oapl_id, H5P_LINK_ACCESS))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "oapl_id is not a link access property list ID")
/* Get the VOL object */
if(NULL == (vol_obj = H5VL_vol_object(loc_id)))
@@ -279,6 +308,7 @@ H5Rcreate_attr(hid_t loc_id, const char *name, const char *attr_name,
/* Set location parameters */
loc_params.type = H5VL_OBJECT_BY_NAME;
loc_params.loc_data.loc_by_name.name = name;
+ loc_params.loc_data.loc_by_name.lapl_id = oapl_id;
loc_params.obj_type = obj_type;
/* Get the object token */
diff --git a/src/H5Rdeprec.c b/src/H5Rdeprec.c
index 0636da9..63be3f8 100644
--- a/src/H5Rdeprec.c
+++ b/src/H5Rdeprec.c
@@ -258,6 +258,7 @@ H5Rcreate(void *ref, hid_t loc_id, const char *name, H5R_type_t ref_type,
/* Set location parameters */
loc_params.type = H5VL_OBJECT_BY_NAME;
loc_params.loc_data.loc_by_name.name = name;
+ loc_params.loc_data.loc_by_name.lapl_id = H5P_LINK_ACCESS_DEFAULT;
loc_params.obj_type = vol_obj_type;
/* Get the object token */
diff --git a/src/H5Rpublic.h b/src/H5Rpublic.h
index ce54ac4..585cb85 100644
--- a/src/H5Rpublic.h
+++ b/src/H5Rpublic.h
@@ -93,9 +93,9 @@ extern "C" {
#endif
/* Constructors */
-H5_DLL herr_t H5Rcreate_object(hid_t loc_id, const char *name, H5R_ref_t *ref_ptr);
-H5_DLL herr_t H5Rcreate_region(hid_t loc_id, const char *name, hid_t space_id, H5R_ref_t *ref_ptr);
-H5_DLL herr_t H5Rcreate_attr(hid_t loc_id, const char *name, const char *attr_name, H5R_ref_t *ref_ptr);
+H5_DLL herr_t H5Rcreate_object(hid_t loc_id, const char *name, hid_t oapl_id, H5R_ref_t *ref_ptr);
+H5_DLL herr_t H5Rcreate_region(hid_t loc_id, const char *name, hid_t space_id, hid_t oapl_id, H5R_ref_t *ref_ptr);
+H5_DLL herr_t H5Rcreate_attr(hid_t loc_id, const char *name, const char *attr_name, hid_t oapl_id, H5R_ref_t *ref_ptr);
H5_DLL herr_t H5Rdestroy(H5R_ref_t *ref_ptr);
/* Info */
diff --git a/test/objcopy_ref.c b/test/objcopy_ref.c
index 721a7c6..a73e569 100644
--- a/test/objcopy_ref.c
+++ b/test/objcopy_ref.c
@@ -247,8 +247,8 @@ attach_ref_attr(hid_t file_id, hid_t loc_id)
if(H5Dwrite(did2, H5T_NATIVE_INT, H5S_ALL , H5S_ALL, H5P_DEFAULT,data2) < 0) TEST_ERROR
/* create an attribute with two object references */
- if(H5Rcreate_object(file_id, dsetname1, &ref[0]) < 0) TEST_ERROR
- if(H5Rcreate_object(file_id, dsetname2, &ref[1]) < 0) TEST_ERROR
+ if(H5Rcreate_object(file_id, dsetname1, H5P_DEFAULT, &ref[0]) < 0) TEST_ERROR
+ if(H5Rcreate_object(file_id, dsetname2, H5P_DEFAULT, &ref[1]) < 0) TEST_ERROR
if((aid = H5Acreate2(loc_id, "obj_ref_attr", H5T_STD_REF, sid_ref, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Awrite(aid, H5T_STD_REF, ref) < 0) TEST_ERROR
@@ -315,12 +315,12 @@ attach_reg_ref_attr(hid_t file_id, hid_t loc_id)
/* create reg_ref of block selection */
if(H5Sselect_hyperslab(space_id,H5S_SELECT_SET,start,NULL,count,NULL) < 0) TEST_ERROR
- if(H5Rcreate_region(file_id, dsetnamev, space_id, &ref[0]) < 0) TEST_ERROR
+ if(H5Rcreate_region(file_id, dsetnamev, space_id, H5P_DEFAULT, &ref[0]) < 0) TEST_ERROR
/* create reg_ref of point selection */
if(H5Sselect_none(space_id) < 0) TEST_ERROR
if(H5Sselect_elements(space_id, H5S_SELECT_SET, num_points, (const hsize_t *)coord) < 0) TEST_ERROR
- if(H5Rcreate_region(file_id, dsetnamev, space_id, &ref[1]) < 0) TEST_ERROR
+ if(H5Rcreate_region(file_id, dsetnamev, space_id, H5P_DEFAULT, &ref[1]) < 0) TEST_ERROR
/* create reg_ref attribute */
if((aid = H5Acreate2(loc_id, "reg_ref_attr", H5T_STD_REF, spacer_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
@@ -402,10 +402,10 @@ create_reg_ref_dataset(hid_t file_id, hid_t loc_id)
count[0] = 2;
count[1] = 3;
if(H5Sselect_hyperslab(space_id,H5S_SELECT_SET,start,NULL,count,NULL) < 0) TEST_ERROR
- if(H5Rcreate_region(file_id, dsetnamev, space_id, &ref[0]) < 0) TEST_ERROR
+ if(H5Rcreate_region(file_id, dsetnamev, space_id, H5P_DEFAULT, &ref[0]) < 0) TEST_ERROR
if(H5Sselect_none(space_id) < 0) TEST_ERROR
if(H5Sselect_elements(space_id, H5S_SELECT_SET, num_points, (const hsize_t *)coord) < 0) TEST_ERROR
- if(H5Rcreate_region(file_id, dsetnamev, space_id, &ref[1]) < 0) TEST_ERROR
+ if(H5Rcreate_region(file_id, dsetnamev, space_id, H5P_DEFAULT, &ref[1]) < 0) TEST_ERROR
if(H5Dwrite(dsetr_id, H5T_STD_REF, H5S_ALL, H5S_ALL, H5P_DEFAULT,ref) < 0) TEST_ERROR
if(H5Dclose(dsetr_id) < 0) TEST_ERROR
diff --git a/test/trefer.c b/test/trefer.c
index 0f9e4f9..9fc6563 100644
--- a/test/trefer.c
+++ b/test/trefer.c
@@ -195,33 +195,33 @@ test_reference_params(void)
CHECK(ret, H5I_INVALID_HID, "H5Dcreate2");
/* Test parameters to H5Rcreate_object */
- ret = H5Rcreate_object(fid1, "/Group1/Dataset1", NULL);
+ ret = H5Rcreate_object(fid1, "/Group1/Dataset1", H5P_DEFAULT, NULL);
VERIFY(ret, FAIL, "H5Rcreate_object ref");
- ret = H5Rcreate_object(H5I_INVALID_HID, "/Group1/Dataset1", &wbuf[0]);
+ ret = H5Rcreate_object(H5I_INVALID_HID, "/Group1/Dataset1", H5P_DEFAULT, &wbuf[0]);
VERIFY(ret, FAIL, "H5Rcreate_object loc_id");
- ret = H5Rcreate_object(fid1, NULL, &wbuf[0]);
+ ret = H5Rcreate_object(fid1, NULL, H5P_DEFAULT, &wbuf[0]);
VERIFY(ret, FAIL, "H5Rcreate_object name");
- ret = H5Rcreate_object(fid1, "", &wbuf[0]);
+ ret = H5Rcreate_object(fid1, "", H5P_DEFAULT, &wbuf[0]);
VERIFY(ret, FAIL, "H5Rcreate_object null name");
/* Test parameters to H5Rcreate_region */
- ret = H5Rcreate_region(fid1, "/Group1/Dataset1", sid1, NULL);
+ ret = H5Rcreate_region(fid1, "/Group1/Dataset1", sid1, H5P_DEFAULT, NULL);
VERIFY(ret, FAIL, "H5Rcreate_region ref");
- ret = H5Rcreate_region(H5I_INVALID_HID, "/Group1/Dataset1", sid1, &wbuf[0]);
+ ret = H5Rcreate_region(H5I_INVALID_HID, "/Group1/Dataset1", sid1, H5P_DEFAULT, &wbuf[0]);
VERIFY(ret, FAIL, "H5Rcreate_region loc_id");
- ret = H5Rcreate_region(fid1, NULL, sid1, &wbuf[0]);
+ ret = H5Rcreate_region(fid1, NULL, sid1, H5P_DEFAULT, &wbuf[0]);
VERIFY(ret, FAIL, "H5Rcreate_region name");
- ret = H5Rcreate_region(fid1, "/Group1/Dataset1", H5I_INVALID_HID, &wbuf[0]);
+ ret = H5Rcreate_region(fid1, "/Group1/Dataset1", H5I_INVALID_HID, H5P_DEFAULT, &wbuf[0]);
VERIFY(ret, FAIL, "H5Rcreate_region dataspace");
/* Test parameters to H5Rcreate_attr */
- ret = H5Rcreate_attr(fid1, "/Group1/Dataset2", "Attr", NULL);
+ ret = H5Rcreate_attr(fid1, "/Group1/Dataset2", "Attr", H5P_DEFAULT, NULL);
VERIFY(ret, FAIL, "H5Rcreate_attr ref");
- ret = H5Rcreate_attr(H5I_INVALID_HID, "/Group1/Dataset2", "Attr", &wbuf[0]);
+ ret = H5Rcreate_attr(H5I_INVALID_HID, "/Group1/Dataset2", "Attr", H5P_DEFAULT, &wbuf[0]);
VERIFY(ret, FAIL, "H5Rcreate_attr loc_id");
- ret = H5Rcreate_attr(fid1, NULL, "Attr", &wbuf[0]);
+ ret = H5Rcreate_attr(fid1, NULL, "Attr", H5P_DEFAULT, &wbuf[0]);
VERIFY(ret, FAIL, "H5Rcreate_attr name");
- ret = H5Rcreate_attr(fid1, "/Group1/Dataset2", NULL, &wbuf[0]);
+ ret = H5Rcreate_attr(fid1, "/Group1/Dataset2", NULL, H5P_DEFAULT, &wbuf[0]);
VERIFY(ret, FAIL, "H5Rcreate_attr attr_name");
/* Test parameters to H5Rdestroy */
@@ -403,28 +403,28 @@ test_reference_obj(void)
CHECK(dataset, H5I_INVALID_HID, "H5Dcreate2");
/* Create reference to dataset */
- ret = H5Rcreate_object(fid1, "/Group1/Dataset1", &wbuf[0]);
+ ret = H5Rcreate_object(fid1, "/Group1/Dataset1", H5P_DEFAULT, &wbuf[0]);
CHECK(ret, FAIL, "H5Rcreate_object");
ret = H5Rget_obj_type3((const H5R_ref_t *)&wbuf[0], H5P_DEFAULT, &obj_type);
CHECK(ret, FAIL, "H5Rget_obj_type3");
VERIFY(obj_type, H5O_TYPE_DATASET, "H5Rget_obj_type3");
/* Create reference to dataset */
- ret = H5Rcreate_object(fid1, "/Group1/Dataset2", &wbuf[1]);
+ ret = H5Rcreate_object(fid1, "/Group1/Dataset2", H5P_DEFAULT, &wbuf[1]);
CHECK(ret, FAIL, "H5Rcreate_object");
ret = H5Rget_obj_type3((const H5R_ref_t *)&wbuf[1], H5P_DEFAULT, &obj_type);
CHECK(ret, FAIL, "H5Rget_obj_type3");
VERIFY(obj_type, H5O_TYPE_DATASET, "H5Rget_obj_type3");
/* Create reference to group */
- ret = H5Rcreate_object(fid1, "/Group1", &wbuf[2]);
+ ret = H5Rcreate_object(fid1, "/Group1", H5P_DEFAULT, &wbuf[2]);
CHECK(ret, FAIL, "H5Rcreate_object");
ret = H5Rget_obj_type3((const H5R_ref_t *)&wbuf[2], H5P_DEFAULT, &obj_type);
CHECK(ret, FAIL, "H5Rget_obj_type3");
VERIFY(obj_type, H5O_TYPE_GROUP, "H5Rget_obj_type3");
/* Create reference to named datatype */
- ret = H5Rcreate_object(fid1, "/Group1/Datatype1", &wbuf[3]);
+ ret = H5Rcreate_object(fid1, "/Group1/Datatype1", H5P_DEFAULT, &wbuf[3]);
CHECK(ret, FAIL, "H5Rcreate_object");
ret = H5Rget_obj_type3((const H5R_ref_t *)&wbuf[3], H5P_DEFAULT, &obj_type);
CHECK(ret, FAIL, "H5Rget_obj_type3");
@@ -645,7 +645,7 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
VERIFY(ret, 36, "H5Sget_select_npoints");
/* Store first dataset region */
- ret = H5Rcreate_region(fid1, "/Dataset2", sid2, &wbuf[0]);
+ ret = H5Rcreate_region(fid1, "/Dataset2", sid2, H5P_DEFAULT, &wbuf[0]);
CHECK(ret, FAIL, "H5Rcreate_region");
ret = H5Rget_obj_type3((const H5R_ref_t *)&wbuf[0], H5P_DEFAULT, &obj_type);
CHECK(ret, FAIL, "H5Rget_obj_type3");
@@ -669,7 +669,7 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
VERIFY(ret, SPACE2_DIM2, "H5Sget_select_npoints");
/* Store second dataset region */
- ret = H5Rcreate_region(fid1, "/Dataset2", sid2, &wbuf[1]);
+ ret = H5Rcreate_region(fid1, "/Dataset2", sid2, H5P_DEFAULT, &wbuf[1]);
CHECK(ret, FAIL, "H5Rcreate_region");
/* Select unlimited hyperslab for third reference */
@@ -688,7 +688,7 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
VERIFY(hssize_ret, (hssize_t)H5S_UNLIMITED, "H5Sget_select_npoints");
/* Store third dataset region */
- ret = H5Rcreate_region(fid1, "/Dataset2", sid2, &wbuf[2]);
+ ret = H5Rcreate_region(fid1, "/Dataset2", sid2, H5P_DEFAULT, &wbuf[2]);
CHECK(ret, FAIL, "H5Rcreate_region");
ret = H5Rget_obj_type3((const H5R_ref_t *)&wbuf[2], H5P_DEFAULT, &obj_type);
@@ -696,7 +696,7 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
VERIFY(obj_type, H5O_TYPE_DATASET, "H5Rget_obj_type3");
/* Store fourth dataset region */
- ret = H5Rcreate_region(fid1, "/Dataset2", sid2, &wbuf[3]);
+ ret = H5Rcreate_region(fid1, "/Dataset2", sid2, H5P_DEFAULT, &wbuf[3]);
CHECK(ret, FAIL, "H5Rcreate_region");
/* Write selection to disk */
@@ -1068,7 +1068,7 @@ test_reference_region_1D(H5F_libver_t libver_low, H5F_libver_t libver_high)
VERIFY(ret, (block[0] * count[0]), "H5Sget_select_npoints");
/* Store first dataset region */
- ret = H5Rcreate_region(fid1, "/Dataset2", sid3, &wbuf[0]);
+ ret = H5Rcreate_region(fid1, "/Dataset2", sid3, H5P_DEFAULT, &wbuf[0]);
CHECK(ret, FAIL, "H5Rcreate_region");
ret = H5Rget_obj_type3((const H5R_ref_t *)&wbuf[0], H5P_DEFAULT, &obj_type);
CHECK(ret, FAIL, "H5Rget_obj_type3");
@@ -1092,7 +1092,7 @@ test_reference_region_1D(H5F_libver_t libver_low, H5F_libver_t libver_high)
VERIFY(ret, POINT1_NPOINTS, "H5Sget_select_npoints");
/* Store second dataset region */
- ret = H5Rcreate_region(fid1, "/Dataset2", sid3, &wbuf[1]);
+ ret = H5Rcreate_region(fid1, "/Dataset2", sid3, H5P_DEFAULT, &wbuf[1]);
CHECK(ret, FAIL, "H5Rcreate_region");
/* Write selection to disk */
@@ -1311,7 +1311,7 @@ test_reference_obj_deleted(void)
CHECK(dataset, H5I_INVALID_HID, "H5Dcreate2");
/* Create reference to dataset */
- ret = H5Rcreate_object(fid1, "/Dataset1", &oref);
+ ret = H5Rcreate_object(fid1, "/Dataset1", H5P_DEFAULT, &oref);
CHECK(ret, FAIL, "H5Rcreate_object");
ret = H5Rget_obj_type3((const H5R_ref_t *)&oref, H5P_DEFAULT, &obj_type);
CHECK(ret, FAIL, "H5Rget_obj_type3");
@@ -1469,7 +1469,7 @@ test_reference_group(void)
CHECK(did, H5I_INVALID_HID, "H5Dcreate2");
/* Create reference to group */
- ret = H5Rcreate_object(fid, GROUPNAME, &wref);
+ ret = H5Rcreate_object(fid, GROUPNAME, H5P_DEFAULT, &wref);
CHECK(ret, FAIL, "H5Rcreate_object");
/* Write reference to disk */
@@ -1678,28 +1678,28 @@ test_reference_attr(void)
CHECK(dataset, H5I_INVALID_HID, "H5Dcreate2");
/* Create reference to dataset1 attribute */
- ret = H5Rcreate_attr(fid, "/Group1/Dataset1", "Attr1", &ref_wbuf[0]);
+ ret = H5Rcreate_attr(fid, "/Group1/Dataset1", "Attr1", H5P_DEFAULT, &ref_wbuf[0]);
CHECK(ret, FAIL, "H5Rcreate_attr");
ret = H5Rget_obj_type3((const H5R_ref_t *)&ref_wbuf[0], H5P_DEFAULT, &obj_type);
CHECK(ret, FAIL, "H5Rget_obj_type3");
VERIFY(obj_type, H5O_TYPE_DATASET, "H5Rget_obj_type3");
/* Create reference to dataset2 attribute */
- ret = H5Rcreate_attr(fid, "/Group1/Dataset2", "Attr1", &ref_wbuf[1]);
+ ret = H5Rcreate_attr(fid, "/Group1/Dataset2", "Attr1", H5P_DEFAULT, &ref_wbuf[1]);
CHECK(ret, FAIL, "H5Rcreate_attr");
ret = H5Rget_obj_type3((const H5R_ref_t *)&ref_wbuf[1], H5P_DEFAULT, &obj_type);
CHECK(ret, FAIL, "H5Rget_obj_type3");
VERIFY(obj_type, H5O_TYPE_DATASET, "H5Rget_obj_type3");
/* Create reference to group attribute */
- ret = H5Rcreate_attr(fid, "/Group1", "Attr2", &ref_wbuf[2]);
+ ret = H5Rcreate_attr(fid, "/Group1", "Attr2", H5P_DEFAULT, &ref_wbuf[2]);
CHECK(ret, FAIL, "H5Rcreate_attr");
ret = H5Rget_obj_type3((const H5R_ref_t *)&ref_wbuf[2], H5P_DEFAULT, &obj_type);
CHECK(ret, FAIL, "H5Rget_obj_type3");
VERIFY(obj_type, H5O_TYPE_GROUP, "H5Rget_obj_type3");
/* Create reference to named datatype attribute */
- ret = H5Rcreate_attr(fid, "/Group1/Datatype1", "Attr3", &ref_wbuf[3]);
+ ret = H5Rcreate_attr(fid, "/Group1/Datatype1", "Attr3", H5P_DEFAULT, &ref_wbuf[3]);
CHECK(ret, FAIL, "H5Rcreate_attr");
ret = H5Rget_obj_type3((const H5R_ref_t *)&ref_wbuf[3], H5P_DEFAULT, &obj_type);
CHECK(ret, FAIL, "H5Rget_obj_type3");
@@ -1938,28 +1938,28 @@ test_reference_external(void)
CHECK(ret, FAIL, "H5Gclose");
/* Create reference to dataset1 attribute */
- ret = H5Rcreate_attr(fid1, "/Group1/Dataset1", "Attr1", &ref_wbuf[0]);
+ ret = H5Rcreate_attr(fid1, "/Group1/Dataset1", "Attr1", H5P_DEFAULT, &ref_wbuf[0]);
CHECK(ret, FAIL, "H5Rcreate_attr");
ret = H5Rget_obj_type3((const H5R_ref_t *)&ref_wbuf[0], H5P_DEFAULT, &obj_type);
CHECK(ret, FAIL, "H5Rget_obj_type3");
VERIFY(obj_type, H5O_TYPE_DATASET, "H5Rget_obj_type3");
/* Create reference to dataset2 attribute */
- ret = H5Rcreate_attr(fid1, "/Group1/Dataset2", "Attr1", &ref_wbuf[1]);
+ ret = H5Rcreate_attr(fid1, "/Group1/Dataset2", "Attr1", H5P_DEFAULT, &ref_wbuf[1]);
CHECK(ret, FAIL, "H5Rcreate_attr");
ret = H5Rget_obj_type3((const H5R_ref_t *)&ref_wbuf[1], H5P_DEFAULT, &obj_type);
CHECK(ret, FAIL, "H5Rget_obj_type3");
VERIFY(obj_type, H5O_TYPE_DATASET, "H5Rget_obj_type3");
/* Create reference to group attribute */
- ret = H5Rcreate_attr(fid1, "/Group1", "Attr2", &ref_wbuf[2]);
+ ret = H5Rcreate_attr(fid1, "/Group1", "Attr2", H5P_DEFAULT, &ref_wbuf[2]);
CHECK(ret, FAIL, "H5Rcreate_attr");
ret = H5Rget_obj_type3((const H5R_ref_t *)&ref_wbuf[2], H5P_DEFAULT, &obj_type);
CHECK(ret, FAIL, "H5Rget_obj_type3");
VERIFY(obj_type, H5O_TYPE_GROUP, "H5Rget_obj_type3");
/* Create reference to named datatype attribute */
- ret = H5Rcreate_attr(fid1, "/Group1/Datatype1", "Attr3", &ref_wbuf[3]);
+ ret = H5Rcreate_attr(fid1, "/Group1/Datatype1", "Attr3", H5P_DEFAULT, &ref_wbuf[3]);
CHECK(ret, FAIL, "H5Rcreate_attr");
ret = H5Rget_obj_type3((const H5R_ref_t *)&ref_wbuf[3], H5P_DEFAULT, &obj_type);
CHECK(ret, FAIL, "H5Rget_obj_type3");
@@ -2506,7 +2506,7 @@ test_reference_perf(void)
t = 0;
for(i = 0; i < MAX_ITER_CREATE; i++) {
t1 = H5_get_time();
- ret = H5Rcreate_object(fid1, "/Group1/Dataset1", &wbuf[0]);
+ ret = H5Rcreate_object(fid1, "/Group1/Dataset1", H5P_DEFAULT, &wbuf[0]);
CHECK(ret, FAIL, "H5Rcreate_object");
t2 = H5_get_time();
t += t2 - t1;
@@ -2516,7 +2516,7 @@ test_reference_perf(void)
HDprintf("--- Object reference create time: %lfs\n", t / MAX_ITER_CREATE);
/* Create reference to dataset */
- ret = H5Rcreate_object(fid1, "/Group1/Dataset1", &wbuf[0]);
+ ret = H5Rcreate_object(fid1, "/Group1/Dataset1", H5P_DEFAULT, &wbuf[0]);
CHECK(ret, FAIL, "H5Rcreate_object");
ret = H5Rget_obj_type3((const H5R_ref_t *)&wbuf[0], H5P_DEFAULT, &obj_type);
CHECK(ret, FAIL, "H5Rget_obj_type3");
@@ -2578,7 +2578,7 @@ test_reference_perf(void)
for(i = 0; i < MAX_ITER_CREATE; i++) {
t1 = H5_get_time();
/* Store first dataset region */
- ret = H5Rcreate_region(fid1, "/Group1/Dataset1", sid1, &wbuf_reg[0]);
+ ret = H5Rcreate_region(fid1, "/Group1/Dataset1", sid1, H5P_DEFAULT, &wbuf_reg[0]);
CHECK(ret, FAIL, "H5Rcreate_region");
t2 = H5_get_time();
t += t2 - t1;
@@ -2588,7 +2588,7 @@ test_reference_perf(void)
HDprintf("--- Region reference create time: %lfs\n", t / MAX_ITER_CREATE);
/* Store first dataset region */
- ret = H5Rcreate_region(fid1, "/Group1/Dataset1", sid1, &wbuf_reg[0]);
+ ret = H5Rcreate_region(fid1, "/Group1/Dataset1", sid1, H5P_DEFAULT, &wbuf_reg[0]);
CHECK(ret, FAIL, "H5Rcreate_region");
t = 0;