summaryrefslogtreecommitdiffstats
path: root/src/H5VLdaosm.c
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2017-04-30 23:40:28 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2017-04-30 23:40:28 (GMT)
commit72b57518eb02e1df92d0e3ae7b29f09bbafe937c (patch)
tree21eade07ff05a2f5d8aeea755faa5b8d98d51403 /src/H5VLdaosm.c
parent9fcc88fa46a661ad7a7d482b45fa0055bd1035ee (diff)
downloadhdf5-72b57518eb02e1df92d0e3ae7b29f09bbafe937c.zip
hdf5-72b57518eb02e1df92d0e3ae7b29f09bbafe937c.tar.gz
hdf5-72b57518eb02e1df92d0e3ae7b29f09bbafe937c.tar.bz2
Fix bug with opening root group in collective mode. Fix performance issue with collective dataset open. Other minor fixes.
Diffstat (limited to 'src/H5VLdaosm.c')
-rw-r--r--src/H5VLdaosm.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/H5VLdaosm.c b/src/H5VLdaosm.c
index b816755..0924b77 100644
--- a/src/H5VLdaosm.c
+++ b/src/H5VLdaosm.c
@@ -2349,7 +2349,7 @@ H5VL_daosm_group_create_helper(H5VL_daosm_file_t *file, hid_t gcpl_id,
if(H5Pencode(gcpl_id, NULL, &gcpl_size) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "can't determine serialized length of gcpl")
if(NULL == (gcpl_buf = H5MM_malloc(gcpl_size)))
- HGOTO_ERROR(gcpl_id, H5E_CANTALLOC, NULL, "can't allocate buffer for serialized gcpl")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, NULL, "can't allocate buffer for serialized gcpl")
if(H5Pencode(gcpl_id, gcpl_buf, &gcpl_size) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, NULL, "can't serialize gcpl")
@@ -2713,8 +2713,20 @@ H5VL_daosm_group_open(void *_item,
/* Check for no target_name, in this case just return target_grp */
if(target_name[0] == '\0'
|| (target_name[0] == '.' && target_name[1] == '\0')) {
+ size_t gcpl_size;
+
+ /* Take ownership of target_grp */
grp = target_grp;
target_grp = NULL;
+
+ /* Encode GCPL */
+ if(H5Pencode(grp->gcpl_id, NULL, &gcpl_size) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "can't determine serialized length of gcpl")
+ if(NULL == (gcpl_buf = H5MM_malloc(gcpl_size)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, NULL, "can't allocate buffer for serialized gcpl")
+ gcpl_len = (uint64_t)gcpl_size;
+ if(H5Pencode(grp->gcpl_id, gcpl_buf, &gcpl_size) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, NULL, "can't serialize gcpl")
} /* end if */
else {
gcpl_buf = (uint8_t *)H5MM_xfree(gcpl_buf);
@@ -3435,6 +3447,10 @@ H5VL_daosm_dataset_open(void *_item,
if(collective && (item->file->num_procs > 1))
must_bcast = TRUE;
+ /* Traverse the path */
+ if(NULL == (target_grp = H5VL_daosm_group_traverse(item, name, dxpl_id, req, &target_name, NULL, NULL)))
+ HGOTO_ERROR(H5E_DATASET, H5E_BADITER, NULL, "can't traverse path")
+
/* Follow link to dataset */
if(H5VL_daosm_link_follow(target_grp, target_name, HDstrlen(target_name), dxpl_id, req, &dset->obj.oid, NULL, NULL) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "can't follow link to dataset")
@@ -4647,7 +4663,7 @@ H5VL_daosm_attribute_open(void *_item, H5VL_loc_params_t loc_params,
if(H5Sselect_all(attr->space_id) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, NULL, "can't change selection")
- /* Finish setting up dataset struct */
+ /* Finish setting up attribute struct */
if(NULL == (attr->name = H5MM_strdup(name)))
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, NULL, "can't copy attribute name")