-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated H5VOL for HDF5 v1.13 #2945
Changes from 4 commits
17af008
4e576fe
f45a56e
2f5a376
53788a7
238e6b9
992594a
e1aa34c
7a818f3
ba6b355
d98783f
920033d
8a10f06
20bf965
6ae2ab5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,10 +33,8 @@ extern herr_t H5VL_adios2_beginstep(const char *engine_name, | |
|
||
extern herr_t H5VL_adios2_endstep(const char *engine_nane); | ||
|
||
static herr_t H5VL_adios2_introspect_opt_query(void *obj, H5VL_subclass_t cls, | ||
int opt_type, hbool_t *supported) | ||
static herr_t H5VL_adios2_introspect_opt_query(const void *obj, unsigned int *opt_type) | ||
{ | ||
*supported = 0; | ||
return 0; | ||
} | ||
|
||
|
@@ -53,7 +51,8 @@ static const H5VL_class_t H5VL_adios2_def = { | |
H5VL_ADIOS2_VERSION, | ||
(H5VL_class_value_t)H5VL_ADIOS2_VALUE, | ||
H5VL_ADIOS2_NAME, /* name */ | ||
0, | ||
0, /* Version # of connector */ | ||
0, /* Capability flags for connector */ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could also use H5VL_CAP_FLAG_NONE here. |
||
H5VL_adios2_init, /* initialize */ | ||
H5VL_adios2_term, /* terminate */ | ||
{ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -154,29 +154,39 @@ void GetFromAttribute(void *attrObj, hid_t *ret_id, H5VL_attr_get_t get_type) | |
} | ||
} | ||
|
||
herr_t H5VL_adios2_attr_get(void *obj, H5VL_attr_get_t get_type, hid_t dxpl_id, | ||
void **req, va_list arguments) | ||
herr_t H5VL_adios2_attr_get(void *obj, H5VL_attr_get_args_t *args, hid_t dxpl_id, | ||
void **req) | ||
{ | ||
REQUIRE_NOT_NULL_ERR(obj, -1); | ||
H5VL_ObjDef_t *vol = (H5VL_ObjDef_t *)obj; | ||
|
||
if ((get_type == H5VL_ATTR_GET_SPACE) || (get_type == H5VL_ATTR_GET_TYPE)) | ||
switch (args->op_type) | ||
{ | ||
hid_t *ret_id = va_arg(arguments, hid_t *); | ||
GetFromAttribute((vol->m_ObjPtr), ret_id, get_type); | ||
case H5VL_ATTR_GET_SPACE: | ||
{ | ||
hid_t *ret_id = (hid_t *)args->args.get_space.space_id; | ||
GetFromAttribute((vol->m_ObjPtr), ret_id, args->op_type); | ||
return 0; | ||
} | ||
case H5VL_ATTR_GET_TYPE: | ||
{ | ||
hid_t *ret_id = (hid_t *)args->args.get_type.type_id; | ||
GetFromAttribute((vol->m_ObjPtr), ret_id, args->op_type); | ||
return 0; | ||
} | ||
default: | ||
break; | ||
} | ||
|
||
const H5VL_loc_params_t *loc_params = | ||
va_arg(arguments, const H5VL_loc_params_t *); | ||
const H5VL_loc_params_t *loc_params = &args->args.get_info.loc_params; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would probably move this inside the get_info block so that you don't try to access the get_info portion when that's not the operation being performed. |
||
REQUIRE_NOT_NULL_ERR(loc_params, -1); | ||
|
||
switch (get_type) | ||
switch (args->op_type) | ||
{ | ||
case H5VL_ATTR_GET_NAME: | ||
{ | ||
char *buf = va_arg(arguments, char *); | ||
ssize_t *ret_val = va_arg(arguments, ssize_t *); | ||
char *buf = args->args.get_name.buf; | ||
ssize_t *ret_val = (ssize_t*)args->args.get_name.attr_name_len; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This changed to a size_t * with changes in the VOL. |
||
|
||
if (H5VL_OBJECT_BY_SELF == loc_params->type) | ||
{ | ||
|
@@ -222,16 +232,16 @@ herr_t H5VL_adios2_attr_close(void *attr, hid_t dxpl_id, void **req) | |
} | ||
|
||
herr_t H5VL_adios2_attr_specific(void *obj, const H5VL_loc_params_t *loc_params, | ||
H5VL_attr_specific_t specific_type, | ||
hid_t dxpl_id, void **req, va_list arguments) | ||
H5VL_attr_specific_args_t *args, | ||
hid_t dxpl_id, void **req) | ||
{ | ||
REQUIRE_NOT_NULL_ERR(obj, -1); | ||
H5VL_ObjDef_t *vol = (H5VL_ObjDef_t *)obj; | ||
const char *attr_name = va_arg(arguments, const char *); | ||
const char *attr_name = (const char *)args->args.del.name; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It won't necessarily be safe to retrieve the attribute's name here until you know that the delete operation is the one occurring since the arguments are in a union. For delete, the attribute name is in args->args.del.name, for exists, it's in args->args.exists.name and for rename it's in args->args.rename.old_name for example. |
||
|
||
adios2_attribute *attr = gLocateAttrFrom(vol, attr_name); | ||
|
||
switch (specific_type) | ||
switch (args->op_type) | ||
{ | ||
case H5VL_ATTR_DELETE: | ||
{ | ||
|
@@ -250,7 +260,7 @@ herr_t H5VL_adios2_attr_specific(void *obj, const H5VL_loc_params_t *loc_params, | |
} | ||
case H5VL_ATTR_EXISTS: | ||
{ | ||
htri_t *ret = va_arg(arguments, htri_t *); | ||
hbool_t *ret = args->args.exists.exists; | ||
if (NULL == attr) | ||
{ | ||
*ret = 0; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,23 +4,23 @@ | |
#include "H5Vol_def.h" | ||
|
||
herr_t H5VL_adios2_link_specific(void *obj, const H5VL_loc_params_t *loc_params, | ||
H5VL_link_specific_t specific_type, | ||
H5VL_link_specific_args_t *args, | ||
hid_t H5_ATTR_UNUSED dxpl_id, | ||
void H5_ATTR_UNUSED **req, va_list arguments) | ||
void H5_ATTR_UNUSED **req) | ||
|
||
{ | ||
REQUIRE_NOT_NULL_ERR(loc_params, -1); | ||
REQUIRE_NOT_NULL_ERR(obj, -1); | ||
|
||
H5VL_ObjDef_t *vol = (H5VL_ObjDef_t *)obj; | ||
|
||
switch (specific_type) | ||
switch (args->op_type) | ||
{ | ||
case H5VL_LINK_EXISTS: | ||
{ | ||
if ((GROUP == vol->m_ObjType) || (ROOT == vol->m_ObjType)) | ||
{ | ||
htri_t *ret = va_arg(arguments, htri_t *); | ||
hbool_t *ret = args->args.exists.exists; | ||
|
||
const char *obj_name = loc_params->loc_data.loc_by_name.name; | ||
*ret = gExistsUnderGrp(vol, obj_name); | ||
|
@@ -52,21 +52,21 @@ herr_t H5VL_adios2_link_specific(void *obj, const H5VL_loc_params_t *loc_params, | |
} | ||
|
||
herr_t H5VL_adios2_link_get(void *obj, const H5VL_loc_params_t *loc_params, | ||
H5VL_link_get_t get_type, | ||
H5VL_link_get_args_t *args, | ||
hid_t H5_ATTR_UNUSED dxpl_id, | ||
void H5_ATTR_UNUSED **req, va_list arguments) | ||
void H5_ATTR_UNUSED **req) | ||
{ | ||
|
||
REQUIRE_NOT_NULL_ERR(loc_params, -1); | ||
REQUIRE_NOT_NULL_ERR(obj, -1); | ||
|
||
H5VL_ObjDef_t *vol = (H5VL_ObjDef_t *)obj; | ||
switch (get_type) | ||
switch (args->op_type) | ||
{ | ||
case H5VL_LINK_GET_NAME: | ||
{ | ||
char *name = va_arg(arguments, char *); | ||
ssize_t *ret = va_arg(arguments, ssize_t *); | ||
char *name = args->args.get_name.name; | ||
ssize_t *ret = (ssize_t*)args->args.get_name.name_len; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Changed to a size_t * with changes in the VOL. |
||
|
||
if ((GROUP == vol->m_ObjType) || (ROOT == vol->m_ObjType)) | ||
{ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This old signature is actually the correct one, with the hbool_t * changed to a uint64_t * instead.