summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/H5AS.c10
-rw-r--r--src/H5ASprivate.h2
-rw-r--r--src/H5VLiod.c30
-rw-r--r--src/H5VLiod_client.h6
-rw-r--r--src/H5VLiod_common.h5
5 files changed, 42 insertions, 11 deletions
diff --git a/src/H5AS.c b/src/H5AS.c
index 144eab7..c7eadf6 100644
--- a/src/H5AS.c
+++ b/src/H5AS.c
@@ -85,13 +85,15 @@ H5ASexecute(const char *file_name, const char *obj_name, hid_t query_id,
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL file name")
if(obj_name == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL object name")
+ /*
if(NULL == (query = (H5Q_t *)H5I_object_verify(query_id, H5I_QUERY)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a query ID")
+ */
/* It is allowed to have split_script and combine_script to be NULL */
/* H5AS_execute */
- if((ret_value = H5AS_execute(file_name, obj_name, query, split_script,
+ if((ret_value = H5AS_execute(file_name, obj_name, query_id, split_script,
combine_script, estack_id)) < 0)
HGOTO_ERROR(H5E_QUERY, H5E_CANTENCODE, FAIL, "can't start analysis"
"shipping execution")
@@ -110,7 +112,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5AS_execute(const char *file_name, const char *obj_name, H5Q_t *query,
+H5AS_execute(const char *file_name, const char *obj_name, hid_t query_id,
const char *split_script, const char *combine_script, hid_t estack_id)
{
H5_priv_request_t *request = NULL; /* private request struct inserted in event queue */
@@ -122,7 +124,6 @@ H5AS_execute(const char *file_name, const char *obj_name, H5Q_t *query,
HDassert(file_name);
HDassert(obj_name);
- HDassert(query);
if(estack_id != H5_EVENT_STACK_NULL) {
/* create the private request */
@@ -137,7 +138,8 @@ H5AS_execute(const char *file_name, const char *obj_name, H5Q_t *query,
}
/* Get the data through the IOD VOL */
- if((ret_value = H5VL_iod_analysis_execute(file_name, obj_name, query, req)) < 0)
+ if((ret_value = H5VL_iod_analysis_execute(file_name, obj_name, query_id,
+ split_script, combine_script, req)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL,
"can't start iod analysis shipping execution")
diff --git a/src/H5ASprivate.h b/src/H5ASprivate.h
index 9659a64..203990e 100644
--- a/src/H5ASprivate.h
+++ b/src/H5ASprivate.h
@@ -41,7 +41,7 @@
/******************************/
H5_DLL herr_t H5AS_execute(const char *file_name, const char *dataset_name,
- H5Q_t *query, const char *split_script, const char *combine_script,
+ hid_t query_id, const char *split_script, const char *combine_script,
hid_t estack_id);
#endif /* _H5ASprivate_H */
diff --git a/src/H5VLiod.c b/src/H5VLiod.c
index 4952da4..70fd51c3 100644
--- a/src/H5VLiod.c
+++ b/src/H5VLiod.c
@@ -494,7 +494,8 @@ H5VL__iod_create_and_forward(hg_id_t op_id, H5RQ_type_t op_type,
request->trans_info = req_info;
/* add request to container's linked list */
- H5VL_iod_request_add(request_obj->file, request);
+ if(HG_ANALYSIS_EXECUTE != op_id)
+ H5VL_iod_request_add(request_obj->file, request);
/* update the parent information in the request */
request->num_parents = num_parents;
@@ -545,9 +546,29 @@ H5VL__iod_create_and_forward(hg_id_t op_id, H5RQ_type_t op_type,
if(track)
request_obj->request = NULL;
+ if(HG_ANALYSIS_EXECUTE == op_id) {
+ int ret;
+ hg_status_t status;
+
+ /* test the operation status */
+ ret = HG_Wait(*((hg_request_t *)request->req), HG_MAX_IDLE_TIME,
+ &status);
+ if(HG_FAIL == ret) {
+ fprintf(stderr, "failed to wait on request\n");
+ request->status = H5ES_STATUS_FAIL;
+ request->state = H5VL_IOD_COMPLETED;
+ }
+ else {
+ if(status) {
+ request->status = H5ES_STATUS_SUCCEED;
+ request->state = H5VL_IOD_COMPLETED;
+ }
+ }
+ } else {
/* Synchronously wait on the request */
if(H5VL_iod_request_wait(request_obj->file, request) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't wait on HG request");
+ }
request->req = H5MM_xfree(request->req);
H5VL_iod_request_decr_rc(request);
@@ -1427,8 +1448,9 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5VL_iod_analysis_execute(const char *file_name, const char *obj_name, hid_t query_id,
- void **req)
+H5VL_iod_analysis_execute(const char *file_name, const char *obj_name,
+ hid_t query_id, const char *split_script, const char *combine_script,
+ void **req)
{
analysis_execute_in_t input;
analysis_execute_out_t *output;
@@ -1440,6 +1462,8 @@ H5VL_iod_analysis_execute(const char *file_name, const char *obj_name, hid_t que
input.file_name = file_name;
input.obj_name = obj_name;
input.query_id = query_id;
+ input.split_script = split_script;
+ input.combine_script = combine_script;
#if H5VL_IOD_DEBUG
printf("Analysis Execute on file %s Object %s\n",
diff --git a/src/H5VLiod_client.h b/src/H5VLiod_client.h
index c9b1156..0a15346 100644
--- a/src/H5VLiod_client.h
+++ b/src/H5VLiod_client.h
@@ -408,7 +408,9 @@ H5_DLL herr_t H5VL_iod_tr_skip(H5VL_iod_file_t *file, uint64_t start_trans_num,
uint64_t count, void **req);
H5_DLL herr_t H5VL_iod_tr_abort(H5TR_t *tr, void **req);
-H5_DLL herr_t H5VL_iod_analysis_execute(const char *file_name, const char *obj_name,
- hid_t query_id, void **req);
+H5_DLL herr_t H5VL_iod_analysis_execute(const char *file_name, const char *obj_name,
+ hid_t query_id, const char *split_script, const char *combine_script,
+ void **req);
+
#endif /* H5_HAVE_EFF */
#endif /* _H5VLiod_client_H */
diff --git a/src/H5VLiod_common.h b/src/H5VLiod_common.h
index 9cf3368..65d259f 100644
--- a/src/H5VLiod_common.h
+++ b/src/H5VLiod_common.h
@@ -98,7 +98,10 @@ H5_DLL int hg_proc_iod_layout_t(hg_proc_t proc, void *data);
MERCURY_GEN_PROC(analysis_execute_in_t, ((axe_t)(axe_info))
((hid_t)(query_id)) ((hg_const_string_t)(file_name))
- ((hg_const_string_t)(obj_name)))
+ ((hg_const_string_t)(obj_name))
+ ((hg_const_string_t)(split_script))
+ ((hg_const_string_t)(combine_script))
+ )
MERCURY_GEN_PROC(analysis_execute_out_t, ((int32_t)(ret)))
MERCURY_GEN_PROC(analysis_farm_in_t, ((axe_t)(axe_info))
((iod_handle_t)(coh)) ((hid_t)(query_id)) ((hid_t)(space_id))