summaryrefslogtreecommitdiffstats
path: root/src/H5VLiod_server.c
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2013-08-06 15:01:59 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2013-08-06 15:01:59 (GMT)
commit53439040224d74e255b40c7c92556cf662a55ef8 (patch)
tree8b75cd1bdfd96e07f282f00f641c4b10b3f9a4de /src/H5VLiod_server.c
parent4db8adb56cb6a5f620f4758e0b1ec1cd7745e964 (diff)
downloadhdf5-53439040224d74e255b40c7c92556cf662a55ef8.zip
hdf5-53439040224d74e255b40c7c92556cf662a55ef8.tar.gz
hdf5-53439040224d74e255b40c7c92556cf662a55ef8.tar.bz2
[svn-r23972] - Merge common code between read and write operations in IOD VOL client and server.
- Seperate code uncompatible with VL data. - Fix use of IOD mem-descriptors - add support for basic H5T_VLEN and vl strings. -- Compound & array types containing VL data are not supported for now. -- VL of VL types are not supported for now.
Diffstat (limited to 'src/H5VLiod_server.c')
-rw-r--r--src/H5VLiod_server.c60
1 files changed, 59 insertions, 1 deletions
diff --git a/src/H5VLiod_server.c b/src/H5VLiod_server.c
index 69d745a..5fecc4e 100644
--- a/src/H5VLiod_server.c
+++ b/src/H5VLiod_server.c
@@ -112,6 +112,8 @@ H5VLiod_start_handler(MPI_Comm comm, MPI_Info UNUSED info)
dset_open_in_t, dset_open_out_t);
MERCURY_HANDLER_REGISTER("dset_read", H5VL_iod_server_dset_read,
dset_io_in_t, dset_read_out_t);
+ MERCURY_HANDLER_REGISTER("dset_get_vl_size", H5VL_iod_server_dset_get_vl_size,
+ dset_get_vl_size_in_t, dset_read_out_t);
MERCURY_HANDLER_REGISTER("dset_write", H5VL_iod_server_dset_write,
dset_io_in_t, ret_t);
MERCURY_HANDLER_REGISTER("dset_set_extent", H5VL_iod_server_dset_set_extent,
@@ -157,7 +159,7 @@ H5VLiod_start_handler(MPI_Comm comm, MPI_Info UNUSED info)
return FAIL;
/* Set number of threads in AXE engine */
- if(AXEset_num_threads(&engine_attr, 4) != AXE_SUCCEED)
+ if(AXEset_num_threads(&engine_attr, 1) != AXE_SUCCEED)
return FAIL;
/* Create AXE engine */
@@ -1284,6 +1286,62 @@ done:
/*-------------------------------------------------------------------------
+ * Function: H5VL_iod_server_dset_get_vl_size
+ *
+ * Purpose: Function shipper registered call for dset get VL buffer size.
+ * Inserts the real worker routine into the Async Engine.
+ *
+ * Return: Success: HG_SUCCESS
+ * Failure: Negative
+ *
+ * Programmer: Mohamad Chaarawi
+ * January, 2013
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+H5VL_iod_server_dset_get_vl_size(hg_handle_t handle)
+{
+ op_data_t *op_data = NULL;
+ dset_get_vl_size_in_t *input = NULL;
+ int ret_value = HG_SUCCESS;
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+ if(NULL == (op_data = (op_data_t *)H5MM_malloc(sizeof(op_data_t))))
+ HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, HG_FAIL, "can't allocate axe op_data struct");
+
+ if(NULL == (input = (dset_get_vl_size_in_t *)
+ H5MM_malloc(sizeof(dset_get_vl_size_in_t))))
+ HGOTO_ERROR(H5E_DATASET, H5E_NOSPACE, HG_FAIL, "can't allocate input struct for decoding");
+
+ if(HG_FAIL == HG_Handler_get_input(handle, input))
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, HG_FAIL, "can't get input parameters");
+
+ if(NULL == engine)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, HG_FAIL, "AXE engine not started");
+
+ op_data->hg_handle = handle;
+ op_data->input = (void *)input;
+
+ if(input->parent_axe_id) {
+ if (AXE_SUCCEED != AXEcreate_task(engine, input->axe_id,
+ 1, &input->parent_axe_id, 0, NULL,
+ H5VL_iod_server_dset_get_vl_size_cb, op_data, NULL))
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, HG_FAIL, "can't insert task into async engine");
+ }
+ else {
+ if (AXE_SUCCEED != AXEcreate_task(engine, input->axe_id, 0, NULL, 0, NULL,
+ H5VL_iod_server_dset_get_vl_size_cb, op_data, NULL))
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, HG_FAIL, "can't insert task into async engine");
+ }
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5VL_iod_server_dset_get_vl_size() */
+
+
+/*-------------------------------------------------------------------------
* Function: H5VL_iod_server_dset_write
*
* Purpose: Function shipper registered call for Dset Write.