summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--examples/h5ff_client_adv_analysis.c2
-rw-r--r--examples/h5ff_client_dset.c7
-rw-r--r--examples/h5ff_client_evict_deltas.c4
-rw-r--r--examples/h5ff_client_links.c2
-rw-r--r--examples/h5ff_client_map.c22
-rw-r--r--src/H5FF.c42
-rw-r--r--src/H5Pdxpl.c6
-rw-r--r--src/H5Pvcpl.c3
-rw-r--r--src/H5V.c8
-rw-r--r--src/H5VLiod.c2
-rw-r--r--src/H5VLiod_client.c13
-rw-r--r--src/H5VLiod_encdec.c2
12 files changed, 79 insertions, 34 deletions
diff --git a/examples/h5ff_client_adv_analysis.c b/examples/h5ff_client_adv_analysis.c
index 14de9c2..f989784 100644
--- a/examples/h5ff_client_adv_analysis.c
+++ b/examples/h5ff_client_adv_analysis.c
@@ -93,7 +93,7 @@ write_dataset(hid_t group_id, const char *dataset_name,
/* Create a dataset. */
dataset_id = H5Dcreate_ff(group_id, dataset_name, datatype_id, space_id,
- H5P_DEFAULT, dcpl_id, H5P_DEFAULT, trans_id, estack_id);
+ H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT, trans_id, estack_id);
assert(dataset_id);
/* Write the first dataset. */
diff --git a/examples/h5ff_client_dset.c b/examples/h5ff_client_dset.c
index 4b59d9c..60daabc 100644
--- a/examples/h5ff_client_dset.c
+++ b/examples/h5ff_client_dset.c
@@ -166,9 +166,10 @@ int main(int argc, char **argv) {
assert(gid3 > 0);
dcpl_id = H5Pcreate (H5P_DATASET_CREATE);
- H5Pset_dcpl_dim_layout(dcpl_id, H5D_COL_MAJOR);
- H5Pset_dcpl_stripe_count(dcpl_id, 4);
- H5Pset_dcpl_stripe_size(dcpl_id, 5);
+ /* MSC - Was working in FF, but not working now. Seems like IOD regression bug. */
+ //H5Pset_dcpl_dim_layout(dcpl_id, H5D_COL_MAJOR);
+ //H5Pset_dcpl_stripe_count(dcpl_id, 4);
+ //H5Pset_dcpl_stripe_size(dcpl_id, 5);
/* create datasets */
did1 = H5Dcreate_ff(gid1, "D1", dtid, sid, H5P_DEFAULT, dcpl_id, H5P_DEFAULT, tid1, e_stack);
diff --git a/examples/h5ff_client_evict_deltas.c b/examples/h5ff_client_evict_deltas.c
index 735e984..e72c9aa 100644
--- a/examples/h5ff_client_evict_deltas.c
+++ b/examples/h5ff_client_evict_deltas.c
@@ -216,8 +216,12 @@ int main(int argc, char **argv) {
assert(rid2 > 0);
}
+ /* wait on all requests and print completion status */
gid = H5Oopen_ff(file_id, "G1", H5P_DEFAULT, rid2);
assert(gid);
+ H5ESget_count(e_stack, &num_events);
+ printf("%d events in event stack. Completion status = %d\n", num_events, status);
+
dtid = H5Oopen_ff(file_id, "DT1", H5P_DEFAULT, rid2);
assert(dtid);
did = H5Oopen_ff(gid,"D1", H5P_DEFAULT, rid2);
diff --git a/examples/h5ff_client_links.c b/examples/h5ff_client_links.c
index 2be2685..d59a479 100644
--- a/examples/h5ff_client_links.c
+++ b/examples/h5ff_client_links.c
@@ -172,7 +172,9 @@ int main(int argc, char **argv) {
H5Dclose_ff(did2, H5_EVENT_STACK_NULL);
/* should fail */
+ H5E_BEGIN_TRY {
did2 = H5Dopen_ff(file_id,"/G1/G2/G3/D2", H5P_DEFAULT, rid3, H5_EVENT_STACK_NULL);
+ } H5E_END_TRY;
assert(did2 < 0);
/* release container version 1. This is async. */
diff --git a/examples/h5ff_client_map.c b/examples/h5ff_client_map.c
index 2a4c7ea..9c743fe 100644
--- a/examples/h5ff_client_map.c
+++ b/examples/h5ff_client_map.c
@@ -147,21 +147,24 @@ int main(int argc, char **argv) {
/* create two groups */
gid1 = H5Gcreate_ff(file_id, "G1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT, tid1, e_stack);
+ assert(gid1);
gid2 = H5Gcreate_ff(gid1, "G2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT, tid1, e_stack);
+ assert(gid2);
/* Create 3 Map objects with the key type being 32 bit LE integer */
/* First Map object with a Value type a 32 bit LE integer */
map1 = H5Mcreate_ff(file_id, "MAP_1", H5T_STD_I32LE, H5T_STD_I32LE,
H5P_DEFAULT,H5P_DEFAULT,H5P_DEFAULT, tid1, e_stack);
-
+ assert(map1);
/* Second Map object with a Value type being an HDF5 VL datatype */
map2 = H5Mcreate_ff(gid1, "MAP_2", H5T_STD_I32LE, dtid1,
H5P_DEFAULT,H5P_DEFAULT,H5P_DEFAULT, tid1, e_stack);
-
+ assert(map2);
/* Third Map object with a Value type being an HDF5 VL string */
map3 = H5Mcreate_ff(gid2, "MAP_3", H5T_STD_I32LE, dtid2,
H5P_DEFAULT,H5P_DEFAULT,H5P_DEFAULT, tid1, e_stack);
+ assert(map3);
/* write some KV pairs to each map object. */
{
@@ -357,8 +360,10 @@ int main(int argc, char **argv) {
key = 1;
ret = H5Mdelete_ff(map3, H5T_STD_I32LE, &key, tid2, H5_EVENT_STACK_NULL);
+ H5E_BEGIN_TRY {
temp_id = H5Gcreate_ff(file_id, "temp_group", H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT, tid2, H5_EVENT_STACK_NULL);
+ } H5E_END_TRY;
if(temp_id > 0)
assert(H5Gclose_ff(temp_id, H5_EVENT_STACK_NULL) ==0);
}
@@ -375,15 +380,22 @@ int main(int argc, char **argv) {
assert(0 == ret);
}
else {
+ H5E_BEGIN_TRY {
ret = H5TRfinish(tid2, H5P_DEFAULT, NULL, H5_EVENT_STACK_NULL);
+ } H5E_END_TRY;
if(ret < 0)
fprintf(stderr, "Transaction finish failed as expected (aborted)\n");
}
+ H5E_BEGIN_TRY {
ret = H5TRfinish(tid3, H5P_DEFAULT, NULL, H5_EVENT_STACK_NULL);
+ } H5E_END_TRY;
if(ret < 0)
fprintf(stderr, "Transaction finish failed (aborted)\n");
+
+ H5E_BEGIN_TRY {
ret = H5TRfinish(tid4, H5P_DEFAULT, NULL, H5_EVENT_STACK_NULL);
+ } H5E_END_TRY;
if(ret < 0)
fprintf(stderr, "Transaction finish failed (aborted)\n");
@@ -412,13 +424,19 @@ int main(int argc, char **argv) {
/* acquire container version 3, 4, 5 - EXACT (Should Fail since 2 is aborted) */
version = 3;
+ H5E_BEGIN_TRY {
rid3 = H5RCacquire(file_id, &version, H5P_DEFAULT, H5_EVENT_STACK_NULL);
+ } H5E_END_TRY;
assert(rid3 < 0);
version = 4;
+ H5E_BEGIN_TRY {
rid3 = H5RCacquire(file_id, &version, H5P_DEFAULT, H5_EVENT_STACK_NULL);
+ } H5E_END_TRY;
assert(rid3 < 0);
version = 5;
+ H5E_BEGIN_TRY {
rid3 = H5RCacquire(file_id, &version, H5P_DEFAULT, H5_EVENT_STACK_NULL);
+ } H5E_END_TRY;
assert(rid3 < 0);
/* Now read some data from the container at version 1*/
diff --git a/src/H5FF.c b/src/H5FF.c
index f30a23d..1b109f5 100644
--- a/src/H5FF.c
+++ b/src/H5FF.c
@@ -3299,11 +3299,13 @@ H5Oopen_by_token(const void *token, hid_t trans_id, hid_t estack_id)
if(H5ES_insert(estack_id, request) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "failed to insert request in event stack")
+ HDassert(tr->vol_cls->value == H5_VOL_IOD);
+
/* setup VOL info struct */
if(NULL == (vol_info = H5FL_CALLOC(H5VL_t)))
HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, FAIL, "can't allocate VL info struct")
vol_info->vol_cls = tr->vol_cls;
- HDassert(tr->vol_cls->value == H5_VOL_IOD);
+ vol_info->vol_id = H5VL_IOD_g;
if(H5I_inc_ref(vol_info->vol_id, FALSE) < 0)
HGOTO_ERROR(H5E_ATOM, H5E_CANTINC, FAIL, "unable to increment ref count on VOL plugin")
@@ -3683,7 +3685,7 @@ H5Oget_comment_ff(hid_t loc_id, char *comment, size_t bufsize, ssize_t *ret,
loc_params.type = H5VL_OBJECT_BY_SELF;
loc_params.obj_type = H5I_get_type(loc_id);
- /* get the file object */
+ /* get the vol object */
if(NULL == (obj = H5VL_get_object(loc_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid file identifier")
@@ -3702,7 +3704,7 @@ H5Oget_comment_ff(hid_t loc_id, char *comment, size_t bufsize, ssize_t *ret,
}
if(H5VL_object_optional(obj->vol_obj, obj->vol_info->vol_cls, dxpl_id, req,
- H5VL_OBJECT_GET_COMMENT, loc_params, comment, bufsize, &ret_value) < 0)
+ H5VL_OBJECT_GET_COMMENT, loc_params, comment, bufsize, ret) < 0)
HGOTO_ERROR(H5E_INTERNAL, H5E_CANTGET, FAIL, "unable to get object comment")
if(request && *req)
@@ -3775,7 +3777,7 @@ H5Oget_comment_by_name_ff(hid_t loc_id, const char *name, char *comment, size_t
}
if(H5VL_object_optional(obj->vol_obj, obj->vol_info->vol_cls, dxpl_id, req,
- H5VL_OBJECT_GET_COMMENT, loc_params, comment, bufsize, &ret_value) < 0)
+ H5VL_OBJECT_GET_COMMENT, loc_params, comment, bufsize, &ret) < 0)
HGOTO_ERROR(H5E_INTERNAL, H5E_CANTGET, FAIL, "unable to get object info")
if(request && *req)
@@ -3959,20 +3961,37 @@ H5Oclose_ff(hid_t object_id, hid_t estack_id)
/* Get the type of the object and close it in the correct way */
switch(H5I_get_type(object_id)) {
case H5I_GROUP:
- case H5I_DATATYPE:
case H5I_DATASET:
case H5I_MAP:
/* Check args */
if(NULL == (obj = (H5VL_object_t *)H5I_object(object_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a valid object ID")
- /* set the async request and dxpl IDs to be passed on to the VOL layer */
+ /* set the async request and dxpl IDs to be passed on to the VOL layer */
obj->close_estack_id = estack_id;
obj->close_dxpl_id = H5AC_dxpl_id;
if(H5I_dec_app_ref(object_id) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "unable to close object");
break;
+ case H5I_DATATYPE:
+ {
+ H5T_t *dt = NULL;
+
+ /* Check args */
+ if(NULL == (dt = (H5T_t *)H5I_object(object_id)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a valid datatype ID");
+
+ if (NULL != dt->vol_obj) {
+ /* set the async request and dxpl IDs to be passed on to the VOL layer */
+ dt->vol_obj->close_estack_id = estack_id;
+ dt->vol_obj->close_dxpl_id = H5AC_dxpl_id;
+ }
+
+ if(H5I_dec_app_ref(object_id) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "unable to close object");
+ break;
+ }
case H5I_UNINIT:
case H5I_BADID:
case H5I_FILE:
@@ -5272,12 +5291,13 @@ done:
hid_t
H5Dquery_ff(hid_t dset_id, hid_t query_id, hid_t scope_id, hid_t rcxt_id)
{
- void *dset = NULL;
+ H5VL_object_t *dset = NULL;
hid_t xxpl_id = FAIL;
unsigned plugin_id;
void *buf = NULL;
hid_t type_id=FAIL, space_id=scope_id, dset_space_id=FAIL;
hbool_t use_region_scope = TRUE;
+ herr_t ret;
hid_t ret_value = FAIL;
FUNC_ENTER_API(FAIL)
@@ -5288,12 +5308,12 @@ H5Dquery_ff(hid_t dset_id, hid_t query_id, hid_t scope_id, hid_t rcxt_id)
#ifdef H5_HAVE_INDEXING
/* Use indexing query callback if it exists */
- if (H5X_PLUGIN_NONE != (plugin_id = H5VL_iod_dataset_get_index_plugin_id(dset))) {
+ if (H5X_PLUGIN_NONE != (plugin_id = H5VL_iod_dataset_get_index_plugin_id(dset->vol_obj))) {
void *idx_handle = NULL; /* index */
H5X_class_t *idx_class = NULL;
H5P_genplist_t *xxpl_plist = NULL, *plist = NULL; /* Property list pointer */
- if (NULL == (idx_handle = H5VL_iod_dataset_get_index(dset)))
+ if (NULL == (idx_handle = H5VL_iod_dataset_get_index(dset->vol_obj)))
HGOTO_ERROR(H5E_INDEX, H5E_CANTGET, FAIL, "can't get index handle from dataset");
if (NULL == (idx_class = H5X_registered(plugin_id)))
HGOTO_ERROR(H5E_INDEX, H5E_CANTGET, FAIL, "can't get index plugin class");
@@ -5353,11 +5373,11 @@ H5Dquery_ff(hid_t dset_id, hid_t query_id, hid_t scope_id, hid_t rcxt_id)
HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't allocate data buffer");
FUNC_LEAVE_API_THREADSAFE;
- ret_value = H5Dread_ff(dset_id, type_id, H5S_ALL, space_id, H5P_DEFAULT,
+ ret = H5Dread_ff(dset_id, type_id, H5S_ALL, space_id, H5P_DEFAULT,
buf, rcxt_id, H5_EVENT_STACK_NULL);
FUNC_ENTER_API_THREADSAFE;
- if(SUCCEED != ret_value)
+ if(SUCCEED != ret)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't read data from dataset");
if(FAIL == (udata.space_query = H5Scopy(space_id)))
diff --git a/src/H5Pdxpl.c b/src/H5Pdxpl.c
index 4127238..50dcf11 100644
--- a/src/H5Pdxpl.c
+++ b/src/H5Pdxpl.c
@@ -58,14 +58,14 @@
/* layout type of prefetched data */
#define H5O_XFER_LAYOUT_TYPE_SIZE sizeof(int32_t)
-#define H5O_XFER_LAYOUT_TYPE_DEF H5_DEFAULT_LAYOUT
+#define H5O_XFER_LAYOUT_TYPE_DEF H5_DEFAULT_LAYOUT
#define H5O_XFER_LAYOUT_TYPE_ENC H5P__encode_uint32_t
#define H5O_XFER_LAYOUT_TYPE_DEC H5P__decode_uint32_t
/* Definitions for dataspace selections for prefetched datasets */
-#define H5O_XFER_SELECTION_SIZE sizeof(unsigned)
+#define H5O_XFER_SELECTION_SIZE sizeof(hid_t)
#define H5O_XFER_SELECTION_DEF -1
/* Definitions for datatypes for MAPS */
-#define H5O_XFER_KEY_TYPE_SIZE sizeof(unsigned)
+#define H5O_XFER_KEY_TYPE_SIZE sizeof(hid_t)
#define H5O_XFER_KEY_TYPE_DEF -1
/* Definitions for map low key buffer property */
#define H5O_XFER_LOW_KEY_BUF_SIZE sizeof(void *)
diff --git a/src/H5Pvcpl.c b/src/H5Pvcpl.c
index 4e0a06e..d0e51c3 100644
--- a/src/H5Pvcpl.c
+++ b/src/H5Pvcpl.c
@@ -46,8 +46,7 @@
/****************/
/* ======== View creation properties ======== */
-/* Definitions for create intermediate groups flag */
-#define H5V_CRT_ELMT_SCOPE_SIZE sizeof(unsigned)
+#define H5V_CRT_ELMT_SCOPE_SIZE sizeof(hid_t)
#define H5V_CRT_ELMT_SCOPE_DEF -1
#define H5V_CRT_ELMT_SCOPE_ENC H5P_dataspace_enc
#define H5V_CRT_ELMT_SCOPE_DEC H5P_dataspace_dec
diff --git a/src/H5V.c b/src/H5V.c
index 61078a6..8cb00ce 100644
--- a/src/H5V.c
+++ b/src/H5V.c
@@ -307,9 +307,9 @@ hid_t
H5Vcreate_ff(hid_t loc_id, hid_t query_id, hid_t vcpl_id, hid_t rcxt_id, hid_t estack_id)
{
H5_priv_request_t *request = NULL; /* private request struct inserted in event queue */
- void **req = NULL; /* pointer to plugin generate requests (Stays NULL if plugin does not support async */
- void *view = NULL; /* pointer to view object created */
- H5VL_object_t *obj = NULL; /* object token of loc_id */
+ void **req = NULL; /* pointer to plugin generate requests (Stays NULL if plugin does not support async */
+ void *view = NULL; /* pointer to view object created */
+ H5VL_object_t *obj = NULL; /* object token of loc_id */
hid_t ret_value;
FUNC_ENTER_API(FAIL)
@@ -338,7 +338,7 @@ H5Vcreate_ff(hid_t loc_id, hid_t query_id, hid_t vcpl_id, hid_t rcxt_id, hid_t e
}
/* call the IOD specific private routine to create a view object */
- if(NULL == (view = H5VL_iod_view_create(obj, query_id, vcpl_id, rcxt_id, req)))
+ if(NULL == (view = H5VL_iod_view_create(obj->vol_obj, query_id, vcpl_id, rcxt_id, req)))
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create view")
if(request && *req)
diff --git a/src/H5VLiod.c b/src/H5VLiod.c
index 2bacd7b..d304a20 100644
--- a/src/H5VLiod.c
+++ b/src/H5VLiod.c
@@ -588,7 +588,7 @@ H5VL__iod_create_and_forward(hg_id_t op_id, H5RQ_type_t op_type,
request->state = H5VL_IOD_COMPLETED;
}
}
- }
+ }
else {
/* Synchronously wait on the request */
if(H5VL_iod_request_wait(request_obj->file, request) < 0)
diff --git a/src/H5VLiod_client.c b/src/H5VLiod_client.c
index ad286ef..0421089d 100644
--- a/src/H5VLiod_client.c
+++ b/src/H5VLiod_client.c
@@ -158,6 +158,7 @@ H5VL_iod_request_delete(H5VL_iod_file_t *file, H5VL_iod_request_t *request)
/* remove the request from the container link list */
prev = request->file_prev;
next = request->file_next;
+
if (prev) {
if (next) {
prev->file_next = next;
@@ -2897,15 +2898,15 @@ H5VLiod_query_map(hid_t obj_id, iod_trans_id_t rtid, iod_obj_map_t **obj_map)
{
iod_obj_id_t iod_id;
iod_handles_t iod_oh;
- H5VL_iod_object_t *obj = NULL;
+ H5VL_object_t *obj = NULL;
herr_t ret, ret_value = SUCCEED;
FUNC_ENTER_API(FAIL)
- if(NULL == (obj = (H5VL_iod_object_t *)H5VL_get_object(obj_id)))
+ if(NULL == (obj = (H5VL_object_t *)H5VL_get_object(obj_id)))
HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, FAIL, "invalid object identifier");
- if(H5VL_iod_get_loc_info(obj, &iod_id, &iod_oh, NULL, NULL) < 0)
+ if(H5VL_iod_get_loc_info((H5VL_iod_object_t *)obj->vol_obj, &iod_id, &iod_oh, NULL, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get object iod location info");
ret = iod_obj_query_map(iod_oh.rd_oh, rtid, obj_map, NULL);
@@ -2921,15 +2922,15 @@ H5VLiod_close_map(hid_t obj_id, iod_obj_map_t *obj_map)
{
iod_obj_id_t iod_id;
iod_handles_t iod_oh;
- H5VL_iod_object_t *obj = NULL;
+ H5VL_object_t *obj = NULL;
herr_t ret, ret_value = SUCCEED;
FUNC_ENTER_API(FAIL)
- if(NULL == (obj = (H5VL_iod_object_t *)H5VL_get_object(obj_id)))
+ if(NULL == (obj = (H5VL_object_t *)H5VL_get_object(obj_id)))
HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, FAIL, "invalid object identifier");
- if(H5VL_iod_get_loc_info(obj, &iod_id, &iod_oh, NULL, NULL) < 0)
+ if(H5VL_iod_get_loc_info((H5VL_iod_object_t *)obj->vol_obj, &iod_id, &iod_oh, NULL, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get object iod location info");
ret = iod_obj_free_map(iod_oh.rd_oh, obj_map);
diff --git a/src/H5VLiod_encdec.c b/src/H5VLiod_encdec.c
index 45d4705..5405f6a 100644
--- a/src/H5VLiod_encdec.c
+++ b/src/H5VLiod_encdec.c
@@ -858,7 +858,7 @@ int hg_proc_hid_t(hg_proc_t proc, void *data)
}
break;
case H5I_UNINIT:
- ret = hg_proc_int32_t(proc, (hid_t *)data);
+ ret = hg_proc_int64_t(proc, (hid_t *)data);
if (ret != HG_SUCCESS) {
HG_ERROR_DEFAULT("Proc error");
ret = HG_FAIL;