summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2014-02-24 20:40:45 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2014-02-24 20:40:45 (GMT)
commitb9f277756bd66cd60dd2150e9800598fe3757135 (patch)
tree4715f2a70db7e0f4f154ae7922ba52fa68765b60
parent0b58f62c773d3b46c62908610686a01435a6e0c5 (diff)
downloadhdf5-b9f277756bd66cd60dd2150e9800598fe3757135.zip
hdf5-b9f277756bd66cd60dd2150e9800598fe3757135.tar.gz
hdf5-b9f277756bd66cd60dd2150e9800598fe3757135.tar.bz2
[svn-r24734] - Add iteration feature at the server with a callback on every object under the starting location.
- Implement view creation for element region on all dataset under a group. - Add the creation propertly list to the token buffer since they are used now in the FF plugin.
-rw-r--r--examples/h5ff_client_view.c185
-rw-r--r--src/H5VLiod.c130
-rw-r--r--src/H5VLiod_server.h8
-rw-r--r--src/H5VLiod_util.c180
-rw-r--r--src/H5VLiod_view.c138
5 files changed, 594 insertions, 47 deletions
diff --git a/examples/h5ff_client_view.c b/examples/h5ff_client_view.c
index 8056c08..5b7cc78 100644
--- a/examples/h5ff_client_view.c
+++ b/examples/h5ff_client_view.c
@@ -18,7 +18,8 @@ write_dataset(const char *file_name, const char *dataset_name,
hsize_t total, hsize_t ncomponents, hid_t datatype_id,
hsize_t ntuples, hsize_t start, void *buf)
{
- hid_t file_id, dataset_id, view_id;
+ hid_t file_id, view_id;
+ hid_t did1, did2, did3, gid1;
hid_t file_space_id, mem_space_id;
hid_t tid1, rid1, rid2, trspl_id;
hid_t fapl_id;
@@ -28,13 +29,13 @@ write_dataset(const char *file_name, const char *dataset_name,
int rank = (ncomponents == 1) ? 1 : 2;
uint64_t version;
herr_t ret;
- void *dset_token1;
- size_t token_size1;
+ void *dset_token1, *dset_token2, *dset_token3;
+ size_t token_size1, token_size2, token_size3;
double lower_bound1 = 39.1, upper_bound1 = 42.1;
int lower_bound2 = 295, upper_bound2 = 298;
hid_t query_id1, query_id2, query_id3, query_id4, query_id5, query_id6;
hid_t query_id;
- MPI_Request mpi_reqs[2];
+ MPI_Request mpi_reqs[6];
/* Choose the IOD VOL plugin to use with this file. */
fapl_id = H5Pcreate(H5P_FILE_ACCESS);
@@ -69,46 +70,97 @@ write_dataset(const char *file_name, const char *dataset_name,
assert(file_space_id);
if(0 == my_rank) {
+ /* create a group */
+ gid1 = H5Gcreate_ff(file_id, "G1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT,
+ tid1, H5_EVENT_STACK_NULL);
+ assert(gid1 > 0);
+
+ /* Create a dataset. */
+ did1 = H5Dcreate_ff(gid1, "D1", datatype_id, file_space_id,
+ H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT, tid1, H5_EVENT_STACK_NULL);
+ assert(did1);
+
/* Create a dataset. */
- dataset_id = H5Dcreate_ff(file_id, dataset_name, datatype_id, file_space_id,
+ did2 = H5Dcreate_ff(gid1, "D2", datatype_id, file_space_id,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT, tid1, H5_EVENT_STACK_NULL);
- assert(dataset_id);
+ assert(did2);
+
+ /* Create a dataset. */
+ did3 = H5Dcreate_ff(gid1, "D3", datatype_id, file_space_id,
+ H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT, tid1, H5_EVENT_STACK_NULL);
+ assert(did3);
+
+ ret = H5Gclose_ff(gid1, H5_EVENT_STACK_NULL);
+ assert(0 == ret);
/* get the token size of each dset */
- ret = H5Oget_token(dataset_id, NULL, &token_size1);
+ ret = H5Oget_token(did1, NULL, &token_size1);
+ assert(0 == ret);
+ ret = H5Oget_token(did2, NULL, &token_size2);
+ assert(0 == ret);
+ ret = H5Oget_token(did3, NULL, &token_size3);
assert(0 == ret);
/* allocate buffers for each token */
dset_token1 = malloc(token_size1);
+ dset_token2 = malloc(token_size2);
+ dset_token3 = malloc(token_size3);
/* get the token buffer */
- ret = H5Oget_token(dataset_id, dset_token1, &token_size1);
+ ret = H5Oget_token(did1, dset_token1, &token_size1);
+ assert(0 == ret);
+ ret = H5Oget_token(did2, dset_token2, &token_size2);
+ assert(0 == ret);
+ ret = H5Oget_token(did3, dset_token3, &token_size3);
assert(0 == ret);
/* bcast the token sizes and the tokens */
MPI_Ibcast(&token_size1, sizeof(size_t), MPI_BYTE, 0, MPI_COMM_WORLD,
&mpi_reqs[0]);
- MPI_Ibcast(dset_token1, token_size1, MPI_BYTE, 0, MPI_COMM_WORLD,
+ MPI_Ibcast(&token_size2, sizeof(size_t), MPI_BYTE, 0, MPI_COMM_WORLD,
&mpi_reqs[1]);
- MPI_Waitall(2, mpi_reqs, MPI_STATUS_IGNORE);
+ MPI_Ibcast(&token_size3, sizeof(size_t), MPI_BYTE, 0, MPI_COMM_WORLD,
+ &mpi_reqs[2]);
+
+ MPI_Ibcast(dset_token1, token_size1, MPI_BYTE, 0, MPI_COMM_WORLD,
+ &mpi_reqs[3]);
+ MPI_Ibcast(dset_token2, token_size2, MPI_BYTE, 0, MPI_COMM_WORLD,
+ &mpi_reqs[4]);
+ MPI_Ibcast(dset_token3, token_size3, MPI_BYTE, 0, MPI_COMM_WORLD,
+ &mpi_reqs[5]);
+ MPI_Waitall(6, mpi_reqs, MPI_STATUS_IGNORE);
}
else {
/* recieve the token size */
MPI_Ibcast(&token_size1, sizeof(size_t), MPI_BYTE, 0, MPI_COMM_WORLD,
&mpi_reqs[0]);
- MPI_Waitall(1, mpi_reqs, MPI_STATUS_IGNORE);
+ MPI_Ibcast(&token_size2, sizeof(size_t), MPI_BYTE, 0, MPI_COMM_WORLD,
+ &mpi_reqs[1]);
+ MPI_Ibcast(&token_size3, sizeof(size_t), MPI_BYTE, 0, MPI_COMM_WORLD,
+ &mpi_reqs[2]);
+ MPI_Waitall(3, mpi_reqs, MPI_STATUS_IGNORE);
/* allocate buffer for token */
dset_token1 = malloc(token_size1);
+ dset_token2 = malloc(token_size2);
+ dset_token3 = malloc(token_size3);
/* recieve the token */
MPI_Ibcast(dset_token1, token_size1, MPI_BYTE, 0, MPI_COMM_WORLD,
&mpi_reqs[0]);
- MPI_Waitall(1, mpi_reqs, MPI_STATUS_IGNORE);
+ MPI_Ibcast(dset_token2, token_size2, MPI_BYTE, 0, MPI_COMM_WORLD,
+ &mpi_reqs[1]);
+ MPI_Ibcast(dset_token3, token_size3, MPI_BYTE, 0, MPI_COMM_WORLD,
+ &mpi_reqs[2]);
+ MPI_Waitall(3, mpi_reqs, MPI_STATUS_IGNORE);
- dataset_id = H5Oopen_by_token(dset_token1, tid1, H5_EVENT_STACK_NULL);
+ did1 = H5Oopen_by_token(dset_token1, tid1, H5_EVENT_STACK_NULL);
+ did2 = H5Oopen_by_token(dset_token2, tid1, H5_EVENT_STACK_NULL);
+ did3 = H5Oopen_by_token(dset_token3, tid1, H5_EVENT_STACK_NULL);
}
free(dset_token1);
+ free(dset_token2);
+ free(dset_token3);
mem_space_id = H5Screate_simple(rank, count, NULL);
assert(mem_space_id);
@@ -118,8 +170,16 @@ write_dataset(const char *file_name, const char *dataset_name,
NULL, count, NULL);
assert(0 == ret);
- /* Write the first dataset. */
- ret = H5Dwrite_ff(dataset_id, datatype_id, mem_space_id, file_space_id,
+ /* Write to the datasets. */
+ ret = H5Dwrite_ff(did1, datatype_id, mem_space_id, file_space_id,
+ H5P_DEFAULT, buf, tid1, H5_EVENT_STACK_NULL);
+ assert(0 == ret);
+
+ ret = H5Dwrite_ff(did2, datatype_id, mem_space_id, file_space_id,
+ H5P_DEFAULT, buf, tid1, H5_EVENT_STACK_NULL);
+ assert(0 == ret);
+
+ ret = H5Dwrite_ff(did3, datatype_id, mem_space_id, file_space_id,
H5P_DEFAULT, buf, tid1, H5_EVENT_STACK_NULL);
assert(0 == ret);
@@ -128,9 +188,16 @@ write_dataset(const char *file_name, const char *dataset_name,
assert(0 == ret);
/* Finish transaction 1. */
- ret = H5TRfinish(tid1, H5P_DEFAULT, &rid2, H5_EVENT_STACK_NULL);
+ ret = H5TRfinish(tid1, H5P_DEFAULT, NULL, H5_EVENT_STACK_NULL);
assert(0 == ret);
+ MPI_Barrier(MPI_COMM_WORLD);
+ /* acquire container version 1 - EXACT. */
+ version = 1;
+ rid2 = H5RCacquire(file_id, &version, H5P_DEFAULT, H5_EVENT_STACK_NULL);
+ assert(rid2 > 0);
+ assert(1 == version);
+
/* release container version 0. */
ret = H5RCrelease(rid1, H5_EVENT_STACK_NULL);
assert(0 == ret);
@@ -158,7 +225,8 @@ write_dataset(const char *file_name, const char *dataset_name,
query_id = H5Qcombine(query_id3, H5Q_COMBINE_OR, query_id6);
assert(query_id);
- view_id = H5Vcreate_ff(dataset_id, query_id, H5P_DEFAULT, rid2, H5_EVENT_STACK_NULL);
+ /* create a view on D1 */
+ view_id = H5Vcreate_ff(did1, query_id, H5P_DEFAULT, rid2, H5_EVENT_STACK_NULL);
assert(view_id > 0);
{
@@ -169,13 +237,13 @@ write_dataset(const char *file_name, const char *dataset_name,
hsize_t r_dims[2];
H5Qclose(query_id);
- ret = H5Dclose_ff(dataset_id, H5_EVENT_STACK_NULL);
+ ret = H5Dclose_ff(did1, H5_EVENT_STACK_NULL);
assert(0 == ret);
- ret = H5Vget_location_ff(view_id, &dataset_id, H5_EVENT_STACK_NULL);
+ ret = H5Vget_location_ff(view_id, &did1, H5_EVENT_STACK_NULL);
assert(0 == ret);
- ret = H5Dclose_ff(dataset_id, H5_EVENT_STACK_NULL);
+ ret = H5Dclose_ff(did1, H5_EVENT_STACK_NULL);
assert(0 == ret);
ret = H5Vget_query(view_id, &query_id);
@@ -187,7 +255,7 @@ write_dataset(const char *file_name, const char *dataset_name,
assert(0 == obj_count);
assert(1 == reg_count);
- ret = H5Vget_elem_regions_ff(view_id, 0, 1, &dataset_id,
+ ret = H5Vget_elem_regions_ff(view_id, 0, 1, &did1,
&region_space, H5_EVENT_STACK_NULL);
assert(0 == ret);
@@ -198,7 +266,10 @@ write_dataset(const char *file_name, const char *dataset_name,
assert(ncomponents == r_dims[1]);
num_points = H5Sget_select_elem_npoints(region_space);
- assert(9 == num_points);
+ if(my_size > 1)
+ assert(15 == num_points);
+ else
+ assert(9 == num_points);
ret = H5Sclose(region_space);
assert(0 == ret);
@@ -206,6 +277,66 @@ write_dataset(const char *file_name, const char *dataset_name,
H5Vclose(view_id);
+ gid1 = H5Gopen_ff(file_id, "G1", H5P_DEFAULT, rid2, H5_EVENT_STACK_NULL);
+ assert(gid1 > 0);
+
+ /* create a view on all datasets under G1 */
+ view_id = H5Vcreate_ff(gid1, query_id, H5P_DEFAULT, rid2, H5_EVENT_STACK_NULL);
+ assert(view_id > 0);
+
+ {
+ hsize_t attr_count, obj_count, reg_count, i;
+ hssize_t num_points;
+ hid_t regions[3];
+ hid_t did[3];
+ int r_ndims;
+ hsize_t r_dims[2];
+
+ H5Qclose(query_id);
+ ret = H5Gclose_ff(gid1, H5_EVENT_STACK_NULL);
+ assert(0 == ret);
+
+ ret = H5Vget_location_ff(view_id, &gid1, H5_EVENT_STACK_NULL);
+ assert(0 == ret);
+ assert(gid1 > 0);
+
+ ret = H5Vget_query(view_id, &query_id);
+ assert(0 == ret);
+
+ ret = H5Vget_counts(view_id, &attr_count, &obj_count, &reg_count);
+ assert(0 == ret);
+ assert(0 == attr_count);
+ assert(0 == obj_count);
+ assert(3 == reg_count);
+
+ ret = H5Vget_elem_regions_ff(view_id, 0, reg_count, did, regions, H5_EVENT_STACK_NULL);
+ assert(0 == ret);
+
+ for(i=0 ; i<reg_count ; i++) {
+
+ assert(did[i] > 0);
+ ret = H5Dclose_ff(did[i], H5_EVENT_STACK_NULL);
+ assert(0 == ret);
+
+ r_ndims = H5Sget_simple_extent_dims(regions[i], r_dims, NULL);
+
+ assert(2 == r_ndims);
+ assert(total == r_dims[0]);
+ assert(ncomponents == r_dims[1]);
+
+ num_points = H5Sget_select_elem_npoints(regions[i]);
+ if(my_size > 1)
+ assert(15 == num_points);
+ else
+ assert(9 == num_points);
+
+ ret = H5Sclose(regions[i]);
+ assert(0 == ret);
+ }
+ }
+
+ H5Vclose(view_id);
+
H5Qclose(query_id);
H5Qclose(query_id6);
H5Qclose(query_id5);
@@ -214,8 +345,14 @@ write_dataset(const char *file_name, const char *dataset_name,
H5Qclose(query_id2);
H5Qclose(query_id1);
- /* Close the first dataset. */
- ret = H5Dclose_ff(dataset_id, H5_EVENT_STACK_NULL);
+ ret = H5Gclose_ff(gid1, H5_EVENT_STACK_NULL);
+ assert(0 == ret);
+
+ ret = H5Dclose_ff(did1, H5_EVENT_STACK_NULL);
+ assert(0 == ret);
+ ret = H5Dclose_ff(did2, H5_EVENT_STACK_NULL);
+ assert(0 == ret);
+ ret = H5Dclose_ff(did3, H5_EVENT_STACK_NULL);
assert(0 == ret);
ret = H5Sclose(file_space_id);
assert(0 == ret);
diff --git a/src/H5VLiod.c b/src/H5VLiod.c
index 1dbd8d0..bd5be88 100644
--- a/src/H5VLiod.c
+++ b/src/H5VLiod.c
@@ -21,6 +21,8 @@
* by the function shipper.
*/
+#define H5P_PACKAGE /*suppress error about including H5Ppkg */
+
/* Interface initialization */
#define H5_INTERFACE_INIT_FUNC H5VL_iod_init_interface
@@ -31,6 +33,7 @@
#include "H5Iprivate.h" /* IDs */
#include "H5MMprivate.h" /* Memory management */
#include "H5Pprivate.h" /* Property lists */
+#include "H5Ppkg.h" /* Property lists */
#include "H5Sprivate.h" /* Dataspaces */
#include "H5VLprivate.h" /* VOL plugins */
#include "H5VLiod.h" /* Iod VOL plugin */
@@ -6097,7 +6100,18 @@ H5VL_iod_obj_open_token(const void *token, H5TR_t *tr, H5I_type_t *opened_type,
dset->remote_dset.attrkv_id = attrkv_id;
dset->dapl_id = H5Pcopy(H5P_DATASET_ACCESS_DEFAULT);
- dset->remote_dset.dcpl_id = H5Pcopy(H5P_DATASET_CREATE_DEFAULT);
+
+ /* decode creation property list */
+ {
+ size_t plist_size;
+
+ HDmemcpy(&plist_size, buf_ptr, sizeof(size_t));
+ buf_ptr += sizeof(size_t);
+ /* Create plist by decoding buffer */
+ if((dset->remote_dset.dcpl_id = H5P__decode((const void *)buf_ptr)) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTDECODE, NULL, "can't decode object");
+ buf_ptr += plist_size;
+ }
/* decode dtype */
{
@@ -6166,7 +6180,18 @@ H5VL_iod_obj_open_token(const void *token, H5TR_t *tr, H5I_type_t *opened_type,
dtype->remote_dtype.attrkv_id = attrkv_id;
dtype->tapl_id = H5Pcopy(H5P_DATATYPE_ACCESS_DEFAULT);
- dtype->remote_dtype.tcpl_id = H5Pcopy(H5P_DATATYPE_CREATE_DEFAULT);
+
+ /* decode creation property list */
+ {
+ size_t plist_size;
+
+ HDmemcpy(&plist_size, buf_ptr, sizeof(size_t));
+ buf_ptr += sizeof(size_t);
+ /* Create plist by decoding buffer */
+ if((dtype->remote_dtype.tcpl_id = H5P__decode((const void *)buf_ptr)) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTDECODE, NULL, "can't decode object");
+ buf_ptr += plist_size;
+ }
/* decode dtype */
{
@@ -6220,9 +6245,20 @@ H5VL_iod_obj_open_token(const void *token, H5TR_t *tr, H5I_type_t *opened_type,
grp->remote_group.mdkv_id = mdkv_id;
grp->remote_group.attrkv_id = attrkv_id;
- grp->remote_group.gcpl_id = H5Pcopy(H5P_GROUP_CREATE_DEFAULT);
grp->gapl_id = H5Pcopy(H5P_GROUP_ACCESS_DEFAULT);
+ /* decode creation property list */
+ {
+ size_t plist_size;
+
+ HDmemcpy(&plist_size, buf_ptr, sizeof(size_t));
+ buf_ptr += sizeof(size_t);
+ /* Create plist by decoding buffer */
+ if((grp->remote_group.gcpl_id = H5P__decode((const void *)buf_ptr)) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTDECODE, NULL, "can't decode object");
+ buf_ptr += plist_size;
+ }
+
/* set the input structure for the HG encode routine */
input.coh = tr->file->remote_file.coh;
input.iod_id = iod_id;
@@ -6259,9 +6295,20 @@ H5VL_iod_obj_open_token(const void *token, H5TR_t *tr, H5I_type_t *opened_type,
map->remote_map.mdkv_id = mdkv_id;
map->remote_map.attrkv_id = attrkv_id;
- map->remote_map.mcpl_id = H5Pcopy(H5P_MAP_CREATE_DEFAULT);
map->mapl_id = H5Pcopy(H5P_MAP_ACCESS_DEFAULT);
+ /* decode creation property list */
+ {
+ size_t plist_size;
+
+ HDmemcpy(&plist_size, buf_ptr, sizeof(size_t));
+ buf_ptr += sizeof(size_t);
+ /* Create plist by decoding buffer */
+ if((map->remote_map.mcpl_id = H5P__decode((const void *)buf_ptr)) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTDECODE, NULL, "can't decode object");
+ buf_ptr += plist_size;
+ }
+
/* decode key_type */
{
H5T_t *dt = NULL;
@@ -6430,9 +6477,11 @@ H5VL_iod_get_token(void *_obj, void *token, size_t *token_size)
iod_obj_id_t iod_id, mdkv_id, attrkv_id;
H5O_type_t type;
uint8_t *buf_ptr = (uint8_t *)token;
- size_t dt_size = 0, space_size = 0;
+ size_t dt_size = 0, space_size = 0, plist_size = 0;
H5T_t *dt = NULL;
H5S_t *space = NULL;
+ H5P_genplist_t *plist = NULL;
+ hid_t cpl_id;
size_t keytype_size = 0, valtype_size;
H5T_t *kt = NULL, *vt = NULL;
herr_t ret_value = SUCCEED; /* Return value */
@@ -6443,11 +6492,23 @@ H5VL_iod_get_token(void *_obj, void *token, size_t *token_size)
switch(obj->obj_type) {
case H5I_GROUP:
- iod_id = ((const H5VL_iod_group_t *)obj)->remote_group.iod_id;
- mdkv_id = ((const H5VL_iod_group_t *)obj)->remote_group.mdkv_id;
- attrkv_id = ((const H5VL_iod_group_t *)obj)->remote_group.attrkv_id;
- type = H5O_TYPE_GROUP;
- break;
+ {
+ H5VL_iod_group_t *grp = (H5VL_iod_group_t *)obj;
+
+ iod_id = grp->remote_group.iod_id;
+ mdkv_id = grp->remote_group.mdkv_id;
+ attrkv_id = grp->remote_group.attrkv_id;
+ type = H5O_TYPE_GROUP;
+
+ cpl_id = grp->remote_group.gcpl_id;
+ if(NULL == (plist = (H5P_genplist_t *)H5I_object_verify(cpl_id, H5I_GENPROP_LST)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list")
+ if(H5P__encode(plist, TRUE, NULL, &plist_size) < 0)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTENCODE, FAIL, "can't encode plist")
+
+ *token_size += plist_size + sizeof(size_t);
+ break;
+ }
case H5I_DATASET:
{
H5VL_iod_dset_t *dset = (H5VL_iod_dset_t *)obj;
@@ -6470,7 +6531,13 @@ H5VL_iod_get_token(void *_obj, void *token, size_t *token_size)
if(H5S_encode(space, NULL, &space_size) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTENCODE, FAIL, "can't encode dataspace")
- *token_size += dt_size + space_size + sizeof(size_t)*2;
+ cpl_id = dset->remote_dset.dcpl_id;
+ if(NULL == (plist = (H5P_genplist_t *)H5I_object_verify(cpl_id, H5I_GENPROP_LST)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list");
+ if(H5P__encode(plist, TRUE, NULL, &plist_size) < 0)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTENCODE, FAIL, "can't encode plist")
+
+ *token_size += plist_size + dt_size + space_size + sizeof(size_t)*3;
break;
}
@@ -6490,7 +6557,13 @@ H5VL_iod_get_token(void *_obj, void *token, size_t *token_size)
if(H5T_encode(dt, NULL, &dt_size) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTENCODE, FAIL, "can't encode datatype")
- *token_size += dt_size + sizeof(size_t);
+ cpl_id = dtype->remote_dtype.tcpl_id;
+ if(NULL == (plist = (H5P_genplist_t *)H5I_object_verify(cpl_id, H5I_GENPROP_LST)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list");
+ if(H5P__encode(plist, TRUE, NULL, &plist_size) < 0)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTENCODE, FAIL, "can't encode plist")
+
+ *token_size += dt_size + plist_size + sizeof(size_t)*2;
break;
}
@@ -6517,7 +6590,13 @@ H5VL_iod_get_token(void *_obj, void *token, size_t *token_size)
if(H5T_encode(vt, NULL, &valtype_size) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTENCODE, FAIL, "can't encode datatype")
- *token_size += keytype_size + valtype_size + sizeof(size_t)*2;
+ cpl_id = map->remote_map.mcpl_id;
+ if(NULL == (plist = (H5P_genplist_t *)H5I_object_verify(cpl_id, H5I_GENPROP_LST)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list");
+ if(H5P__encode(plist, TRUE, NULL, &plist_size) < 0)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTENCODE, FAIL, "can't encode plist")
+
+ *token_size += keytype_size + valtype_size + plist_size + sizeof(size_t)*3;
break;
}
@@ -6556,8 +6635,19 @@ H5VL_iod_get_token(void *_obj, void *token, size_t *token_size)
switch(obj->obj_type) {
case H5I_GROUP:
+ HDmemcpy(buf_ptr, &plist_size, sizeof(size_t));
+ buf_ptr += sizeof(size_t);
+ if(H5P__encode(plist, TRUE, buf_ptr, &plist_size) < 0)
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTENCODE, FAIL, "can't encode dataspace")
+ buf_ptr += plist_size;
break;
case H5I_DATASET:
+ HDmemcpy(buf_ptr, &plist_size, sizeof(size_t));
+ buf_ptr += sizeof(size_t);
+ if(H5P__encode(plist, TRUE, buf_ptr, &plist_size) < 0)
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTENCODE, FAIL, "can't encode dataspace")
+ buf_ptr += plist_size;
+
HDmemcpy(buf_ptr, &dt_size, sizeof(size_t));
buf_ptr += sizeof(size_t);
if(H5T_encode(dt, buf_ptr, &dt_size) < 0)
@@ -6571,6 +6661,12 @@ H5VL_iod_get_token(void *_obj, void *token, size_t *token_size)
buf_ptr += space_size;
break;
case H5I_DATATYPE:
+ HDmemcpy(buf_ptr, &plist_size, sizeof(size_t));
+ buf_ptr += sizeof(size_t);
+ if(H5P__encode(plist, TRUE, buf_ptr, &plist_size) < 0)
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTENCODE, FAIL, "can't encode dataspace")
+ buf_ptr += plist_size;
+
HDmemcpy(buf_ptr, &dt_size, sizeof(size_t));
buf_ptr += sizeof(size_t);
if(H5T_encode(dt, buf_ptr, &dt_size) < 0)
@@ -6578,6 +6674,12 @@ H5VL_iod_get_token(void *_obj, void *token, size_t *token_size)
buf_ptr += dt_size;
break;
case H5I_MAP:
+ HDmemcpy(buf_ptr, &plist_size, sizeof(size_t));
+ buf_ptr += sizeof(size_t);
+ if(H5P__encode(plist, TRUE, buf_ptr, &plist_size) < 0)
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTENCODE, FAIL, "can't encode dataspace")
+ buf_ptr += plist_size;
+
HDmemcpy(buf_ptr, &keytype_size, sizeof(size_t));
buf_ptr += sizeof(size_t);
if(H5T_encode(kt, buf_ptr, &keytype_size) < 0)
@@ -9907,7 +10009,7 @@ H5VL_iod_view_create(void *_obj, hid_t query_id, hid_t vcpl_id, hid_t rcxt_id, v
/* store the query ID */
view->query_id = query_id;
- if(H5I_inc_ref(query_id, FALSE) < 0)
+ if(H5I_inc_ref(query_id, TRUE) < 0)
HGOTO_ERROR(H5E_ATOM, H5E_CANTINC, NULL, "can't increment ID ref count");
/* copy property list */
diff --git a/src/H5VLiod_server.h b/src/H5VLiod_server.h
index d49e323..7ebb609 100644
--- a/src/H5VLiod_server.h
+++ b/src/H5VLiod_server.h
@@ -90,6 +90,10 @@ extern hg_id_t H5VL_EFF_CLOSE_CONTAINER;
extern hg_id_t H5VL_EFF_ANALYSIS_FARM;
extern hg_id_t H5VL_EFF_ANALYSIS_FARM_TRANSFER;
+/* Define the operator function pointer for H5Diterate() */
+typedef herr_t (*H5VL_operator_t)(iod_handle_t coh, iod_obj_id_t obj_id, iod_trans_id_t rtid,
+ H5I_type_t obj_type, uint32_t cs_scope, void *operator_data);
+
H5_DLL void EFF__mercury_register_callbacks(void);
H5_DLL int H5VL_iod_server_analysis_execute(hg_handle_t handle);
@@ -444,6 +448,10 @@ H5_DLL herr_t H5VL__iod_server_final_io(iod_handle_t iod_oh, hid_t space_id, siz
hbool_t write_op, void *buf, size_t buf_size,
iod_checksum_t cs, uint32_t cs_scope, iod_trans_id_t tid);
+H5_DLL herr_t H5VL_iod_server_iterate(iod_handle_t coh, iod_obj_id_t obj_id, iod_trans_id_t rtid,
+ H5I_type_t obj_type, uint32_t cs_scope,
+ H5VL_operator_t op, void *op_data);
+
H5_DLL herr_t H5VL__iod_get_query_data_cb(void *elem, hid_t type_id, unsigned ndim,
const hsize_t *point, void *_udata);
#endif /* H5_HAVE_EFF */
diff --git a/src/H5VLiod_util.c b/src/H5VLiod_util.c
index c577ecb..a67d7b8 100644
--- a/src/H5VLiod_util.c
+++ b/src/H5VLiod_util.c
@@ -22,6 +22,9 @@
#ifdef H5_HAVE_EFF
+static H5I_type_t H5VL__iod_get_h5_obj_type(iod_obj_id_t oid, iod_handle_t coh,
+ iod_trans_id_t rtid, uint32_t cs_scope);
+
/*
* Programmer: Mohamad Chaarawi <chaarawi@hdfgroup.gov>
* February, 2013
@@ -1243,6 +1246,183 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5VL_iod_verify_kv_pair */
+
+/*-------------------------------------------------------------------------
+ * Function: H5VL__iod_get_h5_obj_type
+ *
+ * Purpose: Function to retrieve the HDF5 object type of an IOD object.
+ *
+ * Return: Success: SUCCEED
+ * Failure: Negative
+ *
+ *-------------------------------------------------------------------------
+ */
+static H5I_type_t
+H5VL__iod_get_h5_obj_type(iod_obj_id_t oid, iod_handle_t coh, iod_trans_id_t rtid, uint32_t cs_scope)
+{
+ iod_handle_t mdkv_oh, oh;
+ H5I_type_t obj_type;
+ iod_obj_type_t iod_type;
+ herr_t ret_value = -1;
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+ iod_type = IOD_OBJID_GETTYPE(oid);
+
+ if(IOD_OBJ_ARRAY == iod_type)
+ obj_type = H5I_DATASET;
+ else if(IOD_OBJ_BLOB == iod_type)
+ obj_type = H5I_DATATYPE;
+ else {
+ scratch_pad sp;
+ iod_checksum_t sp_cs = 0;
+
+ if (iod_obj_open_read(coh, oid, rtid, NULL /*hints*/, &oh, NULL) < 0)
+ HGOTO_ERROR2(H5E_FILE, H5E_CANTINIT, FAIL, "can't open object");
+
+ /* get scratch pad of the object */
+ if(iod_obj_get_scratch(oh, rtid, &sp, &sp_cs, NULL) < 0)
+ HGOTO_ERROR2(H5E_FILE, H5E_CANTINIT, FAIL, "can't get scratch pad for object");
+ if(sp_cs && (cs_scope & H5_CHECKSUM_IOD)) {
+ /* verify scratch pad integrity */
+ if(H5VL_iod_verify_scratch_pad(&sp, sp_cs) < 0)
+ HGOTO_ERROR2(H5E_SYM, H5E_CANTINIT, FAIL, "Scratch Pad failed integrity check");
+ }
+
+ /* open the metadata KV */
+ if (iod_obj_open_read(coh, sp[0], rtid, NULL /*hints*/, &mdkv_oh, NULL) < 0)
+ HGOTO_ERROR2(H5E_FILE, H5E_CANTINIT, FAIL, "can't open MDKV");
+
+ if(H5VL_iod_get_metadata(mdkv_oh, rtid, H5VL_IOD_OBJECT_TYPE, H5VL_IOD_KEY_OBJ_TYPE,
+ cs_scope, NULL, &obj_type) < 0)
+ HGOTO_ERROR2(H5E_SYM, H5E_CANTGET, FAIL, "failed to retrieve link count");
+
+ if(iod_obj_close(mdkv_oh, NULL, NULL) < 0)
+ HGOTO_ERROR2(H5E_SYM, H5E_CANTINIT, FAIL, "can't close current object handle");
+ if(iod_obj_close(oh, NULL, NULL) < 0)
+ HGOTO_ERROR2(H5E_SYM, H5E_CANTINIT, FAIL, "can't close current object handle");
+ }
+
+ ret_value = obj_type;
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5VL__iod_get_h5_obj_type() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5VL_iod_server_iterate
+ *
+ * Purpose:
+ *
+ * Return: Success: SUCCEED
+ * Failure: Negative
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5VL_iod_server_iterate(iod_handle_t coh, iod_obj_id_t obj_id, iod_trans_id_t rtid,
+ H5I_type_t obj_type, uint32_t cs_scope,
+ H5VL_operator_t op, void *op_data)
+{
+ iod_handle_t obj_oh;
+ herr_t ret;
+ herr_t ret_value = SUCCEED;
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+ ret = (*op)(coh, obj_id, rtid, obj_type, cs_scope, op_data);
+
+ /* Get the object type, if it is not a group do not check for links */
+ if(H5I_GROUP == obj_type) {
+ int num_entries;
+
+ /* Get the object ID and iterate into every member in the group */
+ if (iod_obj_open_read(coh, obj_id, rtid, NULL, &obj_oh, NULL) < 0)
+ HGOTO_ERROR2(H5E_SYM, H5E_CANTINIT, FAIL, "can't open current group");
+
+ ret = iod_kv_get_num(obj_oh, rtid, &num_entries, NULL);
+ if(ret != 0)
+ HGOTO_ERROR_IOD(ret, FAIL, "can't get number of KV entries");
+
+ if(0 != num_entries) {
+ iod_kv_params_t *kvs = NULL;
+ iod_kv_t *kv = NULL;
+ iod_checksum_t *oid_cs = NULL;
+ iod_ret_t *oid_ret = NULL;
+ int i;
+
+ kvs = (iod_kv_params_t *)malloc(sizeof(iod_kv_params_t) * (size_t)num_entries);
+ kv = (iod_kv_t *)malloc(sizeof(iod_kv_t) * (size_t)num_entries);
+ oid_cs = (iod_checksum_t *)malloc(sizeof(iod_checksum_t) * (size_t)num_entries);
+ oid_ret = (iod_ret_t *)malloc(sizeof(iod_ret_t) * (size_t)num_entries);
+
+ for(i=0 ; i<num_entries ; i++) {
+ kv[i].key = malloc(IOD_KV_KEY_MAXLEN);
+ kv[i].key_len = IOD_KV_KEY_MAXLEN;
+ //kv[i].value = malloc(sizeof(iod_obj_id_t));
+ //kv[i].value_len = sizeof(iod_obj_id_t);
+ kvs[i].kv = &kv[i];
+ kvs[i].cs = &oid_cs[i];
+ kvs[i].ret = &oid_ret[i];
+ }
+
+ ret = iod_kv_list_key(obj_oh, rtid, NULL, 0, &num_entries, kvs, NULL);
+ if(ret != 0)
+ HGOTO_ERROR_IOD(ret, FAIL, "can't get list of keys");
+ //ret = iod_kv_get_list(obj_oh, rtid, NULL, 0, &num_entries, kvs, NULL);
+ //if(ret != 0)
+ //HGOTO_ERROR_IOD(ret, FAIL, "can't get KV list from group KV");
+
+ for(i=0 ; i<num_entries ; i++) {
+
+ H5I_type_t otype;
+ iod_obj_id_t oid;// = *((iod_obj_id_t *)kv[i].value);
+ H5VL_iod_link_t value;
+
+ /* lookup object in the current group */
+ if(H5VL_iod_get_metadata(obj_oh, rtid, H5VL_IOD_LINK,
+ (char *)(kv[i].key), cs_scope, NULL, &value) < 0)
+ HGOTO_ERROR2(H5E_SYM, H5E_CANTGET, FAIL, "failed to retrieve link value");
+
+ if(H5L_TYPE_SOFT == value.link_type) {
+ continue;
+ }
+ else
+ oid = value.u.iod_id;
+
+#if H5VL_IOD_DEBUG
+ fprintf(stderr, "Iterating into %s OID %"PRIx64"\n", ((char *)kv[i].key), oid);
+#endif
+
+ /* Get the object type. */
+ if((otype = H5VL__iod_get_h5_obj_type(oid, coh, rtid, cs_scope)) < 0)
+ HGOTO_ERROR_IOD(ret, FAIL, "can't get object type");
+
+ if(H5VL_iod_server_iterate(coh, oid, rtid, otype, cs_scope, op, op_data) < 0)
+ HGOTO_ERROR_IOD(ret, FAIL, "can't iterate");
+ }
+
+ for(i=0 ; i<num_entries ; i++) {
+ free(kv[i].key);
+ //free(kv[i].value);
+ }
+
+ free(kv);
+ free(oid_cs);
+ free(oid_ret);
+ free(kvs);
+ }
+
+ if(iod_obj_close(obj_oh, NULL, NULL) < 0)
+ HGOTO_ERROR2(H5E_SYM, H5E_CANTINIT, FAIL, "can't close current object handle");
+ }
+
+ ret_value = ret;
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+}
+
#if 0
herr_t
H5VL_iod_map_type_convert(hid_t src_id, hid_t dst_id, void *buf, size_t buf_size)
diff --git a/src/H5VLiod_view.c b/src/H5VLiod_view.c
index 62bc9af..4383572 100644
--- a/src/H5VLiod_view.c
+++ b/src/H5VLiod_view.c
@@ -28,6 +28,14 @@
#ifdef H5_HAVE_EFF
+typedef struct {
+ hid_t query_id;
+ hid_t vcpl_id;
+ region_info_t region_info;
+ obj_info_t obj_info;
+ attr_info_t attr_info;
+} H5VL_view_op_t;
+
static hid_t H5VL__iod_get_elmt_region(iod_handle_t coh, iod_obj_id_t dset_id,
iod_trans_id_t rtid, hid_t query_id,
hid_t vcpl_id, uint32_t cs_scope, binary_buf_t *token);
@@ -37,6 +45,35 @@ H5VL__iod_get_token(H5O_type_t obj_type, iod_obj_id_t iod_id, iod_obj_id_t mdkv_
iod_obj_id_t attrkv_id, hid_t cpl_id, hid_t id1, hid_t id2,
binary_buf_t *token);
+static herr_t
+H5VL__iod_view_iterate_cb(iod_handle_t coh, iod_obj_id_t obj_id, iod_trans_id_t rtid,
+ H5I_type_t obj_type, uint32_t cs_scope, void *_op_data)
+{
+ H5VL_view_op_t *op_data = (H5VL_view_op_t *)_op_data;
+ herr_t ret_value = SUCCEED;
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+ if(obj_type == H5I_DATASET) {
+ hsize_t i = op_data->region_info.count;
+
+ op_data->region_info.tokens = (binary_buf_t *)realloc(op_data->region_info.tokens,
+ (i+1) * sizeof(binary_buf_t));
+ op_data->region_info.regions = (hid_t *)realloc(op_data->region_info.regions,
+ (i+1) * sizeof(hid_t));
+
+ if((op_data->region_info.regions[i] =
+ H5VL__iod_get_elmt_region(coh, obj_id, rtid, op_data->query_id, op_data->vcpl_id,
+ cs_scope, &op_data->region_info.tokens[i])) < 0)
+ HGOTO_ERROR2(H5E_FILE, H5E_CANTINIT, FAIL, "can't get region from query");
+
+ op_data->region_info.count ++;
+ }
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+}
+
/*-------------------------------------------------------------------------
* Function: H5VL_iod_server_view_create_cb
*
@@ -65,10 +102,7 @@ H5VL_iod_server_view_create_cb(AXE_engine_t UNUSED axe_engine,
hid_t vcpl_id;
iod_trans_id_t rtid = input->rcxt_num;
uint32_t cs_scope = input->cs_scope;
- iod_handle_t mdkv_oh;
- scratch_pad sp;
- iod_ret_t ret;
- hid_t region = FAIL;
+ hsize_t i;
herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI_NOINIT
@@ -96,7 +130,33 @@ H5VL_iod_server_view_create_cb(AXE_engine_t UNUSED axe_engine,
output.obj_info.tokens = NULL;
output.attr_info.count = 0;
output.attr_info.tokens = NULL;
-
+ }
+ else if (H5I_GROUP == obj_type) {
+ H5VL_view_op_t udata;
+
+ udata.query_id = query_id;
+ udata.vcpl_id = vcpl_id;
+
+ udata.region_info.count = 0;
+ udata.region_info.tokens = NULL;
+ udata.region_info.regions = NULL;
+ udata.obj_info.count = 0;
+ udata.obj_info.tokens = NULL;
+ udata.attr_info.count = 0;
+ udata.attr_info.tokens = NULL;
+
+ if(H5VL_iod_server_iterate(coh, loc_id, rtid, obj_type, cs_scope,
+ H5VL__iod_view_iterate_cb, &udata) < 0)
+ HGOTO_ERROR2(H5E_SYM, H5E_CANTINIT, FAIL, "can't iterate to create group");
+
+ output.region_info.count = udata.region_info.count;
+ output.region_info.tokens = udata.region_info.tokens;
+ output.region_info.regions = udata.region_info.regions;
+ output.valid_view = TRUE;
+ output.obj_info.count = 0;
+ output.obj_info.tokens = NULL;
+ output.attr_info.count = 0;
+ output.attr_info.tokens = NULL;
}
else {
/* MSC - for now this is only what is supported */
@@ -117,6 +177,31 @@ done:
HG_Handler_start_output(op_data->hg_handle, &output);
+ for(i=0 ; i<output.region_info.count ; i++) {
+ free(output.region_info.tokens[i].buf);
+ H5Sclose(output.region_info.regions[i]);
+ }
+
+ for(i=0 ; i<output.obj_info.count ; i++) {
+ free(output.obj_info.tokens[i].buf);
+ }
+
+ for(i=0 ; i<output.attr_info.count ; i++) {
+ free(output.attr_info.tokens[i].buf);
+ }
+
+ if(output.region_info.tokens)
+ free(output.region_info.tokens);
+
+ if(output.region_info.regions)
+ free(output.region_info.regions);
+
+ if(output.obj_info.tokens)
+ free(output.obj_info.tokens);
+
+ if(output.attr_info.tokens)
+ free(output.attr_info.tokens);
+
input = (view_create_in_t *)H5MM_xfree(input);
op_data = (op_data_t *)H5MM_xfree(op_data);
@@ -244,7 +329,7 @@ H5VL__iod_get_token(H5O_type_t obj_type, iod_obj_id_t iod_id, iod_obj_id_t mdkv_
iod_obj_id_t attrkv_id, hid_t cpl_id, hid_t id1, hid_t id2,
binary_buf_t *token)
{
- size_t dt_size = 0, space_size = 0;
+ size_t dt_size = 0, space_size = 0, plist_size = 0;
size_t keytype_size = 0, valtype_size;
uint8_t *buf_ptr = NULL;
size_t token_size = 0;
@@ -256,30 +341,42 @@ H5VL__iod_get_token(H5O_type_t obj_type, iod_obj_id_t iod_id, iod_obj_id_t mdkv_
switch(obj_type) {
case H5O_TYPE_GROUP:
+ if(H5Pencode(cpl_id, NULL, &plist_size) < 0)
+ HGOTO_ERROR2(H5E_PLIST, H5E_CANTENCODE, FAIL, "can't encode plist");
+ token_size += plist_size + sizeof(size_t);
break;
case H5O_TYPE_DATASET:
+ if(H5Pencode(cpl_id, NULL, &plist_size) < 0)
+ HGOTO_ERROR2(H5E_PLIST, H5E_CANTENCODE, FAIL, "can't encode plist");
+
if(H5Tencode(id1, NULL, &dt_size) < 0)
HGOTO_ERROR2(H5E_DATATYPE, H5E_CANTENCODE, FAIL, "can't encode datatype");
if(H5Sencode(id2, NULL, &space_size) < 0)
HGOTO_ERROR2(H5E_DATASPACE, H5E_CANTENCODE, FAIL, "can't encode dataspace");
- token_size += dt_size + space_size + sizeof(size_t)*2;
+ token_size += plist_size + dt_size + space_size + sizeof(size_t)*3;
break;
case H5O_TYPE_NAMED_DATATYPE:
+ if(H5Pencode(cpl_id, NULL, &plist_size) < 0)
+ HGOTO_ERROR2(H5E_PLIST, H5E_CANTENCODE, FAIL, "can't encode plist");
+
if(H5Tencode(id1, NULL, &dt_size) < 0)
HGOTO_ERROR2(H5E_DATATYPE, H5E_CANTENCODE, FAIL, "can't encode datatype");
- token_size += dt_size + sizeof(size_t);
+ token_size += plist_size + dt_size + sizeof(size_t)*2;
break;
case H5O_TYPE_MAP:
+ if(H5Pencode(cpl_id, NULL, &plist_size) < 0)
+ HGOTO_ERROR2(H5E_PLIST, H5E_CANTENCODE, FAIL, "can't encode plist");
+
if(H5Tencode(id1, NULL, &keytype_size) < 0)
HGOTO_ERROR2(H5E_DATATYPE, H5E_CANTENCODE, FAIL, "can't encode datatype");
if(H5Tencode(id2, NULL, &valtype_size) < 0)
HGOTO_ERROR2(H5E_DATATYPE, H5E_CANTENCODE, FAIL, "can't encode datatype");
- token_size += keytype_size + valtype_size + sizeof(size_t)*2;
+ token_size += plist_size + keytype_size + valtype_size + sizeof(size_t)*3;
break;
case H5O_TYPE_UNKNOWN:
case H5O_TYPE_NTYPES:
@@ -302,8 +399,19 @@ H5VL__iod_get_token(H5O_type_t obj_type, iod_obj_id_t iod_id, iod_obj_id_t mdkv_
switch(obj_type) {
case H5O_TYPE_GROUP:
+ HDmemcpy(buf_ptr, &plist_size, sizeof(size_t));
+ buf_ptr += sizeof(size_t);
+ if(H5Pencode(cpl_id, buf_ptr, &plist_size) < 0)
+ HGOTO_ERROR2(H5E_PLIST, H5E_CANTENCODE, FAIL, "can't encode plist");
+ buf_ptr += plist_size;
break;
case H5O_TYPE_DATASET:
+ HDmemcpy(buf_ptr, &plist_size, sizeof(size_t));
+ buf_ptr += sizeof(size_t);
+ if(H5Pencode(cpl_id, buf_ptr, &plist_size) < 0)
+ HGOTO_ERROR2(H5E_PLIST, H5E_CANTENCODE, FAIL, "can't encode plist");
+ buf_ptr += plist_size;
+
HDmemcpy(buf_ptr, &dt_size, sizeof(size_t));
buf_ptr += sizeof(size_t);
if(H5Tencode(id1, buf_ptr, &dt_size) < 0)
@@ -317,6 +425,12 @@ H5VL__iod_get_token(H5O_type_t obj_type, iod_obj_id_t iod_id, iod_obj_id_t mdkv_
buf_ptr += space_size;
break;
case H5O_TYPE_NAMED_DATATYPE:
+ HDmemcpy(buf_ptr, &plist_size, sizeof(size_t));
+ buf_ptr += sizeof(size_t);
+ if(H5Pencode(cpl_id, buf_ptr, &plist_size) < 0)
+ HGOTO_ERROR2(H5E_PLIST, H5E_CANTENCODE, FAIL, "can't encode plist");
+ buf_ptr += plist_size;
+
HDmemcpy(buf_ptr, &dt_size, sizeof(size_t));
buf_ptr += sizeof(size_t);
if(H5Tencode(id1, buf_ptr, &dt_size) < 0)
@@ -324,6 +438,12 @@ H5VL__iod_get_token(H5O_type_t obj_type, iod_obj_id_t iod_id, iod_obj_id_t mdkv_
buf_ptr += dt_size;
break;
case H5O_TYPE_MAP:
+ HDmemcpy(buf_ptr, &plist_size, sizeof(size_t));
+ buf_ptr += sizeof(size_t);
+ if(H5Pencode(cpl_id, buf_ptr, &plist_size) < 0)
+ HGOTO_ERROR2(H5E_PLIST, H5E_CANTENCODE, FAIL, "can't encode plist");
+ buf_ptr += plist_size;
+
HDmemcpy(buf_ptr, &keytype_size, sizeof(size_t));
buf_ptr += sizeof(size_t);
if(H5Tencode(id1, buf_ptr, &keytype_size) < 0)