diff options
author | Quincey Koziol <koziol@koziol.gov> | 2019-12-20 04:41:37 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@koziol.gov> | 2019-12-20 04:41:37 (GMT) |
commit | 58cf79532129a0df49c5516506cfe8be5e09d3eb (patch) | |
tree | 768d5f91c9b821329bd06206b6510b5bf31c9ec7 /src/H5Fmpi.c | |
parent | b55a584fd5b3aac6f2514fba41a6182030b497ae (diff) | |
download | hdf5-58cf79532129a0df49c5516506cfe8be5e09d3eb.zip hdf5-58cf79532129a0df49c5516506cfe8be5e09d3eb.tar.gz hdf5-58cf79532129a0df49c5516506cfe8be5e09d3eb.tar.bz2 |
Refactor all the 'H5VL_*_optional' callbacks to move the type of operation out
of the va_list, so it's at least possible for another connector to know what
the operation is and decide whether to implement it or not.
Added a new VOL sub-class called "introspect" where callbacks that report
information about the connector or container can be placed. Added an
'opt_query' callback to this sub-class, for a connector to report back
to the library whether a particular optional callback operation is supported.
Also added a 'get_conn_cls' introspection callback, to retrieve the H5VL_class_t
of a connector (either the "current" connector, H5VL_GET_CONN_LVL_CURR, or
the terminal connector, H5VL_GET_CONN_LVL_TERM).
Moved the "post open" operation from a file 'specific' operation to a file
'optional' operation, now that it's possible to detect (with the 'opt_query'
introspection callback) whether a VOL connector implements an optional
operation, without just returning an error.
Added new internal VOL helper routines: H5VL_object_is_native, to determine
if an object is in (or is a) native file, and H5VL_file_is_same, to determine
if two objects are in (or are) the same terminal VOL connector's container.
(And moved the special handling for FILE_IS_EQUAL operation out of internal VOL
callback routine into H5VL_file_is_same)
Made new dataset 'get' operation for H5Dvlen_get_buf_size, aligning it better
with other 'get' operations in API.
Fixed several issues with pass-through connectors, which are now passing the
'make check-passthrough-vol' tests again.
A bunch of warning and style cleanups as well.
Diffstat (limited to 'src/H5Fmpi.c')
-rw-r--r-- | src/H5Fmpi.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/H5Fmpi.c b/src/H5Fmpi.c index 1630d6b..0c46f59 100644 --- a/src/H5Fmpi.c +++ b/src/H5Fmpi.c @@ -291,11 +291,11 @@ H5Fset_mpi_atomicity(hid_t file_id, hbool_t flag) H5TRACE2("e", "ib", file_id, flag); /* Get the file object */ - if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(file_id, H5I_FILE))) + if(NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(file_id, H5I_FILE))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid file identifier"); /* Set atomicity value */ - if (H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_SET_MPI_ATOMICITY, va_flag) < 0) + if(H5VL_file_optional(vol_obj, H5VL_NATIVE_FILE_SET_MPI_ATOMICITY, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, va_flag) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to set MPI atomicity"); done: @@ -359,11 +359,11 @@ H5Fget_mpi_atomicity(hid_t file_id, hbool_t *flag) H5TRACE2("e", "i*b", file_id, flag); /* Get the file object */ - if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(file_id, H5I_FILE))) + if(NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(file_id, H5I_FILE))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid file identifier"); /* Get atomicity value */ - if (H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_GET_MPI_ATOMICITY, flag) < 0) + if(H5VL_file_optional(vol_obj, H5VL_NATIVE_FILE_GET_MPI_ATOMICITY, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, flag) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get MPI atomicity"); done: @@ -374,8 +374,8 @@ done: /*------------------------------------------------------------------------- * Function: H5F_mpi_retrieve_comm * - * Purpose: Retrieves an MPI communicator from the file the location ID - * is in. If the loc_id is invalid, the fapl_id is used to + * Purpose: Retrieves an MPI communicator from the file the location ID + * is in. If the loc_id is invalid, the fapl_id is used to * retrieve the communicator. * * Return: Success: Non-negative |