+ * Programmer: Quincey Koziol
* Tuesday, January 8, 2008
*
* Purpose: Free space section callbacks for file.
@@ -81,7 +81,7 @@ static herr_t H5MF__sect_large_shrink(H5FS_section_info_t **_sect, void *udata);
/*********************/
/* Class info for "simple" free space sections */
-H5FS_section_class_t H5MF_FSPACE_SECT_CLS_SIMPLE[1] = {{
+const H5FS_section_class_t H5MF_FSPACE_SECT_CLS_SIMPLE[1] = {{
/* Class variables */
H5MF_FSPACE_SECT_SIMPLE, /* Section type */
0, /* Extra serialized size */
@@ -107,7 +107,7 @@ H5FS_section_class_t H5MF_FSPACE_SECT_CLS_SIMPLE[1] = {{
}};
/* Class info for "small" free space sections */
-H5FS_section_class_t H5MF_FSPACE_SECT_CLS_SMALL[1] = {{
+const H5FS_section_class_t H5MF_FSPACE_SECT_CLS_SMALL[1] = {{
/* Class variables */
H5MF_FSPACE_SECT_SMALL, /* Section type */
0, /* Extra serialized size */
@@ -133,7 +133,7 @@ H5FS_section_class_t H5MF_FSPACE_SECT_CLS_SMALL[1] = {{
}};
/* Class info for "large" free space sections */
-H5FS_section_class_t H5MF_FSPACE_SECT_CLS_LARGE[1] = {{
+const H5FS_section_class_t H5MF_FSPACE_SECT_CLS_LARGE[1] = {{
/* Class variables */
H5MF_FSPACE_SECT_LARGE, /* Section type */
0, /* Extra serialized size */
@@ -181,7 +181,6 @@ H5FL_DEFINE(H5MF_free_section_t);
* Return: Pointer to new section on success/NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* January 8 2008
*
*-------------------------------------------------------------------------
diff --git a/src/H5Mpublic.h b/src/H5Mpublic.h
index 88db39af86a..3f6bf018ff7 100644
--- a/src/H5Mpublic.h
+++ b/src/H5Mpublic.h
@@ -177,6 +177,13 @@ H5_DLL hid_t H5Mopen_async(const char *app_file, const char *app_func, unsigned
*
*/
H5_DLL herr_t H5Mclose(hid_t map_id);
+/**
+ * --------------------------------------------------------------------------
+ * \ingroup ASYNC
+ * \async_variant_of{H5Mclose}
+ */
+H5_DLL herr_t H5Mclose_async(const char *app_file, const char *app_func, unsigned app_line, hid_t map_id,
+ hid_t es_id);
/**
* \ingroup H5M
@@ -292,6 +299,14 @@ H5_DLL herr_t H5Mget_count(hid_t map_id, hsize_t *count, hid_t dxpl_id);
*/
H5_DLL herr_t H5Mput(hid_t map_id, hid_t key_mem_type_id, const void *key, hid_t val_mem_type_id,
const void *value, hid_t dxpl_id);
+/**
+ * --------------------------------------------------------------------------
+ * \ingroup ASYNC
+ * \async_variant_of{H5Mput}
+ */
+H5_DLL herr_t H5Mput_async(const char *app_file, const char *app_func, unsigned app_line, hid_t map_id,
+ hid_t key_mem_type_id, const void *key, hid_t val_mem_type_id, const void *value,
+ hid_t dxpl_id, hid_t es_id);
/**
* \ingroup H5M
@@ -325,6 +340,14 @@ H5_DLL herr_t H5Mput(hid_t map_id, hid_t key_mem_type_id, const void *key, hid_t
*/
H5_DLL herr_t H5Mget(hid_t map_id, hid_t key_mem_type_id, const void *key, hid_t val_mem_type_id, void *value,
hid_t dxpl_id);
+/**
+ * --------------------------------------------------------------------------
+ * \ingroup ASYNC
+ * \async_variant_of{H5Mget}
+ */
+H5_DLL herr_t H5Mget_async(const char *app_file, const char *app_func, unsigned app_line, hid_t map_id,
+ hid_t key_mem_type_id, const void *key, hid_t val_mem_type_id, void *value,
+ hid_t dxpl_id, hid_t es_id);
/**
* \ingroup H5M
@@ -455,6 +478,25 @@ H5_DLL herr_t H5Miterate_by_name(hid_t loc_id, const char *map_name, hsize_t *id
*/
H5_DLL herr_t H5Mdelete(hid_t map_id, hid_t key_mem_type_id, const void *key, hid_t dxpl_id);
+/* API Wrappers for async routines */
+/* (Must be defined _after_ the function prototype) */
+/* (And must only defined when included in application code, not the library) */
+#ifndef H5M_MODULE
+#define H5Mcreate_async(...) H5Mcreate_async(__FILE__, __func__, __LINE__, __VA_ARGS__)
+#define H5Mopen_async(...) H5Mopen_async(__FILE__, __func__, __LINE__, __VA_ARGS__)
+#define H5Mclose_async(...) H5Mclose_async(__FILE__, __func__, __LINE__, __VA_ARGS__)
+#define H5Mput_async(...) H5Mput_async(__FILE__, __func__, __LINE__, __VA_ARGS__)
+#define H5Mget_async(...) H5Mget_async(__FILE__, __func__, __LINE__, __VA_ARGS__)
+
+/* Define "wrapper" versions of function calls, to allow compile-time values to
+ * be passed in by language wrapper or library layer on top of HDF5. */
+#define H5Mcreate_async_wrap H5_NO_EXPAND(H5Mcreate_async)
+#define H5Mopen_async_wrap H5_NO_EXPAND(H5Mopen_async)
+#define H5Mclose_async_wrap H5_NO_EXPAND(H5Mclose_async)
+#define H5Mput_async_wrap H5_NO_EXPAND(H5Mput_async)
+#define H5Mget_async_wrap H5_NO_EXPAND(H5Mget_async)
+#endif /* H5M_MODULE */
+
/* Symbols defined for compatibility with previous versions of the HDF5 API.
*
* Use of these symbols is deprecated.
diff --git a/src/H5O.c b/src/H5O.c
index 10fb35db1be..4876bb038a0 100644
--- a/src/H5O.c
+++ b/src/H5O.c
@@ -32,6 +32,7 @@
#include "H5private.h" /* Generic Functions */
#include "H5CXprivate.h" /* API Contexts */
#include "H5Eprivate.h" /* Error handling */
+#include "H5ESprivate.h" /* Event Sets */
#include "H5Fprivate.h" /* File access */
#include "H5Iprivate.h" /* IDs */
#include "H5Lprivate.h" /* Links */
@@ -55,6 +56,22 @@
/* Local Prototypes */
/********************/
+/* Helper routines for sync/async API calls */
+static hid_t H5O__open_api_common(hid_t loc_id, const char *name, hid_t lapl_id, void **token_ptr,
+ H5VL_object_t **_vol_obj_ptr);
+static hid_t H5O__open_by_idx_api_common(hid_t loc_id, const char *group_name, H5_index_t idx_type,
+ H5_iter_order_t order, hsize_t n, hid_t lapl_id, void **token_ptr,
+ H5VL_object_t **_vol_obj_ptr);
+static herr_t H5O__get_info_by_name_api_common(hid_t loc_id, const char *name, H5O_info2_t *oinfo /*out*/,
+ unsigned fields, hid_t lapl_id, void **token_ptr,
+ H5VL_object_t **_vol_obj_ptr);
+static herr_t H5O__copy_api_common(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id,
+ const char *dst_name, hid_t ocpypl_id, hid_t lcpl_id, void **token_ptr,
+ H5VL_object_t **_vol_obj_ptr);
+static herr_t H5O__flush_api_common(hid_t obj_id, void **token_ptr, H5VL_object_t **_vol_obj_ptr);
+static herr_t H5O__refresh_api_common(hid_t oid, void **token_ptr, H5VL_object_t **_vol_obj_ptr);
+static htri_t H5O__close_check_common(hid_t object_id);
+
/*********************/
/* Package Variables */
/*********************/
@@ -67,6 +84,50 @@
/* Local Variables */
/*******************/
+/*-------------------------------------------------------------------------
+ * Function: H5O__open_api_common
+ *
+ * Purpose: This is the common function for opening an object
+ *
+ * Return: Success: An open object identifier
+ * Failure: H5I_INVALID_HID
+ *
+ *-------------------------------------------------------------------------
+ */
+static hid_t
+H5O__open_api_common(hid_t loc_id, const char *name, hid_t lapl_id, void **token_ptr,
+ H5VL_object_t **_vol_obj_ptr)
+{
+ H5VL_object_t * tmp_vol_obj = NULL; /* Object for loc_id */
+ H5VL_object_t **vol_obj_ptr =
+ (_vol_obj_ptr ? _vol_obj_ptr : &tmp_vol_obj); /* Ptr to object ptr for loc_id */
+ H5I_type_t opened_type;
+ void * opened_obj = NULL;
+ H5VL_loc_params_t loc_params;
+ hid_t ret_value = H5I_INVALID_HID;
+
+ FUNC_ENTER_STATIC
+
+ /* Check args */
+
+ /* name is checked in this H5VL_setup_name_args() */
+ /* Set up object access arguments */
+ if (H5VL_setup_name_args(loc_id, name, H5P_CLS_LACC, FALSE, lapl_id, vol_obj_ptr, &loc_params) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, H5I_INVALID_HID, "can't set object access arguments")
+
+ /* Open the object */
+ if (NULL == (opened_obj = H5VL_object_open(*vol_obj_ptr, &loc_params, &opened_type,
+ H5P_DATASET_XFER_DEFAULT, token_ptr)))
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open object")
+
+ /* Get an atom for the object */
+ if ((ret_value = H5VL_register(opened_type, opened_obj, (*vol_obj_ptr)->connector, TRUE)) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to atomize object handle")
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* H5O__open_api_common() */
+
/*-------------------------------------------------------------------------
* Function: H5Oopen
*
@@ -93,47 +154,107 @@
hid_t
H5Oopen(hid_t loc_id, const char *name, hid_t lapl_id)
{
- H5VL_object_t * vol_obj; /* Object of loc_id */
- H5I_type_t opened_type;
- void * opened_obj = NULL;
- H5VL_loc_params_t loc_params;
- hid_t ret_value = H5I_INVALID_HID;
+ hid_t ret_value = H5I_INVALID_HID;
FUNC_ENTER_API(H5I_INVALID_HID)
H5TRACE3("i", "i*si", loc_id, name, lapl_id);
- /* Check args */
- if (!name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "name parameter cannot be NULL")
- if (!*name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "name parameter cannot be an empty string")
+ /* Open the object synchronously */
+ if ((ret_value = H5O__open_api_common(loc_id, name, lapl_id, NULL, NULL)) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to synchronously open object")
- /* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info")
+done:
+ FUNC_LEAVE_API(ret_value)
+} /* end H5Oopen() */
- /* Get the location object */
- if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(loc_id)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier")
+/*-------------------------------------------------------------------------
+ * Function: H5Oopen_async
+ *
+ * Purpose: Asynchronous version of H5Oopen
+ *
+ * Return: Success: An open object identifier
+ * Failure: H5I_INVALID_HID
+ *
+ *-------------------------------------------------------------------------
+ */
+hid_t
+H5Oopen_async(const char *app_file, const char *app_func, unsigned app_line, hid_t loc_id, const char *name,
+ hid_t lapl_id, hid_t es_id)
+{
+ H5VL_object_t *vol_obj = NULL; /* Object for loc_id */
+ void * token = NULL; /* Request token for async operation */
+ void ** token_ptr = H5_REQUEST_NULL; /* Pointer to request token for async operation */
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
- /* Set location struct fields */
- loc_params.type = H5VL_OBJECT_BY_NAME;
- loc_params.loc_data.loc_by_name.name = name;
- loc_params.loc_data.loc_by_name.lapl_id = lapl_id;
- loc_params.obj_type = H5I_get_type(loc_id);
+ FUNC_ENTER_API(H5I_INVALID_HID)
+ H5TRACE7("i", "*s*sIui*sii", app_file, app_func, app_line, loc_id, name, lapl_id, es_id);
+
+ /* Set up request token pointer for asynchronous operation */
+ if (H5ES_NONE != es_id)
+ token_ptr = &token; /* Point at token for VOL connector to set up */
+
+ /* Open the object asynchronously */
+ if ((ret_value = H5O__open_api_common(loc_id, name, lapl_id, token_ptr, &vol_obj)) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to asynchronously open object")
+
+ /* If a token was created, add the token to the event set */
+ if (NULL != token)
+ /* clang-format off */
+ if (H5ES_insert(es_id, vol_obj->connector, token,
+ H5ARG_TRACE7(FUNC, "*s*sIui*sii", app_file, app_func, app_line, loc_id, name, lapl_id, es_id)) < 0) {
+ /* clang-format on */
+ if (H5I_dec_app_ref_always_close(ret_value) < 0)
+ HDONE_ERROR(H5E_OHDR, H5E_CANTDEC, H5I_INVALID_HID, "can't decrement count on object ID")
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert token into event set")
+ }
+
+done:
+ FUNC_LEAVE_API(ret_value)
+} /* end H5Oopen_async() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5O__open_by_idx_api_common
+ *
+ * Purpose: This is the common function for opening an object within an index
+ *
+ * Return: Success: An open object identifier
+ * Failure: H5I_INVALID_HID
+ *
+ *-------------------------------------------------------------------------
+ */
+static hid_t
+H5O__open_by_idx_api_common(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order,
+ hsize_t n, hid_t lapl_id, void **token_ptr, H5VL_object_t **_vol_obj_ptr)
+{
+ H5VL_object_t * tmp_vol_obj = NULL; /* Object for loc_id */
+ H5VL_object_t **vol_obj_ptr =
+ (_vol_obj_ptr ? _vol_obj_ptr : &tmp_vol_obj); /* Ptr to object ptr for loc_id */
+ H5I_type_t opened_type;
+ void * opened_obj = NULL;
+ H5VL_loc_params_t loc_params;
+ hid_t ret_value = H5I_INVALID_HID;
+
+ FUNC_ENTER_STATIC
+
+ /* Check args */
+ /* group_name, idx_type, order are checked in H5VL_setup_idx-args() */
+ /* Set up object access arguments */
+ if (H5VL_setup_idx_args(loc_id, group_name, idx_type, order, n, H5P_CLS_LACC, FALSE, lapl_id, vol_obj_ptr,
+ &loc_params) < 0)
+ HGOTO_ERROR(H5E_LINK, H5E_CANTSET, H5I_INVALID_HID, "can't set object access arguments")
/* Open the object */
- if (NULL == (opened_obj = H5VL_object_open(vol_obj, &loc_params, &opened_type, H5P_DATASET_XFER_DEFAULT,
- H5_REQUEST_NULL)))
+ if (NULL == (opened_obj = H5VL_object_open(*vol_obj_ptr, &loc_params, &opened_type,
+ H5P_DATASET_XFER_DEFAULT, token_ptr)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open object")
- /* Get an atom for the object */
- if ((ret_value = H5VL_register(opened_type, opened_obj, vol_obj->connector, TRUE)) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to atomize object handle")
+ /* Get an ID for the object */
+ if ((ret_value = H5VL_register(opened_type, opened_obj, (*vol_obj_ptr)->connector, TRUE)) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register object handle")
done:
- FUNC_LEAVE_API(ret_value)
-} /* end H5Oopen() */
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* H5O__open_by_idx_api_common() */
/*-------------------------------------------------------------------------
* Function: H5Oopen_by_idx
@@ -162,50 +283,67 @@ hid_t
H5Oopen_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n,
hid_t lapl_id)
{
- H5VL_object_t * vol_obj; /* Object of loc_id */
- H5I_type_t opened_type;
- void * opened_obj = NULL;
- H5VL_loc_params_t loc_params;
- hid_t ret_value = H5I_INVALID_HID;
+ hid_t ret_value = H5I_INVALID_HID;
FUNC_ENTER_API(H5I_INVALID_HID)
H5TRACE6("i", "i*sIiIohi", loc_id, group_name, idx_type, order, n, lapl_id);
- /* Check args */
- if (!group_name || !*group_name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "no name specified")
- if (idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid index type specified")
- if (order <= H5_ITER_UNKNOWN || order >= H5_ITER_N)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid iteration order specified")
-
- /* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info")
-
- loc_params.type = H5VL_OBJECT_BY_IDX;
- loc_params.loc_data.loc_by_idx.name = group_name;
- loc_params.loc_data.loc_by_idx.idx_type = idx_type;
- loc_params.loc_data.loc_by_idx.order = order;
- loc_params.loc_data.loc_by_idx.n = n;
- loc_params.loc_data.loc_by_idx.lapl_id = lapl_id;
- loc_params.obj_type = H5I_get_type(loc_id);
+ /* Open the object synchronously */
+ if ((ret_value =
+ H5O__open_by_idx_api_common(loc_id, group_name, idx_type, order, n, lapl_id, NULL, NULL)) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to synchronously open object")
- /* get the location object */
- if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(loc_id)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier")
+done:
+ FUNC_LEAVE_API(ret_value)
+} /* end H5Oopen_by_idx() */
- /* Open the object */
- if (NULL == (opened_obj = H5VL_object_open(vol_obj, &loc_params, &opened_type, H5P_DATASET_XFER_DEFAULT,
- H5_REQUEST_NULL)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open object")
+/*-------------------------------------------------------------------------
+ * Function: H5Oopen_by_idx_async
+ *
+ * Purpose: Asynchronous version of H5Oopen_by_idx
+ *
+ * Return: Success: An open object identifier
+ * Failure: H5I_INVALID_HID
+ *
+ *-------------------------------------------------------------------------
+ */
+hid_t
+H5Oopen_by_idx_async(const char *app_file, const char *app_func, unsigned app_line, hid_t loc_id,
+ const char *group_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n,
+ hid_t lapl_id, hid_t es_id)
+{
+ H5VL_object_t *vol_obj = NULL; /* Object for loc_id */
+ void * token = NULL; /* Request token for async operation */
+ void ** token_ptr = H5_REQUEST_NULL; /* Pointer to request token for async operation */
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
- if ((ret_value = H5VL_register(opened_type, opened_obj, vol_obj->connector, TRUE)) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to atomize object handle")
+ FUNC_ENTER_API(H5I_INVALID_HID)
+ H5TRACE10("i", "*s*sIui*sIiIohii", app_file, app_func, app_line, loc_id, group_name, idx_type, order, n,
+ lapl_id, es_id);
+
+ /* Set up request token pointer for asynchronous operation */
+ if (H5ES_NONE != es_id)
+ token_ptr = &token; /* Point at token for VOL connector to set up */
+
+ /* Open the object asynchronously */
+ if ((ret_value = H5O__open_by_idx_api_common(loc_id, group_name, idx_type, order, n, lapl_id, token_ptr,
+ &vol_obj)) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to asynchronously open object")
+
+ /* If a token was created, add the token to the event set */
+ if (NULL != token)
+ /* clang-format off */
+ if (H5ES_insert(es_id, vol_obj->connector, token,
+ H5ARG_TRACE10(FUNC, "*s*sIui*sIiIohii", app_file, app_func, app_line, loc_id, group_name, idx_type, order, n, lapl_id, es_id)) < 0) {
+ /* clang-format on */
+ if (H5I_dec_app_ref_always_close(ret_value) < 0)
+ HDONE_ERROR(H5E_OHDR, H5E_CANTDEC, H5I_INVALID_HID, "can't decrement count on object ID")
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert token into event set")
+ }
done:
FUNC_LEAVE_API(ret_value)
-} /* end H5Oopen_by_idx() */
+} /* end H5Oopen_by_idx_async() */
/*-------------------------------------------------------------------------
* Function: H5Oopen_by_token
@@ -256,12 +394,417 @@ H5Oopen_by_token(hid_t loc_id, H5O_token_t token)
/* Register the object's ID */
if ((ret_value = H5VL_register(opened_type, opened_obj, vol_obj->connector, TRUE)) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to atomize object handle")
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register object handle")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Oopen_by_token() */
+/*-------------------------------------------------------------------------
+ * Function: H5O__copy_api_common
+ *
+ * Purpose: This is the common function for copying an object.
+ *
+ * Return: SUCCEED/FAIL
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5O__copy_api_common(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, const char *dst_name,
+ hid_t ocpypl_id, hid_t lcpl_id, void **token_ptr, H5VL_object_t **_vol_obj_ptr)
+{
+ /* dst_id */
+ H5VL_object_t * tmp_vol_obj = NULL; /* Object for loc_id */
+ H5VL_object_t **vol_obj_ptr =
+ (_vol_obj_ptr ? _vol_obj_ptr : &tmp_vol_obj); /* Ptr to object ptr for loc_id */
+ H5VL_loc_params_t loc_params2;
+
+ /* src_id */
+ H5VL_object_t * vol_obj1 = NULL; /* object of src_id */
+ H5VL_loc_params_t loc_params1;
+
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_STATIC
+
+ /* Check arguments */
+ if (!src_name || !*src_name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no source name specified")
+ if (!dst_name || !*dst_name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no destination name specified")
+
+ /* Get correct property lists */
+ if (H5P_DEFAULT == lcpl_id)
+ lcpl_id = H5P_LINK_CREATE_DEFAULT;
+ else if (TRUE != H5P_isa_class(lcpl_id, H5P_LINK_CREATE))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link creation property list")
+
+ /* Get object copy property list */
+ if (H5P_DEFAULT == ocpypl_id)
+ ocpypl_id = H5P_OBJECT_COPY_DEFAULT;
+ else if (TRUE != H5P_isa_class(ocpypl_id, H5P_OBJECT_COPY))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not object copy property list")
+
+ /* Set the LCPL for the API context */
+ H5CX_set_lcpl(lcpl_id);
+
+ if (H5VL_setup_loc_args(src_loc_id, &vol_obj1, &loc_params1) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set object access arguments")
+
+ /* get the object */
+ if (NULL == (*vol_obj_ptr = (H5VL_object_t *)H5I_object(dst_loc_id)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
+ loc_params2.type = H5VL_OBJECT_BY_SELF;
+ loc_params2.obj_type = H5I_get_type(dst_loc_id);
+
+ /* Copy the object */
+ if (H5VL_object_copy(vol_obj1, &loc_params1, src_name, *vol_obj_ptr, &loc_params2, dst_name, ocpypl_id,
+ lcpl_id, H5P_DATASET_XFER_DEFAULT, token_ptr) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object")
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* H5O__copy_api_common() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5Ocopy
+ *
+ * Purpose: Copy an object (group or dataset) to destination location
+ * within a file or cross files. PLIST_ID is a property list
+ * which is used to pass user options and properties to the
+ * copy. The name, dst_name, must not already be taken by some
+ * other object in the destination group.
+ *
+ * H5Ocopy() will fail if the name of the destination object
+ * exists in the destination group. For example,
+ * H5Ocopy(fid_src, "/dset", fid_dst, "/dset", ...)
+ * will fail if "/dset" exists in the destination file
+ *
+ * OPTIONS THAT HAVE BEEN IMPLEMENTED.
+ * H5O_COPY_SHALLOW_HIERARCHY_FLAG
+ * If this flag is specified, only immediate members of
+ * the group are copied. Otherwise (default), it will
+ * recursively copy all objects below the group
+ * H5O_COPY_EXPAND_SOFT_LINK_FLAG
+ * If this flag is specified, it will copy the objects
+ * pointed by the soft links. Otherwise (default), it
+ * will copy the soft link as they are
+ * H5O_COPY_WITHOUT_ATTR_FLAG
+ * If this flag is specified, it will copy object without
+ * copying attributes. Otherwise (default), it will
+ * copy object along with all its attributes
+ * H5O_COPY_EXPAND_REFERENCE_FLAG
+ * 1) Copy object between two different files:
+ * When this flag is specified, it will copy objects that
+ * are pointed by the references and update the values of
+ * references in the destination file. Otherwise (default)
+ * the values of references in the destination will set to
+ * zero
+ * The current implementation does not handle references
+ * inside of other datatype structure. For example, if
+ * a member of compound datatype is reference, H5Ocopy()
+ * will copy that field as it is. It will not set the
+ * value to zero as default is used nor copy the object
+ * pointed by that field the flag is set
+ * 2) Copy object within the same file:
+ * This flag does not have any effect to the H5Ocopy().
+ * Datasets or attributes of references are copied as they
+ * are, i.e. values of references of the destination object
+ * are the same as the values of the source object
+ *
+ * OPTIONS THAT MAY APPLY TO COPY IN THE FUTURE.
+ * H5O_COPY_EXPAND_EXT_LINK_FLAG
+ * If this flag is specified, it will expand the external links
+ * into new objects, Otherwise (default), it will keep external
+ * links as they are (default)
+ *
+ * PROPERTIES THAT MAY APPLY TO COPY IN FUTURE
+ * Change data layout such as chunk size
+ * Add filter such as data compression.
+ * Add an attribute to the copied object(s) that say the date/time
+ * for the copy or other information about the source file.
+ *
+ * The intermediate group creation property should be passed in
+ * using the lcpl instead of the ocpypl.
+ *
+ * Usage: H5Ocopy(src_loc_id, src_name, dst_loc_id, dst_name, ocpypl_id, lcpl_id)
+ * hid_t src_loc_id IN: Source file or group identifier.
+ * const char *src_name IN: Name of the source object to be copied
+ * hid_t dst_loc_id IN: Destination file or group identifier
+ * const char *dst_name IN: Name of the destination object
+ * hid_t ocpypl_id IN: Properties which apply to the copy
+ * hid_t lcpl_id IN: Properties which apply to the new hard link
+ *
+ *
+ * Return: SUCCEED/FAIL
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5Ocopy(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, const char *dst_name, hid_t ocpypl_id,
+ hid_t lcpl_id)
+{
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_API(FAIL)
+ H5TRACE6("e", "i*si*sii", src_loc_id, src_name, dst_loc_id, dst_name, ocpypl_id, lcpl_id);
+
+ /* To copy an object synchronously */
+ if (H5O__copy_api_common(src_loc_id, src_name, dst_loc_id, dst_name, ocpypl_id, lcpl_id, NULL, NULL) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to synchronously copy object")
+
+done:
+ FUNC_LEAVE_API(ret_value)
+} /* end H5Ocopy() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5Ocopy_async
+ *
+ * Purpose: Asynchronous version of H5Ocopy
+ *
+ * Return: SUCCEED/FAIL
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5Ocopy_async(const char *app_file, const char *app_func, unsigned app_line, hid_t src_loc_id,
+ const char *src_name, hid_t dst_loc_id, const char *dst_name, hid_t ocpypl_id, hid_t lcpl_id,
+ hid_t es_id)
+{
+ H5VL_object_t *vol_obj = NULL; /* Object for loc_id */
+ void * token = NULL; /* Request token for async operation */
+ void ** token_ptr = H5_REQUEST_NULL; /* Pointer to request token for async operation */
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_API(FAIL)
+ H5TRACE10("e", "*s*sIui*si*siii", app_file, app_func, app_line, src_loc_id, src_name, dst_loc_id,
+ dst_name, ocpypl_id, lcpl_id, es_id);
+
+ /* Set up request token pointer for asynchronous operation */
+ if (H5ES_NONE != es_id)
+ token_ptr = &token; /* Point at token for VOL connector to set up */
+
+ /* To copy an object asynchronously */
+ if (H5O__copy_api_common(src_loc_id, src_name, dst_loc_id, dst_name, ocpypl_id, lcpl_id, token_ptr,
+ &vol_obj) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to asynchronously copy object")
+
+ /* If a token was created, add the token to the event set */
+ if (NULL != token)
+ /* clang-format off */
+ if (H5ES_insert(es_id, vol_obj->connector, token,
+ H5ARG_TRACE10(FUNC, "*s*sIui*si*siii", app_file, app_func, app_line, src_loc_id, src_name, dst_loc_id, dst_name, ocpypl_id, lcpl_id, es_id)) < 0)
+ /* clang-format on */
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't insert token into event set")
+
+done:
+ FUNC_LEAVE_API(ret_value)
+} /* H5Ocopy_async() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5O__flush_api_common
+ *
+ * Purpose: This is the common function for flushing an object.
+ *
+ * Return: SUCCEED/FAIL
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5O__flush_api_common(hid_t obj_id, void **token_ptr, H5VL_object_t **_vol_obj_ptr)
+{
+ H5VL_object_t * tmp_vol_obj = NULL; /* Object for loc_id */
+ H5VL_object_t **vol_obj_ptr =
+ (_vol_obj_ptr ? _vol_obj_ptr : &tmp_vol_obj); /* Ptr to object ptr for loc_id */
+ H5VL_loc_params_t loc_params; /* Location parameters for object access */
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_STATIC
+
+ /* Check args */
+
+ if (H5VL_setup_loc_args(obj_id, vol_obj_ptr, &loc_params) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set object access arguments")
+
+ /* Flush the object */
+ if (H5VL_object_specific(*vol_obj_ptr, &loc_params, H5VL_OBJECT_FLUSH, H5P_DATASET_XFER_DEFAULT,
+ token_ptr, obj_id) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTFLUSH, FAIL, "unable to flush object")
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* H5O__flush_api_common() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5Oflush
+ *
+ * Purpose: Flushes all buffers associated with an object to disk.
+ *
+ * Return: Non-negative on success, negative on failure
+ *
+ * Programmer: Mike McGreevy
+ * May 19, 2010
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5Oflush(hid_t obj_id)
+{
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_API(FAIL)
+ H5TRACE1("e", "i", obj_id);
+
+ /* To flush an object synchronously */
+ if (H5O__flush_api_common(obj_id, NULL, NULL) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTFLUSH, FAIL, "unable to synchronously flush object")
+
+done:
+ FUNC_LEAVE_API(ret_value)
+} /* end H5Oflush() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5Oflush_async
+ *
+ * Purpose: Asynchronous version of H5Oflush
+ *
+ * Return: SUCCEED/FAIL
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5Oflush_async(const char *app_file, const char *app_func, unsigned app_line, hid_t obj_id, hid_t es_id)
+{
+ H5VL_object_t *vol_obj = NULL; /* Object for loc_id */
+ void * token = NULL; /* Request token for async operation */
+ void ** token_ptr = H5_REQUEST_NULL; /* Pointer to request token for async operation */
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_API(FAIL)
+ H5TRACE5("e", "*s*sIuii", app_file, app_func, app_line, obj_id, es_id);
+
+ /* Set up request token pointer for asynchronous operation */
+ if (H5ES_NONE != es_id)
+ token_ptr = &token; /* Point at token for VOL connector to set up */
+
+ /* Flush an object asynchronously */
+ if (H5O__flush_api_common(obj_id, token_ptr, &vol_obj) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTFLUSH, FAIL, "unable to asynchronously flush object")
+
+ /* If a token was created, add the token to the event set */
+ if (NULL != token)
+ /* clang-format off */
+ if (H5ES_insert(es_id, vol_obj->connector, token,
+ H5ARG_TRACE5(FUNC, "*s*sIuii", app_file, app_func, app_line, obj_id, es_id)) < 0)
+ /* clang-format on */
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't insert token into event set")
+
+done:
+ FUNC_LEAVE_API(ret_value)
+} /* H5Oflush_async() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5O__refresh_api_common
+ *
+ * Purpose: This is the common function for refreshing an object.
+ *
+ * Return: SUCCEED/FAIL
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5O__refresh_api_common(hid_t oid, void **token_ptr, H5VL_object_t **_vol_obj_ptr)
+{
+ H5VL_object_t * tmp_vol_obj = NULL; /* Object for loc_id */
+ H5VL_object_t **vol_obj_ptr =
+ (_vol_obj_ptr ? _vol_obj_ptr : &tmp_vol_obj); /* Ptr to object ptr for loc_id */
+ H5VL_loc_params_t loc_params; /* Location parameters for object access */
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_STATIC
+
+ /* Check args */
+
+ if (H5VL_setup_loc_args(oid, vol_obj_ptr, &loc_params) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set object access arguments")
+
+ /* Refresh the object */
+ if (H5VL_object_specific(*vol_obj_ptr, &loc_params, H5VL_OBJECT_REFRESH, H5P_DATASET_XFER_DEFAULT,
+ token_ptr, oid) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "unable to refresh object")
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* H5O__refresh_api_common() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5Orefresh
+ *
+ * Purpose: Refreshes all buffers associated with an object.
+ *
+ * Return: Non-negative on success, negative on failure
+ *
+ * Programmer: Mike McGreevy
+ * July 28, 2010
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5Orefresh(hid_t oid)
+{
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_API(FAIL)
+ H5TRACE1("e", "i", oid);
+
+ /* To refresh an object synchronously */
+ if (H5O__refresh_api_common(oid, NULL, NULL) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "unable to synchronously refresh object")
+
+done:
+ FUNC_LEAVE_API(ret_value)
+} /* end H5Orefresh() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5Orefresh_async
+ *
+ * Purpose: Asynchronous version of H5Orefresh
+ *
+ * Return: SUCCEED/FAIL
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5Orefresh_async(const char *app_file, const char *app_func, unsigned app_line, hid_t oid, hid_t es_id)
+{
+ H5VL_object_t *vol_obj = NULL; /* Object for loc_id */
+ void * token = NULL; /* Request token for async operation */
+ void ** token_ptr = H5_REQUEST_NULL; /* Pointer to request token for async operation */
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_API(FAIL)
+ H5TRACE5("e", "*s*sIuii", app_file, app_func, app_line, oid, es_id);
+
+ /* Set up request token pointer for asynchronous operation */
+ if (H5ES_NONE != es_id)
+ token_ptr = &token; /* Point at token for VOL connector to set up */
+
+ /* Refresh an object asynchronously */
+ if (H5O__refresh_api_common(oid, token_ptr, &vol_obj) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "unable to asynchronously refresh object")
+
+ /* If a token was created, add the token to the event set */
+ if (NULL != token)
+ /* clang-format off */
+ if (H5ES_insert(es_id, vol_obj->connector, token,
+ H5ARG_TRACE5(FUNC, "*s*sIuii", app_file, app_func, app_line, oid, es_id)) < 0)
+ /* clang-format on */
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't insert token into event set")
+
+done:
+ FUNC_LEAVE_API(ret_value)
+} /* H5Orefresh_async() */
+
/*-------------------------------------------------------------------------
* Function: H5Olink
*
@@ -522,14 +1065,14 @@ H5Oexists_by_name(hid_t loc_id, const char *name, hid_t lapl_id)
*-------------------------------------------------------------------------
*/
herr_t
-H5Oget_info3(hid_t loc_id, H5O_info2_t *oinfo, unsigned fields)
+H5Oget_info3(hid_t loc_id, H5O_info2_t *oinfo /*out*/, unsigned fields)
{
H5VL_object_t * vol_obj; /* Object of loc_id */
H5VL_loc_params_t loc_params;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
- H5TRACE3("e", "i*!Iu", loc_id, oinfo, fields);
+ H5TRACE3("e", "ixIu", loc_id, oinfo, fields);
/* Check args */
if (!oinfo)
@@ -555,60 +1098,120 @@ H5Oget_info3(hid_t loc_id, H5O_info2_t *oinfo, unsigned fields)
} /* end H5Oget_info3() */
/*-------------------------------------------------------------------------
- * Function: H5Oget_info_by_name3
+ * Function: H5O__get_info_by_name_api_common
*
- * Purpose: Retrieve information about an object
+ * Purpose: This is the common function for retrieving information
+ * about an object.
*
* Return: SUCCEED/FAIL
*
- * Programmer: Dana Robinson
- * Fall 2019
- *
*-------------------------------------------------------------------------
*/
-herr_t
-H5Oget_info_by_name3(hid_t loc_id, const char *name, H5O_info2_t *oinfo, unsigned fields, hid_t lapl_id)
+static herr_t
+H5O__get_info_by_name_api_common(hid_t loc_id, const char *name, H5O_info2_t *oinfo /*out*/, unsigned fields,
+ hid_t lapl_id, void **token_ptr, H5VL_object_t **_vol_obj_ptr)
{
- H5VL_object_t * vol_obj; /* Object of loc_id */
- H5VL_loc_params_t loc_params;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5VL_object_t * tmp_vol_obj = NULL; /* Object for loc_id */
+ H5VL_object_t **vol_obj_ptr =
+ (_vol_obj_ptr ? _vol_obj_ptr : &tmp_vol_obj); /* Ptr to object ptr for loc_id */
+ H5VL_loc_params_t loc_params; /* Location parameters for object access */
+ herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(FAIL)
- H5TRACE5("e", "i*s*!Iui", loc_id, name, oinfo, fields, lapl_id);
+ FUNC_ENTER_STATIC
/* Check args */
- if (!name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "name parameter cannot be NULL")
- if (!*name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "name parameter cannot be an empty string")
if (!oinfo)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "oinfo parameter cannot be NULL")
if (fields & ~H5O_INFO_ALL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid fields")
- /* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info")
-
- /* Fill out location struct */
- loc_params.type = H5VL_OBJECT_BY_NAME;
- loc_params.loc_data.loc_by_name.name = name;
- loc_params.loc_data.loc_by_name.lapl_id = lapl_id;
- loc_params.obj_type = H5I_get_type(loc_id);
-
- /* Get the location object */
- if (NULL == (vol_obj = H5VL_vol_object(loc_id)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
+ /* "name" is checked in H5VL_setup_name_args() */
+ /* Set up object access arguments */
+ if (H5VL_setup_name_args(loc_id, name, H5P_CLS_LACC, FALSE, lapl_id, vol_obj_ptr, &loc_params) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set object access arguments")
/* Retrieve the object's information */
- if (H5VL_object_get(vol_obj, &loc_params, H5VL_OBJECT_GET_INFO, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL,
+ if (H5VL_object_get(*vol_obj_ptr, &loc_params, H5VL_OBJECT_GET_INFO, H5P_DATASET_XFER_DEFAULT, token_ptr,
oinfo, fields) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get data model info for object")
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* H5O__get_info_by_name_api_common() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5Oget_info_by_name3
+ *
+ * Purpose: Retrieve information about an object
+ *
+ * Return: SUCCEED/FAIL
+ *
+ * Programmer: Dana Robinson
+ * Fall 2019
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5Oget_info_by_name3(hid_t loc_id, const char *name, H5O_info2_t *oinfo /*out*/, unsigned fields,
+ hid_t lapl_id)
+{
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_API(FAIL)
+ H5TRACE5("e", "i*sxIui", loc_id, name, oinfo, fields, lapl_id);
+
+ /* Retrieve object information synchronously */
+ if (H5O__get_info_by_name_api_common(loc_id, name, oinfo, fields, lapl_id, NULL, NULL) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't synchronously retrieve object info")
+
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Oget_info_by_name3() */
+/*-------------------------------------------------------------------------
+ * Function: H5Oget_info_by_name_async
+ *
+ * Purpose: Asynchronous version of H5Oget_info_by_name3
+ *
+ * Return: SUCCEED/FAIL
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5Oget_info_by_name_async(const char *app_file, const char *app_func, unsigned app_line, hid_t loc_id,
+ const char *name, H5O_info2_t *oinfo /*out*/, unsigned fields, hid_t lapl_id,
+ hid_t es_id)
+{
+ H5VL_object_t *vol_obj = NULL; /* Object for loc_id */
+ void * token = NULL; /* Request token for async operation */
+ void ** token_ptr = H5_REQUEST_NULL; /* Pointer to request token for async operation */
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_API(FAIL)
+ /* clang-format off */
+ H5TRACE9("e", "*s*sIui*sxIuii", app_file, app_func, app_line, loc_id, name, oinfo, fields, lapl_id, es_id);
+ /* clang-format on */
+
+ /* Set up request token pointer for asynchronous operation */
+ if (H5ES_NONE != es_id)
+ token_ptr = &token; /* Point at token for VOL connector to set up */
+
+ /* Retrieve group information asynchronously */
+ if (H5O__get_info_by_name_api_common(loc_id, name, oinfo, fields, lapl_id, token_ptr, &vol_obj) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't asynchronously retrieve object info")
+
+ /* If a token was created, add the token to the event set */
+ if (NULL != token)
+ /* clang-format off */
+ if (H5ES_insert(es_id, vol_obj->connector, token,
+ H5ARG_TRACE9(FUNC, "*s*sIui*sxIuii", app_file, app_func, app_line, loc_id, name, oinfo, fields, lapl_id, es_id)) < 0)
+ /* clang-format on */
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't insert token into event set")
+
+done:
+ FUNC_LEAVE_API(ret_value)
+} /* H5Oget_info_by_name_async() */
+
/*-------------------------------------------------------------------------
* Function: H5Oget_info_by_idx3
*
@@ -625,14 +1228,14 @@ H5Oget_info_by_name3(hid_t loc_id, const char *name, H5O_info2_t *oinfo, unsigne
*/
herr_t
H5Oget_info_by_idx3(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order,
- hsize_t n, H5O_info2_t *oinfo, unsigned fields, hid_t lapl_id)
+ hsize_t n, H5O_info2_t *oinfo /*out*/, unsigned fields, hid_t lapl_id)
{
H5VL_object_t * vol_obj; /* Object of loc_id */
H5VL_loc_params_t loc_params;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
- H5TRACE8("e", "i*sIiIoh*!Iui", loc_id, group_name, idx_type, order, n, oinfo, fields, lapl_id);
+ H5TRACE8("e", "i*sIiIohxIui", loc_id, group_name, idx_type, order, n, oinfo, fields, lapl_id);
/* Check args */
if (!group_name || !*group_name)
@@ -684,14 +1287,14 @@ H5Oget_info_by_idx3(hid_t loc_id, const char *group_name, H5_index_t idx_type, H
*-------------------------------------------------------------------------
*/
herr_t
-H5Oget_native_info(hid_t loc_id, H5O_native_info_t *oinfo, unsigned fields)
+H5Oget_native_info(hid_t loc_id, H5O_native_info_t *oinfo /*out*/, unsigned fields)
{
H5VL_object_t * vol_obj; /* Object of loc_id */
H5VL_loc_params_t loc_params;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
- H5TRACE3("e", "i*!Iu", loc_id, oinfo, fields);
+ H5TRACE3("e", "ixIu", loc_id, oinfo, fields);
/* Check args */
if (!oinfo)
@@ -729,7 +1332,7 @@ H5Oget_native_info(hid_t loc_id, H5O_native_info_t *oinfo, unsigned fields)
*-------------------------------------------------------------------------
*/
herr_t
-H5Oget_native_info_by_name(hid_t loc_id, const char *name, H5O_native_info_t *oinfo, unsigned fields,
+H5Oget_native_info_by_name(hid_t loc_id, const char *name, H5O_native_info_t *oinfo /*out*/, unsigned fields,
hid_t lapl_id)
{
H5VL_object_t * vol_obj; /* Object of loc_id */
@@ -737,7 +1340,7 @@ H5Oget_native_info_by_name(hid_t loc_id, const char *name, H5O_native_info_t *oi
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
- H5TRACE5("e", "i*s*!Iui", loc_id, name, oinfo, fields, lapl_id);
+ H5TRACE5("e", "i*sxIui", loc_id, name, oinfo, fields, lapl_id);
/* Check args */
if (!name)
@@ -788,14 +1391,14 @@ H5Oget_native_info_by_name(hid_t loc_id, const char *name, H5O_native_info_t *oi
*/
herr_t
H5Oget_native_info_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order,
- hsize_t n, H5O_native_info_t *oinfo, unsigned fields, hid_t lapl_id)
+ hsize_t n, H5O_native_info_t *oinfo /*out*/, unsigned fields, hid_t lapl_id)
{
H5VL_object_t * vol_obj; /* Object of loc_id */
H5VL_loc_params_t loc_params;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
- H5TRACE8("e", "i*sIiIoh*!Iui", loc_id, group_name, idx_type, order, n, oinfo, fields, lapl_id);
+ H5TRACE8("e", "i*sIiIohxIui", loc_id, group_name, idx_type, order, n, oinfo, fields, lapl_id);
/* Check args */
if (!group_name || !*group_name)
@@ -953,14 +1556,14 @@ H5Oset_comment_by_name(hid_t loc_id, const char *name, const char *comment, hid_
*-------------------------------------------------------------------------
*/
ssize_t
-H5Oget_comment(hid_t obj_id, char *comment, size_t bufsize)
+H5Oget_comment(hid_t obj_id, char *comment /*out*/, size_t bufsize)
{
H5VL_object_t * vol_obj; /* Object of loc_id */
H5VL_loc_params_t loc_params;
ssize_t ret_value = -1; /* Return value */
FUNC_ENTER_API((-1))
- H5TRACE3("Zs", "i*sz", obj_id, comment, bufsize);
+ H5TRACE3("Zs", "ixz", obj_id, comment, bufsize);
/* Get the object */
if (NULL == (vol_obj = H5VL_vol_object(obj_id)))
@@ -996,14 +1599,14 @@ H5Oget_comment(hid_t obj_id, char *comment, size_t bufsize)
*-------------------------------------------------------------------------
*/
ssize_t
-H5Oget_comment_by_name(hid_t loc_id, const char *name, char *comment, size_t bufsize, hid_t lapl_id)
+H5Oget_comment_by_name(hid_t loc_id, const char *name, char *comment /*out*/, size_t bufsize, hid_t lapl_id)
{
H5VL_object_t * vol_obj; /* Object of loc_id */
H5VL_loc_params_t loc_params;
ssize_t ret_value = -1; /* Return value */
FUNC_ENTER_API((-1))
- H5TRACE5("Zs", "i*s*szi", loc_id, name, comment, bufsize, lapl_id);
+ H5TRACE5("Zs", "i*sxzi", loc_id, name, comment, bufsize, lapl_id);
/* Check args */
if (!name || !*name)
@@ -1191,29 +1794,21 @@ H5Ovisit_by_name3(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_it
} /* end H5Ovisit_by_name3() */
/*-------------------------------------------------------------------------
- * Function: H5Oclose
- *
- * Purpose: Close an open file object.
- *
- * This is the companion to H5Oopen. It is used to close any
- * open object in an HDF5 file (but not IDs are that not file
- * objects, such as property lists and dataspaces). It has
- * the same effect as calling H5Gclose, H5Dclose, or H5Tclose.
+ * Function: H5O__close_check_common
*
- * Return: SUCCEED/FAIL
+ * Purpose: This is the common function to validate an object
+ * when closing it.
*
- * Programmer: James Laird
- * July 14 2006
+ * Return: TRUE/FALSE/FAIL
*
*-------------------------------------------------------------------------
*/
-herr_t
-H5Oclose(hid_t object_id)
+static htri_t
+H5O__close_check_common(hid_t object_id)
{
- herr_t ret_value = SUCCEED;
+ htri_t ret_value = TRUE; /* Return value */
- FUNC_ENTER_API(FAIL)
- H5TRACE1("e", "i", object_id);
+ FUNC_ENTER_STATIC
/* Get the type of the object and close it in the correct way */
switch (H5I_get_type(object_id)) {
@@ -1223,8 +1818,6 @@ H5Oclose(hid_t object_id)
case H5I_MAP:
if (H5I_object(object_id) == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a valid object")
- if (H5I_dec_app_ref(object_id) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "unable to close object")
break;
case H5I_UNINIT:
@@ -1240,17 +1833,115 @@ H5Oclose(hid_t object_id)
case H5I_ERROR_MSG:
case H5I_ERROR_STACK:
case H5I_SPACE_SEL_ITER:
+ case H5I_EVENTSET:
case H5I_NTYPES:
default:
- HGOTO_ERROR(H5E_ARGS, H5E_CANTRELEASE, FAIL,
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTRELEASE, FALSE,
"not a valid file object ID (dataset, group, or datatype)")
break;
} /* end switch */
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* H5O__close_check_common() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5Oclose
+ *
+ * Purpose: Close an open file object.
+ *
+ * This is the companion to H5Oopen. It is used to close any
+ * open object in an HDF5 file (but not IDs are that not file
+ * objects, such as property lists and dataspaces). It has
+ * the same effect as calling H5Gclose, H5Dclose, or H5Tclose.
+ *
+ * Return: SUCCEED/FAIL
+ *
+ * Programmer: James Laird
+ * July 14 2006
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5Oclose(hid_t object_id)
+{
+ herr_t ret_value = SUCCEED;
+
+ FUNC_ENTER_API(FAIL)
+ H5TRACE1("e", "i", object_id);
+
+ /* Validate the object type before closing */
+ if (H5O__close_check_common(object_id) <= 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "not a valid object")
+
+ if (H5I_dec_app_ref(object_id) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "unable to close object")
+
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Oclose() */
+/*-------------------------------------------------------------------------
+ * Function: H5Oclose_async
+ *
+ * Purpose: Asynchronous version of H5Oclose
+ *
+ * Return: SUCCEED/FAIL
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5Oclose_async(const char *app_file, const char *app_func, unsigned app_line, hid_t object_id, hid_t es_id)
+{
+ H5VL_object_t *vol_obj = NULL; /* Object for loc_id */
+ H5VL_t * connector = NULL; /* VOL connector */
+ void * token = NULL; /* Request token for async operation */
+ void ** token_ptr = H5_REQUEST_NULL; /* Pointer to request token for async operation */
+ herr_t ret_value = SUCCEED;
+
+ FUNC_ENTER_API(FAIL)
+ H5TRACE5("e", "*s*sIuii", app_file, app_func, app_line, object_id, es_id);
+
+ /* Validate the object type before closing */
+ if (H5O__close_check_common(object_id) <= 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "not a valid object")
+
+ /* Prepare for possible asynchronous operation */
+ if (H5ES_NONE != es_id) {
+ /* Get file object's connector */
+ if (NULL == (vol_obj = H5VL_vol_object(object_id)))
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get VOL object for object")
+
+ /* Increase connector's refcount, so it doesn't get closed if closing
+ * this object ID closes the file */
+ connector = vol_obj->connector;
+ H5VL_conn_inc_rc(connector);
+
+ /* Point at token for operation to set up */
+ token_ptr = &token;
+ } /* end if */
+
+ /* Asynchronously decrement reference count on ID.
+ * When it reaches zero the object will be closed.
+ */
+ if (H5I_dec_app_ref_async(object_id, token_ptr) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTCLOSEFILE, FAIL, "decrementing object ID failed")
+
+ /* If a token was created, add the token to the event set */
+ if (NULL != token)
+ /* clang-format off */
+ if (H5ES_insert(es_id, vol_obj->connector, token,
+ H5ARG_TRACE5(FUNC, "*s*sIuii", app_file, app_func, app_line, object_id, es_id)) < 0)
+ /* clang-format on */
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't insert token into event set")
+
+done:
+ if (connector && H5VL_conn_dec_rc(connector) < 0)
+ HDONE_ERROR(H5E_OHDR, H5E_CANTDEC, FAIL, "can't decrement ref count on connector")
+
+ FUNC_LEAVE_API(ret_value)
+} /* end H5Oclose_async() */
+
/*-------------------------------------------------------------------------
* Function: H5O_disable_mdc_flushes
*
@@ -1496,7 +2187,7 @@ H5Otoken_cmp(hid_t loc_id, const H5O_token_t *token1, const H5O_token_t *token2,
/* Compare the two tokens */
if (H5VL_token_cmp(vol_obj, token1, token2, cmp_value) < 0)
- HGOTO_ERROR(H5E_VOL, H5E_CANTCOMPARE, FAIL, "object token comparison failed")
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTCOMPARE, FAIL, "object token comparison failed")
done:
FUNC_LEAVE_API(ret_value)
@@ -1532,11 +2223,11 @@ H5Otoken_to_str(hid_t loc_id, const H5O_token_t *token, char **token_str)
/* Get object type */
if ((vol_obj_type = H5I_get_type(loc_id)) < 0)
- HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't get underlying VOL object type")
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get underlying VOL object type")
/* Serialize the token */
if (H5VL_token_to_str(vol_obj, vol_obj_type, token, token_str) < 0)
- HGOTO_ERROR(H5E_VOL, H5E_CANTSERIALIZE, FAIL, "object token serialization failed")
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTSERIALIZE, FAIL, "object token serialization failed")
done:
FUNC_LEAVE_API(ret_value)
@@ -1572,11 +2263,11 @@ H5Otoken_from_str(hid_t loc_id, const char *token_str, H5O_token_t *token)
/* Get object type */
if ((vol_obj_type = H5I_get_type(loc_id)) < 0)
- HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't get underlying VOL object type")
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get underlying VOL object type")
/* Deserialize the token */
if (H5VL_token_from_str(vol_obj, vol_obj_type, token_str, token) < 0)
- HGOTO_ERROR(H5E_VOL, H5E_CANTUNSERIALIZE, FAIL, "object token deserialization failed")
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTUNSERIALIZE, FAIL, "object token deserialization failed")
done:
FUNC_LEAVE_API(ret_value)
diff --git a/src/H5Oattribute.c b/src/H5Oattribute.c
index 4adfaf72b28..0fc4cc6088f 100644
--- a/src/H5Oattribute.c
+++ b/src/H5Oattribute.c
@@ -93,6 +93,15 @@ typedef struct {
hbool_t found; /* Found attribute to delete */
} H5O_iter_rm_t;
+/* User data for iteration when checking if an attribute exists */
+typedef struct {
+ /* down */
+ const char *name; /* Name of attribute to open */
+
+ /* up */
+ hbool_t *exists; /* Pointer to flag to indicate attribute exists */
+} H5O_iter_xst_t;
+
/********************/
/* Package Typedefs */
/********************/
@@ -1723,19 +1732,19 @@ static herr_t
H5O__attr_exists_cb(H5O_t H5_ATTR_UNUSED *oh, H5O_mesg_t *mesg /*in,out*/, unsigned H5_ATTR_UNUSED sequence,
unsigned H5_ATTR_UNUSED *oh_modified, void *_udata /*in,out*/)
{
- H5O_iter_rm_t *udata = (H5O_iter_rm_t *)_udata; /* Operator user data */
- herr_t ret_value = H5_ITER_CONT; /* Return value */
+ H5O_iter_xst_t *udata = (H5O_iter_xst_t *)_udata; /* Operator user data */
+ herr_t ret_value = H5_ITER_CONT; /* Return value */
FUNC_ENTER_STATIC_NOERR
/* check args */
HDassert(mesg);
- HDassert(!udata->found);
+ HDassert(udata->exists && !*udata->exists);
/* Check for correct attribute message */
if (HDstrcmp(((H5A_t *)mesg->native)->shared->name, udata->name) == 0) {
/* Indicate that this message is the attribute sought */
- udata->found = TRUE;
+ *udata->exists = TRUE;
/* Stop iterating */
ret_value = H5_ITER_STOP;
@@ -1756,18 +1765,19 @@ H5O__attr_exists_cb(H5O_t H5_ATTR_UNUSED *oh, H5O_mesg_t *mesg /*in,out*/, unsig
*
*-------------------------------------------------------------------------
*/
-htri_t
-H5O__attr_exists(const H5O_loc_t *loc, const char *name)
+herr_t
+H5O__attr_exists(const H5O_loc_t *loc, const char *name, hbool_t *attr_exists)
{
- H5O_t * oh = NULL; /* Pointer to actual object header */
- H5O_ainfo_t ainfo; /* Attribute information for object */
- htri_t ret_value = FAIL; /* Return value */
+ H5O_t * oh = NULL; /* Pointer to actual object header */
+ H5O_ainfo_t ainfo; /* Attribute information for object */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE_TAG(loc->addr)
/* Check arguments */
HDassert(loc);
HDassert(name);
+ HDassert(attr_exists);
/* Protect the object header to iterate over */
if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
@@ -1784,26 +1794,22 @@ H5O__attr_exists(const H5O_loc_t *loc, const char *name)
/* Check for attributes stored densely */
if (H5F_addr_defined(ainfo.fheap_addr)) {
/* Check if attribute exists in dense storage */
- if ((ret_value = H5A__dense_exists(loc->file, &ainfo, name)) < 0)
+ if (H5A__dense_exists(loc->file, &ainfo, name, attr_exists) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_BADITER, FAIL, "error checking for existence of attribute")
} /* end if */
else {
- H5O_iter_rm_t udata; /* User data for callback */
+ H5O_iter_xst_t udata; /* User data for callback */
H5O_mesg_operator_t op; /* Wrapper for operator */
/* Set up user data for callback */
- udata.f = loc->file;
- udata.name = name;
- udata.found = FALSE;
+ udata.name = name;
+ udata.exists = attr_exists;
/* Iterate over existing attributes, checking for attribute with same name */
op.op_type = H5O_MESG_OP_LIB;
op.u.lib_op = H5O__attr_exists_cb;
if (H5O__msg_iterate_real(loc->file, oh, H5O_MSG_ATTR, &op, &udata) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_BADITER, FAIL, "error checking for existence of attribute")
-
- /* Check that we found the attribute */
- ret_value = (htri_t)udata.found;
} /* end else */
done:
diff --git a/src/H5Ochunk.c b/src/H5Ochunk.c
index 6e31668ce5f..eadbb19caa7 100644
--- a/src/H5Ochunk.c
+++ b/src/H5Ochunk.c
@@ -412,7 +412,7 @@ H5O__chunk_dest(H5O_chunk_proxy_t *chk_proxy)
HDassert(chk_proxy);
/* Decrement reference count of object header */
- if (chk_proxy->oh && H5O__dec_rc(chk_proxy->oh) < 0)
+ if (H5O__dec_rc(chk_proxy->oh) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTDEC, FAIL, "can't decrement reference count on object header")
done:
diff --git a/src/H5Ocopy.c b/src/H5Ocopy.c
index d28590fcfa8..67167690699 100644
--- a/src/H5Ocopy.c
+++ b/src/H5Ocopy.c
@@ -111,140 +111,7 @@ H5FL_DEFINE(haddr_t);
/*******************/
/*-------------------------------------------------------------------------
- * Function: H5Ocopy
- *
- * Purpose: Copy an object (group or dataset) to destination location
- * within a file or cross files. PLIST_ID is a property list
- * which is used to pass user options and properties to the
- * copy. The name, dst_name, must not already be taken by some
- * other object in the destination group.
- *
- * H5Ocopy() will fail if the name of the destination object
- * exists in the destination group. For example,
- * H5Ocopy(fid_src, "/dset", fid_dst, "/dset", ...)
- * will fail if "/dset" exists in the destination file
- *
- * OPTIONS THAT HAVE BEEN IMPLEMENTED.
- * H5O_COPY_SHALLOW_HIERARCHY_FLAG
- * If this flag is specified, only immediate members of
- * the group are copied. Otherwise (default), it will
- * recursively copy all objects below the group
- * H5O_COPY_EXPAND_SOFT_LINK_FLAG
- * If this flag is specified, it will copy the objects
- * pointed by the soft links. Otherwise (default), it
- * will copy the soft link as they are
- * H5O_COPY_WITHOUT_ATTR_FLAG
- * If this flag is specified, it will copy object without
- * copying attributes. Otherwise (default), it will
- * copy object along with all its attributes
- * H5O_COPY_EXPAND_REFERENCE_FLAG
- * 1) Copy object between two different files:
- * When this flag is specified, it will copy objects that
- * are pointed by the references and update the values of
- * references in the destination file. Otherwise (default)
- * the values of references in the destination will set to
- * zero
- * The current implementation does not handle references
- * inside of other datatype structure. For example, if
- * a member of compound datatype is reference, H5Ocopy()
- * will copy that field as it is. It will not set the
- * value to zero as default is used nor copy the object
- * pointed by that field the flag is set
- * 2) Copy object within the same file:
- * This flag does not have any effect to the H5Ocopy().
- * Datasets or attributes of references are copied as they
- * are, i.e. values of references of the destination object
- * are the same as the values of the source object
- *
- * OPTIONS THAT MAY APPLY TO COPY IN THE FUTURE.
- * H5O_COPY_EXPAND_EXT_LINK_FLAG
- * If this flag is specified, it will expand the external links
- * into new objects, Otherwise (default), it will keep external
- * links as they are (default)
- *
- * PROPERTIES THAT MAY APPLY TO COPY IN FUTURE
- * Change data layout such as chunk size
- * Add filter such as data compression.
- * Add an attribute to the copied object(s) that say the date/time
- * for the copy or other information about the source file.
- *
- * The intermediate group creation property should be passed in
- * using the lcpl instead of the ocpypl.
- *
- * Usage: H5Ocopy(src_loc_id, src_name, dst_loc_id, dst_name, ocpypl_id, lcpl_id)
- * hid_t src_loc_id IN: Source file or group identifier.
- * const char *src_name IN: Name of the source object to be copied
- * hid_t dst_loc_id IN: Destination file or group identifier
- * const char *dst_name IN: Name of the destination object
- * hid_t ocpypl_id IN: Properties which apply to the copy
- * hid_t lcpl_id IN: Properties which apply to the new hard link
- *
- *
- * Return: SUCCEED/FAIL
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5Ocopy(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, const char *dst_name, hid_t ocpypl_id,
- hid_t lcpl_id)
-{
- H5VL_object_t * vol_obj1 = NULL; /* object of src_id */
- H5VL_loc_params_t loc_params1;
- H5VL_object_t * vol_obj2 = NULL; /* object of dst_id */
- H5VL_loc_params_t loc_params2;
- herr_t ret_value = SUCCEED; /* Return value */
-
- FUNC_ENTER_API(FAIL)
- H5TRACE6("e", "i*si*sii", src_loc_id, src_name, dst_loc_id, dst_name, ocpypl_id, lcpl_id);
-
- /* Check arguments */
- if (!src_name || !*src_name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no source name specified")
- if (!dst_name || !*dst_name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no destination name specified")
-
- /* Get correct property lists */
- if (H5P_DEFAULT == lcpl_id)
- lcpl_id = H5P_LINK_CREATE_DEFAULT;
- else if (TRUE != H5P_isa_class(lcpl_id, H5P_LINK_CREATE))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link creation property list")
-
- /* Get object copy property list */
- if (H5P_DEFAULT == ocpypl_id)
- ocpypl_id = H5P_OBJECT_COPY_DEFAULT;
- else if (TRUE != H5P_isa_class(ocpypl_id, H5P_OBJECT_COPY))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not object copy property list")
-
- /* Set the LCPL for the API context */
- H5CX_set_lcpl(lcpl_id);
-
- /* Set up collective metadata if appropriate */
- if (H5CX_set_loc(src_loc_id) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set collective metadata read info")
-
- /* get the object */
- if (NULL == (vol_obj1 = (H5VL_object_t *)H5I_object(src_loc_id)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
- loc_params1.type = H5VL_OBJECT_BY_SELF;
- loc_params1.obj_type = H5I_get_type(src_loc_id);
-
- /* get the object */
- if (NULL == (vol_obj2 = (H5VL_object_t *)H5I_object(dst_loc_id)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
- loc_params2.type = H5VL_OBJECT_BY_SELF;
- loc_params2.obj_type = H5I_get_type(dst_loc_id);
-
- /* Copy the object */
- if (H5VL_object_copy(vol_obj1, &loc_params1, src_name, vol_obj2, &loc_params2, dst_name, ocpypl_id,
- lcpl_id, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object")
-
-done:
- FUNC_LEAVE_API(ret_value)
-} /* end H5Ocopy() */
-
-/*-------------------------------------------------------------------------
- * Function: H5O_copy
+ * Function: H5O__copy
*
* Purpose: Private version of H5Ocopy
*
@@ -256,18 +123,18 @@ H5Ocopy(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, const char *ds
*-------------------------------------------------------------------------
*/
herr_t
-H5O_copy(const H5G_loc_t *loc, const char *src_name, H5G_loc_t *dst_loc, const char *dst_name,
- hid_t ocpypl_id, hid_t lcpl_id)
+H5O__copy(const H5G_loc_t *loc, const char *src_name, H5G_loc_t *dst_loc, const char *dst_name,
+ hid_t ocpypl_id, hid_t lcpl_id)
{
H5G_loc_t src_loc; /* Source object group location */
H5G_name_t src_path; /* Opened source object hier. path */
H5O_loc_t src_oloc; /* Opened source object object location */
- htri_t dst_exists; /* Does destination name exist already? */
+ hbool_t dst_exists; /* Does destination name exist already? */
hbool_t loc_found = FALSE; /* Location at 'name' found */
hbool_t obj_open = FALSE; /* Entry at 'name' found */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(loc);
@@ -276,9 +143,10 @@ H5O_copy(const H5G_loc_t *loc, const char *src_name, H5G_loc_t *dst_loc, const c
HDassert(dst_name && *dst_name);
/* Check if destination name already exists */
- if ((dst_exists = H5L_exists_tolerant(dst_loc, dst_name)) < 0)
+ dst_exists = FALSE;
+ if (H5L_exists_tolerant(dst_loc, dst_name, &dst_exists) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to check if destination name exists")
- if (TRUE == dst_exists)
+ if (dst_exists)
HGOTO_ERROR(H5E_OHDR, H5E_EXISTS, FAIL, "destination object already exists")
/* Set up opened group location to fill in */
@@ -307,7 +175,7 @@ H5O_copy(const H5G_loc_t *loc, const char *src_name, H5G_loc_t *dst_loc, const c
HDONE_ERROR(H5E_OHDR, H5E_CLOSEERROR, FAIL, "unable to release object header")
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_copy() */
+} /* end H5O__copy() */
/*-------------------------------------------------------------------------
* Function: H5O__copy_header_real
@@ -1283,10 +1151,10 @@ H5O__copy_comm_dt_cmp(const void *_key1, const void *_key2)
} /* end H5O__copy_comm_dt_cmp */
/*-------------------------------------------------------------------------
- * Function: H5O_copy_search_comm_dt_attr_cb
+ * Function: H5O__copy_search_comm_dt_attr_cb
*
* Purpose: Callback for H5O_attr_iterate_real from
- * H5O_copy_search_comm_dt_check. Checks if the attribute's
+ * H5O__copy_search_comm_dt_check. Checks if the attribute's
* datatype is committed. If it is, adds it to the merge
* committed dt skiplist present in udata if it does not match
* any already present.
@@ -1299,7 +1167,7 @@ H5O__copy_comm_dt_cmp(const void *_key1, const void *_key2)
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_copy_search_comm_dt_attr_cb(const H5A_t *attr, void *_udata)
+H5O__copy_search_comm_dt_attr_cb(const H5A_t *attr, void *_udata)
{
H5O_copy_search_comm_dt_ud_t * udata = (H5O_copy_search_comm_dt_ud_t *)_udata;
H5T_t * dt = NULL; /* Datatype */
@@ -1308,7 +1176,7 @@ H5O_copy_search_comm_dt_attr_cb(const H5A_t *attr, void *_udata)
hbool_t obj_inserted = FALSE; /* Object inserted into skip list */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Sanity checks */
HDassert(attr);
@@ -1361,10 +1229,10 @@ H5O_copy_search_comm_dt_attr_cb(const H5A_t *attr, void *_udata)
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_copy_search_comm_dt_attr_cb */
+} /* end H5O__copy_search_comm_dt_attr_cb */
/*-------------------------------------------------------------------------
- * Function: H5O_copy_search_comm_dt_check
+ * Function: H5O__copy_search_comm_dt_check
*
* Purpose: Check if the object at obj_oloc is or contains a reference
* to a committed datatype. If it does, adds it to the merge
@@ -1379,7 +1247,7 @@ H5O_copy_search_comm_dt_attr_cb(const H5A_t *attr, void *_udata)
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_copy_search_comm_dt_check(H5O_loc_t *obj_oloc, H5O_copy_search_comm_dt_ud_t *udata)
+H5O__copy_search_comm_dt_check(H5O_loc_t *obj_oloc, H5O_copy_search_comm_dt_ud_t *udata)
{
H5O_copy_search_comm_dt_key_t *key = NULL; /* Skiplist key */
haddr_t * addr = NULL; /* Destination address */
@@ -1388,7 +1256,7 @@ H5O_copy_search_comm_dt_check(H5O_loc_t *obj_oloc, H5O_copy_search_comm_dt_ud_t
const H5O_obj_class_t * obj_class = NULL; /* Type of object */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Sanity checks */
HDassert(obj_oloc);
@@ -1457,7 +1325,7 @@ H5O_copy_search_comm_dt_check(H5O_loc_t *obj_oloc, H5O_copy_search_comm_dt_ud_t
/* Search within attributes */
attr_op.op_type = H5A_ATTR_OP_LIB;
- attr_op.u.lib_op = H5O_copy_search_comm_dt_attr_cb;
+ attr_op.u.lib_op = H5O__copy_search_comm_dt_attr_cb;
udata->obj_oloc.file = obj_oloc->file;
udata->obj_oloc.addr = obj_oloc->addr;
if (H5O_attr_iterate_real((hid_t)-1, obj_oloc, H5_INDEX_NAME, H5_ITER_NATIVE, (hsize_t)0, NULL, &attr_op,
@@ -1479,14 +1347,14 @@ H5O_copy_search_comm_dt_check(H5O_loc_t *obj_oloc, H5O_copy_search_comm_dt_ud_t
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_copy_search_comm_dt_check */
+} /* end H5O__copy_search_comm_dt_check */
/*-------------------------------------------------------------------------
* Function: H5O__copy_search_comm_dt_cb
*
* Purpose: H5G_visit callback to add committed datatypes to the merge
* committed dt skiplist. Mostly a wrapper for
- * H5O_copy_search_comm_dt_check.
+ * H5O__copy_search_comm_dt_check.
*
* Return: Non-negative on success/Negative on failure
*
@@ -1529,7 +1397,7 @@ H5O__copy_search_comm_dt_cb(hid_t H5_ATTR_UNUSED group, const char *name, const
obj_found = TRUE;
/* Check object and add to skip list if appropriate */
- if (H5O_copy_search_comm_dt_check(&obj_oloc, udata) < 0)
+ if (H5O__copy_search_comm_dt_check(&obj_oloc, udata) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, H5_ITER_ERROR, "can't check object")
} /* end if */
@@ -1627,7 +1495,7 @@ H5O__copy_search_comm_dt(H5F_t *file_src, H5O_t *oh_src, H5O_loc_t *oloc_dst /*i
H5E_clear_stack(NULL);
else
/* Check object and add to skip list if appropriate */
- if (H5O_copy_search_comm_dt_check(&obj_oloc, &udata) < 0) {
+ if (H5O__copy_search_comm_dt_check(&obj_oloc, &udata) < 0) {
if (H5G_loc_free(&obj_loc) < 0)
HERROR(H5E_OHDR, H5E_CANTRELEASE, "can't free location");
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't check object")
diff --git a/src/H5Ocopy_ref.c b/src/H5Ocopy_ref.c
index 83643f34e9a..e06e699ab4b 100644
--- a/src/H5Ocopy_ref.c
+++ b/src/H5Ocopy_ref.c
@@ -63,7 +63,7 @@ static herr_t H5O__copy_expand_ref_object1(H5O_loc_t *src_oloc, const void *buf_
static herr_t H5O__copy_expand_ref_region1(H5O_loc_t *src_oloc, const void *buf_src, H5O_loc_t *dst_oloc,
H5G_loc_t *dst_root_loc, void *buf_dst, size_t ref_count,
H5O_copy_t *cpy_info);
-static herr_t H5O__copy_expand_ref_object2(H5O_loc_t *src_oloc, hid_t tid_src, H5T_t *dt_src,
+static herr_t H5O__copy_expand_ref_object2(H5O_loc_t *src_oloc, hid_t tid_src, const H5T_t *dt_src,
const void *buf_src, size_t nbytes_src, H5O_loc_t *dst_oloc,
H5G_loc_t *dst_root_loc, void *buf_dst, size_t ref_count,
H5O_copy_t *cpy_info);
@@ -284,7 +284,7 @@ H5O__copy_expand_ref_region1(H5O_loc_t *src_oloc, const void *buf_src, H5O_loc_t
*-------------------------------------------------------------------------
*/
static herr_t
-H5O__copy_expand_ref_object2(H5O_loc_t *src_oloc, hid_t tid_src, H5T_t *dt_src, const void *buf_src,
+H5O__copy_expand_ref_object2(H5O_loc_t *src_oloc, hid_t tid_src, const H5T_t *dt_src, const void *buf_src,
size_t nbytes_src, H5O_loc_t *dst_oloc, H5G_loc_t *dst_root_loc, void *buf_dst,
size_t ref_count, H5O_copy_t *cpy_info)
{
@@ -423,7 +423,7 @@ H5O__copy_expand_ref_object2(H5O_loc_t *src_oloc, hid_t tid_src, H5T_t *dt_src,
*-------------------------------------------------------------------------
*/
herr_t
-H5O_copy_expand_ref(H5F_t *file_src, hid_t tid_src, H5T_t *dt_src, void *buf_src, size_t nbytes_src,
+H5O_copy_expand_ref(H5F_t *file_src, hid_t tid_src, const H5T_t *dt_src, void *buf_src, size_t nbytes_src,
H5F_t *file_dst, void *buf_dst, H5O_copy_t *cpy_info)
{
H5O_loc_t dst_oloc; /* Copied object object location */
diff --git a/src/H5Oefl.c b/src/H5Oefl.c
index 1ecaf36ba87..d950249cbdb 100644
--- a/src/H5Oefl.c
+++ b/src/H5Oefl.c
@@ -466,7 +466,7 @@ H5O__efl_copy_file(H5F_t H5_ATTR_UNUSED *file_src, void *mesg_src, H5F_t *file_d
HGOTO_ERROR(H5E_EFL, H5E_PROTECT, NULL, "unable to protect EFL file name heap")
/* Insert "empty" name first */
- if (UFAIL == (name_offset = H5HL_insert(file_dst, heap, (size_t)1, "")))
+ if (H5HL_insert(file_dst, heap, (size_t)1, "", &name_offset) < 0)
HGOTO_ERROR(H5E_EFL, H5E_CANTINSERT, NULL, "can't insert file name into heap")
HDassert(0 == name_offset);
@@ -483,10 +483,10 @@ H5O__efl_copy_file(H5F_t H5_ATTR_UNUSED *file_src, void *mesg_src, H5F_t *file_d
/* copy the name from the source */
for (idx = 0; idx < efl_src->nused; idx++) {
efl_dst->slot[idx].name = H5MM_xstrdup(efl_src->slot[idx].name);
- if (UFAIL == (efl_dst->slot[idx].name_offset = H5HL_insert(
- file_dst, heap, HDstrlen(efl_dst->slot[idx].name) + 1, efl_dst->slot[idx].name)))
+ if (H5HL_insert(file_dst, heap, HDstrlen(efl_dst->slot[idx].name) + 1, efl_dst->slot[idx].name,
+ &(efl_dst->slot[idx].name_offset)) < 0)
HGOTO_ERROR(H5E_EFL, H5E_CANTINSERT, NULL, "can't insert file name into heap")
- } /* end for */
+ }
/* Set return value */
ret_value = efl_dst;
diff --git a/src/H5Oflush.c b/src/H5Oflush.c
index e1fa5e9c192..2e3c1fd8911 100644
--- a/src/H5Oflush.c
+++ b/src/H5Oflush.c
@@ -55,49 +55,6 @@ static herr_t H5O__refresh_metadata_close(hid_t oid, H5O_loc_t oloc, H5G_loc_t *
/* Functions */
/*************/
-/*-------------------------------------------------------------------------
- * Function: H5Oflush
- *
- * Purpose: Flushes all buffers associated with an object to disk.
- *
- * Return: SUCCEED/FAIL
- *
- * Programmer: Mike McGreevy
- * May 19, 2010
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5Oflush(hid_t obj_id)
-{
- H5VL_object_t * vol_obj = NULL; /* Object of obj_id */
- H5VL_loc_params_t loc_params;
- herr_t ret_value = SUCCEED; /* Return value */
-
- FUNC_ENTER_API(FAIL)
- H5TRACE1("e", "i", obj_id);
-
- /* Check args */
- if (NULL == (vol_obj = H5VL_vol_object(obj_id)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid object identifier")
-
- /* Set up collective metadata if appropriate */
- if (H5CX_set_loc(obj_id) < 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't set access property list info")
-
- /* Set location parameters */
- loc_params.type = H5VL_OBJECT_BY_SELF;
- loc_params.obj_type = H5I_get_type(obj_id);
-
- /* Flush the object */
- if (H5VL_object_specific(vol_obj, &loc_params, H5VL_OBJECT_FLUSH, H5P_DATASET_XFER_DEFAULT,
- H5_REQUEST_NULL, obj_id) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTFLUSH, FAIL, "unable to flush object")
-
-done:
- FUNC_LEAVE_API(ret_value)
-} /* end H5Oflush() */
-
/*-------------------------------------------------------------------------
* Function: H5O_flush
*
@@ -216,49 +173,6 @@ H5O__oh_tag(const H5O_loc_t *oloc, haddr_t *tag)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O__oh_tag() */
-/*-------------------------------------------------------------------------
- * Function: H5Orefresh
- *
- * Purpose: Refreshes all buffers associated with an object.
- *
- * Return: SUCCEED/FAIL
- *
- * Programmer: Mike McGreevy
- * July 28, 2010
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5Orefresh(hid_t oid)
-{
- H5VL_object_t * vol_obj = NULL; /* Object of oid */
- H5VL_loc_params_t loc_params;
- herr_t ret_value = SUCCEED; /* Return value */
-
- FUNC_ENTER_API(FAIL)
- H5TRACE1("e", "i", oid);
-
- /* Check args */
- if (NULL == (vol_obj = H5VL_vol_object(oid)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid object identifier")
-
- /* Set up collective metadata if appropriate */
- if (H5CX_set_loc(oid) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info")
-
- /* Set location parameters */
- loc_params.type = H5VL_OBJECT_BY_SELF;
- loc_params.obj_type = H5I_get_type(oid);
-
- /* Refresh the object */
- if (H5VL_object_specific(vol_obj, &loc_params, H5VL_OBJECT_REFRESH, H5P_DATASET_XFER_DEFAULT,
- H5_REQUEST_NULL, oid) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "unable to refresh object")
-
-done:
- FUNC_LEAVE_API(ret_value)
-} /* end H5Orefresh() */
-
/*-------------------------------------------------------------------------
* Function: H5O_refresh_metadata
*
@@ -487,9 +401,8 @@ H5O_refresh_metadata_reopen(hid_t oid, H5G_loc_t *obj_loc, const H5O_refresh_sta
case H5I_DATASET:
object = H5D_open(obj_loc, (state == NULL) ? H5P_DATASET_ACCESS_DEFAULT : state->dapl_id);
- if (NULL == object) {
- HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open dataset");
- }
+ if (NULL == object)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open dataset")
if (!start_swmr) /* No need to handle multiple opens when H5Fstart_swmr_write() */
if (H5D_mult_refresh_reopen((H5D_t *)object) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, FAIL, "unable to finish refresh for dataset")
@@ -511,6 +424,7 @@ H5O_refresh_metadata_reopen(hid_t oid, H5G_loc_t *obj_loc, const H5O_refresh_sta
case H5I_ERROR_MSG:
case H5I_ERROR_STACK:
case H5I_SPACE_SEL_ITER:
+ case H5I_EVENTSET:
case H5I_NTYPES:
default:
HGOTO_ERROR(H5E_OHDR, H5E_BADTYPE, FAIL,
diff --git a/src/H5Oint.c b/src/H5Oint.c
index a88a0261fb4..f24d0bbb0f5 100644
--- a/src/H5Oint.c
+++ b/src/H5Oint.c
@@ -91,35 +91,35 @@ hbool_t H5_PKG_INIT_VAR = FALSE;
* message.
*/
const H5O_msg_class_t *const H5O_msg_class_g[] = {
- H5O_MSG_NULL, /*0x0000 Null */
- H5O_MSG_SDSPACE, /*0x0001 Dataspace */
- H5O_MSG_LINFO, /*0x0002 Link information */
- H5O_MSG_DTYPE, /*0x0003 Datatype */
- H5O_MSG_FILL, /*0x0004 Old data storage -- fill value */
- H5O_MSG_FILL_NEW, /*0x0005 New data storage -- fill value */
- H5O_MSG_LINK, /*0x0006 Link */
+ H5O_MSG_NULL, /*0x0000 Null */
+ H5O_MSG_SDSPACE, /*0x0001 Dataspace */
+ H5O_MSG_LINFO, /*0x0002 Link information */
+ H5O_MSG_DTYPE, /*0x0003 Datatype */
+ H5O_MSG_FILL, /*0x0004 Old data storage -- fill value */
+ H5O_MSG_FILL_NEW, /*0x0005 New data storage -- fill value */
+ H5O_MSG_LINK, /*0x0006 Link */
H5O_MSG_EFL, /*0x0007 Data storage -- external data files */
- H5O_MSG_LAYOUT, /*0x0008 Data Layout */
+ H5O_MSG_LAYOUT, /*0x0008 Data Layout */
#ifdef H5O_ENABLE_BOGUS
- H5O_MSG_BOGUS_VALID, /*0x0009 "Bogus valid" (for testing) */
+ H5O_MSG_BOGUS_VALID, /*0x0009 "Bogus valid" (for testing) */
#else /* H5O_ENABLE_BOGUS */
- NULL, /*0x0009 "Bogus valid" (for testing) */
+ NULL, /*0x0009 "Bogus valid" (for testing) */
#endif /* H5O_ENABLE_BOGUS */
- H5O_MSG_GINFO, /*0x000A Group information */
+ H5O_MSG_GINFO, /*0x000A Group information */
H5O_MSG_PLINE, /*0x000B Data storage -- filter pipeline */
- H5O_MSG_ATTR, /*0x000C Attribute */
- H5O_MSG_NAME, /*0x000D Object name */
+ H5O_MSG_ATTR, /*0x000C Attribute */
+ H5O_MSG_NAME, /*0x000D Object name */
H5O_MSG_MTIME, /*0x000E Object modification date and time */
- H5O_MSG_SHMESG, /*0x000F File-wide shared message table */
- H5O_MSG_CONT, /*0x0010 Object header continuation */
- H5O_MSG_STAB, /*0x0011 Symbol table */
+ H5O_MSG_SHMESG, /*0x000F File-wide shared message table */
+ H5O_MSG_CONT, /*0x0010 Object header continuation */
+ H5O_MSG_STAB, /*0x0011 Symbol table */
H5O_MSG_MTIME_NEW, /*0x0012 New Object modification date and time */
H5O_MSG_BTREEK, /*0x0013 Non-default v1 B-tree 'K' values */
- H5O_MSG_DRVINFO, /*0x0014 Driver info settings */
- H5O_MSG_AINFO, /*0x0015 Attribute information */
- H5O_MSG_REFCOUNT, /*0x0016 Object's ref. count */
- H5O_MSG_FSINFO, /*0x0017 Free-space manager info */
- H5O_MSG_MDCI, /*0x0018 Metadata cache image */
+ H5O_MSG_DRVINFO, /*0x0014 Driver info settings */
+ H5O_MSG_AINFO, /*0x0015 Attribute information */
+ H5O_MSG_REFCOUNT, /*0x0016 Object's ref. count */
+ H5O_MSG_FSINFO, /*0x0017 Free-space manager info */
+ H5O_MSG_MDCI, /*0x0018 Metadata cache image */
H5O_MSG_UNKNOWN /*0x0019 Placeholder for unknown message */
};
@@ -204,7 +204,7 @@ H5O__init_package(void)
} /* end H5O__init_package() */
/*-------------------------------------------------------------------------
- * Function: H5O_set_version
+ * Function: H5O__set_version
*
* Purpose: Sets the correct version to encode the object header.
* Chooses the oldest version possible, unless the file's
@@ -218,12 +218,12 @@ H5O__init_package(void)
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_set_version(H5F_t *f, H5O_t *oh, uint8_t oh_flags, hbool_t store_msg_crt_idx)
+H5O__set_version(H5F_t *f, H5O_t *oh, uint8_t oh_flags, hbool_t store_msg_crt_idx)
{
uint8_t version; /* Message version */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_STATIC
/* check arguments */
HDassert(f);
@@ -247,7 +247,7 @@ H5O_set_version(H5F_t *f, H5O_t *oh, uint8_t oh_flags, hbool_t store_msg_crt_idx
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_set_version() */
+} /* end H5O__set_version() */
/*-------------------------------------------------------------------------
* Function: H5O_create
@@ -283,13 +283,13 @@ H5O_create(H5F_t *f, size_t size_hint, size_t initial_rc, hid_t ocpl_id, H5O_loc
/* create object header in freelist
* header version is set internally
*/
- oh = H5O__create_ohdr(f, ocpl_id);
+ oh = H5O_create_ohdr(f, ocpl_id);
if (NULL == oh)
HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "Can't instantiate object header")
/* apply object header information to file
*/
- if (H5O__apply_ohdr(f, oh, ocpl_id, size_hint, initial_rc, loc) < 0)
+ if (H5O_apply_ohdr(f, oh, ocpl_id, size_hint, initial_rc, loc) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "Can't apply object header to file")
done:
@@ -300,7 +300,7 @@ H5O_create(H5F_t *f, size_t size_hint, size_t initial_rc, hid_t ocpl_id, H5O_loc
} /* end H5O_create() */
/*-----------------------------------------------------------------------------
- * Function: H5O__create_ohdr
+ * Function: H5O_create_ohdr
*
* Purpose: Create the object header, set version and flags.
*
@@ -313,7 +313,7 @@ H5O_create(H5F_t *f, size_t size_hint, size_t initial_rc, hid_t ocpl_id, H5O_loc
*-----------------------------------------------------------------------------
*/
H5O_t *
-H5O__create_ohdr(H5F_t *f, hid_t ocpl_id)
+H5O_create_ohdr(H5F_t *f, hid_t ocpl_id)
{
H5P_genplist_t *oc_plist;
H5O_t * oh = NULL; /* Object header in Freelist */
@@ -349,7 +349,7 @@ H5O__create_ohdr(H5F_t *f, hid_t ocpl_id)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get object header flags")
}
- if (H5O_set_version(f, oh, oh_flags, H5F_STORE_MSG_CRT_IDX(f)) < 0)
+ if (H5O__set_version(f, oh, oh_flags, H5F_STORE_MSG_CRT_IDX(f)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, NULL, "can't set version of object header")
oh->flags = oh_flags;
@@ -361,10 +361,10 @@ H5O__create_ohdr(H5F_t *f, hid_t ocpl_id)
HDONE_ERROR(H5E_OHDR, H5E_CANTFREE, NULL, "can't delete object header")
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5O__create_ohdr() */
+} /* H5O_create_ohdr() */
/*-----------------------------------------------------------------------------
- * Function: H5O__apply_ohdr
+ * Function: H5O_apply_ohdr
*
* Purpose: Initialize and set the object header in the file.
* Record some information at `loc_out`.
@@ -378,7 +378,7 @@ H5O__create_ohdr(H5F_t *f, hid_t ocpl_id)
*-----------------------------------------------------------------------------
*/
herr_t
-H5O__apply_ohdr(H5F_t *f, H5O_t *oh, hid_t ocpl_id, size_t size_hint, size_t initial_rc, H5O_loc_t *loc_out)
+H5O_apply_ohdr(H5F_t *f, H5O_t *oh, hid_t ocpl_id, size_t size_hint, size_t initial_rc, H5O_loc_t *loc_out)
{
haddr_t oh_addr;
size_t oh_size;
@@ -449,12 +449,16 @@ H5O__apply_ohdr(H5F_t *f, H5O_t *oh, hid_t ocpl_id, size_t size_hint, size_t ini
#if H5_SIZEOF_SIZE_T > H5_SIZEOF_INT32_T
if (size_hint > 4294967295UL)
oh->flags |= H5O_HDR_CHUNK0_8;
- else
-#endif /* H5_SIZEOF_SIZE_T > H5_SIZEOF_INT32_T */
- if (size_hint > 65535)
+ else if (size_hint > 65535)
+ oh->flags |= H5O_HDR_CHUNK0_4;
+ else if (size_hint > 255)
+ oh->flags |= H5O_HDR_CHUNK0_2;
+#else
+ if (size_hint > 65535)
oh->flags |= H5O_HDR_CHUNK0_4;
else if (size_hint > 255)
oh->flags |= H5O_HDR_CHUNK0_2;
+#endif
}
else {
/* Reset unused time fields */
@@ -538,7 +542,7 @@ H5O__apply_ohdr(H5F_t *f, H5O_t *oh, hid_t ocpl_id, size_t size_hint, size_t ini
done:
FUNC_LEAVE_NOAPI(ret_value);
-} /* H5O__apply_ohdr() */
+} /* H5O_apply_ohdr() */
/*-------------------------------------------------------------------------
* Function: H5O_open
@@ -635,7 +639,7 @@ H5O_open_name(const H5G_loc_t *loc, const char *name, H5I_type_t *opened_type)
} /* end H5O_open_name() */
/*-------------------------------------------------------------------------
- * Function: H5O_open_by_idx
+ * Function: H5O__open_by_idx
*
* Purpose: Internal routine to open an object by index within group
*
@@ -648,8 +652,8 @@ H5O_open_name(const H5G_loc_t *loc, const char *name, H5I_type_t *opened_type)
*-------------------------------------------------------------------------
*/
void *
-H5O_open_by_idx(const H5G_loc_t *loc, const char *name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n,
- H5I_type_t *opened_type)
+H5O__open_by_idx(const H5G_loc_t *loc, const char *name, H5_index_t idx_type, H5_iter_order_t order,
+ hsize_t n, H5I_type_t *opened_type)
{
H5G_loc_t obj_loc; /* Location used to open group */
H5G_name_t obj_path; /* Opened object group hier. path */
@@ -657,7 +661,7 @@ H5O_open_by_idx(const H5G_loc_t *loc, const char *name, H5_index_t idx_type, H5_
hbool_t loc_found = FALSE; /* Entry at 'name' found */
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI(NULL)
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(loc);
@@ -683,10 +687,10 @@ H5O_open_by_idx(const H5G_loc_t *loc, const char *name, H5_index_t idx_type, H5_
HDONE_ERROR(H5E_OHDR, H5E_CANTRELEASE, NULL, "can't free location")
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_open_by_idx() */
+} /* end H5O__open_by_idx() */
/*-------------------------------------------------------------------------
- * Function: H5O_open_by_addr
+ * Function: H5O__open_by_addr
*
* Purpose: Internal routine to open an object by its address
*
@@ -699,14 +703,14 @@ H5O_open_by_idx(const H5G_loc_t *loc, const char *name, H5_index_t idx_type, H5_
*-------------------------------------------------------------------------
*/
void *
-H5O_open_by_addr(const H5G_loc_t *loc, haddr_t addr, H5I_type_t *opened_type)
+H5O__open_by_addr(const H5G_loc_t *loc, haddr_t addr, H5I_type_t *opened_type)
{
H5G_loc_t obj_loc; /* Location used to open group */
H5G_name_t obj_path; /* Opened object group hier. path */
H5O_loc_t obj_oloc; /* Opened object object location */
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI(NULL)
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(loc);
@@ -725,7 +729,7 @@ H5O_open_by_addr(const H5G_loc_t *loc, haddr_t addr, H5I_type_t *opened_type)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_open_by_addr() */
+} /* end H5O__open_by_addr() */
/*-------------------------------------------------------------------------
* Function: H5O_open_by_loc
@@ -1827,6 +1831,7 @@ H5O_get_loc(hid_t object_id)
case H5I_ERROR_MSG:
case H5I_ERROR_STACK:
case H5I_SPACE_SEL_ITER:
+ case H5I_EVENTSET:
case H5I_NTYPES:
default:
HGOTO_ERROR(H5E_OHDR, H5E_BADTYPE, NULL, "invalid object type")
diff --git a/src/H5Opkg.h b/src/H5Opkg.h
index 3434baf607e..6e203bb48fd 100644
--- a/src/H5Opkg.h
+++ b/src/H5Opkg.h
@@ -540,7 +540,12 @@ H5_DLLVAR const H5O_obj_class_t H5O_OBJ_DATASET[1];
H5_DLLVAR const H5O_obj_class_t H5O_OBJ_DATATYPE[1];
/* Package-local function prototypes */
+H5_DLL void *H5O__open_by_addr(const H5G_loc_t *loc, haddr_t addr, H5I_type_t *opened_type /*out*/);
+H5_DLL void *H5O__open_by_idx(const H5G_loc_t *loc, const char *name, H5_index_t idx_type,
+ H5_iter_order_t order, hsize_t n, H5I_type_t *opened_type /*out*/);
H5_DLL const H5O_obj_class_t *H5O__obj_class(const H5O_loc_t *loc);
+H5_DLL herr_t H5O__copy(const H5G_loc_t *src_loc, const char *src_name, H5G_loc_t *dst_loc,
+ const char *dst_name, hid_t ocpypl_id, hid_t lcpl_id);
H5_DLL int H5O__link_oh(H5F_t *f, int adjust, H5O_t *oh, hbool_t *deleted);
H5_DLL herr_t H5O__visit(H5G_loc_t *loc, const char *obj_name, H5_index_t idx_type, H5_iter_order_t order,
H5O_iterate2_t op, void *op_data, unsigned fields);
diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h
index 3325a434087..d3b469cbf9b 100644
--- a/src/H5Oprivate.h
+++ b/src/H5Oprivate.h
@@ -29,22 +29,22 @@ typedef struct H5O_t H5O_t;
typedef struct H5O_fill_t H5O_fill_t;
/* Include the public header file for this API */
-#include "H5Opublic.h" /* Object header functions */
+#include "H5Opublic.h" /* Object header functions */
/* Public headers needed by this file */
-#include "H5Dpublic.h" /* Dataset functions */
-#include "H5Lpublic.h" /* Link functions */
+#include "H5Dpublic.h" /* Dataset functions */
+#include "H5Lpublic.h" /* Link functions */
#include "H5Spublic.h" /* Dataspace functions */
/* Private headers needed by this file */
-#include "H5private.h" /* Generic Functions */
-#include "H5ACprivate.h" /* Metadata cache */
+#include "H5private.h" /* Generic Functions */
+#include "H5ACprivate.h" /* Metadata cache */
#include "H5Fprivate.h" /* File access */
-#include "H5HGprivate.h" /* Global Heaps */
+#include "H5HGprivate.h" /* Global Heaps */
#include "H5SLprivate.h" /* Skip lists */
#include "H5Tprivate.h" /* Datatype functions */
-#include "H5VLprivate.h"
-#include "H5Zprivate.h" /* I/O pipeline filters */
+#include "H5VLprivate.h" /* Virtual Object Layer */
+#include "H5Zprivate.h" /* I/O pipeline filters */
/* Forward references of package typedefs */
typedef struct H5O_msg_class_t H5O_msg_class_t;
@@ -232,7 +232,7 @@ typedef struct H5O_copy_t {
#define H5O_FSINFO_ID 0x0017 /* File space info message. */
#define H5O_MDCI_MSG_ID 0x0018 /* Metadata Cache Image Message */
#define H5O_UNKNOWN_ID 0x0019 /* Placeholder message ID for unknown message. */
- /* (this should never exist in a file) */
+/* (this should never exist in a file) */
/*
* Note: Must increment H5O_MSG_TYPES in H5Opkg.h and update H5O_msg_class_g
* in H5O.c when creating a new message type. Also bump the value of
@@ -912,13 +912,10 @@ struct H5P_genplist_t;
H5_DLL herr_t H5O_init(void);
H5_DLL herr_t H5O_create(H5F_t *f, size_t size_hint, size_t initial_rc, hid_t ocpl_id,
H5O_loc_t *loc /*out*/);
-H5_DLL H5O_t *H5O__create_ohdr(H5F_t *f, hid_t ocpl_id);
-H5_DLL herr_t H5O__apply_ohdr(H5F_t *f, H5O_t *oh, hid_t ocpl_id, size_t size_hint, size_t initial_rc,
- H5O_loc_t *loc_out);
+H5_DLL H5O_t *H5O_create_ohdr(H5F_t *f, hid_t ocpl_id);
+H5_DLL herr_t H5O_apply_ohdr(H5F_t *f, H5O_t *oh, hid_t ocpl_id, size_t size_hint, size_t initial_rc,
+ H5O_loc_t *loc_out);
H5_DLL herr_t H5O_open(H5O_loc_t *loc);
-H5_DLL void * H5O_open_by_idx(const H5G_loc_t *loc, const char *name, H5_index_t idx_type,
- H5_iter_order_t order, hsize_t n, H5I_type_t *opened_type /*out*/);
-H5_DLL void * H5O_open_by_addr(const H5G_loc_t *loc, haddr_t addr, H5I_type_t *opened_type /*out*/);
H5_DLL void * H5O_open_by_loc(const H5G_loc_t *obj_loc, H5I_type_t *opened_type /*out*/);
H5_DLL herr_t H5O_close(H5O_loc_t *loc, hbool_t *file_closed /*out*/);
H5_DLL int H5O_link(const H5O_loc_t *loc, int adjust);
@@ -1005,10 +1002,8 @@ H5_DLL herr_t H5O_are_mdc_flushes_disabled(H5O_loc_t *oloc, hbool_t *are_disable
H5_DLL herr_t H5O_copy_header_map(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out */,
H5O_copy_t *cpy_info, hbool_t inc_depth, H5O_type_t *obj_type,
void **udata);
-H5_DLL herr_t H5O_copy_expand_ref(H5F_t *file_src, hid_t tid_src, H5T_t *dt_src, void *buf_src,
+H5_DLL herr_t H5O_copy_expand_ref(H5F_t *file_src, hid_t tid_src, const H5T_t *dt_src, void *buf_src,
size_t nbytes_src, H5F_t *file_dst, void *buf_dst, H5O_copy_t *cpy_info);
-H5_DLL herr_t H5O_copy(const H5G_loc_t *src_loc, const char *src_name, H5G_loc_t *dst_loc,
- const char *dst_name, hid_t ocpypl_id, hid_t lcpl_id);
/* Debugging routines */
H5_DLL herr_t H5O_debug_id(unsigned type_id, H5F_t *f, const void *mesg, FILE *stream, int indent,
diff --git a/src/H5Opublic.h b/src/H5Opublic.h
index 901c0fbefd3..7bc7784c380 100644
--- a/src/H5Opublic.h
+++ b/src/H5Opublic.h
@@ -26,9 +26,9 @@
#define H5Opublic_H
/* Public headers needed by this file */
-#include "H5public.h" /* Generic Functions */
-#include "H5Ipublic.h" /* IDs */
-#include "H5Lpublic.h" /* Links */
+#include "H5public.h" /* Generic Functions */
+#include "H5Ipublic.h" /* IDs */
+#include "H5Lpublic.h" /* Links */
/*****************/
/* Public Macros */
@@ -86,13 +86,15 @@
#define H5O_INFO_NUM_ATTRS 0x0004u /* Fill in the num_attrs field */
#define H5O_INFO_ALL (H5O_INFO_BASIC | H5O_INFO_TIME | H5O_INFO_NUM_ATTRS)
-/* Flags for H5Oget_native_info.
- * Theses flags determine which fields will be filled in in the H5O_native_info_t
- * struct.
+//!
+/**
+ * Flags for H5Oget_native_info(). Theses flags determine which fields will be
+ * filled in in the \ref H5O_native_info_t struct.
*/
#define H5O_NATIVE_INFO_HDR 0x0008u /* Fill in the hdr field */
#define H5O_NATIVE_INFO_META_SIZE 0x0010u /* Fill in the meta_size field */
#define H5O_NATIVE_INFO_ALL (H5O_NATIVE_INFO_HDR | H5O_NATIVE_INFO_META_SIZE)
+//!
/* Convenience macro to check if the token is the 'undefined' token value */
#define H5O_IS_TOKEN_UNDEF(token) (!HDmemcmp(&(token), &(H5O_TOKEN_UNDEF), sizeof(H5O_token_t)))
@@ -101,36 +103,48 @@
/* Public Typedefs */
/*******************/
-/* Types of objects in file */
+//!
+/**
+ * Types of objects in file
+ */
typedef enum H5O_type_t {
- H5O_TYPE_UNKNOWN = -1, /* Unknown object type */
- H5O_TYPE_GROUP, /* Object is a group */
- H5O_TYPE_DATASET, /* Object is a dataset */
- H5O_TYPE_NAMED_DATATYPE, /* Object is a named data type */
- H5O_TYPE_MAP, /* Object is a map */
- H5O_TYPE_NTYPES /* Number of different object types (must be last!) */
+ H5O_TYPE_UNKNOWN = -1, /**< Unknown object type */
+ H5O_TYPE_GROUP, /**< Object is a group */
+ H5O_TYPE_DATASET, /**< Object is a dataset */
+ H5O_TYPE_NAMED_DATATYPE, /**< Object is a named data type */
+ H5O_TYPE_MAP, /**< Object is a map */
+ H5O_TYPE_NTYPES /**< Number of different object types (must be last!) */
} H5O_type_t;
+//!
-/* Information struct for object header metadata (for H5Oget_info/H5Oget_info_by_name/H5Oget_info_by_idx) */
+//!
+/**
+ * Information struct for object header metadata (for
+ * H5Oget_info(), H5Oget_info_by_name(), H5Oget_info_by_idx())
+ */
typedef struct H5O_hdr_info_t {
- unsigned version; /* Version number of header format in file */
- unsigned nmesgs; /* Number of object header messages */
- unsigned nchunks; /* Number of object header chunks */
- unsigned flags; /* Object header status flags */
+ unsigned version; /**< Version number of header format in file */
+ unsigned nmesgs; /**< Number of object header messages */
+ unsigned nchunks; /**< Number of object header chunks */
+ unsigned flags; /**< Object header status flags */
struct {
- hsize_t total; /* Total space for storing object header in file */
- hsize_t meta; /* Space within header for object header metadata information */
- hsize_t mesg; /* Space within header for actual message information */
- hsize_t free; /* Free space within object header */
+ hsize_t total; /**< Total space for storing object header in file */
+ hsize_t meta; /**< Space within header for object header metadata information */
+ hsize_t mesg; /**< Space within header for actual message information */
+ hsize_t free; /**< Free space within object header */
} space;
struct {
- uint64_t present; /* Flags to indicate presence of message type in header */
- uint64_t shared; /* Flags to indicate message type is shared in header */
+ uint64_t present; /**< Flags to indicate presence of message type in header */
+ uint64_t shared; /**< Flags to indicate message type is shared in header */
} mesg;
} H5O_hdr_info_t;
+//!
-/* Data model information struct for objects */
-/* (For H5Oget_info / H5Oget_info_by_name / H5Oget_info_by_idx version 3) */
+//!
+/**
+ * Data model information struct for objects
+ * (For H5Oget_info(), H5Oget_info_by_name(), H5Oget_info_by_idx() version 3)
+ */
typedef struct H5O_info2_t {
unsigned long fileno; /* File number that object is located in */
H5O_token_t token; /* Token representing the object */
@@ -142,34 +156,52 @@ typedef struct H5O_info2_t {
time_t btime; /* Birth time */
hsize_t num_attrs; /* # of attributes attached to object */
} H5O_info2_t;
+//!
-/* Native file format information struct for objects */
-/* (For H5Oget_native_info / H5Oget_native_info_by_name / H5Oget_native_info_by_idx) */
+//!
+/**
+ * Native file format information struct for objects.
+ * (For H5Oget_native_info(), H5Oget_native_info_by_name(), H5Oget_native_info_by_idx())
+ */
typedef struct H5O_native_info_t {
- H5O_hdr_info_t hdr; /* Object header information */
+ H5O_hdr_info_t hdr; /**< Object header information */
/* Extra metadata storage for obj & attributes */
struct {
- H5_ih_info_t obj; /* v1/v2 B-tree & local/fractal heap for groups, B-tree for chunked datasets */
- H5_ih_info_t attr; /* v2 B-tree & heap for attributes */
+ H5_ih_info_t obj; /**< v1/v2 B-tree & local/fractal heap for groups, B-tree for chunked datasets */
+ H5_ih_info_t attr; /**< v2 B-tree & heap for attributes */
} meta_size;
} H5O_native_info_t;
+//!
-/* Typedef for message creation indexes */
+/**
+ * Typedef for message creation indexes
+ */
typedef uint32_t H5O_msg_crt_idx_t;
-/* Prototype for H5Ovisit/H5Ovisit_by_name() operator (version 3) */
+//!
+/**
+ * Prototype for H5Ovisit(), H5Ovisit_by_name() operator (version 3)
+ */
typedef herr_t (*H5O_iterate2_t)(hid_t obj, const char *name, const H5O_info2_t *info, void *op_data);
+//!
+//!
typedef enum H5O_mcdt_search_ret_t {
- H5O_MCDT_SEARCH_ERROR = -1, /* Abort H5Ocopy */
- H5O_MCDT_SEARCH_CONT, /* Continue the global search of all committed datatypes in the destination file */
- H5O_MCDT_SEARCH_STOP /* Stop the search, but continue copying. The committed datatype will be copied but
- not merged. */
+ H5O_MCDT_SEARCH_ERROR = -1, /**< Abort H5Ocopy */
+ H5O_MCDT_SEARCH_CONT, /**< Continue the global search of all committed datatypes in the destination file
+ */
+ H5O_MCDT_SEARCH_STOP /**< Stop the search, but continue copying. The committed datatype will be copied
+ but not merged. */
} H5O_mcdt_search_ret_t;
+//!
-/* Callback to invoke when completing the search for a matching committed datatype from the committed dtype
- * list */
+//!
+/**
+ * Callback to invoke when completing the search for a matching committed
+ * datatype from the committed dtype list
+ */
typedef H5O_mcdt_search_ret_t (*H5O_mcdt_search_cb_t)(void *op_data);
+//!
/********************/
/* Public Variables */
@@ -182,118 +214,2679 @@ typedef H5O_mcdt_search_ret_t (*H5O_mcdt_search_cb_t)(void *op_data);
extern "C" {
#endif
-H5_DLL hid_t H5Oopen(hid_t loc_id, const char *name, hid_t lapl_id);
-H5_DLL hid_t H5Oopen_by_token(hid_t loc_id, H5O_token_t token);
-H5_DLL hid_t H5Oopen_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order,
- hsize_t n, hid_t lapl_id);
+/**
+ *-------------------------------------------------------------------------
+ * \ingroup H5O
+ *
+ * \brief Opens an object in an HDF5 file by location identifier and path name.
+ *
+ * \fgdta_loc_obj_id{loc_id}
+ * \param[in] name Path to the object; relative to \p loc_id
+ * \lapl_id
+ *
+ * \return \hid_tv{object}
+ *
+ * \details H5Oopen() opens a group, dataset, or committed (named) datatype
+ * specified by a location, \p loc_id, and a path name, \p name, in an HDF5 file.
+ *
+ * This function opens the object in the same manner as H5Gopen(), H5Topen(), and H5Dopen().
+ * However, H5Oopen() does not require the type of object to be known beforehand.
+ * This can be useful with user-defined links, for instance, when only a path may be known.
+ *
+ * H5Oopen() cannot be used to open a dataspace, attribute, property list, or file.
+ *
+ * Once an object of unknown type has been opened with H5Oopen(),
+ * the type of that object can be determined by means of an H5Iget_type() call.
+ *
+ * \p loc_id may be a file, group, dataset, named datatype, or attribute.
+ * If an attribute is specified for \p loc_id then the object where the
+ * attribute is attached will be accessed.
+ *
+ * \p name must be the path to that object relative to \p loc_id.
+ *
+ * \p lapl_id is the link access property list associated with the link pointing to
+ * the object. If default link access properties are appropriate, this can be
+ * passed in as #H5P_DEFAULT.
+ *
+ * When it is no longer needed, the opened object should be closed with
+ * H5Oclose(), H5Gclose(), H5Tclose(), or H5Dclose().
+ *
+ * \version 1.8.1 Fortran subroutine introduced in this release.
+ *
+ * \since 1.8.0
+ *
+ */
+H5_DLL hid_t H5Oopen(hid_t loc_id, const char *name, hid_t lapl_id);
+/**
+ * --------------------------------------------------------------------------
+ * \ingroup ASYNC
+ * \async_variant_of{H5Oopen}
+ */
+H5_DLL hid_t H5Oopen_async(const char *app_file, const char *app_func, unsigned app_line, hid_t loc_id,
+ const char *name, hid_t lapl_id, hid_t es_id);
+
+/**
+ *-------------------------------------------------------------------------
+ * \ingroup H5O
+ *
+ * \brief Opens an object in an HDF5 file using its VOL independent token
+ *
+ * \fgdta_loc_obj_id{loc_id}
+ * \param[in] token Object token
+ *
+ * \return \hid_ti{object}
+ *
+ * \details H5Oopen_by_token() opens an object specified by the object
+ * identifier, \p loc_id and object token, \p token.
+ *
+ * \par Example
+ * An example snippet from examples/h5_extlink.c:
+ * \snippet h5_extlink.c H5Open_by_token_snip
+ *
+ * \since 1.12.0
+ *
+ */
+H5_DLL hid_t H5Oopen_by_token(hid_t loc_id, H5O_token_t token);
+
+/**
+ *-------------------------------------------------------------------------
+ * \ingroup H5O
+ *
+ * \brief Opens the nth object in a group
+ *
+ * \fgdta_loc_obj_id{loc_id}
+ * \param[in] group_name Name of group, relative to \p loc_id, in which object is located
+ * \idx_type
+ * \order
+ * \param[in] n Object to open
+ * \lapl_id
+ *
+ * \return \hid_tv{object}
+ *
+ * \details H5Open_by_idx() opens the nth object in the group specified by \p loc_id
+ * and \p group_name.
+ *
+ * \p loc_id specifies a location identifier.
+ * \p group_name specifies the group relative to \p loc_id in which the object can be found.
+ * If \p loc_id fully specifies the group in which the object resides,
+ * \p group_name can be a dot (.).
+ *
+ * The specific object to be opened within the group is specified by the three parameters:
+ * \p idx_type, \p order and \p n.
+ *
+ * \p idx_type specifies the type of index by which objects are ordered.
+ * Valid index types include the following:
+ *
+ * \indexes
+ *
+ * \p order specifies the order in which the objects are to be referenced for the purposes
+ * of this function. Valid orders include the following:
+ *
+ * \orders
+ *
+ * Note that for #H5_ITER_NATIVE, rather than implying a particular order,
+ * it instructs the HDF5 library to iterate through the objects in the fastest
+ * available order, i.e., in a natural order.
+ *
+ * \p n specifies the position of the object within the index. Note that this count is
+ * zero-based; 0 (zero) indicates that the function will return the value of the first object;
+ * if \p n is 5, the function will return the value of the sixth object; etc.
+ *
+ * \p lapl_id specifies the link access property list to be used in accessing the object.
+ *
+ * An object opened with this function should be closed when it is no longer needed so that
+ * resource leaks will not develop. H5Oclose() can be used to close groups, datasets,
+ * or committed datatypes.
+ *
+ * \version 1.8.1 Fortran subroutine introduced in this release.
+ *
+ * \since 1.8.0
+ *
+ */
+H5_DLL hid_t H5Oopen_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order,
+ hsize_t n, hid_t lapl_id);
+/**
+ * --------------------------------------------------------------------------
+ * \ingroup ASYNC
+ * \async_variant_of{H5Oopen_by_idx}
+ */
+H5_DLL hid_t H5Oopen_by_idx_async(const char *app_file, const char *app_func, unsigned app_line, hid_t loc_id,
+ const char *group_name, H5_index_t idx_type, H5_iter_order_t order,
+ hsize_t n, hid_t lapl_id, hid_t es_id);
+
+/**
+ *-------------------------------------------------------------------------
+ * \ingroup H5O
+ *
+ * \brief Determines whether a link resolves to an actual object.
+ *
+ * \fgdta_loc_obj_id{loc_id}
+ * \param[in] name The name of the link to check
+ * \lapl_id
+ *
+ * \return Returns a positive value if the object pointed to by
+ * the \p loc_id and \p name combination exists.
+ * \return Returns 0 if the object pointed to by
+ * the \p loc_id and \p name combination does not exist.
+ * \return Returns a negatvie value when the function fails.
+ *
+ * \details H5Oexists_by_name() allows an application to determine whether
+ * the link \p name in the group or file specified with \p loc_id
+ * resolves to an HDF5 object to open or if the link dangles. The
+ * link may be of any type, but hard links will always resolve
+ * to objects and do not need to be verified.
+ *
+ * Note that H5Oexists_by_name() verifies only that the target
+ * object exists. If \p name includes either a relative path or
+ * an absolute path to the target link, intermediate steps
+ * along the path must be verified before the existence of
+ * the target link can be safely checked. If the path is not
+ * verified and an intermediate element of the path does not
+ * exist, H5Oexists_by_name() will fail. The example in the next
+ * paragraph illustrates one step-by-step method for verifying
+ * the existence of a link with a relative or absolute path.
+ *
+ * \par Example
+ * Use the following steps to verify the existence of
+ * the link \c datasetD in the \c group group1/group2/softlink_to_group3/,
+ * where \c group1 is a member of the group specified by \c loc_id:
+ *
+ * \par
+ * - First use H5Lexists() to verify that a link named \c group1 exists.
+ * - If \c group1 exists, use H5Oexists_by_name() to verify that the
+ * link \c group1 resolves to an object.
+ * - If \c group1 exists, use H5Lexists() again, this time with name
+ * set to \c group1/group2, to verify that the link \c group2 exists
+ * in \c group1.
+ * - If the \c group2 link exists, use H5Oexists_by_name() to verify
+ * that \c group1/group2 resolves to an object.
+ * - If \c group2 exists, use H5Lexists() again, this time with name
+ * set to \c group1/group2/softlink_to_group3, to verify that the
+ * link \c softlink_to_group3 exists in \c group2.
+ * - If the \c softlink_to_group3 link exists, use H5Oexists_by_name()
+ * to verify that \c group1/group2/softlink_to_group3 resolves to
+ * an object.
+ * - If \c softlink_to_group3 exists, you can now safely use H5Lexists
+ * with name set to \c group1/group2/softlink_to_group3/datasetD to
+ * verify that the target link, \c datasetD, exists.
+ * - And finally, if the link \c datasetD exists, use H5Oexists_by_name
+ * to verify that \c group1/group2/softlink_to_group3/datasetD
+ * resolves to an object.
+ *
+ * \par
+ * If the link to be verified is specified with an absolute path,
+ * the same approach should be used, but starting with the first
+ * link in the file’s root group. For instance, if \c datasetD
+ * were in \c /group1/group2/softlink_to_group3, the first call to
+ * H5Lexists() would have name set to \c /group1.
+ *
+ * \par
+ * Note that this is an outline and does not include all necessary
+ * details. Depending on circumstances, for example, an application
+ * may need to verify the type of an object also.
+ *
+ * \warning \Bold{Failure Modes:}
+ * \warning If \p loc_id and \p name both exist but the combination does not
+ * resolve to an object, the function will return 0 (zero);
+ * the function does not fail in this case.
+ * \warning If either the location or the link specified by the \p loc_id
+ * and \p name combination does not exist, the function will fail,
+ * returning a negative value.
+ * \warning Note that verifying the existence of an object within an HDF5
+ * file is a multistep process. An application can be certain the
+ * object does not exist only if H5Lexists() and H5Oexists_by_name()
+ * have been used to verify the existence of the links and groups
+ * in the hierarchy above that object. The example above, in the
+ * function description, provides a step-by-step description of
+ * that verification process.
+ *
+ * \version 1.8.11 Fortran subroutine introduced in this release.
+ *
+ * \since 1.8.5
+ *
+ */
H5_DLL htri_t H5Oexists_by_name(hid_t loc_id, const char *name, hid_t lapl_id);
+
+/**
+ *-------------------------------------------------------------------------
+ * \ingroup H5O
+ *
+ * \brief Retrieves the metadata for an object specified by an identifier
+ *
+ * \fgdta_loc_obj_id{loc_id}
+ * \param[out] oinfo Buffer in which to return object information
+ * \param[in] fields Flags specifying the fields to include in \p oinfo
+ *
+ * \return \herr_t
+ *
+ * \details H5Oget_info3() specifies an object by its identifier, \p loc_id , and
+ * retrieves the metadata describing that object in \p oinfo , an H5O_info2_t \c struct.
+ *
+ * The H5O_info2_t \c struct is defined in H5Opublic.h as follows :
+ * \snippet this H5O_info2_t_snip
+ *
+ * Note the following about H5O_info2_t :
+ * - Of the four time fields (\c atime, \c mtime, \c ctime, and \c btime)
+ * only \c ctime has been implemented.
+ * - The \c atime value is the last time the object was read or written.
+ * - The \c mtime value is the last time the raw data in the object was changed.
+ * - The \c ctime value is the last time the metadata for the object was changed.
+ * - The \c btime value is the time the object was created.
+ *
+ * The H5O_token_t is defined in H5public.h as follows:
+ * \snippet H5public.h H5O_token_t_snip
+ *
+ * The H5O_type_t \c enum indicates the object type and
+ * is defined in H5Opublic.h as follows:
+ * \snippet this H5O_type_t_snip
+ *
+ * Note that the object retrieved as indicated by \p loc_id
+ * refers only to the types specified by H5O_type_t.
+ *
+ * The \p fields parameter contains flags to determine which fields will be filled in
+ * the H5O_info2_t \c struct returned in \p oinfo.
+ * These flags are defined in the H5Opublic.h file:
+ *
+ * \obj_info_fields
+ *
+ * \par Example
+ * An example snippet from examples/h5_attribute.c:
+ * \par
+ * \snippet h5_attribute.c H5Oget_info3_snip
+ *
+ * \note If you are iterating through a lot of different objects to
+ * retrieve information via the H5Oget_info() family of routines,
+ * you may see memory building up. This can be due to memory
+ * allocation for metadata such as object headers and messages
+ * when the iterated objects are put into the metadata cache.
+ * \note
+ * If the memory buildup is not desirable, you can configure a
+ * smaller cache via H5Fset_mdc_config() or set the file access
+ * property list via H5Pset_mdc_config(). A smaller sized cache
+ * will force metadata entries to be evicted from the cache,
+ * thus freeing the memory associated with the entries.
+ *
+ * \since 1.12.0
+ *
+ */
H5_DLL herr_t H5Oget_info3(hid_t loc_id, H5O_info2_t *oinfo, unsigned fields);
+
+/**
+ *-------------------------------------------------------------------------
+ * \ingroup H5O
+ *
+ * \brief Retrieves the metadata for an object, identifying the object by
+ * location and relative name
+ *
+ * \fgdta_loc_obj_id{loc_id}
+ * \param[in] name Name of group, relative to \p loc_id
+ * \param[out] oinfo Buffer in which to return object information
+ * \param[in] fields Flags specifying the fields to include in \p oinfo
+ * \lapl_id
+ *
+ * \return \herr_t
+ *
+ * \details H5Oget_info_by_name3() specifies an object’s location and name,
+ * \p loc_id and \p name, respectively, and retrieves the metadata
+ * describing that object in \p oinfo, an H5O_info2_t struct.
+ *
+ * \p oinfo, in which the object information is returned, is a \c struct of
+ * type H5O_info2_t, which is defined in H5Opublic.h in the HDF5 source code:
+ *
+ * \snippet this H5O_info2_t_snip
+ *
+ * Note the following about H5O_info2_t :
+ * - Of the four time fields (\c atime, \c mtime, \c ctime, and \c btime)
+ * only \c ctime has been implemented.
+ * - The \c atime value is the last time the object was read or written.
+ * - The \c mtime value is the last time the raw data in the object was changed.
+ * - The \c ctime value is the last time the metadata for the object was changed.
+ * - The \c btime value is the time the object was created.
+ *
+ * The H5O_token_t is defined in H5public.h as follows:
+ * \snippet H5public.h H5O_token_t_snip
+ *
+ * The H5O_type_t \c enum indicates the object type and
+ * is defined in H5Opublic.h as follows:
+ * \snippet this H5O_type_t_snip
+ *
+ * Note that the object retrieved as indicated by \p loc_id
+ * refers only to the types specified by H5O_type_t.
+ *
+ * The \p fields parameter contains flags to determine which fields will be filled in
+ * the H5O_info2_t \c struct returned in \p oinfo.
+ * These flags are defined in the H5Opublic.h file:
+ *
+ * \obj_info_fields
+ *
+ * The link access property list, \c lapl_id, is not currently used;
+ * it should be passed in as #H5P_DEFAULT.
+ *
+ * \par Example
+ * An example snippet from test/vol.c:
+ * \snippet vol.c H5Oget_info_by_name3_snip
+ *
+ * \since 1.12.0
+ *
+ */
H5_DLL herr_t H5Oget_info_by_name3(hid_t loc_id, const char *name, H5O_info2_t *oinfo, unsigned fields,
hid_t lapl_id);
+/**
+ * --------------------------------------------------------------------------
+ * \ingroup ASYNC
+ * \async_variant_of{H5Oget_info_by_name}
+ */
+H5_DLL herr_t H5Oget_info_by_name_async(const char *app_file, const char *app_func, unsigned app_line,
+ hid_t loc_id, const char *name, H5O_info2_t *oinfo /*out*/,
+ unsigned fields, hid_t lapl_id, hid_t es_id);
+
+/**
+ *-------------------------------------------------------------------------
+ * \ingroup H5O
+ *
+ * \brief Retrieves the metadata for an object, identifying the object
+ * by an index position
+ *
+ * \fgdta_loc_obj_id{loc_id}
+ * \param[in] group_name Name of group in which object is located
+ * \idx_type
+ * \order
+ * \param[in] n Position within the index
+ * \param[out] oinfo Buffer in which to return object information
+ * \param[in] fields Flags specifying the fields to include in \p oinfo
+ * \lapl_id
+ *
+ * \return \herr_t
+ *
+ * \details H5Oget_info_by_idx3() retrieves the metadata describing an
+ * object in the \c struct \p oinfo, as specified by the location,
+ * \p loc_id, group name, \p group_name, the index by which objects
+ * in that group are tracked, \p idx_type, the order by which the
+ * index is to be traversed, \p order, and an object’s position
+ * \p n within that index.
+ *
+ * If \p loc_id fully specifies the group in which the object resides,
+ * \p group_name can be a dot (\c .).
+ *
+ * \p idx_type is of type #H5_index_t, defined in H5public.h as:
+ * \snippet H5public.h H5_index_t_snip
+ *
+ * \p order is of type #H5_iter_order_t defined in H5public.h as:
+ * \snippet H5public.h H5_iter_order_t_snip
+ *
+ * \p oinfo, in which the object information is returned, is a \c struct of
+ * type H5O_info2_t, which is defined in H5Opublic.h in the HDF5 source code:
+ * \snippet this H5O_info2_t_snip
+ *
+ * Note the following about H5O_info2_t :
+ * - Of the four time fields (\c atime, \c mtime, \c ctime, and \c btime)
+ * only \c ctime has been implemented.
+ * - The \c atime value is the last time the object was read or written.
+ * - The \c mtime value is the last time the raw data in the object was changed.
+ * - The \c ctime value is the last time the metadata for the object was changed.
+ * - The \c btime value is the time the object was created.
+ *
+ * H5O_token_t is defined in H5public.h as follows:
+ * \snippet H5public.h H5O_token_t_snip
+ *
+ * The #H5O_type_t \c enum indicates the object type and
+ * is defined in H5Opublic.h as follows:
+ * \snippet this H5O_type_t_snip
+ *
+ * Note that the object retrieved as indicated by \p loc_id
+ * refers only to the types specified by #H5O_type_t.
+ *
+ * The \p fields parameter contains flags to determine which fields will be filled in
+ * the H5O_info2_t \c struct returned in \p oinfo.
+ * These flags are defined in the H5Opublic.h file:
+ * \obj_info_fields
+ *
+ * The link access property list, \c lapl_id, is not currently used;
+ * it should be passed in as #H5P_DEFAULT.
+ *
+ * \par Example
+ * An example snippet from test/titerate.c:
+ * \snippet titerate.c H5Oget_info_by_idx3_snip
+ *
+ * \since 1.12.0
+ *
+ */
H5_DLL herr_t H5Oget_info_by_idx3(hid_t loc_id, const char *group_name, H5_index_t idx_type,
H5_iter_order_t order, hsize_t n, H5O_info2_t *oinfo, unsigned fields,
hid_t lapl_id);
+
+/**
+ *-------------------------------------------------------------------------
+ * \ingroup H5O
+ *
+ * \brief Retrieve native file format information about an object
+ *
+ * \fgdta_loc_obj_id{loc_id}
+ * \param[out] oinfo Buffer in which to return native object information
+ * \param[in] fields Flags to determine which fields in \p oinfo are filled in
+ *
+ * \return \herr_t
+ *
+ * \details H5Oget_native_info() retrieves the native file format information for an object
+ * specified by \p loc_id. The information is retrieved into the
+ * buffer specified by \p oinfo, which is defined as a \c struct of
+ * type H5O_native_info_t in H5Opublic.h:
+ *
+ * \snippet this H5O_native_info_t_snip
+ *
+ * The \p fields parameter indicates which fields to fill in
+ * H5O_native_info_t. Possible values defined in H5Opublic.h are:
+ *
+ * \snippet this H5O_native_info_fields_snip
+ *
+ * \par Example
+ * An example snippet from test/tfile.c:
+ * \par
+ * \snippet tfile.c H5Oget_native_info_snip
+ *
+ * \since 1.12.0
+ *
+ */
H5_DLL herr_t H5Oget_native_info(hid_t loc_id, H5O_native_info_t *oinfo, unsigned fields);
+
+/**
+ *-------------------------------------------------------------------------
+ * \ingroup H5O
+ *
+ * \brief Retrieve native file format information about an object given its name
+ *
+ * \fgdta_loc_obj_id{loc_id}
+ * \param[in] name Name of object
+ * \param[out] oinfo Buffer in which to return native object information
+ * \param[in] fields Flags to determine which fields in \p oinfo are filled in
+ * \lapl_id
+ *
+ * \return \herr_t
+ *
+ * \details H5Oget_native_info_by_name() retrieves the native file format information for an object
+ * specified by \p loc_id and the name \p name. The information is
+ * retrieved into the buffer specified by \p oinfo, which is defined
+ * as a \c struct of type H5O_native_info_t in H5Opublic.h:
+ *
+ * \snippet this H5O_native_info_t_snip
+ *
+ * The \p fields parameter which fields to fill in H5O_native_info_t.
+ * Possible values defined in H5Opublic.h are:
+ *
+ * \snippet this H5O_native_info_fields_snip
+ *
+ * \par Example
+ * An example snippet from test/tfile.c:
+ * \snippet tfile.c H5Oget_native_info_by_name_snip
+ *
+ * \since 1.12.0
+ *
+ */
H5_DLL herr_t H5Oget_native_info_by_name(hid_t loc_id, const char *name, H5O_native_info_t *oinfo,
unsigned fields, hid_t lapl_id);
+
+/**
+ *-------------------------------------------------------------------------
+ * \ingroup H5O
+ *
+ * \brief Retrieve native file format information about an object
+ * according to the order of an index
+ *
+ * \fgdta_loc_obj_id{loc_id}
+ * \param[in] group_name Name of group in which object is located
+ * \idx_type
+ * \order
+ * \param[in] n Position within the index
+ * \param[out] oinfo Buffer in which to return native object information
+ * \param[in] fields Flags to determine which fields in \p oinfo are filled in
+ * \lapl_id
+ *
+ * \return \herr_t
+ *
+ * \details H5Oget_native_info_by_idx() retrieves the native file format information for an object
+ * specified by \p loc_id, group name, \p group_name, the index by which
+ * objects in the group are tracked, \p idx_type, the order by which
+ * the index is to be traversed, \p order , and an object's position
+ * \p n within that index. The information is retrieved into the
+ * buffer specified by \p oinfo, which is defined as a \c struct of
+ * type H5O_native_info_t in H5Opublic.h:
+ * \snippet this H5O_native_info_t_snip
+ *
+ * \p idx_type is of type #H5_index_t, defined in H5public.h as:
+ * \snippet H5public.h H5_index_t_snip
+ *
+ * \p order is of type #H5_iter_order_t defined in H5public.h as:
+ * \snippet H5public.h H5_iter_order_t_snip
+ *
+ * The \p fields parameter indicates which fields to fill in H5O_native_info_t.
+ * Possible values defined in H5Opublic.h are:
+ * \snippet this H5O_native_info_fields_snip
+ *
+ * The link access property list, \c lapl_id, is not currently used;
+ * it should be passed in as #H5P_DEFAULT.
+ *
+ * \since 1.12.0
+ *
+ */
H5_DLL herr_t H5Oget_native_info_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type,
H5_iter_order_t order, hsize_t n, H5O_native_info_t *oinfo,
unsigned fields, hid_t lapl_id);
+
+/**
+ *-------------------------------------------------------------------------
+ * \ingroup H5O
+ *
+ * \brief Creates a hard link to an object in an HDF5 file
+ *
+ * \param[in] obj_id Object to be linked
+ * \param[in] new_loc_id Location identifier at which object is to be linked;
+ * may be a file, group, dataset, named datatype or attribute identifier.
+ * \param[in] new_name Name of link to be created, relative to \p new_loc_id.
+ * \lcpl_id
+ * \lapl_id
+ *
+ * \return \herr_t
+ *
+ * \details H5Olink() creates a new hard link to an object in an HDF5 file.
+ * \p new_loc_id and \p \p new_link_name specify the location and name of the
+ * new link while \p object_id identifies the object that the link
+ * points to.
+ *
+ * H5Olink() is designed for two purposes:
+ * - To create the first hard link to an object that has just
+ * been created with H5Dcreate_anon(), H5Gcreate_anon(), or
+ * H5Tcommit_anon().
+ * - To add additional structure to an existing
+ * file so that, for example, an object can be shared among
+ * multiple groups.
+ *
+ * \p lcpl and \p lapl are the link creation and access property lists
+ * associated with the new link.
+ *
+ * \par Example:
+ * To create a new link to an object while simultaneously creating
+ * missing intermediate groups: Suppose that an application must
+ * create the group C with the path /A/B01/C but may not know
+ * at run time whether the groups A and B01 exist. The following
+ * code ensures that those groups are created if they are missing:
+ * \par
+ * \code
+ *
+ * // Creates a link creation property list (LCPL).
+ * hid_t lcpl_id = H5Pcreate(H5P_LINK_CREATE);
+ *
+ * // Sets "create missing intermediate groups" property in that LCPL.
+ * int status = H5Pset_create_intermediate_group(lcpl_id, TRUE);
+ *
+ * // Creates a group without linking it into the file structure.
+ * hid_t gid = H5Gcreate_anon(file_id, H5P_DEFAULT, H5P_DEFAULT);
+ *
+ * // Links group into file structure.
+ * status = H5Olink(gid, file_id, "/A/B01/C", lcpl_id, H5P_DEFAULT);
+ *
+ * \endcode
+ *
+ * \par
+ * Note that unless the object is intended to be temporary,
+ * the H5O_LINK call is mandatory if an object created with one
+ * of the H5*_CREATE_ANON functions (or with H5T_COMMIT_ANON)
+ * is to be retained in the file; without an H5O_LINK call,
+ * the object will not be linked into the HDF5 file structure
+ * and will be deleted when the file is closed.
+ *
+ * \version 1.8.1 Fortran subroutine introduced in this release.
+ *
+ * \since 1.8.0
+ *
+ */
H5_DLL herr_t H5Olink(hid_t obj_id, hid_t new_loc_id, const char *new_name, hid_t lcpl_id, hid_t lapl_id);
-H5_DLL herr_t H5Oincr_refcount(hid_t object_id);
-H5_DLL herr_t H5Odecr_refcount(hid_t object_id);
-H5_DLL herr_t H5Ocopy(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, const char *dst_name,
- hid_t ocpypl_id, hid_t lcpl_id);
-H5_DLL herr_t H5Oset_comment(hid_t obj_id, const char *comment);
-H5_DLL herr_t H5Oset_comment_by_name(hid_t loc_id, const char *name, const char *comment, hid_t lapl_id);
-H5_DLL ssize_t H5Oget_comment(hid_t obj_id, char *comment, size_t bufsize);
-H5_DLL ssize_t H5Oget_comment_by_name(hid_t loc_id, const char *name, char *comment, size_t bufsize,
- hid_t lapl_id);
-H5_DLL herr_t H5Ovisit3(hid_t obj_id, H5_index_t idx_type, H5_iter_order_t order, H5O_iterate2_t op,
- void *op_data, unsigned fields);
-H5_DLL herr_t H5Ovisit_by_name3(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
- H5_iter_order_t order, H5O_iterate2_t op, void *op_data, unsigned fields,
- hid_t lapl_id);
-H5_DLL herr_t H5Oclose(hid_t object_id);
-H5_DLL herr_t H5Oflush(hid_t obj_id);
-H5_DLL herr_t H5Orefresh(hid_t oid);
-H5_DLL herr_t H5Odisable_mdc_flushes(hid_t object_id);
-H5_DLL herr_t H5Oenable_mdc_flushes(hid_t object_id);
-H5_DLL herr_t H5Oare_mdc_flushes_disabled(hid_t object_id, hbool_t *are_disabled);
-H5_DLL herr_t H5Otoken_cmp(hid_t loc_id, const H5O_token_t *token1, const H5O_token_t *token2,
- int *cmp_value);
-H5_DLL herr_t H5Otoken_to_str(hid_t loc_id, const H5O_token_t *token, char **token_str);
-H5_DLL herr_t H5Otoken_from_str(hid_t loc_id, const char *token_str, H5O_token_t *token);
-/* The canonical 'undefined' token value */
-#define H5O_TOKEN_UNDEF (H5OPEN H5O_TOKEN_UNDEF_g)
-H5_DLLVAR const H5O_token_t H5O_TOKEN_UNDEF_g;
+/**
+ *-------------------------------------------------------------------------
+ * \ingroup H5O
+ *
+ * \brief Increments an object reference count
+ *
+ * \fgdta_loc_obj_id{object_id}
+ *
+ * \return \herr_t
+ *
+ * \details H5Oincr_refcount() increments the hard link reference count for an object.
+ * It should be used any time a user-defined link that references
+ * an object by address is added. When the link is deleted,
+ * H5Odecr_refcount() should be used.
+ *
+ * An object’s reference count is the number of hard links in the
+ * file that point to that object. See the “Programming Model”
+ * section of the HDF5 Groups chapter in the -- HDF5 User’s Guide
+ * for a more complete discussion of reference counts.
+ *
+ * If a user application needs to determine an object’s reference
+ * count, an H5Oget_info() call is required; the reference count
+ * is returned in the \c rc field of the #H5O_info_t \c struct.
+ *
+ * \warning This function must be used with care!
+ * \warning Improper use can lead to inaccessible data, wasted space in the file,
+ * or file corruption.
+ *
+ * \version 1.8.11 Fortran subroutine introduced in this release.
+ *
+ * \since 1.8.0
+ *
+ */
+H5_DLL herr_t H5Oincr_refcount(hid_t object_id);
-/* Symbols defined for compatibility with previous versions of the HDF5 API.
+/**
+ *-------------------------------------------------------------------------
+ * \ingroup H5O
+ *
+ * \brief Decrements an object reference count
+ *
+ * \fgdta_loc_obj_id{object_id}
+ *
+ * \return \herr_t
+ *
+ * \details H5Odecr_refcount() decrements the hard link reference count for an object.
+ * It should be used any time a user-defined link that references
+ * an object by address is deleted. In general, H5Oincr_refcount() will have
+ * been used previously, when the link was created.
+ *
+ * An object’s reference count is the number of hard links in the
+ * file that point to that object. See the “Programming Model”
+ * section of the HDF5 Groups chapter in the HDF5 User’s Guide
+ * for a more complete discussion of reference counts.
+ *
+ * If a user application needs to determine an object’s reference
+ * count, an H5Oget_info() call is required; the reference count
+ * is returned in the \c rc field of the #H5O_info_t \c struct.
+ *
+ * \warning This function must be used with care!
+ * \warning Improper use can lead to inaccessible data, wasted space in the file,
+ * or file corruption.
+ *
+ * \version 1.8.11 Fortran subroutine introduced in this release.
+ *
+ * \since 1.8.0
*
- * Use of these symbols is deprecated.
*/
-#ifndef H5_NO_DEPRECATED_SYMBOLS
+H5_DLL herr_t H5Odecr_refcount(hid_t object_id);
-/* Macros */
+/**
+ *-------------------------------------------------------------------------
+ * \ingroup H5O
+ *
+ * \brief Copies an object in an HDF5 file
+ *
+ * \param[in] src_loc_id Object identifier indicating the location of the
+ * source object to be copied
+ * \param[in] src_name Name of the source object to be copied
+ * \param[in] dst_loc_id Location identifier specifying the destination
+ * \param[in] dst_name Name to be assigned to the new copy
+ * \param[in] ocpypl_id Object copy property list
+ * \lcpl_id
+ *
+ * \return \herr_t
+ *
+ * \details H5Ocopy() copies the group, dataset or committed datatype
+ * specified by \p src_name from the file or group specified by
+ * \p src_loc_id to the destination location \p dst_loc_id.
+ *
+ * The destination location, as specified in dst_loc_id, may
+ * be a group in the current file or a location in a different
+ * file. If dst_loc_id is a file identifier, the copy will be
+ * placed in that file’s root group.
+ *
+ * The copy will be created with the path specified in \p dst_name,
+ * which must not pre-exist in the destination location. If
+ * \p dst_name already exists at the location \p dst_loc_id,
+ * H5Ocopy() will fail. If \p dst_name is an absolute path,
+ * the copy will be created relative to the file’s root group.
+ *
+ * The copy of the object is created with the property lists
+ * specified by \p ocpypl_id and \p lcpl_id. #H5P_DEFAULT can be passed
+ * in for these property lists. The default behavior:
+ *
+ * - of the link creation property list is to NOT create
+ * intermediate groups.
+ * - of the flags specified by the object creation property list
+ * is described in H5Pset_copy_object().
+ *
+ * These property lists or flags can be modified to govern the
+ * behavior of H5Ocopy() as follows:
+ *
+ * - A flag controlling the creation of intermediate groups that
+ * may not yet exist is set in the link creation property list
+ * \p lcpl_id with H5Pset_create_intermediate_group().
+ *
+ * - Copying of committed datatypes can be tuned through the use
+ * of H5Pset_copy_object(), H5Padd_merge_committed_dtype_path(),
+ * H5Pset_mcdt_search_cb(), and related functions.
+ *
+ * - Flags controlling other aspects of object copying are set in the
+ * object copy property list \p ocpypl_id with H5Pset_copy_object().
+ *
+ * H5Ocopy() will always try to make a copy of the object specified
+ * in \p src_name.
+ *
+ * - If the object specified by \p src_name is a group containing a
+ * soft or external link, the default is that the new copy will
+ * contain a soft or external link with the same value as the
+ * original. See H5Pset_copy_object() for optional settings.
+ *
+ * - If the path specified in \p src_name is or contains a soft link
+ * or an external link, H5Ocopy() will copy the target object.
+ * Use H5Lcopy() if the intent is to create a new soft or external
+ * link with the same value as the original link.
+ *
+ * H5Ocopy() can be used to copy an object in an HDF5 file. If
+ * an object has been changed since it was opened, it should be
+ * written back to the file before using H5Ocopy(). The object
+ * can be written back either by closing the object (H5Gclose(),
+ * H5Oclose(), H5Dclose(), or H5Tclose()) or by flushing
+ * the HDF5 file (H5Fflush()).
+ *
+ * \par See Also:
+ * - Functions to modify the behavior of H5Ocopy():
+ * - H5Padd_merge_committed_dtype_path()
+ * - H5Pset_copy_object()
+ * - H5Pset_create_intermediate_group()
+ * - H5Pset_mcdt_search_cb()
+ * - Copying Committed Datatypes with #H5Ocopy - A comprehensive
+ * discussion of copying committed datatypes (PDF) in
+ * Advanced Topics in HDF5
+ *
+ * \version 1.8.9 Fortran subroutine introduced in this release.
+ *
+ * \since 1.8.0
+ *
+ */
+H5_DLL herr_t H5Ocopy(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, const char *dst_name,
+ hid_t ocpypl_id, hid_t lcpl_id);
+/**
+ * --------------------------------------------------------------------------
+ * \ingroup ASYNC
+ * \async_variant_of{H5Ocopy}
+ */
+H5_DLL herr_t H5Ocopy_async(const char *app_file, const char *app_func, unsigned app_line, hid_t src_loc_id,
+ const char *src_name, hid_t dst_loc_id, const char *dst_name, hid_t ocpypl_id,
+ hid_t lcpl_id, hid_t es_id);
-/* Deprecated flags for earlier versions of H5Oget_info* */
-#define H5O_INFO_HDR 0x0008u /* Fill in the hdr field */
-#define H5O_INFO_META_SIZE 0x0010u /* Fill in the meta_size field */
+/**
+ *-------------------------------------------------------------------------
+ * \ingroup H5O
+ *
+ * \brief Sets comment for specified object
+ *
+ * \fgdta_loc_obj_id{obj_id}
+ * \param[in] comment The new comment
+ *
+ * \return \herr_t
+ *
+ * \details H5Oset_comment() sets the comment for the specified object
+ * to the contents of \p comment. Any previously existing comment
+ * is overwritten.
+ *
+ * The target object is specified by an identifier, \p obj_id.
+ * If \p comment is the empty string or a null pointer, any existing
+ * comment message is removed from the object.
+ *
+ * Comments should be relatively short, null-terminated, ASCII strings.
+ *
+ * Comments can be attached to any object that has an object
+ * header. Datasets, groups, and committed (named) datatypes have
+ * object headers. Symbolic links do not have object headers.
+ *
+ * If a comment is being added to an object attribute, this comment
+ * will be attached to the object to which the attribute belongs
+ * and not to the attribute itself.
+ *
+ * \version 1.8.11 Fortran subroutine introduced in this release.
+ *
+ * \since 1.8.0
+ *
+ */
+H5_DLL herr_t H5Oset_comment(hid_t obj_id, const char *comment);
+
+/**
+ *-------------------------------------------------------------------------
+ * \ingroup H5O
+ *
+ * \brief Sets comment for specified object
+ *
+ * \fgdta_loc_obj_id{loc_id}
+ * \param[in] name Name of the object whose comment is to be set or reset
+ * \param[in] comment The new comment
+ * \lapl_id
+ *
+ * \return \herr_t
+ *
+ * \details H5Oset_comment_by_name() sets the comment for the specified object
+ * to the contents of \p comment. Any previously existing comment
+ * is overwritten.
+ *
+ * The target object is specified by \p loc_id and \p name.
+ * \p loc_id can specify any object in the file.
+ * \p name can be one of the following:
+ *
+ * - The name of the object specified as a path relative to \p loc_id
+ * - An absolute name of the object, starting from \c /, the file’s root group
+ * - A dot (\c .), if \p loc_id fully specifies the object
+ *
+ * If \p comment is the empty string or a null pointer, any existing
+ * comment message is removed from the object.
+ *
+ * Comments should be relatively short, null-terminated, ASCII strings.
+ *
+ * Comments can be attached to any object that has an object
+ * header. Datasets, groups, and committed (named) datatypes have
+ * object headers. Symbolic links do not have object headers.
+ *
+ * If a comment is being added to an object attribute, this comment
+ * will be attached to the object to which the attribute belongs
+ * and not to the attribute itself.
+ *
+ * \p lapl_id contains a link access property list identifier. A
+ * link access property list can come into play when traversing
+ * links to access an object.
+ *
+ * \version 1.8.11 Fortran subroutine introduced in this release.
+ *
+ * \since 1.8.0
+ *
+ */
+H5_DLL herr_t H5Oset_comment_by_name(hid_t loc_id, const char *name, const char *comment, hid_t lapl_id);
+
+/**
+ *-------------------------------------------------------------------------
+ * \ingroup H5O
+ *
+ * \brief Retrieves comment for specified object
+ *
+ * \fgdta_loc_obj_id{obj_id}
+ * \param[out] comment The comment
+ * \param[in] bufsize Anticipated required size of the comment buffer
+ *
+ * \return Upon success, returns the number of characters in the
+ * comment, not including the \c NULL terminator, or zero (\c 0) if
+ * the object has no comment. The value returned may be larger
+ * than \p bufsize. Otherwise returns a negative value.
+ *
+ * \details H5Oget_comment() retrieves the comment for the specified object in
+ * the buffer \p comment.
+ *
+ * The target object is specified by an identifier, \p object_id.
+ *
+ * The size in bytes of the buffer \p comment, including the \c NULL
+ * terminator, is specified in \p bufsize. If \p bufsize is unknown,
+ * a preliminary H5Oget_comment() call with the pointer \p comment
+ * set to \c NULL will return the size of the comment without
+ * the \c NULL terminator.
+ *
+ * If \p bufsize is set to a smaller value than described above,
+ * only \p bufsize bytes of the comment, without a \c NULL terminator,
+ * are returned in \p comment.
+ *
+ * If an object does not have a comment, the empty string is
+ * returned in \p comment.
+ *
+ * \version 1.8.11 Fortran subroutine introduced in this release.
+ *
+ * \since 1.8.0
+ *
+ */
+H5_DLL ssize_t H5Oget_comment(hid_t obj_id, char *comment, size_t bufsize);
+
+/**
+ *-------------------------------------------------------------------------
+ * \ingroup H5O
+ *
+ * \brief Retrieves comment for specified object
+ *
+ * \fgdta_loc_obj_id{loc_id}
+ * \param[in] name Name of the object whose comment is to be retrieved
+ * \param[out] comment The comment
+ * \param[in] bufsize Anticipated required size of the \p comment buffer
+ * \lapl_id
+ *
+ * \return Upon success, returns the number of characters in the comment,
+ * not including the \c NULL terminator, or zero (\c 0) if the object
+ * has no comment. The value returned may be larger than \c bufsize.
+ * Otherwise returns a negative value.
+ *
+ * \details H5Oget_comment_by_name() retrieves the comment for an object
+ * in the buffer \p comment.
+ *
+ * The target object is specified by \p loc_id and \p name.
+ * \p loc_id can specify any object in the file.
+ * \p name can be one of the following:
+ *
+ * - The name of the object relative to \p loc_id
+ * - An absolute name of the object, starting from \c /, the file’s root group
+ * - A dot (\c .), if \p loc_id fully specifies the object
+ *
+ * The size in bytes of the comment, including the \c NULL terminator,
+ * is specified in \p bufsize. If \p bufsize is unknown, a preliminary
+ * H5Oget_comment_by_name() call with the pointer \p comment set
+ * to \c NULL will return the size of the comment without
+ * the \c NULL terminator.
+ *
+ * If \p bufsize is set to a smaller value than described above,
+ * only \p bufsize bytes of the comment, without a \c NULL terminator,
+ * are returned in \p comment.
+ *
+ * If an object does not have a comment, the empty string is
+ * returned in \p comment.
+ *
+ * \p lapl_id contains a link access property list identifier. A
+ * link access property list can come into play when traversing
+ * links to access an object.
+ *
+ * \version 1.8.11 Fortran subroutine introduced in this release.
+ *
+ * \since 1.8.0
+ *
+ */
+H5_DLL ssize_t H5Oget_comment_by_name(hid_t loc_id, const char *name, char *comment, size_t bufsize,
+ hid_t lapl_id);
+
+/**
+ *-------------------------------------------------------------------------
+ * \ingroup H5O
+ *
+ * \brief Recursively visits all objects accessible from a specified object
+ *
+ * \fgdta_loc_obj_id{obj_id}
+ * \idx_type
+ * \order
+ * \param[in] op Callback function passing data regarding the object
+ * to the calling application
+ * \param[in] op_data User-defined pointer to data required by the application
+ * for its processing of the object
+ * \param[in] fields Flags specifying the fields to be retrieved to the
+ * callback \p op
+ *
+ * \return On success, returns the return value of the first operator
+ * that returns a positive value, or zero if all members were
+ * processed with no operator returning non-zero.
+ *
+ * \return On failure, returns a negative value if something goes wrong
+ * within the library, or the first negative value returned by
+ * an operator.
+ *
+ * \details H5Ovisit3() is a recursive iteration function to visit the
+ * object \p obj_id and, if \p obj_id is a group, all objects in
+ * and below it in an HDF5 file, thus providing a mechanism for
+ * an application to perform a common set of operations across
+ * all of those objects or a dynamically selected subset.
+ * For non-recursive iteration across the members of a group,
+ * see H5Literate2().
+ *
+ * If \p obj_id is a group identifier, that group serves as the
+ * root of a recursive iteration. If \p obj_id is a file identifier,
+ * that file’s root group serves as the root of the recursive
+ * iteration. If \p obj_id is an attribute identifier,
+ * then the object where the attribute is attached will be iterated.
+ * If \p obj_id is any other type of object, such as a dataset or
+ * named datatype, there is no iteration.
+ *
+ * Two parameters are used to establish the iteration: \p idx_type
+ * and \p order.
+ *
+ * \p idx_type specifies the index to be used. If the links in
+ * a group have not been indexed by the index type, they will
+ * first be sorted by that index then the iteration will begin;
+ * if the links have been so indexed, the sorting step will be
+ * unnecessary, so the iteration may begin more quickly. Valid
+ * values include the following:
+ *
+ * \indexes
+ *
+ * Note that the index type passed in \p idx_type is a
+ * best effort setting. If the application passes in
+ * a value indicating iteration in creation order and a group is
+ * encountered that was not tracked in creation order, that group
+ * will be iterated over in alpha-numeric order by name, or
+ * name order. (Name order is the native order
+ * used by the HDF5 library and is always available.)
+ *
+ * \p order specifies the order in which objects are to be inspected
+ * along the index specified in \p idx_type. Valid values include
+ * the following:
+ *
+ * \orders
+ *
+ * The prototype of the callback function op is as follows (as
+ * defined in the source code file H5Opublic.h):
+ *
+ * \snippet this H5O_iterate2_t_snip
+ *
+ * The parameters of this callback function have the following values
+ * or meanings:
+ *
+ *
+ * \c obj |
+ * Object that serves as root of the iteration;
+ * same value as the H5Ovisit() \p obj_id parameter |
+ *
+ *
+ * \c name |
+ * Name of object, relative to \c obj, being examined at
+ * current step of the iteration |
+ *
+ *
+ * \c info |
+ * H5O_info2_t \c struct containing information
+ * regarding that object |
+ *
+ *
+ * \c op_data |
+ * User-defined pointer to data required by the application in
+ * processing the object; a pass-through of the \c op_data pointer
+ * provided with the H5Ovisit() function call |
+ *
+ *
+ *
+ * The H5O_info2_t \c struct is defined in H5Opublic.h as follows:
+ * \snippet this H5O_info2_t_snip
+ *
+ * H5O_token_t is defined in H5public.h as follows:
+ * \snippet H5public.h H5O_token_t_snip
+ *
+ * The #H5O_type_t enum indicates the object type and is
+ * defined in H5Opublic.h as follows:
+ * \snippet this H5O_type_t_snip
+ *
+ * Note that the object retrieved as indicated by \p obj_id
+ * refers only to the types specified by #H5O_type_t.
+ *
+ * The return values from an operator are:
+ * - Zero causes the visit iterator to continue, returning zero when all
+ * group members have been processed.
+ * - A positive value causes the visit iterator to immediately return that
+ * positive value, indicating short-circuit success.
+ * - A negative value causes the visit iterator to immediately return that
+ * value, indicating failure.
+ *
+ * The H5Ovisit3() \p op_data parameter is a user-defined pointer to the data
+ * required to process objects in the course of the iteration. This pointer
+ * is passed back to each step of the iteration in the callback
+ * function’s \p op_data parameter.
+ *
+ * The \p fields parameter contains flags to determine which fields will
+ * be retrieved by the \p op callback function. These flags are defined
+ * in the H5Opublic.h file:
+ * \obj_info_fields
+ *
+ * H5Lvisit2() and H5Ovisit3() are companion functions: one for
+ * examining and operating on links; the other for examining
+ * and operating on the objects that those links point to. Both
+ * functions ensure that by the time the function completes
+ * successfully, every link or object below the specified point
+ * in the file has been presented to the application for whatever
+ * processing the application requires. These functions assume
+ * that the membership of the group being iterated over remains
+ * unchanged through the iteration; if any of the links in the
+ * group change during the iteration, the resulting behavior
+ * is undefined.
+ *
+ * \note \Bold{Programming Note for C++ Developers Using C Functions:}
+ * \note If a C routine that takes a function pointer as an argument is
+ * called from within C++ code, the C routine should be returned
+ * from normally.
+ *
+ * \note Examples of this kind of routine include callbacks such as
+ * H5Pset_elink_cb() and H5Pset_type_conv_cb() and
+ * functions such as H5Tconvert() and H5Ewalk2().
+ *
+ * \note Exiting the routine in its normal fashion allows the HDF5
+ * C library to clean up its work properly. In other words, if
+ * the C++ application jumps out of the routine back to the C++
+ * “catch” statement, the library is not given the opportunity
+ * to close any temporary data structures that were set up when
+ * the routine was called. The C++ application should save some
+ * state as the routine is started so that any problem that occurs
+ * might be diagnosed.
+ *
+ * \par Example
+ * An example snippet from test/links.c:
+ * \snippet links.c H5Ovisit3_snip
+ *
+ * \since 1.12.0
+ *
+ */
+H5_DLL herr_t H5Ovisit3(hid_t obj_id, H5_index_t idx_type, H5_iter_order_t order, H5O_iterate2_t op,
+ void *op_data, unsigned fields);
+
+/**
+ *-------------------------------------------------------------------------
+ * \ingroup H5O
+ *
+ * \brief Recursively visits all objects accessible from a specified object
+ *
+ * \fgdta_loc_obj_id{loc_id}
+ * \param[in] obj_name Name of the object, generally relative to
+ * \p loc_id, that will serve as root of the iteration
+ * \idx_type
+ * \order
+ * \param[in] op Callback function passing data regarding the object
+ * to the calling application
+ * \param[in] op_data User-defined pointer to data required by the application
+ * for its processing of the object
+ * \param[in] fields Flags specifying the fields to be retrieved to the
+ * callback function \p op
+ * \lapl_id
+ *
+ * \return On success, returns the return value of the first operator
+ * that returns a positive value, or zero if all members were
+ * processed with no operator returning non-zero.
+ *
+ * \return On failure, returns a negative value if something goes wrong
+ * within the library, or the first negative value returned by
+ * an operator.
+ *
+ * \details H5Ovisit_by_name3() is a recursive iteration function to visit
+ * the object specified by the \p loc_id / \p obj_name parameter
+ * pair and, if that object is a group, all objects in and below it
+ * in an HDF5 file, thus providing a mechanism for an application to
+ * perform a common set of operations across all of those objects or
+ * a dynamically selected subset. For non-recursive iteration across
+ * the members of a group, see H5Literate2().
+ *
+ * The object serving as the root of the iteration is specified
+ * by the \p loc_id / \p obj_name parameter pair. \p loc_id specifies
+ * a file or an object in a file; if \p loc_id is an attribute identifier,
+ * the object where the attribute is attached will be used.
+ * \p obj_name specifies either an object in the file (with an absolute
+ * name based in the file’s root group) or an object name relative
+ * to \p loc_id. If \p loc_id fully specifies the object that is to serve
+ * as the root of the iteration, \p obj_name should be '\c .' (a dot).
+ * (Note that when \p loc_id fully specifies the object that is to serve
+ * as the root of the iteration, the user may wish to consider
+ * using H5Ovisit3() instead of H5Ovisit_by_name3().)
+ *
+ * Two parameters are used to establish the iteration: \p idx_type
+ * and \p order.
+ *
+ * \p idx_type specifies the index to be used. If the links in
+ * a group have not been indexed by the index type, they will
+ * first be sorted by that index then the iteration will begin;
+ * if the links have been so indexed, the sorting step will be
+ * unnecessary, so the iteration may begin more quickly. Valid
+ * values include the following:
+ *
+ * \indexes
+ *
+ * Note that the index type passed in \p idx_type is a
+ * best effort setting. If the application passes in a
+ * value indicating iteration in creation order and a group is
+ * encountered that was not tracked in creation order, that group
+ * will be iterated over in alpha-numeric order by name, or
+ * name order. (Name order is the native order
+ * used by the HDF5 library and is always available.)
+ *
+ * \p order specifies the order in which objects are to be inspected
+ * along the index specified in \p idx_type. Valid values include
+ * the following:
+ *
+ * \orders
+ *
+ * The prototype of the callback function op is as follows (as
+ * defined in the source code file H5Opublic.h):
+ *
+ * \snippet this H5O_iterate2_t_snip
+ *
+ * The parameters of this callback function have the following
+ * values or meanings:
+ *
+ *
+ * \c obj |
+ * Object that serves as root of the iteration |
+ *
+ *
+ * \c name |
+ * Name of object, relative to \c obj, being examined at
+ * current step of the iteration |
+ *
+ *
+ * \c info |
+ * H5O_info2_t \c struct containing information
+ * regarding that object |
+ *
+ *
+ * \c op_data |
+ * User-defined pointer to data required by the application in
+ * processing the object |
+ *
+ *
+ *
+ * The H5O_info2_t \c struct is defined in H5Opublic.h as follows:
+ * \snippet this H5O_info2_t_snip
+ *
+ * H5O_token_t is defined in H5public.h as follows:
+ * \snippet H5public.h H5O_token_t_snip
+ *
+ * The #H5O_type_t enum indicates the object type and is
+ * defined in H5Opublic.h as follows:
+ * \snippet this H5O_type_t_snip
+ *
+ * The H5Ovisit_by_name3() \p op_data parameter is a user-defined
+ * pointer to the data required to process objects in the course
+ * of the iteration. This pointer is passed back to each step of
+ * the iteration in the callback function’s \p op_data parameter.
+ *
+ * \p lapl_id is a link access property list. In the general case,
+ * when default link access properties are acceptable, this can
+ * be passed in as #H5P_DEFAULT. An example of a situation that
+ * requires a non-default link access property list is when
+ * the link is an external link; an external link may require
+ * that a link prefix be set in a link access property list
+ * (see H5Pset_elink_prefix()).
+ *
+ * The \p fields parameter contains flags to determine which fields will
+ * be retrieved by the \p op callback function. These flags are defined
+ * in the H5Opublic.h file:
+ * \obj_info_fields
+ *
+ * H5Lvisit_by_name2() and H5Ovisit_by_name3() are companion
+ * functions: one for examining and operating on links; the other
+ * for examining and operating on the objects that those links point to.
+ * Both functions ensure that by the time the function completes
+ * successfully, every link or object below the specified point
+ * in the file has been presented to the application for whatever
+ * processing the application requires.
+ *
+ * \note \Bold{Programming Note for C++ Developers Using C Functions:}
+ * \note If a C routine that takes a function pointer as an argument is
+ * called from within C++ code, the C routine should be returned
+ * from normally.
+ *
+ * \note Examples of this kind of routine include callbacks such as
+ * H5Pset_elink_cb() and H5Pset_type_conv_cb() and
+ * functions such as H5Tconvert() and H5Ewalk2().
+ *
+ * \note Exiting the routine in its normal fashion allows the HDF5
+ * C library to clean up its work properly. In other words, if
+ * the C++ application jumps out of the routine back to the C++
+ * “catch” statement, the library is not given the opportunity
+ * to close any temporary data structures that were set up when
+ * the routine was called. The C++ application should save some
+ * state as the routine is started so that any problem that occurs
+ * might be diagnosed.
+ *
+ * \par Example
+ * An example snippet from test/links.c:
+ * \snippet links.c H5Ovisit_by_name3_snip
+ *
+ * \since 1.12.0
+ *
+ */
+H5_DLL herr_t H5Ovisit_by_name3(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
+ H5_iter_order_t order, H5O_iterate2_t op, void *op_data, unsigned fields,
+ hid_t lapl_id);
+
+/**
+ *-------------------------------------------------------------------------
+ * \ingroup H5O
+ *
+ * \brief Closes an object in an HDF5 file
+ *
+ * \obj_id{object_id}
+ *
+ * \return \herr_t
+ *
+ * \details H5Oclose() closes the group, dataset, or named datatype specified by
+ * object_id.
+ *
+ * This function is the companion to H5Oopen(), and has the same
+ * effect as calling H5Gclose(), H5Dclose(), or H5Tclose().
+ *
+ * H5Oclose() is not used to close a dataspace, attribute, property
+ * list, or file.
+ *
+ * \version 1.8.8 Fortran subroutine introduced in this release.
+ *
+ * \since 1.8.0
+ *
+ */
+H5_DLL herr_t H5Oclose(hid_t object_id);
+/**
+ * --------------------------------------------------------------------------
+ * \ingroup ASYNC
+ * \async_variant_of{H5Oclose}
+ */
+H5_DLL herr_t H5Oclose_async(const char *app_file, const char *app_func, unsigned app_line, hid_t object_id,
+ hid_t es_id);
+
+/**
+ *-------------------------------------------------------------------------
+ * \ingroup H5O
+ *
+ * \brief Flushes all buffers associated with an HDF5 object to disk
+ *
+ * \fgdta_loc_obj_id{obj_id}
+ *
+ * \return \herr_t
+ *
+ * \details H5Oflush() causes all buffers associated with an object to be immediately
+ * flushed to disk without removing the data from the cache.
+ *
+ * The object associated with \p object_id can be any named object in an
+ * HDF5 file including a dataset, a group, or a committed datatype.
+ *
+ * \note HDF5 does not possess full control over buffering. H5Oflush()
+ * flushes the internal HDF5 buffers and then asks the operating
+ * system (the OS) to flush the system buffers for the open
+ * files. After that, the OS is responsible for ensuring that
+ * the data is actually flushed to disk.
+ *
+ * \par See Also:
+ * - H5Dflush()
+ * - H5Drefresh()
+ * - H5Oflush()
+ * - H5Grefresh()
+ * - H5Oflush()
+ * - H5Orefresh()
+ * - H5Tflush()
+ * - H5Trefresh()
+ * \par
+ * - \c H5DOappend()
+ * - H5Fstart_swmr_write()
+ * - H5Pget_append_flush()
+ * - H5Pget_object_flush_cb()
+ * - H5Pset_append_flush()
+ * - H5Pset_object_flush_cb()
+ * \par
+ * - H5Oare_mdc_flushes_disabled()
+ * - H5Odisable_mdc_flushes()
+ * - H5Oenable_mdc_flushes()
+ *
+ * \since 1.10.0
+ *
+ */
+H5_DLL herr_t H5Oflush(hid_t obj_id);
+/**
+ * --------------------------------------------------------------------------
+ * \ingroup ASYNC
+ * \async_variant_of{H5Oflush}
+ */
+H5_DLL herr_t H5Oflush_async(const char *app_file, const char *app_func, unsigned app_line, hid_t obj_id,
+ hid_t es_id);
+/**
+ *-------------------------------------------------------------------------
+ * \ingroup H5O
+ *
+ * \brief Refreshes all buffers associated with an HDF5 object
+ *
+ * \fgdta_loc_obj_id{oid}
+ *
+ * \return \herr_t
+ *
+ * \details H5Orefresh() causes all buffers associated with an object to be cleared
+ * and immediately re-loaded with updated contents from disk.
+ *
+ * This function essentially closes the object, evicts all
+ * metadata associated with it from the cache, and then re-opens
+ * the object. The reopened object is automatically re-registered
+ * with the same identifier.
+ *
+ * The object associated with \p oid can be any named object in an
+ * HDF5 file including a dataset, a group, or a committed datatype.
+ *
+ * \since 1.10.0
+ *
+ */
+H5_DLL herr_t H5Orefresh(hid_t oid);
+/**
+ * --------------------------------------------------------------------------
+ * \ingroup ASYNC
+ * \async_variant_of{H5Orefresh}
+ */
+H5_DLL herr_t H5Orefresh_async(const char *app_file, const char *app_func, unsigned app_line, hid_t oid,
+ hid_t es_id);
+
+/**
+ *-------------------------------------------------------------------------
+ * \ingroup H5O
+ *
+ * \brief Prevents metadata entries for an HDF5 object from being flushed
+ * from the metadata cache to storage
+ *
+ * \param[in] object_id Identifier of the object that will have flushes disabled;
+ * may be a group, named datatype, or dataset identifier
+ *
+ * \return \herr_t
+ *
+ * \details H5Odisable_mdc_flushes(), H5Oenable_mdc_flushes() and associated flush
+ * functions can be used to control the flushing of entries from
+ * a file’s metadata cache.
+ *
+ * This function prevents an object’s or cache’s dirty metadata
+ * entries from being flushed from the cache by the usual cache
+ * eviction/flush policy. Instead, users must manually flush the
+ * cache or entries for individual objects via the appropriate
+ * H5Fflush(), H5Dflush(), H5Gflush(), H5Tflush(), and H5Oflush() calls.
+ *
+ * Metadata cache entries can be controlled at both the individual
+ * HDF5 object level (datasets, groups, committed datatypes)
+ * and the entire metadata cache level.
+ *
+ * \note HDF5 objects include datasets, groups, and committed datatypes.
+ * Only #hid_t identifiers that represent these objects can be passed to the function.
+ * \note Passing in a #hid_t identifier that represents any other HDF5 entity is
+ * considered an error.
+ * \note It is an error to pass an HDF5 file identifier
+ * (obtained from H5Fopen() or H5Fcreate())
+ * to this function.
+ * \note Misuse of this function can cause the cache to exhaust
+ * available memory.
+ * \note Objects can be returned to the default automatic flush behavior
+ * with H5Oenable_mdc_flushes().
+ * \note Flush prevention only pertains to new or dirty metadata entries.
+ * Clean entries can be evicted from the cache.
+ * \note Calling this function on an object that has already had flushes
+ * disabled will return an error.
+ *
+ * \since 1.10.0
+ *
+ */
+H5_DLL herr_t H5Odisable_mdc_flushes(hid_t object_id);
+
+/**
+ *-------------------------------------------------------------------------
+ * \ingroup H5O
+ *
+ * \brief Enables flushing of dirty metadata entries from a file’s metadata cache
+ *
+ * \param[in] object_id Identifier of the object that will have flushes re-enabled;
+ * may be a group, named datatype, or dataset identifier
+ *
+ * \return \herr_t
+ *
+ * \details H5Oenable_mdc_flushes(), H5Odisable_mdc_flushes()
+ * and associated flush functions can be used to control the flushing
+ * of entries from a file’s metadata cache.
+ *
+ * This function allows an object or cache’s dirty metadata entries to be
+ * flushed from the cache by the usual cache eviction/flush policy.
+ *
+ * Metadata cache entries can be controlled at both the individual HDF5
+ * object level (datasets, groups, committed datatypes) and the entire
+ * metadata cache level.
+ *
+ *
+ * \note HDF5 objects include datasets, groups, and committed datatypes.
+ * Only #hid_t identifiers that represent these objects can be
+ * passed to the function.
+ *
+ * \note Passing in a #hid_t identifier that represents any other HDF5 entity
+ * is considered an error.
+ *
+ * \note It is an error to pass an HDF5 file identifier
+ * (obtained from H5Fopen() or H5Fcreate())
+ * to this function.
+ *
+ * \note Using this function on an object that has not had flushes disabled
+ * is considered an error. The state of an object can be determined
+ * with H5Oare_mdc_flushes_disabled().
+ *
+ * \note An object will be returned to the default flush algorithm when it is closed.
+ *
+ * \note All objects will be returned to the default flush algorithm when
+ * the file is closed.
+ *
+ * \note An object’s entries will not necessarily be flushed as a result of
+ * calling this function.
+ *
+ * \since 1.10.0
+ *
+ */
+H5_DLL herr_t H5Oenable_mdc_flushes(hid_t object_id);
+
+/**
+ *-------------------------------------------------------------------------
+ * \ingroup H5O
+ *
+ * \brief Retrieves comment for specified object
+ *
+ * \param[in] object_id Identifier of an object in the cache;
+ * may be a group, named datatype, or dataset identifier
+ * \param[out] are_disabled Flushes enabled/disabled
+ *
+ * \return \p are_disabled will be set to \c 1 if an object has had flushes disabled
+ * and \c 0 if it has not had flushes disabled.
+ * \return \herr_t
+ *
+ * \details H5Oare_mdc_flushes_disabled() determines if an HDF5 object (dataset, group, committed
+ * datatype) has had flushes of metadata entries disabled.
+ *
+ * The H5Oenable_mdc_flushes(), H5Odisable_mdc_flushes() and
+ * associated flush functions can be used to control the flushing of
+ * entries from a file’s metadata cache. Metadata cache entries can be controlled
+ * at both the individual HDF5 object level (datasets, groups,
+ * committed datatypes) and the entire metadata cache level.
+ *
+ * \note HDF5 objects include datasets, groups, and committed datatypes.
+ * Only #hid_t identifiers that represent these objects can be passed to the function.
+ * \note Passing in a #hid_t identifier that represents any other HDF5 entity is
+ * considered an error.
+ * \note It is an error to pass an HDF5 file identifier
+ * (obtained from H5Fopen() or H5Fcreate()) to this function.
+ *
+ * \since 1.10.0
+ *
+ */
+H5_DLL herr_t H5Oare_mdc_flushes_disabled(hid_t object_id, hbool_t *are_disabled);
+
+/**
+ *-------------------------------------------------------------------------
+ * \ingroup H5O
+ *
+ * \brief Compares two VOL connector object tokens
+ *
+ * \fgdta_loc_obj_id{loc_id}
+ * \param[in] token1 First object token
+ * \param[in] token2 Second object token
+ * \param[out] cmp_value Comparison value
+ *
+ * \return \herr_t
+ *
+ * \details H5Otoken_cmp() compares two VOL connector object tokens, \p token1
+ * and \p token2 for the file or group identifier specified by \p loc_id.
+ * Both object tokens must be from the same VOL connector class.
+ *
+ * H5O_token_t is defined in H5public.h as follows:
+ * \snippet H5public.h H5O_token_t_snip
+ *
+ * A comparison value, \p cmp_value, is returned, which indicates the
+ * result of the comparison:
+ *
+ *
+ *
+ * cmp_value |
+ * Result |
+ *
+ *
+ * > 0 |
+ * \p token1 > \p token2 |
+ *
+ *
+ * < 0 |
+ * \p token1 < \p token2 |
+ *
+ *
+ * 0 |
+ * \p token1 = \p token2 |
+ *
+ *
+ *
+ * \par Example
+ * An example snippet from test/links.c:
+ * \snippet links.c H5Otoken_cmp_snip
+ *
+ * \since 1.12.0
+ *
+ */
+H5_DLL herr_t H5Otoken_cmp(hid_t loc_id, const H5O_token_t *token1, const H5O_token_t *token2,
+ int *cmp_value);
+
+/**
+ *-------------------------------------------------------------------------
+ * \ingroup H5O
+ *
+ * \brief Serializes a connector's object token into a string
+ *
+ * \fgdta_loc_obj_id{loc_id}
+ * \param[in] token Connector object token
+ * \param[out] token_str String for connector object token \p token
+ *
+ * \return \herr_t
+ *
+ * \details H5Otoken_to_str() serializes a connector's object token specified by
+ * \p token and the location identifier for the object, \p loc_id,
+ * into a string, \p token_str.
+ *
+ * \since 1.12.0
+ *
+ */
+H5_DLL herr_t H5Otoken_to_str(hid_t loc_id, const H5O_token_t *token, char **token_str);
+
+/**
+ *-------------------------------------------------------------------------
+ * \ingroup H5O
+ *
+ * \brief Deserializes a string into a connector object token
+ *
+ * \fgdta_loc_obj_id{loc_id}
+ * \param[in] token_str Object token string
+ * \param[out] token Connector object token
+ *
+ * \return \herr_t
+ *
+ * \details H5Otoken_from_str() deserializes a string, \p token_str, into a
+ * connector object token, \p token, for the object specified by the
+ * location identifier, \p loc_id.
+ *
+ * \since 1.12.0
+ *
+ */
+H5_DLL herr_t H5Otoken_from_str(hid_t loc_id, const char *token_str, H5O_token_t *token);
+
+/* API Wrappers for async routines */
+/* (Must be defined _after_ the function prototype) */
+/* (And must only defined when included in application code, not the library) */
+#ifndef H5O_MODULE
+#define H5Oopen_async(...) H5Oopen_async(__FILE__, __func__, __LINE__, __VA_ARGS__)
+#define H5Oopen_by_idx_async(...) H5Oopen_by_idx_async(__FILE__, __func__, __LINE__, __VA_ARGS__)
+#define H5Oget_info_by_name_async(...) H5Oget_info_by_name_async(__FILE__, __func__, __LINE__, __VA_ARGS__)
+#define H5Oclose_async(...) H5Oclose_async(__FILE__, __func__, __LINE__, __VA_ARGS__)
+#define H5Oflush_async(...) H5Oflush_async(__FILE__, __func__, __LINE__, __VA_ARGS__)
+#define H5Orefresh_async(...) H5Orefresh_async(__FILE__, __func__, __LINE__, __VA_ARGS__)
+#define H5Ocopy_async(...) H5Ocopy_async(__FILE__, __func__, __LINE__, __VA_ARGS__)
+
+/* Define "wrapper" versions of function calls, to allow compile-time values to
+ * be passed in by language wrapper or library layer on top of HDF5.
+ */
+#define H5Oopen_async_wrap H5_NO_EXPAND(H5Oopen_async)
+#define H5Oopen_by_idx_async_wrap H5_NO_EXPAND(H5Oopen_by_idx_async)
+#define H5Oget_info_by_name_async_wrap H5_NO_EXPAND(H5Oget_info_by_name_async)
+#define H5Oclose_async_wrap H5_NO_EXPAND(H5Oclose_async)
+#define H5Oflush_async_wrap H5_NO_EXPAND(H5Oflush_async)
+#define H5Orefresh_async_wrap H5_NO_EXPAND(H5Orefresh_async)
+#define H5Ocopy_async_wrap H5_NO_EXPAND(H5Ocopy_async)
+#endif
+
+/* The canonical 'undefined' token value */
+#define H5O_TOKEN_UNDEF (H5OPEN H5O_TOKEN_UNDEF_g)
+H5_DLLVAR const H5O_token_t H5O_TOKEN_UNDEF_g;
+
+/* Symbols defined for compatibility with previous versions of the HDF5 API.
+ *
+ * Use of these symbols is deprecated.
+ */
+#ifndef H5_NO_DEPRECATED_SYMBOLS
+
+/* Macros */
+
+/* Deprecated flags for earlier versions of H5Oget_info* */
+#define H5O_INFO_HDR 0x0008u /* Fill in the hdr field */
+#define H5O_INFO_META_SIZE 0x0010u /* Fill in the meta_size field */
#undef H5O_INFO_ALL
#define H5O_INFO_ALL (H5O_INFO_BASIC | H5O_INFO_TIME | H5O_INFO_NUM_ATTRS | H5O_INFO_HDR | H5O_INFO_META_SIZE)
/* Typedefs */
-/* A struct that's part of the H5G_stat_t structure (deprecated) */
+//!
+/**
+ * A struct that's part of the \ref H5G_stat_t structure
+ * \deprecated
+ */
typedef struct H5O_stat_t {
- hsize_t size; /* Total size of object header in file */
- hsize_t free; /* Free space within object header */
- unsigned nmesgs; /* Number of object header messages */
- unsigned nchunks; /* Number of object header chunks */
+ hsize_t size; /**< Total size of object header in file */
+ hsize_t free; /**< Free space within object header */
+ unsigned nmesgs; /**< Number of object header messages */
+ unsigned nchunks; /**< Number of object header chunks */
} H5O_stat_t;
+//!
-/* Information struct for object */
-/* (For H5Oget_info/H5Oget_info_by_name/H5Oget_info_by_idx versions 1 & 2) */
+//!
+/**
+ * Information struct for object (For H5Oget_info(), H5Oget_info_by_name(),
+ * H5Oget_info_by_idx() versions 1 & 2.)
+ */
typedef struct H5O_info1_t {
- unsigned long fileno; /* File number that object is located in */
- haddr_t addr; /* Object address in file */
- H5O_type_t type; /* Basic object type (group, dataset, etc.) */
- unsigned rc; /* Reference count of object */
- time_t atime; /* Access time */
- time_t mtime; /* Modification time */
- time_t ctime; /* Change time */
- time_t btime; /* Birth time */
- hsize_t num_attrs; /* # of attributes attached to object */
- H5O_hdr_info_t hdr; /* Object header information */
+ unsigned long fileno; /**< File number that object is located in */
+ haddr_t addr; /**< Object address in file */
+ H5O_type_t type; /**< Basic object type (group, dataset, etc.) */
+ unsigned rc; /**< Reference count of object */
+ time_t atime; /**< Access time */
+ time_t mtime; /**< Modification time */
+ time_t ctime; /**< Change time */
+ time_t btime; /**< Birth time */
+ hsize_t num_attrs; /**< # of attributes attached to object */
+ H5O_hdr_info_t hdr; /**< Object header information */
/* Extra metadata storage for obj & attributes */
struct {
- H5_ih_info_t obj; /* v1/v2 B-tree & local/fractal heap for groups, B-tree for chunked datasets */
- H5_ih_info_t attr; /* v2 B-tree & heap for attributes */
+ H5_ih_info_t obj; /**< v1/v2 B-tree & local/fractal heap for groups, B-tree for chunked datasets */
+ H5_ih_info_t attr; /**< v2 B-tree & heap for attributes */
} meta_size;
} H5O_info1_t;
+//!
-/* Prototype for H5Ovisit/H5Ovisit_by_name() operator (versions 1 & 2) */
+//!
+/**
+ * Prototype for H5Ovisit(), H5Ovisit_by_name() operator (versions 1 & 2)
+ */
typedef herr_t (*H5O_iterate1_t)(hid_t obj, const char *name, const H5O_info1_t *info, void *op_data);
+//!
/* Function prototypes */
-H5_DLL hid_t H5Oopen_by_addr(hid_t loc_id, haddr_t addr);
+
+/**
+ *-------------------------------------------------------------------------
+ * \ingroup H5O
+ *
+ * \brief Opens an object using its address within an HDF5 file.
+ *
+ * \fgdta_loc_obj_id{loc_id}
+ * \param[in] addr Object's address in the file
+ *
+ * \return \hid_tv{object}
+ *
+ * \deprecated As of HDF5-1.12 this function has been deprecated in favor of
+ * the function H5Oopen_by_token().
+ *
+ * \details H5Oopen_by_addr() opens a group, dataset, or committed (named) datatype using its
+ * address within an HDF5 file, \p addr. The resulting opened object is identical to
+ * an object opened with H5Oopen() and should be closed with H5Oclose() or an
+ * object-type-specific closing function (such as H5Gclose()) when no longer needed.
+ *
+ * \p loc_id is a location identifier in the file.
+ *
+ * The object’s address within the file, \p addr, is the byte offset of the first byte
+ * of the object header from the beginning of the HDF5 file space, i.e., from the
+ * beginning of the super block (see the “HDF5 Storage Model” section of the The
+ * HDF5 Data Model and File Structure chapter of the HDF5 User's Guide.)
+ *
+ * \p addr can be obtained via either of two function calls. H5Gget_objinfo() returns
+ * the object’s address in the \c objno field of the H5G_stat_t \c struct;
+ * H5Lget_info() returns the address in the \c address field of the #H5L_info_t \c struct.
+ *
+ * The address of the HDF5 file on a physical device has no effect on H5Oopen_by_addr(),
+ * nor does the use of any file driver. As stated above, the object address is its
+ * offset within the HDF5 file; HDF5’s file drivers will transparently map this to an
+ * address on a storage device.
+ *
+ * \warning This function must be used with care!
+ * \warning Improper use can lead to inaccessible data, wasted space in the file,
+ * or file corruption.
+ * \warning This function is dangerous if called on an invalid address. The risk can be safely
+ * overcome by retrieving the object address with H5Gget_objinfo() or H5Lget_info()
+ * immediately before calling H5Oopen_by_addr(). The immediacy of the operation can be
+ * important; if time has elapsed and the object has been deleted from the file,
+ * the address will be invalid and file corruption can result.
+ *
+ * \version 1.8.4 Fortran subroutine added in this release.
+ *
+ * \since 1.8.0
+ *
+ */
+H5_DLL hid_t H5Oopen_by_addr(hid_t loc_id, haddr_t addr);
+
+/**
+ *-------------------------------------------------------------------------
+ * \ingroup H5O
+ *
+ * \brief Retrieves the metadata for an object specified by an identifier
+ *
+ * \fgdta_loc_obj_id{loc_id}
+ * \param[out] oinfo Buffer in which to return object information
+ *
+ * \return \herr_t
+ *
+ * \deprecated As of HDF5-1.12 this function has been deprecated in favor of
+ * the function H5Oget_info3() or the macro #H5Oget_info.
+ *
+ * \details H5Oget_info1() specifies an object by its identifier, \p loc_id , and
+ * retrieves the metadata describing that object in \p oinfo ,
+ * defined as a \c struct of type H5O_info1_t :
+ *
+ * \snippet this H5O_info1_t_snip
+ *
+ * Note the following about H5O_info1_t :
+ * - Of the four time fields (\c atime, \c mtime, \c ctime, and \c btime)
+ * only \c ctime has been implemented.
+ * - The \c atime value is the last time the object was read or written.
+ * - The \c mtime value is the last time the raw data in the object was changed.
+ * - The \c ctime value is the last time the metadata for the object was changed.
+ * - The \c btime value is the time the object was created.
+ * - The fields nested in the \c meta_size field are for internal library use only.
+ *
+ * The #H5O_type_t \c enum indicates the object type and
+ * is defined in H5Opublic.h as follows:
+ * \snippet this H5O_type_t_snip
+ *
+ * Note that the object retrieved as indicated by \p loc_id
+ * refers only to the types specified by #H5O_type_t.
+ *
+ * An H5O_hdr_info_t \c struct holds object header metadata and is
+ * defined in H5Opublic.h as follows:
+ * \snippet this H5O_hdr_info_t_snip
+ *
+ * Valid values for the \c version field are \c H5O_VERSION_1 and \c H5O_VERSION_2.
+ * Version 2 of the object header is smaller and more efficient than version 1.
+ *
+ * Please be aware that the information held by H5O_hdr_info_t may only be useful to
+ * developers with extensive HDF5 experience.
+ *
+ * \note If you are iterating through a lot of different objects to
+ * retrieve information via the H5Oget_info() family of routines,
+ * you may see memory building up. This can be due to memory
+ * allocation for metadata such as object headers and messages
+ * when the iterated objects are put into the metadata cache.
+ * \note
+ * If the memory buildup is not desirable, you can configure a
+ * smaller cache via H5Fset_mdc_config() or set the file access
+ * property list via H5Pset_mdc_config(). A smaller sized cache
+ * will force metadata entries to be evicted from the cache,
+ * thus freeing the memory associated with the entries.
+ *
+ * \version 1.10.5 The macro #H5Oget_info was removed and the function
+ * H5Oget_info1() was copied to H5Oget_info().
+ * \version 1.10.3 Function H5Oget_info() was copied to H5Oget_info1(),
+ * and the macro #H5Oget_info was created.
+ * \version 1.8.15 Added a note about the valid values for the \c version
+ * field in the H5O_hdr_info_t structure.
+ * \version 1.8.11 Fortran subroutine introduced in this release.
+ * \version 1.8.10 Added #H5O_type_t structure to the Description section. \n
+ * Separated H5O_hdr_info_t structure from #H5O_info_t in the
+ * Description section. \n
+ * Clarified the definition and implementation of the time fields.
+ *
+ * \since 1.8.0
+ *
+ */
H5_DLL herr_t H5Oget_info1(hid_t loc_id, H5O_info1_t *oinfo);
+
+/**
+ *-------------------------------------------------------------------------
+ * \ingroup H5O
+ *
+ * \brief Retrieves the metadata for an object, identifying the object
+ * by location and relative name
+ *
+ * \fgdta_loc_obj_id{loc_id}
+ * \param[in] name Name of group, relative to \p loc_id
+ * \param[out] oinfo Buffer in which to return object information
+ * \lapl_id
+ *
+ * \return \herr_t
+ *
+ * \deprecated As of HDF5-1.12 this function has been deprecated in favor of
+ * the function H5Oget_info_by_name2() or the macro #H5Oget_info_by_name.
+ *
+ * \details H5Oget_info_by_name1() specifies an object’s location and name, \p loc_id
+ * and \p name, respectively, and retrieves the metadata describing that object
+ * in \p oinfo, an H5O_info1_t \c struct.
+ *
+ * The \c struct H5O_info1_t is defined in H5Opublic.h and described
+ * in the H5Oget_info1() function entry.
+ *
+ * The link access property list, \p lapl_id, is not currently used;
+ * it should be passed in as #H5P_DEFAULT.
+ *
+ * \version 1.10.5 The macro #H5Oget_info_by_name was removed and the function
+ * H5Oget_info_by_name1() was copied to H5Oget_info_by_name().
+ * \version 1.10.3 Function H5Oget_info_by_name() was copied to H5Oget_info_by_name1()
+ * and the macro #H5Oget_info_by_name was created.
+ * \version 1.8.8 Fortran 2003 subroutine and \c h5o_info_t derived type introduced
+ * in this release.
+ *
+ * \since 1.8.0
+ *
+ */
H5_DLL herr_t H5Oget_info_by_name1(hid_t loc_id, const char *name, H5O_info1_t *oinfo, hid_t lapl_id);
+
+/**
+ *-------------------------------------------------------------------------
+ * \ingroup H5O
+ *
+ * \brief Retrieves the metadata for an object, identifying the object
+ * by an index position
+ *
+ * \fgdta_loc_obj_id{loc_id}
+ * \param[in] group_name Name of group in which object is located
+ * \idx_type
+ * \order
+ * \param[in] n Position within the index
+ * \param[out] oinfo Buffer in which to return object information
+ * \lapl_id
+ *
+ * \return \herr_t
+ *
+ * \deprecated As of HDF5-1.12 this function has been deprecated in favor of
+ * the function H5Oget_info_by_idx3() or the macro H5Oget_info_by_idx().
+ *
+ * \details H5Oget_info_by_idx1() retrieves the metadata describing an
+ * object in the \c struct \p oinfo, as specified by the location,
+ * \p loc_id, group name, \p group_name, the index by which objects
+ * in that group are tracked, \p idx_type, the order by which the
+ * index is to be traversed, \p order, and an object’s position
+ * \p n within that index.
+ *
+ * If \p loc_id fully specifies the group in which the object resides,
+ * \p group_name can be a dot (\c .).
+ *
+ * \p idx_type is of type #H5_index_t, defined in H5public.h as:
+ * \snippet H5public.h H5_index_t_snip
+ *
+ * \p order is of type #H5_iter_order_t defined in H5public.h as:
+ * \snippet H5public.h H5_iter_order_t_snip
+ *
+ * \p oinfo, in which the object information is returned, is a \c struct of
+ * type H5O_info1_t .
+ * \snippet this H5O_info1_t_snip
+ *
+ * The link access property list, \c lapl_id, is not currently used;
+ * it should be passed in as #H5P_DEFAULT.
+ *
+ * \version 1.10.5 The macro #H5Oget_info_by_idx was removed and the function
+ * H5Oget_info_by_idx() was copied to H5Oget_info_by_idx1().
+ * \version 1.10.3 Function H5Oget_info_by_idx() was copied to H5Oget_info_by_idx1()
+ * and the macro #H5Oget_info_by_idx was created.
+ * \version 1.8.11 Fortran subroutine introduced in this release.
+ *
+ * \since 1.8.0
+ *
+ */
H5_DLL herr_t H5Oget_info_by_idx1(hid_t loc_id, const char *group_name, H5_index_t idx_type,
H5_iter_order_t order, hsize_t n, H5O_info1_t *oinfo, hid_t lapl_id);
+
+/**
+ *-------------------------------------------------------------------------
+ * \ingroup H5O
+ *
+ * \brief Retrieves the metadata for an object specified by an identifier
+ *
+ * \fgdta_loc_obj_id{loc_id}
+ * \param[out] oinfo Buffer in which to return object information
+ * \param[in] fields Flags specifying the fields to include in \p oinfo
+ *
+ * \return \herr_t
+ *
+ * \deprecated As of HDF5-1.12 this function has been deprecated in favor of
+ * the function H5Oget_info3() or the macro H5Oget_info().
+ *
+ * \details H5Oget_info2() specifies an object by its identifier, \p loc_id , and
+ * retrieves the metadata describing that object in \p oinfo , an H5O_info1_t \c struct.
+ * This \c struct type is described in H5Oget_info1().
+ *
+ * The \p fields parameter contains flags to determine which fields will be filled in
+ * the H5O_info1_t \c struct returned in \p oinfo.
+ * These flags are defined in the H5Opublic.h file:
+ *
+ * \obj_info_fields
+ *
+ * \note If you are iterating through a lot of different objects to
+ * retrieve information via the H5Oget_info() family of routines,
+ * you may see memory building up. This can be due to memory
+ * allocation for metadata such as object headers and messages
+ * when the iterated objects are put into the metadata cache.
+ * \note
+ * If the memory buildup is not desirable, you can configure a
+ * smaller cache via H5Fset_mdc_config() or set the file access
+ * property list via H5Pset_mdc_config(). A smaller sized cache
+ * will force metadata entries to be evicted from the cache,
+ * thus freeing the memory associated with the entries.
+ *
+ * \since 1.10.3
+ *
+ */
H5_DLL herr_t H5Oget_info2(hid_t loc_id, H5O_info1_t *oinfo, unsigned fields);
+
+/**
+ *-------------------------------------------------------------------------
+ * \ingroup H5O
+ *
+ * \brief Retrieves the metadata for an object, identifying the object
+ * by location and relative name
+ *
+ * \fgdta_loc_obj_id{loc_id}
+ * \param[in] name Name of group, relative to \p loc_id
+ * \param[out] oinfo Buffer in which to return object information
+ * \param[in] fields Flags specifying the fields to include in \p oinfo
+ * \lapl_id
+ *
+ * \return \herr_t
+ *
+ * \deprecated As of HDF5-1.12 this function has been deprecated in favor of
+ * the function H5Oget_info_by_name3() or the macro H5Oget_info_by_name().
+ *
+ * \details H5Oget_info_by_name2() specifies an object’s location and name, \p loc_id and
+ * \p name, respectively, and retrieves the metadata describing
+ * that object in \p oinfo, an H5O_info1_t \c struct.
+ *
+ * The \c struct H5O_info1_t is defined in H5Opublic.h and described
+ * in the H5Oget_info1() function entry.
+ *
+ * The \p fields parameter contains flags to determine which fields
+ * will be filled in in the H5O_info1_t \c struct returned in
+ * \p oinfo. These flags are defined in the H5Opublic.h file:
+ *
+ * \obj_info_fields
+ *
+ * The link access property list, \p lapl_id, is not currently used;
+ * it should be passed in as #H5P_DEFAULT.
+ *
+ * \since 1.10.3
+ *
+ */
H5_DLL herr_t H5Oget_info_by_name2(hid_t loc_id, const char *name, H5O_info1_t *oinfo, unsigned fields,
hid_t lapl_id);
+
+/**
+ *-------------------------------------------------------------------------
+ * \ingroup H5O
+ *
+ * \brief Retrieves the metadata for an object, identifying the object
+ * by an index position
+ *
+ * \fgdta_loc_obj_id{loc_id}
+ * \param[in] group_name Name of group in which object is located
+ * \idx_type
+ * \order
+ * \param[in] n Position within the index
+ * \param[out] oinfo Buffer in which to return object information
+ * \param[in] fields Flags specifying the fields to include in \p oinfo
+ * \lapl_id
+ *
+ * \return \herr_t
+ *
+ * \deprecated As of HDF5-1.12 this function is deprecated in favor of
+ * the function H5Oget_info_by_idx3() or the macro #H5Oget_info_by_idx.
+ *
+ * \details H5Oget_info_by_idx2() retrieves the metadata describing an
+ * object in the \c struct \p oinfo, as specified by the location,
+ * \p loc_id, group name, \p group_name, the index by which objects
+ * in that group are tracked, \p idx_type, the order by which the
+ * index is to be traversed, \p order, and an object’s position
+ * \p n within that index.
+ *
+ * \p oinfo, in which the object information is returned, is a \c struct of
+ * type H5O_info1_t. This and other \c struct types used
+ * by H5Oget_info_by_idx2() are described in H5Oget_info_by_idx1().
+ *
+ * If \p loc_id fully specifies the group in which the object resides,
+ * i\p group_name can be a dot (\c .).
+ *
+ * The \p fields parameter contains flags to determine which fields will be
+ * filled in the H5O_info1_t \c struct returned in \p oinfo.
+ * These flags are defined in the H5Opublic.h file:
+ * \obj_info_fields
+ *
+ * The link access property list, \c lapl_id, is not currently used;
+ * it should be passed in as #H5P_DEFAULT.
+ *
+ * \since 1.10.3
+ *
+ */
H5_DLL herr_t H5Oget_info_by_idx2(hid_t loc_id, const char *group_name, H5_index_t idx_type,
H5_iter_order_t order, hsize_t n, H5O_info1_t *oinfo, unsigned fields,
hid_t lapl_id);
+
+/**
+ *-------------------------------------------------------------------------
+ * \ingroup H5O
+ *
+ * \brief Recursively visits all objects accessible from a specified object
+ *
+ * \fgdta_loc_obj_id{obj_id}
+ * \idx_type
+ * \order
+ * \param[in] op Callback function passing data regarding the object
+ * to the calling application
+ * \param[in] op_data User-defined pointer to data required by the application
+ * for its processing of the object
+ *
+ * \return On success, returns the return value of the first operator
+ * that returns a positive value, or zero if all members were
+ * processed with no operator returning non-zero.
+ *
+ * \return On failure, returns a negative value if something goes wrong
+ * within the library, or the first negative value returned by
+ * an operator.
+ *
+ * \deprecated As of HDF5-1.12 this function has been deprecated in favor of
+ * the function H5Ovisit3() or the macro #H5Ovisit.
+ *
+ * \details H5Ovisit1() is a recursive iteration function to visit the
+ * object \p obj_id and, if \p obj_id is a group, all objects in
+ * and below it in an HDF5 file, thus providing a mechanism for
+ * an application to perform a common set of operations across all
+ * of those objects or a dynamically selected subset. For
+ * non-recursive iteration across the members of a group,
+ * see H5Literate1().
+ *
+ * If \p obj_id is a group identifier, that group serves as the
+ * root of a recursive iteration. If \p obj_id is a file identifier,
+ * that file’s root group serves as the root of the recursive
+ * iteration. If \p obj_id is an attribute identifier,
+ * then the object where the attribute is attached will be iterated.
+ * If \p obj_id is any other type of object, such as a dataset or
+ * named datatype, there is no iteration.
+ *
+ * Two parameters are used to establish the iteration: \p idx_type
+ * and \p order.
+ *
+ * \p idx_type specifies the index to be used. If the links in
+ * a group have not been indexed by the index type, they will
+ * first be sorted by that index then the iteration will begin;
+ * if the links have been so indexed, the sorting step will be
+ * unnecessary, so the iteration may begin more quickly. Valid
+ * values include the following:
+ *
+ * \indexes
+ *
+ * Note that the index type passed in \p idx_type is a
+ * best effort setting. If the application passes in
+ * a value indicating iteration in creation order and a group is
+ * encountered that was not tracked in creation order, that group
+ * will be iterated over in alpha-numeric order by name, or
+ * name order. (Name order is the native order
+ * used by the HDF5 library and is always available.)
+ *
+ * \p order specifies the order in which objects are to be inspected
+ * along the index specified in \p idx_type. Valid values include
+ * the following:
+ *
+ * \orders
+ *
+ * The prototype of the callback function op is as follows (as
+ * defined in the source code file H5Opublic.h):
+ *
+ * \snippet this H5O_iterate1_t_snip
+ *
+ * The parameters of this callback function have the following values
+ * or meanings:
+ *
+ *
+ * \c obj |
+ * Object that serves as root of the iteration;
+ * same value as the H5Ovisit1() \p obj_id parameter |
+ *
+ *
+ * \c name |
+ * Name of object, relative to \c obj, being examined at
+ * current step of the iteration |
+ *
+ *
+ * \c info |
+ * H5O_info1_t \c struct containing information
+ * regarding that object |
+ *
+ *
+ * \c op_data |
+ * User-defined pointer to data required by the application in
+ * processing the object |
+ *
+ *
+ *
+ * The H5O_info1_t \c struct is defined in H5Opublic.h:
+ * \snippet this H5O_info1_t_snip
+ *
+ * The return values from an operator are:
+ * - Zero causes the visit iterator to continue, returning zero when all
+ * group members have been processed.
+ * - A positive value causes the visit iterator to immediately return that
+ * positive value, indicating short-circuit success.
+ * - A negative value causes the visit iterator to immediately return that
+ * value, indicating failure.
+ *
+ * The H5Ovisit1() \p op_data parameter is a user-defined pointer to the data
+ * required to process objects in the course of the iteration. This pointer
+ * is passed back to each step of the iteration in the callback
+ * function’s \p op_data parameter.
+ *
+ * H5Lvisit1() and H5Ovisit1() are companion functions: one for
+ * examining and operating on links; the other for examining
+ * and operating on the objects that those links point to. Both
+ * functions ensure that by the time the function completes
+ * successfully, every link or object below the specified point
+ * in the file has been presented to the application for whatever
+ * processing the application requires. These functions assume
+ * that the membership of the group being iterated over remains
+ * unchanged through the iteration; if any of the links in the
+ * group change during the iteration, the resulting behavior
+ * is undefined.
+ *
+ * \note \Bold{Programming Note for C++ Developers Using C Functions:}
+ * \note If a C routine that takes a function pointer as an argument is
+ * called from within C++ code, the C routine should be returned
+ * from normally.
+ *
+ * \note Examples of this kind of routine include callbacks such as
+ * H5Pset_elink_cb() and H5Pset_type_conv_cb() and
+ * functions such as H5Tconvert() and H5Ewalk2().
+ *
+ * \note Exiting the routine in its normal fashion allows the HDF5
+ * C library to clean up its work properly. In other words, if
+ * the C++ application jumps out of the routine back to the C++
+ * “catch” statement, the library is not given the opportunity
+ * to close any temporary data structures that were set up when
+ * the routine was called. The C++ application should save some
+ * state as the routine is started so that any problem that occurs
+ * might be diagnosed.
+ *
+ * \version 1.10.5 The macro #H5Ovisit was removed and the function
+ * H5Ovisit1() was copied to H5Ovisit().
+ * \version 1.10.3 Function H5Ovisit() was copied to H5Ovisit1(),
+ * and the macro #H5Ovisit was created.
+ * \version 1.8.8 Fortran subroutine introduced in this release.
+ *
+ * \since 1.8.0
+ *
+ */
H5_DLL herr_t H5Ovisit1(hid_t obj_id, H5_index_t idx_type, H5_iter_order_t order, H5O_iterate1_t op,
void *op_data);
+
+/**
+ *-------------------------------------------------------------------------
+ * \ingroup H5O
+ *
+ * \brief Recursively visits all objects starting from a specified object
+ *
+ * \fgdta_loc_obj_id{loc_id}
+ * \param[in] obj_name Name of the object, generally relative to
+ * \p loc_id, that will serve as root of the iteration
+ * \idx_type
+ * \order
+ * \param[in] op Callback function passing data regarding the object
+ * to the calling application
+ * \param[in] op_data User-defined pointer to data required by the application
+ * for its processing of the object
+ * \lapl_id
+ *
+ * \return On success, returns the return value of the first operator
+ * that returns a positive value, or zero if all members were
+ * processed with no operator returning non-zero.
+ *
+ * \return On failure, returns a negative value if something goes wrong
+ * within the library, or the first negative value returned by
+ * an operator.
+ *
+ * \deprecated As of HDF5-1.12 this function has been deprecated in favor of
+ * the function H5Ovisit_by_name3() or the macro #H5Ovisit_by_name.
+ *
+ * \details H5Ovisit_by_name1() is a recursive iteration function to visit
+ * the object specified by the \p loc_id / \p obj_name parameter
+ * pair and, if that object is a group, all objects in and below it
+ * in an HDF5 file, thus providing a mechanism for an application to
+ * perform a common set of operations across all of those objects or
+ * a dynamically selected subset. For non-recursive iteration across
+ * the members of a group, see H5Literate1().
+ *
+ * The object serving as the root of the iteration is specified
+ * by the \p loc_id / \p obj_name parameter pair. \p loc_id specifies
+ * a file or an object in a file; if \p loc_id is an attribute identifier,
+ * the object where the attribute is attached will be used.
+ * \p obj_name specifies either an object in the file (with an absolute
+ * name based in the file’s root group) or an object name relative
+ * to \p loc_id. If \p loc_id fully specifies the object that is to serve
+ * as the root of the iteration, \p obj_name should be '\c .' (a dot).
+ * (Note that when \p loc_id fully specifies the object that is to serve
+ * as the root of the iteration, the user may wish to consider
+ * using H5Ovisit1() instead of H5Ovisit_by_name1().)
+ *
+ * Two parameters are used to establish the iteration: \p idx_type
+ * and \p order.
+ *
+ * \p idx_type specifies the index to be used. If the links in
+ * a group have not been indexed by the index type, they will
+ * first be sorted by that index then the iteration will begin;
+ * if the links have been so indexed, the sorting step will be
+ * unnecessary, so the iteration may begin more quickly. Valid
+ * values include the following:
+ *
+ * \indexes
+ *
+ * Note that the index type passed in \p idx_type is a
+ * best effort setting. If the application passes in a
+ * value indicating iteration in creation order and a group is
+ * encountered that was not tracked in creation order, that group
+ * will be iterated over in alpha-numeric order by name, or
+ * name order. (Name order is the native order
+ * used by the HDF5 library and is always available.)
+ *
+ * \p order specifies the order in which objects are to be inspected
+ * along the index specified in \p idx_type. Valid values include
+ * the following:
+ *
+ * \orders
+ *
+ * The \p op callback function and the effect of the callback
+ * function’s return value on the application are described
+ * in H5Ovisit1().
+ *
+ * The H5O_info1_t \c struct is defined in H5Opublic.h
+ * and described in the H5Oget_info1() function entry.
+ *
+ * The H5Ovisit_by_name1() \p op_data parameter is a user-defined
+ * pointer to the data required to process objects in the course
+ * of the iteration. This pointer is passed back to each step of
+ * the iteration in the callback function’s \p op_data parameter.
+ *
+ * \p lapl_id is a link access property list. In the general case,
+ * when default link access properties are acceptable, this can
+ * be passed in as #H5P_DEFAULT. An example of a situation that
+ * requires a non-default link access property list is when
+ * the link is an external link; an external link may require
+ * that a link prefix be set in a link access property list
+ * (see H5Pset_elink_prefix()).
+ *
+ * H5Lvisit_by_name1() and H5Ovisit_by_name1() are companion
+ * functions: one for examining and operating on links; the other
+ * for examining and operating on the objects that those links point to.
+ * Both functions ensure that by the time the function completes
+ * successfully, every link or object below the specified point
+ * in the file has been presented to the application for whatever
+ * processing the application requires.
+ *
+ * \note \Bold{Programming Note for C++ Developers Using C Functions:}
+ * \note If a C routine that takes a function pointer as an argument is
+ * called from within C++ code, the C routine should be returned
+ * from normally.
+ *
+ * \note Examples of this kind of routine include callbacks such as
+ * H5Pset_elink_cb() and H5Pset_type_conv_cb() and
+ * functions such as H5Tconvert() and H5Ewalk2().
+ *
+ * \note Exiting the routine in its normal fashion allows the HDF5
+ * C library to clean up its work properly. In other words, if
+ * the C++ application jumps out of the routine back to the C++
+ * “catch” statement, the library is not given the opportunity
+ * to close any temporary data structures that were set up when
+ * the routine was called. The C++ application should save some
+ * state as the routine is started so that any problem that occurs
+ * might be diagnosed.
+ *
+ * \version 1.10.5 The macro #H5Ovisit_by_name was removed and the function
+ * H5Ovisit_by_name1() was copied to #H5Ovisit_by_name.
+ * \version 1.10.3 The H5Ovisit_by_name() function was renamed to H5Ovisit_by_name1(),
+ * and the macro #H5Ovisit_by_name was created.
+ * \version 1.8.11 Fortran subroutine introduced in this release.
+ *
+ * \since 1.8.0
+ *
+ */
H5_DLL herr_t H5Ovisit_by_name1(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
H5_iter_order_t order, H5O_iterate1_t op, void *op_data, hid_t lapl_id);
+
+/**
+ *-------------------------------------------------------------------------
+ * \ingroup H5O
+ *
+ * \brief Recursively visits all objects accessible from a specified object
+ *
+ * \fgdta_loc_obj_id{obj_id}
+ * \idx_type
+ * \order
+ * \param[in] op Callback function passing data regarding the object
+ * to the calling application
+ * \param[in] op_data User-defined pointer to data required by the application
+ * for its processing of the object
+ * \param[in] fields Flags specifying the fields to be retrieved to the
+ * callback \p op
+ *
+ * \return On success, returns the return value of the first operator
+ * that returns a positive value, or zero if all members were
+ * processed with no operator returning non-zero.
+ *
+ * \return On failure, returns a negative value if something goes wrong
+ * within the library, or the first negative value returned by
+ * an operator.
+ *
+ * \deprecated As of HDF5-1.12 this function has been deprecated in favor of
+ * the function H5Ovisit3() or the macro #H5Ovisit.
+ *
+ * \details H5Ovisit2() is a recursive iteration function to visit the
+ * object \p obj_id and, if \p obj_id is a group, all objects in
+ * and below it in an HDF5 file, thus providing a mechanism for
+ * an application to perform a common set of operations across all
+ * of those objects or a dynamically selected subset. For
+ * non-recursive iteration across the members of a group,
+ * see H5Literate1().
+ *
+ * If \p obj_id is a group identifier, that group serves as the
+ * root of a recursive iteration. If \p obj_id is a file identifier,
+ * that file’s root group serves as the root of the recursive
+ * iteration. If \p obj_id is an attribute identifier,
+ * then the object where the attribute is attached will be iterated.
+ * If \p obj_id is any other type of object, such as a dataset or
+ * named datatype, there is no iteration.
+ *
+ * Two parameters are used to establish the iteration: \p idx_type
+ * and \p order.
+ *
+ * \p idx_type specifies the index to be used. If the links in
+ * a group have not been indexed by the index type, they will
+ * first be sorted by that index then the iteration will begin;
+ * if the links have been so indexed, the sorting step will be
+ * unnecessary, so the iteration may begin more quickly. Valid
+ * values include the following:
+ *
+ * \indexes
+ *
+ * Note that the index type passed in \p idx_type is a
+ * best effort setting. If the application passes in
+ * a value indicating iteration in creation order and a group is
+ * encountered that was not tracked in creation order, that group
+ * will be iterated over in alpha-numeric order by name, or
+ * name order. (Name order is the native order
+ * used by the HDF5 library and is always available.)
+ *
+ * \p order specifies the order in which objects are to be inspected
+ * along the index specified in \p idx_type. Valid values include
+ * the following:
+ *
+ * \orders
+ *
+ * The prototype of the callback function op is as follows (as
+ * defined in the source code file H5Opublic.h):
+ *
+ * \snippet this H5O_iterate1_t_snip
+ *
+ * The parameters of this callback function have the following values
+ * or meanings:
+ *
+ *
+ * \c obj |
+ * Object that serves as root of the iteration;
+ * same value as the H5Ovisit1() \p obj_id parameter |
+ *
+ *
+ * \c name |
+ * Name of object, relative to \c obj, being examined at
+ * current step of the iteration |
+ *
+ *
+ * \c info |
+ * H5O_info1_t \c struct containing information
+ * regarding that object |
+ *
+ *
+ * \c op_data |
+ * User-defined pointer to data required by the application in
+ * processing the object; a pass-through of the \c op_data pointer
+ * provided with the H5Ovisit() function call |
+ *
+ *
+ *
+ * The H5O_info1_t \c struct is defined in H5Opublic.h and
+ * described in the H5Oget_info1() function entry.
+ *
+ * The return values from an operator are:
+ * - Zero causes the visit iterator to continue, returning zero when all
+ * group members have been processed.
+ * - A positive value causes the visit iterator to immediately return that
+ * positive value, indicating short-circuit success.
+ * - A negative value causes the visit iterator to immediately return that
+ * value, indicating failure.
+ *
+ * The H5Ovisit2() \p op_data parameter is a user-defined pointer to the data
+ * required to process objects in the course of the iteration. This pointer
+ * is passed back to each step of the iteration in the callback
+ * function’s \p op_data parameter.
+ *
+ * The \p fields parameter contains flags to determine which fields will
+ * be retrieved by the \p op callback function. These flags are defined
+ * in the H5Opublic.h file:
+ * \obj_info_fields
+ *
+ * H5Lvisit() and H5Ovisit() are companion functions: one for
+ * examining and operating on links; the other for examining
+ * and operating on the objects that those links point to. Both
+ * functions ensure that by the time the function completes
+ * successfully, every link or object below the specified point
+ * in the file has been presented to the application for whatever
+ * processing the application requires. These functions assume
+ * that the membership of the group being iterated over remains
+ * unchanged through the iteration; if any of the links in the
+ * group change during the iteration, the resulting behavior
+ * is undefined.
+ *
+ * \note \Bold{Programming Note for C++ Developers Using C Functions:}
+ * \note If a C routine that takes a function pointer as an argument is
+ * called from within C++ code, the C routine should be returned
+ * from normally.
+ *
+ * \note Examples of this kind of routine include callbacks such as
+ * H5Pset_elink_cb() and H5Pset_type_conv_cb() and
+ * functions such as H5Tconvert() and H5Ewalk2().
+ *
+ * \note Exiting the routine in its normal fashion allows the HDF5
+ * C library to clean up its work properly. In other words, if
+ * the C++ application jumps out of the routine back to the C++
+ * “catch” statement, the library is not given the opportunity
+ * to close any temporary data structures that were set up when
+ * the routine was called. The C++ application should save some
+ * state as the routine is started so that any problem that occurs
+ * might be diagnosed.
+ *
+ * \since 1.10.3
+ *
+ */
H5_DLL herr_t H5Ovisit2(hid_t obj_id, H5_index_t idx_type, H5_iter_order_t order, H5O_iterate1_t op,
void *op_data, unsigned fields);
+
+/**
+ *-------------------------------------------------------------------------
+ * \ingroup H5O
+ *
+ * \brief Recursively visits all objects starting from a specified object
+ *
+ * \fgdta_loc_obj_id{loc_id}
+ * \param[in] obj_name Name of the object, generally relative to
+ * \p loc_id, that will serve as root of the iteration
+ * \idx_type
+ * \order
+ * \param[in] op Callback function passing data regarding the object
+ * to the calling application
+ * \param[in] op_data User-defined pointer to data required by the application
+ * for its processing of the object
+ * \param[in] fields Flags specifying the fields to be retrieved to the
+ * callback function \p op
+ * \lapl_id
+ *
+ * \return On success, returns the return value of the first operator
+ * that returns a positive value, or zero if all members were
+ * processed with no operator returning non-zero.
+ *
+ * \return On failure, returns a negative value if something goes wrong
+ * within the library, or the first negative value returned by
+ * an operator.
+ *
+ * \deprecated As of HDF5-1.12 this function has been deprecated in favor of
+ * the function H5Ovisit_by_name3() or the macro #H5Ovisit_by_name.
+ *
+ * \details H5Ovisit_by_name2() is a recursive iteration function to visit
+ * the object specified by the \p loc_id / \p obj_name parameter
+ * pair and, if that object is a group, all objects in and below it
+ * in an HDF5 file, thus providing a mechanism for an application to
+ * perform a common set of operations across all of those objects or
+ * a dynamically selected subset. For non-recursive iteration across
+ * the members of a group, see #H5Literate.
+ *
+ * The object serving as the root of the iteration is specified
+ * by the \p loc_id / \p obj_name parameter pair. \p loc_id specifies
+ * a file or an object in a file; if \p loc_id is an attribute identifier,
+ * the object where the attribute is attached will be used.
+ * \p obj_name specifies either an object in the file (with an absolute
+ * name based in the file’s root group) or an object name relative
+ * to \p loc_id. If \p loc_id fully specifies the object that is to serve
+ * as the root of the iteration, \p obj_name should be '\c .' (a dot).
+ * (Note that when \p loc_id fully specifies the object that is to serve
+ * as the root of the iteration, the user may wish to consider
+ * using H5Ovisit2() instead of #H5Ovisit_by_name.)
+ *
+ * Two parameters are used to establish the iteration: \p idx_type
+ * and \p order.
+ *
+ * \p idx_type specifies the index to be used. If the links in
+ * a group have not been indexed by the index type, they will
+ * first be sorted by that index then the iteration will begin;
+ * if the links have been so indexed, the sorting step will be
+ * unnecessary, so the iteration may begin more quickly. Valid
+ * values include the following:
+ *
+ * \indexes
+ *
+ * Note that the index type passed in \p idx_type is a
+ * best effort setting. If the application passes in a
+ * value indicating iteration in creation order and a group is
+ * encountered that was not tracked in creation order, that group
+ * will be iterated over in alpha-numeric order by name, or
+ * name order. (Name order is the native order
+ * used by the HDF5 library and is always available.)
+ *
+ * \p order specifies the order in which objects are to be inspected
+ * along the index specified in \p idx_type. Valid values include
+ * the following:
+ *
+ * \orders
+ *
+ * The \p op callback function and the effect of the callback
+ * function’s return value on the application are described
+ * in H5Ovisit2().
+ *
+ * The H5O_info1_t \c struct is defined in H5Opublic.h
+ * and described in the H5Oget_info1() function entry.
+ *
+ * The H5Ovisit_by_name2() \p op_data parameter is a user-defined
+ * pointer to the data required to process objects in the course
+ * of the iteration. This pointer is passed back to each step of
+ * the iteration in the callback function’s \p op_data parameter.
+ *
+ * \p lapl_id is a link access property list. In the general case,
+ * when default link access properties are acceptable, this can
+ * be passed in as #H5P_DEFAULT. An example of a situation that
+ * requires a non-default link access property list is when
+ * the link is an external link; an external link may require
+ * that a link prefix be set in a link access property list
+ * (see H5Pset_elink_prefix()).
+ *
+ * The \p fields parameter contains flags to determine which fields will
+ * be retrieved by the \p op callback function. These flags are defined
+ * in the H5Opublic.h file:
+ * \obj_info_fields
+ *
+ * #H5Lvisit_by_name and #H5Ovisit_by_name are companion
+ * functions: one for examining and operating on links; the other
+ * for examining and operating on the objects that those links point to.
+ * Both functions ensure that by the time the function completes
+ * successfully, every link or object below the specified point
+ * in the file has been presented to the application for whatever
+ * processing the application requires.
+ *
+ * \note \Bold{Programming Note for C++ Developers Using C Functions:}
+ * \note If a C routine that takes a function pointer as an argument is
+ * called from within C++ code, the C routine should be returned
+ * from normally.
+ *
+ * \note Examples of this kind of routine include callbacks such as
+ * H5Pset_elink_cb() and H5Pset_type_conv_cb() and
+ * functions such as H5Tconvert() and H5Ewalk2().
+ *
+ * \note Exiting the routine in its normal fashion allows the HDF5
+ * C library to clean up its work properly. In other words, if
+ * the C++ application jumps out of the routine back to the C++
+ * “catch” statement, the library is not given the opportunity
+ * to close any temporary data structures that were set up when
+ * the routine was called. The C++ application should save some
+ * state as the routine is started so that any problem that occurs
+ * might be diagnosed.
+ *
+ * \since 1.10.3
+ *
+ */
H5_DLL herr_t H5Ovisit_by_name2(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
H5_iter_order_t order, H5O_iterate1_t op, void *op_data, unsigned fields,
hid_t lapl_id);
diff --git a/src/H5Osdspace.c b/src/H5Osdspace.c
index 2cdf6ecab0b..dab989f4d87 100644
--- a/src/H5Osdspace.c
+++ b/src/H5Osdspace.c
@@ -106,12 +106,13 @@ H5FL_ARR_EXTERN(hsize_t);
--------------------------------------------------------------------------*/
static void *
H5O__sdspace_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUSED mesg_flags,
- unsigned H5_ATTR_UNUSED *ioflags, size_t H5_ATTR_UNUSED p_size, const uint8_t *p)
+ unsigned H5_ATTR_UNUSED *ioflags, size_t p_size, const uint8_t *p)
{
- H5S_extent_t *sdim = NULL; /* New extent dimensionality structure */
- unsigned flags, version;
- unsigned i; /* Local counting variable */
- void * ret_value = NULL; /* Return value */
+ H5S_extent_t * sdim = NULL; /* New extent dimensionality structure */
+ unsigned flags, version;
+ unsigned i; /* Local counting variable */
+ const uint8_t *p_end = p + p_size - 1; /* End of the p buffer */
+ void * ret_value = NULL; /* Return value */
FUNC_ENTER_STATIC
@@ -161,6 +162,13 @@ H5O__sdspace_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UN
/* Decode dimension sizes */
if (sdim->rank > 0) {
+ /* Ensure that rank doesn't cause reading passed buffer's end,
+ due to possible data corruption */
+ uint8_t sizeof_size = H5F_SIZEOF_SIZE(f);
+ if (p + (sizeof_size * sdim->rank - 1) > p_end) {
+ HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "rank might cause reading passed buffer's end")
+ }
+
if (NULL == (sdim->size = (hsize_t *)H5FL_ARR_MALLOC(hsize_t, (size_t)sdim->rank)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
@@ -170,6 +178,11 @@ H5O__sdspace_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UN
if (flags & H5S_VALID_MAX) {
if (NULL == (sdim->max = (hsize_t *)H5FL_ARR_MALLOC(hsize_t, (size_t)sdim->rank)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+
+ /* Ensure that rank doesn't cause reading passed buffer's end */
+ if (p + (sizeof_size * sdim->rank - 1) > p_end)
+ HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "rank might cause reading passed buffer's end")
+
for (i = 0; i < sdim->rank; i++)
H5F_DECODE_LENGTH(f, p, sdim->max[i]);
} /* end if */
diff --git a/src/H5PL.c b/src/H5PL.c
index 4556885c250..06443f3661c 100644
--- a/src/H5PL.c
+++ b/src/H5PL.c
@@ -104,12 +104,12 @@ H5PLset_loading_state(unsigned int plugin_control_mask)
*-------------------------------------------------------------------------
*/
herr_t
-H5PLget_loading_state(unsigned int *plugin_control_mask)
+H5PLget_loading_state(unsigned *plugin_control_mask /*out*/)
{
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
- H5TRACE1("e", "*Iu", plugin_control_mask);
+ H5TRACE1("e", "x", plugin_control_mask);
if (NULL == plugin_control_mask)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "plugin_control_mask parameter cannot be NULL")
diff --git a/src/H5PLint.c b/src/H5PLint.c
index 2eeaafa9a44..cf6135da9fe 100644
--- a/src/H5PLint.c
+++ b/src/H5PLint.c
@@ -293,12 +293,14 @@ H5PL_load(H5PL_type_t type, const H5PL_key_t *key)
H5_GCC_DIAG_OFF("pedantic")
herr_t
H5PL__open(const char *path, H5PL_type_t type, const H5PL_key_t *key, hbool_t *success,
- const void **plugin_info)
+ H5PL_type_t *plugin_type, const void **plugin_info)
{
H5PL_HANDLE handle = NULL;
H5PL_get_plugin_type_t get_plugin_type = NULL;
H5PL_get_plugin_info_t get_plugin_info = NULL;
- herr_t ret_value = SUCCEED;
+ H5PL_type_t loaded_plugin_type;
+ H5PL_key_t tmp_key;
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_PACKAGE
@@ -310,6 +312,8 @@ H5PL__open(const char *path, H5PL_type_t type, const H5PL_key_t *key, hbool_t *s
/* Initialize out parameters */
*success = FALSE;
*plugin_info = NULL;
+ if (plugin_type)
+ *plugin_type = H5PL_TYPE_ERROR;
/* There are different reasons why a library can't be open, e.g. wrong architecture.
* If we can't open the library, just return.
@@ -332,11 +336,12 @@ H5PL__open(const char *path, H5PL_type_t type, const H5PL_key_t *key, hbool_t *s
HGOTO_DONE(SUCCEED)
/* Check the plugin type and return if it doesn't match the one passed in */
- if (type != (H5PL_type_t)(*get_plugin_type)())
+ loaded_plugin_type = (H5PL_type_t)(*get_plugin_type)();
+ if ((type != H5PL_TYPE_NONE) && (type != loaded_plugin_type))
HGOTO_DONE(SUCCEED)
/* Get the plugin information */
- switch (type) {
+ switch (loaded_plugin_type) {
case H5PL_TYPE_FILTER: {
const H5Z_class2_t *filter_info;
@@ -344,8 +349,16 @@ H5PL__open(const char *path, H5PL_type_t type, const H5PL_key_t *key, hbool_t *s
if (NULL == (filter_info = (const H5Z_class2_t *)(*get_plugin_info)()))
HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, FAIL, "can't get filter info from plugin")
+ /* Setup temporary plugin key if one wasn't supplied */
+ if (!key) {
+ tmp_key.id = filter_info->id;
+ key = &tmp_key;
+ }
+
/* If the filter IDs match, we're done. Set the output parameters. */
if (filter_info->id == key->id) {
+ if (plugin_type)
+ *plugin_type = H5PL_TYPE_FILTER;
*plugin_info = (const void *)filter_info;
*success = TRUE;
}
@@ -354,30 +367,29 @@ H5PL__open(const char *path, H5PL_type_t type, const H5PL_key_t *key, hbool_t *s
}
case H5PL_TYPE_VOL: {
- const H5VL_class_t *cls;
+ const void *cls;
/* Get the plugin info */
- if (NULL == (cls = (const H5VL_class_t *)(*get_plugin_info)()))
+ if (NULL == (cls = (const void *)(*get_plugin_info)()))
HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, FAIL, "can't get VOL connector info from plugin")
- /* Which kind of key are we looking for? */
- if (key->vol.kind == H5VL_GET_CONNECTOR_BY_NAME) {
- /* If the plugin names match, we're done. Set the output parameters. */
- if (cls->name && !HDstrcmp(cls->name, key->vol.u.name)) {
- *plugin_info = (const void *)cls;
- *success = TRUE;
- } /* end if */
- } /* end if */
- else {
- /* Sanity check */
- HDassert(key->vol.kind == H5VL_GET_CONNECTOR_BY_VALUE);
-
- /* If the plugin values match, we're done. Set the output parameters. */
- if (cls->value == key->vol.u.value) {
- *plugin_info = (const void *)cls;
- *success = TRUE;
- } /* end if */
- } /* end else */
+ /* Setup temporary plugin key if one wasn't supplied */
+ if (!key) {
+ tmp_key.vol.kind = H5VL_GET_CONNECTOR_BY_NAME;
+ tmp_key.vol.u.name = ((const H5VL_class_t *)cls)->name;
+ key = &tmp_key;
+ }
+
+ /* Ask VOL interface if this class is the one we are looking for and is compatible, etc */
+ if (H5VL_check_plugin_load(cls, key, success) < 0)
+ HGOTO_ERROR(H5E_PLUGIN, H5E_CANTLOAD, FAIL, "VOL connector compatibility check failed")
+
+ /* Check for finding the correct plugin */
+ if (*success) {
+ if (plugin_type)
+ *plugin_type = H5PL_TYPE_VOL;
+ *plugin_info = cls;
+ }
break;
}
@@ -390,7 +402,7 @@ H5PL__open(const char *path, H5PL_type_t type, const H5PL_key_t *key, hbool_t *s
/* If we found the correct plugin, store it in the cache */
if (*success)
- if (H5PL__add_plugin(type, key, handle))
+ if (H5PL__add_plugin(loaded_plugin_type, key, handle))
HGOTO_ERROR(H5E_PLUGIN, H5E_CANTINSERT, FAIL, "unable to add new plugin to plugin cache")
done:
@@ -420,3 +432,29 @@ H5PL__close(H5PL_HANDLE handle)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5PL__close() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5PL_iterate
+ *
+ * Purpose: Iterates over all the available plugins and calls the
+ * specified callback function on each plugin.
+ *
+ * Return: H5_ITER_CONT if all plugins are processed successfully
+ * H5_ITER_STOP if short-circuit success occurs while
+ * processing plugins
+ * H5_ITER_ERROR if an error occurs while processing plugins
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5PL_iterate(H5PL_iterate_type_t iter_type, H5PL_iterate_t iter_op, void *op_data)
+{
+ herr_t ret_value = H5_ITER_CONT;
+
+ FUNC_ENTER_NOAPI(H5_ITER_ERROR)
+
+ ret_value = H5PL__path_table_iterate(iter_type, iter_op, op_data);
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5PL_iterate() */
diff --git a/src/H5PLpath.c b/src/H5PLpath.c
index 0aaa5b1fe75..39a7d0dc11d 100644
--- a/src/H5PLpath.c
+++ b/src/H5PLpath.c
@@ -62,6 +62,8 @@ static herr_t H5PL__insert_at(const char *path, unsigned int idx);
static herr_t H5PL__make_space_at(unsigned int idx);
static herr_t H5PL__replace_at(const char *path, unsigned int idx);
static herr_t H5PL__expand_path_table(void);
+static herr_t H5PL__path_table_iterate_process_path(const char *plugin_path, H5PL_iterate_type_t iter_type,
+ H5PL_iterate_t iter_op, void *op_data);
static herr_t H5PL__find_plugin_in_path(const H5PL_search_params_t *search_params, hbool_t *found,
const char *dir, const void **plugin_info);
@@ -546,7 +548,220 @@ H5PL__get_path(unsigned int idx)
return H5PL_paths_g[idx];
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5PL__replace_path() */
+} /* end H5PL__get_path() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5PL__path_table_iterate
+ *
+ * Purpose: Iterates over all the plugins in the plugin path table and
+ * calls the specified callback function on each plugin found.
+ *
+ * Return: H5_ITER_CONT if all plugins are processed successfully
+ * H5_ITER_STOP if short-circuit success occurs while
+ * processing plugins
+ * H5_ITER_ERROR if an error occurs while processing plugins
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5PL__path_table_iterate(H5PL_iterate_type_t iter_type, H5PL_iterate_t iter_op, void *op_data)
+{
+ unsigned int u;
+ herr_t ret_value = H5_ITER_CONT;
+
+ FUNC_ENTER_PACKAGE
+
+ for (u = 0; (u < H5PL_num_paths_g) && (ret_value == H5_ITER_CONT); u++)
+ ret_value = H5PL__path_table_iterate_process_path(H5PL_paths_g[u], iter_type, iter_op, op_data);
+
+ if (ret_value < 0)
+ HGOTO_ERROR(H5E_PLUGIN, H5E_BADITER, H5_ITER_ERROR, "can't iterate over plugins in plugin path '%s'",
+ H5PL_paths_g[u]);
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value);
+} /* end H5PL__path_table_iterate() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5PL__path_table_iterate_process_path
+ *
+ * Purpose: Iterates over all the plugins within a single plugin path
+ * entry in the plugin path table and calls the specified
+ * callback function on each plugin found. Two function
+ * definitions are for Unix and Windows.
+ *
+ * Return: H5_ITER_CONT if all plugins are processed successfully
+ * H5_ITER_STOP if short-circuit success occurs while
+ * processing plugins
+ * H5_ITER_ERROR if an error occurs while processing plugins
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifndef H5_HAVE_WIN32_API
+static herr_t
+H5PL__path_table_iterate_process_path(const char *plugin_path, H5PL_iterate_type_t iter_type,
+ H5PL_iterate_t iter_op, void *op_data)
+{
+ H5PL_type_t plugin_type;
+ const void * plugin_info = NULL;
+ hbool_t plugin_loaded;
+ char * path = NULL;
+ DIR * dirp = NULL; /* Directory stream */
+ struct dirent *dp = NULL; /* Directory entry */
+ herr_t ret_value = H5_ITER_CONT;
+
+ FUNC_ENTER_STATIC
+
+ HDassert(plugin_path);
+ HDassert(iter_op);
+
+ /* Open the directory */
+ if (!(dirp = HDopendir(plugin_path)))
+ HGOTO_ERROR(H5E_PLUGIN, H5E_OPENERROR, H5_ITER_ERROR, "can't open directory: %s", plugin_path)
+
+ /* Iterate through all entries in the directory */
+ while (NULL != (dp = HDreaddir(dirp))) {
+ /* The library we are looking for should be called libxxx.so... on Unix
+ * or libxxx.xxx.dylib on Mac.
+ */
+#ifndef __CYGWIN__
+ if (!HDstrncmp(dp->d_name, "lib", (size_t)3) &&
+ (HDstrstr(dp->d_name, ".so") || HDstrstr(dp->d_name, ".dylib"))) {
+#else
+ if (!HDstrncmp(dp->d_name, "cyg", (size_t)3) && HDstrstr(dp->d_name, ".dll")) {
+#endif
+
+ hbool_t plugin_matches;
+ h5_stat_t my_stat;
+ size_t len;
+
+ /* Allocate & initialize the path name */
+ len = HDstrlen(plugin_path) + HDstrlen(H5PL_PATH_SEPARATOR) + HDstrlen(dp->d_name) + 1 /*\0*/ +
+ 4; /* Extra "+4" to quiet GCC warning - 2019/07/05, QAK */
+
+ if (NULL == (path = (char *)H5MM_calloc(len)))
+ HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, H5_ITER_ERROR, "can't allocate memory for path")
+
+ HDsnprintf(path, len, "%s/%s", plugin_path, dp->d_name);
+
+ /* Get info for directory entry */
+ if (HDstat(path, &my_stat) == -1)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTGET, H5_ITER_ERROR, "can't stat file %s -- error was: %s", path,
+ HDstrerror(errno))
+
+ /* If it is a directory, skip it */
+ if (S_ISDIR(my_stat.st_mode))
+ continue;
+
+ /* Attempt to open the dynamic library */
+ plugin_type = H5PL_TYPE_ERROR;
+ plugin_info = NULL;
+ plugin_loaded = FALSE;
+ if (H5PL__open(path, H5PL_TYPE_NONE, NULL, &plugin_loaded, &plugin_type, &plugin_info) < 0)
+ HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, H5_ITER_ERROR, "failed to open plugin '%s'", path);
+
+ /* Determine if we should process this plugin */
+ plugin_matches = (iter_type == H5PL_ITER_TYPE_ALL) ||
+ ((iter_type == H5PL_ITER_TYPE_FILTER) && (plugin_type == H5PL_TYPE_FILTER)) ||
+ ((iter_type == H5PL_ITER_TYPE_VOL) && (plugin_type == H5PL_TYPE_VOL));
+
+ /* If the plugin was successfully loaded, call supplied callback function on plugin */
+ if (plugin_loaded && plugin_matches && (ret_value = iter_op(plugin_type, plugin_info, op_data)))
+ break;
+
+ path = (char *)H5MM_xfree(path);
+ } /* end if */
+ } /* end while */
+
+ if (ret_value < 0)
+ HERROR(H5E_PLUGIN, H5E_CALLBACK, "callback operator function returned failure");
+
+done:
+ if (dirp)
+ if (HDclosedir(dirp) < 0)
+ HDONE_ERROR(H5E_FILE, H5E_CLOSEERROR, H5_ITER_ERROR, "can't close directory: %s",
+ HDstrerror(errno))
+
+ path = (char *)H5MM_xfree(path);
+
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5PL__path_table_iterate_process_path() */
+#else /* H5_HAVE_WIN32_API */
+static herr_t
+H5PL__path_table_iterate_process_path(const char *plugin_path, H5PL_iterate_type_t iter_type,
+ H5PL_iterate_t iter_op, void *op_data)
+{
+ WIN32_FIND_DATAA fdFile;
+ HANDLE hFind = INVALID_HANDLE_VALUE;
+ H5PL_type_t plugin_type;
+ const void * plugin_info = NULL;
+ hbool_t plugin_loaded;
+ char * path = NULL;
+ char service[2048];
+ herr_t ret_value = H5_ITER_CONT;
+
+ FUNC_ENTER_STATIC
+
+ /* Check args - Just assert on package functions */
+ HDassert(plugin_path);
+ HDassert(iter_op);
+
+ /* Specify a file mask. *.* = We want everything! */
+ HDsprintf(service, "%s\\*.dll", plugin_path);
+ if ((hFind = FindFirstFileA(service, &fdFile)) == INVALID_HANDLE_VALUE)
+ HGOTO_ERROR(H5E_PLUGIN, H5E_OPENERROR, H5_ITER_ERROR, "can't open directory")
+
+ /* Loop over all the files */
+ do {
+ /* Ignore '.' and '..' */
+ if (HDstrcmp(fdFile.cFileName, ".") != 0 && HDstrcmp(fdFile.cFileName, "..") != 0) {
+ hbool_t plugin_matches;
+ size_t len;
+
+ /* Allocate & initialize the path name */
+ len = HDstrlen(plugin_path) + HDstrlen(H5PL_PATH_SEPARATOR) + HDstrlen(fdFile.cFileName) + 1;
+
+ if (NULL == (path = (char *)H5MM_calloc(len)))
+ HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, H5_ITER_ERROR, "can't allocate memory for path")
+
+ HDsnprintf(path, len, "%s\\%s", plugin_path, fdFile.cFileName);
+
+ /* Ignore directories */
+ if (fdFile.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
+ continue;
+
+ /* Attempt to open the dynamic library */
+ plugin_type = H5PL_TYPE_ERROR;
+ plugin_info = NULL;
+ plugin_loaded = FALSE;
+ if (H5PL__open(path, H5PL_TYPE_NONE, NULL, &plugin_loaded, &plugin_type, &plugin_info) < 0)
+ HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, H5_ITER_ERROR, "failed to open plugin '%s'", path);
+
+ /* Determine if we should process this plugin */
+ plugin_matches = (iter_type == H5PL_ITER_TYPE_ALL) ||
+ ((iter_type == H5PL_ITER_TYPE_FILTER) && (plugin_type == H5PL_TYPE_FILTER)) ||
+ ((iter_type == H5PL_ITER_TYPE_VOL) && (plugin_type == H5PL_TYPE_VOL));
+
+ /* If the plugin was successfully loaded, call supplied callback function on plugin */
+ if (plugin_loaded && plugin_matches && (ret_value = iter_op(plugin_type, plugin_info, op_data)))
+ break;
+
+ path = (char *)H5MM_xfree(path);
+ }
+ } while (FindNextFileA(hFind, &fdFile));
+
+ if (ret_value < 0)
+ HERROR(H5E_PLUGIN, H5E_CALLBACK, "callback operator function returned failure");
+
+done:
+ if (hFind != INVALID_HANDLE_VALUE)
+ FindClose(hFind);
+
+ path = (char *)H5MM_xfree(path);
+
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5PL__path_table_iterate_process_path() */
+#endif /* H5_HAVE_WIN32_API */
/*-------------------------------------------------------------------------
* Function: H5PL__find_plugin_in_path_table
@@ -669,11 +884,13 @@ H5PL__find_plugin_in_path(const H5PL_search_params_t *search_params, hbool_t *fo
HDstrerror(errno))
/* If it is a directory, skip it */
- if (S_ISDIR(my_stat.st_mode))
+ if (S_ISDIR(my_stat.st_mode)) {
+ path = (char *)H5MM_xfree(path);
continue;
+ }
- /* attempt to open the dynamic library as a filter library */
- if (H5PL__open(path, search_params->type, search_params->key, found, plugin_info) < 0)
+ /* attempt to open the dynamic library */
+ if (H5PL__open(path, search_params->type, search_params->key, found, NULL, plugin_info) < 0)
HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, FAIL, "search in directory failed")
if (*found)
HGOTO_DONE(SUCCEED)
@@ -739,8 +956,8 @@ H5PL__find_plugin_in_path(const H5PL_search_params_t *search_params, hbool_t *fo
if (fdFile.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
continue;
- /* attempt to open the dynamic library as a filter library */
- if (H5PL__open(path, search_params->type, search_params->key, found, plugin_info) < 0)
+ /* attempt to open the dynamic library */
+ if (H5PL__open(path, search_params->type, search_params->key, found, NULL, plugin_info) < 0)
HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, FAIL, "search in directory failed")
if (*found)
HGOTO_DONE(SUCCEED)
diff --git a/src/H5PLpkg.h b/src/H5PLpkg.h
index 627a5cc3eaa..cffc358ae0e 100644
--- a/src/H5PLpkg.h
+++ b/src/H5PLpkg.h
@@ -94,7 +94,7 @@ typedef const void *(__cdecl *H5PL_get_plugin_info_t)(void);
#define H5PL_HANDLE void *
/* Get a handle to a plugin library. Windows: TEXT macro handles Unicode strings */
-#define H5PL_OPEN_DLIB(S) dlopen(S, RTLD_LAZY)
+#define H5PL_OPEN_DLIB(S) dlopen(S, RTLD_LAZY | RTLD_LOCAL)
/* Get the address of a symbol in dynamic library */
#define H5PL_GET_LIB_FUNC(H, N) dlsym(H, N)
@@ -133,7 +133,8 @@ H5_DLL herr_t H5PL__set_plugin_control_mask(unsigned int mask);
/* Plugin search and manipulation */
H5_DLL herr_t H5PL__open(const char *libname, H5PL_type_t type, const H5PL_key_t *key,
- hbool_t *success /*out*/, const void **plugin_info /*out*/);
+ hbool_t *success /*out*/, H5PL_type_t *plugin_type /*out*/,
+ const void **plugin_info /*out*/);
H5_DLL herr_t H5PL__close(H5PL_HANDLE handle);
/* Plugin cache calls */
@@ -153,7 +154,8 @@ H5_DLL herr_t H5PL__replace_path(const char *path, unsigned int index);
H5_DLL herr_t H5PL__insert_path(const char *path, unsigned int index);
H5_DLL herr_t H5PL__remove_path(unsigned int index);
H5_DLL const char *H5PL__get_path(unsigned int index);
-H5_DLL herr_t H5PL__find_plugin_in_path_table(const H5PL_search_params_t *search_params,
- hbool_t *found /*out*/, const void **plugin_info /*out*/);
+H5_DLL herr_t H5PL__path_table_iterate(H5PL_iterate_type_t iter_type, H5PL_iterate_t iter_op, void *op_data);
+H5_DLL herr_t H5PL__find_plugin_in_path_table(const H5PL_search_params_t *search_params,
+ hbool_t *found /*out*/, const void **plugin_info /*out*/);
#endif /* H5PLpkg_H */
diff --git a/src/H5PLplugin_cache.c b/src/H5PLplugin_cache.c
index 970b51124ab..2ec08450012 100644
--- a/src/H5PLplugin_cache.c
+++ b/src/H5PLplugin_cache.c
@@ -264,12 +264,12 @@ H5PL__find_plugin_in_cache(const H5PL_search_params_t *search_params, hbool_t *f
/* Loop over all the plugins, looking for one that matches */
for (u = 0; u < H5PL_num_plugins_g; u++) {
- /* If the plugin type (filter, etc.) and ID match, query the plugin for its info */
+ /* If the plugin type (filter, VOL connector, etc.) and ID match, query the plugin for its info */
if ((search_params->type == (H5PL_cache_g[u]).type) &&
(search_params->key->id == (H5PL_cache_g[u]).key.id)) {
H5PL_get_plugin_info_t get_plugin_info_function;
- const H5Z_class2_t * filter_info;
+ const void * info;
/* Get the "get plugin info" function from the plugin. */
if (NULL == (get_plugin_info_function = (H5PL_get_plugin_info_t)H5PL_GET_LIB_FUNC(
@@ -277,12 +277,12 @@ H5PL__find_plugin_in_cache(const H5PL_search_params_t *search_params, hbool_t *f
HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, FAIL, "can't get function for H5PLget_plugin_info")
/* Call the "get plugin info" function */
- if (NULL == (filter_info = (const H5Z_class2_t *)(*get_plugin_info_function)()))
+ if (NULL == (info = (*get_plugin_info_function)()))
HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, FAIL, "can't get plugin info")
/* Set output parameters */
*found = TRUE;
- *plugin_info = filter_info;
+ *plugin_info = info;
/* No need to continue processing */
break;
diff --git a/src/H5PLprivate.h b/src/H5PLprivate.h
index 36b8ba2156f..7eae513d36f 100644
--- a/src/H5PLprivate.h
+++ b/src/H5PLprivate.h
@@ -44,6 +44,18 @@ typedef union H5PL_key_t {
} vol;
} H5PL_key_t;
+/* Enum dictating the type of plugins to process
+ * when iterating through available plugins
+ */
+typedef enum {
+ H5PL_ITER_TYPE_FILTER,
+ H5PL_ITER_TYPE_VOL,
+ H5PL_ITER_TYPE_ALL,
+} H5PL_iterate_type_t;
+
+/* Callback function for iterating through the available plugins */
+typedef herr_t (*H5PL_iterate_t)(H5PL_type_t plugin_type, const void *plugin_info, void *op_data);
+
/*****************************/
/* Library-private Variables */
/*****************************/
@@ -54,5 +66,6 @@ typedef union H5PL_key_t {
/* Internal API routines */
H5_DLL const void *H5PL_load(H5PL_type_t plugin_type, const H5PL_key_t *key);
+H5_DLL herr_t H5PL_iterate(H5PL_iterate_type_t iter_type, H5PL_iterate_t iter_op, void *op_data);
#endif /* H5PLprivate_H */
diff --git a/src/H5PLpublic.h b/src/H5PLpublic.h
index 0b8d713a2d1..55ff59485f1 100644
--- a/src/H5PLpublic.h
+++ b/src/H5PLpublic.h
@@ -28,13 +28,17 @@
*/
#define H5PL_NO_PLUGIN "::"
-/* Plugin type used by the plugin library */
+//!
+/**
+ * Plugin type (bit-position) used by the plugin library
+ */
typedef enum H5PL_type_t {
- H5PL_TYPE_ERROR = -1, /* Error */
- H5PL_TYPE_FILTER = 0, /* Filter */
- H5PL_TYPE_VOL = 1, /* VOL driver */
- H5PL_TYPE_NONE = 2 /* This must be last! */
+ H5PL_TYPE_ERROR = -1, /**< Error */
+ H5PL_TYPE_FILTER = 0, /**< Filter */
+ H5PL_TYPE_VOL = 1, /**< VOL driver */
+ H5PL_TYPE_NONE = 2 /**< Sentinel: This must be last! */
} H5PL_type_t;
+//!
/* Common dynamic plugin type flags used by the set/get_loading_state functions */
#define H5PL_FILTER_PLUGIN 0x0001
@@ -46,15 +50,175 @@ extern "C" {
#endif
/* plugin state */
-H5_DLL herr_t H5PLset_loading_state(unsigned int plugin_control_mask);
-H5_DLL herr_t H5PLget_loading_state(unsigned int *plugin_control_mask /*out*/);
-H5_DLL herr_t H5PLappend(const char *search_path);
-H5_DLL herr_t H5PLprepend(const char *search_path);
-H5_DLL herr_t H5PLreplace(const char *search_path, unsigned int index);
-H5_DLL herr_t H5PLinsert(const char *search_path, unsigned int index);
-H5_DLL herr_t H5PLremove(unsigned int index);
+/**
+ * \ingroup H5PL
+ * \brief Controls the loadability of dynamic plugin types
+ *
+ * \param[in] plugin_control_mask The list of dynamic plugin types to enable or disable.\n
+ * A plugin bit set to 0 (zero) prevents use of that dynamic plugin.\n
+ * A plugin bit set to 1 (one) enables use of that dynamic plugin.\n
+ * Setting \p plugin_control_mask to a negative value enables all dynamic
+ * plugin types.\n
+ * Setting \p plugin_control_mask to 0 (zero) disables all dynamic plugin\n
+ * types.
+ * \return \herr_t
+ *
+ * \details H5PLset_loading_state() uses one argument to enable or disable individual plugin types.
+ *
+ * \details The \p plugin_control_mask parameter is an encoded integer in which each bit controls a specific
+ * plugin type. Bit positions allocated to date are specified in \ref H5PL_type_t as follows:
+ * \snippet this H5PL_type_t_snip
+ *
+ * A plugin bit set to 0 (zero) prevents the use of the dynamic plugin type corresponding to that bit
+ * position. A plugin bit set to 1 (one) allows the use of that dynamic plugin type.
+ *
+ * All dynamic plugin types can be enabled by setting \p plugin_control_mask to a negative value. A
+ * value of 0 (zero) will disable all dynamic plugin types.
+ *
+ * The loading of external dynamic plugins can be controlled during runtime with an environment
+ * variable, \c HDF5_PLUGIN_PRELOAD. H5PLset_loading_state() inspects the \c HDF5_PLUGIN_PRELOAD
+ * environment variable every time it is called. If the environment variable is set to the special
+ * \c :: string, all dynamic plugins are disabled.
+ *
+ * \warning The environment variable \c HDF5_PLUGIN_PRELOAD controls the loading of dynamic plugin types at
+ * runtime. If it is set to disable all plugin types, then it will disable them for \Emph{all}
+ * running programs that access the same variable instance.
+ *
+ * \since 1.8.15
+ *
+ */
+H5_DLL herr_t H5PLset_loading_state(unsigned int plugin_control_mask);
+/**
+ * \ingroup H5PL
+ * \brief Queries the loadability of dynamic plugin types
+ *
+ * \param[out] plugin_control_mask List of dynamic plugin types that are enabled or disabled.\n
+ * A plugin bit set to 0 (zero) indicates that that the dynamic plugin type is
+ * disabled.\n
+ * A plugin bit set to 1 (one) indicates that that the dynamic plugin type is
+ * enabled.\n
+ * If the value of \p plugin_control_mask is negative, all dynamic plugin
+ * types are enabled.\n
+ * If the value of \p plugin_control_mask is 0 (zero), all dynamic plugins
+ * are disabled.
+ * \return \herr_t
+ *
+ * \details H5PLget_loading_state() retrieves the bitmask that controls whether a certain type of plugins
+ * (e.g.: filters, VOL drivers) will be loaded by the HDF5 library.
+ *
+ * Bit positions allocated to date are specified in \ref H5PL_type_t as follows:
+ * \snippet this H5PL_type_t_snip
+ *
+ * \since 1.8.15
+ *
+ */
+H5_DLL herr_t H5PLget_loading_state(unsigned int *plugin_control_mask /*out*/);
+/**
+ * \ingroup H5PL
+ * \brief Inserts a plugin path at the end of the plugin search path list
+ *
+ * \param[in] search_path A plugin path
+ * \return \herr_t
+ *
+ * \details H5PLappend() inserts a plugin path at the end of the plugin search path list.
+ *
+ * \since 1.10.1
+ *
+ */
+H5_DLL herr_t H5PLappend(const char *search_path);
+/**
+ * \ingroup H5PL
+ * \brief Inserts a plugin path at the beginning of the plugin search path list
+ *
+ * \param[in] search_path A plugin path
+ * \return \herr_t
+ *
+ * \details H5PLprepend() inserts a plugin path at the end of the plugin search path list.
+ *
+ * \since 1.10.1
+ *
+ */
+H5_DLL herr_t H5PLprepend(const char *search_path);
+/**
+ * \ingroup H5PL
+ * \brief Replaces the path at the specified index in the plugin search path list
+ *
+ * \param[in] search_path A plugin path
+ * \param[in] index Index
+ * \return \herr_t
+ *
+ * \details H5PLreplace() replaces a plugin path at the specified index in the plugin search path list.
+ *
+ * \since 1.10.1
+ *
+ */
+H5_DLL herr_t H5PLreplace(const char *search_path, unsigned int index);
+/**
+ * \ingroup H5PL
+ * \brief Inserts a path at the specified index in the plugin search path list
+ *
+ * \param[in] search_path A plugin path
+ * \param[in] index Index
+ * \return \herr_t
+ *
+ * \details H5PLinsert() inserts a plugin path at the specified index in the plugin search path list,
+ * moving other paths after \p index.
+ *
+ * \since 1.10.1
+ *
+ */
+H5_DLL herr_t H5PLinsert(const char *search_path, unsigned int index);
+/**
+ * \ingroup H5PL
+ * \brief Removes a plugin path at a specified index from the plugin search path list
+ *
+ * \param[in] index Index
+ * \return \herr_t
+ *
+ * \details H5PLremove() removes a plugin path at the specified \p index and compacts the plugin search path
+ * list.
+ *
+ * \since 1.10.1
+ *
+ */
+H5_DLL herr_t H5PLremove(unsigned int index);
+/**
+ * \ingroup H5PL
+ * \brief Queries the plugin search path list at the specified index
+ *
+ * \param[in] index Index
+ * \param[out] path_buf Pathname
+ * \param[in] buf_size Size of \p path_buf
+ * \return Returns the length of the path, a non-negative value, if successful; otherwise returns a negative
+ * value.
+ *
+ * \details H5PLget() queries the plugin path at a specified index. If \p path_buf is non-NULL then it writes
+ * up to \p buf_size bytes into that buffer and always returns the length of the path name.
+ *
+ * If \p path_buf is NULL, this function will simply return the number of characters required to
+ * store the path name, ignoring \p path_buf and \p buf_size.
+ *
+ * If an error occurs then the buffer pointed to by \p path_buf (NULL or non-NULL) is unchanged and
+ * the function returns a negative value. If a zero is returned for the name's length, then there is
+ * no path name associated with the index. and the \p path_buf buffer will be unchanged.
+ *
+ * \since 1.10.1
+ *
+ */
H5_DLL ssize_t H5PLget(unsigned int index, char *path_buf /*out*/, size_t buf_size);
-H5_DLL herr_t H5PLsize(unsigned int *num_paths /*out*/);
+/**
+ * \ingroup H5PL
+ * \brief Retrieves the number of stored plugin paths
+ *
+ * \param[out] num_paths Current length of the plugin search path list
+ * \return \herr_t
+ *
+ * \details H5PLsize() retrieves the number of paths stored in the plugin search path list.
+ *
+ * \since 1.10.1
+ *
+ */
+H5_DLL herr_t H5PLsize(unsigned int *num_paths /*out*/);
#ifdef __cplusplus
}
diff --git a/src/H5Pdapl.c b/src/H5Pdapl.c
index c8a97c26608..2ebdbe3337e 100644
--- a/src/H5Pdapl.c
+++ b/src/H5Pdapl.c
@@ -768,7 +768,7 @@ H5Pset_chunk_cache(hid_t dapl_id, size_t rdcc_nslots, size_t rdcc_nbytes, double
/* Check arguments. Note that we allow negative values - they are
* considered to "unset" the property. */
- if (rdcc_w0 > (double)1.0f)
+ if (rdcc_w0 > 1.0)
HGOTO_ERROR(
H5E_ARGS, H5E_BADVALUE, FAIL,
"raw data cache w0 value must be between 0.0 and 1.0 inclusive, or H5D_CHUNK_CACHE_W0_DEFAULT");
diff --git a/src/H5Pdxpl.c b/src/H5Pdxpl.c
index 70fc9825cf0..de67dfdc151 100644
--- a/src/H5Pdxpl.c
+++ b/src/H5Pdxpl.c
@@ -1486,9 +1486,8 @@ H5Pset_btree_ratios(hid_t plist_id, double left, double middle, double right)
H5TRACE4("e", "iddd", plist_id, left, middle, right);
/* Check arguments */
- if (left < (double)0.0f || left > (double)1.0f || middle < (double)0.0f || middle > (double)1.0f ||
- right < (double)0.0f || right > (double)1.0f)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "split ratio must satisfy 0.0<=X<=1.0")
+ if (left < 0.0 || left > 1.0 || middle < 0.0 || middle > 1.0 || right < 0.0 || right > 1.0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "split ratio must satisfy 0.0 <= X <= 1.0")
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER)))
diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c
index 6f3884f850d..5332ea6ea75 100644
--- a/src/H5Pfapl.c
+++ b/src/H5Pfapl.c
@@ -1708,7 +1708,7 @@ H5Pset_cache(hid_t plist_id, int H5_ATTR_UNUSED mdc_nelmts, size_t rdcc_nslots,
H5TRACE5("e", "iIszzd", plist_id, mdc_nelmts, rdcc_nslots, rdcc_nbytes, rdcc_w0);
/* Check arguments */
- if (rdcc_w0 < (double)0.0f || rdcc_w0 > (double)1.0f)
+ if (rdcc_w0 < 0.0 || rdcc_w0 > 1.0)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
"raw data cache w0 value must be between 0.0 and 1.0 inclusive")
diff --git a/src/H5Pint.c b/src/H5Pint.c
index 4215ccb5d49..b27a4407be9 100644
--- a/src/H5Pint.c
+++ b/src/H5Pint.c
@@ -95,6 +95,10 @@ typedef herr_t (*H5P_do_pclass_op_t)(H5P_genplist_t *plist, const char *name, H5
/* Local Prototypes */
/********************/
+/* Infrastructure routines */
+static herr_t H5P__close_class_cb(void *space, void **request);
+static herr_t H5P__close_list_cb(void *space, void **request);
+
/* General helper routines */
static H5P_genplist_t *H5P__create(H5P_genclass_t *pclass);
static H5P_genprop_t * H5P__create_prop(const char *name, size_t size, H5P_prop_within_t type,
@@ -394,18 +398,18 @@ H5FL_DEFINE_STATIC(H5P_genplist_t);
/* Generic Property Class ID class */
static const H5I_class_t H5I_GENPROPCLS_CLS[1] = {{
- H5I_GENPROP_CLS, /* ID class value */
- 0, /* Class flags */
- 0, /* # of reserved IDs for class */
- (H5I_free_t)H5P__close_class /* Callback routine for closing objects of this class */
+ H5I_GENPROP_CLS, /* ID class value */
+ 0, /* Class flags */
+ 0, /* # of reserved IDs for class */
+ (H5I_free_t)H5P__close_class_cb /* Callback routine for closing objects of this class */
}};
/* Generic Property List ID class */
static const H5I_class_t H5I_GENPROPLST_CLS[1] = {{
- H5I_GENPROP_LST, /* ID class value */
- 0, /* Class flags */
- 0, /* # of reserved IDs for class */
- (H5I_free_t)H5P_close /* Callback routine for closing objects of this class */
+ H5I_GENPROP_LST, /* ID class value */
+ 0, /* Class flags */
+ 0, /* # of reserved IDs for class */
+ (H5I_free_t)H5P__close_list_cb /* Callback routine for closing objects of this class */
}};
/*-------------------------------------------------------------------------
@@ -622,6 +626,68 @@ H5P_term_package(void)
FUNC_LEAVE_NOAPI(n)
} /* end H5P_term_package() */
+/*-------------------------------------------------------------------------
+ * Function: H5P__close_class_cb
+ *
+ * Purpose: Called when the ref count reaches zero on a property class's ID
+ *
+ * Return: SUCCEED / FAIL
+ *
+ * Programmer: Quincey Koziol
+ * Wednesday, April 8, 2020
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5P__close_class_cb(void *_pclass, void H5_ATTR_UNUSED **request)
+{
+ H5P_genclass_t *pclass = (H5P_genclass_t *)_pclass; /* Property list class to close */
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_STATIC
+
+ /* Sanity check */
+ HDassert(pclass);
+
+ /* Close the property list class object */
+ if (H5P__close_class(pclass) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CLOSEERROR, FAIL, "unable to close property list class");
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5P__close_class_cb() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5P__close_list_cb
+ *
+ * Purpose: Called when the ref count reaches zero on a property list's ID
+ *
+ * Return: SUCCEED / FAIL
+ *
+ * Programmer: Quincey Koziol
+ * Wednesday, April 8, 2020
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5P__close_list_cb(void *_plist, void H5_ATTR_UNUSED **request)
+{
+ H5P_genplist_t *plist = (H5P_genplist_t *)_plist; /* Property list to close */
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_STATIC
+
+ /* Sanity check */
+ HDassert(plist);
+
+ /* Close the property list object */
+ if (H5P_close(plist) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CLOSEERROR, FAIL, "unable to close property list");
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5P__close_list_cb() */
+
/*--------------------------------------------------------------------------
NAME
H5P__do_prop_cb1
@@ -5011,11 +5077,10 @@ H5P__unregister(H5P_genclass_t *pclass, const char *name)
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
-H5P_close(void *_plist)
+H5P_close(H5P_genplist_t *plist)
{
- H5P_genclass_t *tclass; /* Temporary class pointer */
- H5P_genplist_t *plist = (H5P_genplist_t *)_plist;
- H5SL_t * seen = NULL; /* Skip list to hold names of properties already seen */
+ H5P_genclass_t *tclass; /* Temporary class pointer */
+ H5SL_t * seen = NULL; /* Skip list to hold names of properties already seen */
size_t nseen; /* Number of items 'seen' */
hbool_t has_parent_class; /* Flag to indicate that this property list's class has a parent */
size_t ndel; /* Number of items deleted */
@@ -5394,10 +5459,9 @@ H5P__get_class_parent(const H5P_genclass_t *pclass)
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
-H5P__close_class(void *_pclass)
+H5P__close_class(H5P_genclass_t *pclass)
{
- H5P_genclass_t *pclass = (H5P_genclass_t *)_pclass;
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
diff --git a/src/H5Ppkg.h b/src/H5Ppkg.h
index 699d5f3e5d7..dd43f763946 100644
--- a/src/H5Ppkg.h
+++ b/src/H5Ppkg.h
@@ -166,7 +166,7 @@ H5_DLL herr_t H5P__unregister(H5P_genclass_t *pclass, const char *name);
H5_DLL char * H5P__get_class_path(H5P_genclass_t *pclass);
H5_DLL H5P_genclass_t *H5P__open_class_path(const char *path);
H5_DLL H5P_genclass_t *H5P__get_class_parent(const H5P_genclass_t *pclass);
-H5_DLL herr_t H5P__close_class(void *_pclass);
+H5_DLL herr_t H5P__close_class(H5P_genclass_t *pclass);
H5_DLL H5P_genprop_t *H5P__find_prop_plist(const H5P_genplist_t *plist, const char *name);
H5_DLL hid_t H5P__new_plist_of_type(H5P_plist_type_t type);
diff --git a/src/H5Pprivate.h b/src/H5Pprivate.h
index 862c74f3180..6ebe5d35852 100644
--- a/src/H5Pprivate.h
+++ b/src/H5Pprivate.h
@@ -160,7 +160,7 @@ struct H5VL_connector_prop_t;
H5_DLL herr_t H5P_init(void);
/* Internal versions of API routines */
-H5_DLL herr_t H5P_close(void *_plist);
+H5_DLL herr_t H5P_close(H5P_genplist_t *plist);
H5_DLL hid_t H5P_create_id(H5P_genclass_t *pclass, hbool_t app_ref);
H5_DLL hid_t H5P_copy_plist(const H5P_genplist_t *old_plist, hbool_t app_ref);
H5_DLL herr_t H5P_get(H5P_genplist_t *plist, const char *name, void *value);
diff --git a/src/H5Ppublic.h b/src/H5Ppublic.h
index 862a87f7df4..72a23583ab9 100644
--- a/src/H5Ppublic.h
+++ b/src/H5Ppublic.h
@@ -101,7 +101,7 @@
#define H5P_CRT_ORDER_INDEXED 0x0002
/* Default value for all property list classes */
-#define H5P_DEFAULT (hid_t)0
+#define H5P_DEFAULT 0 /* (hid_t) */
#ifdef __cplusplus
extern "C" {
@@ -112,13 +112,50 @@ extern "C" {
/*******************/
/* Define property list class callback function pointer types */
+//!
typedef herr_t (*H5P_cls_create_func_t)(hid_t prop_id, void *create_data);
+//!
+
+//!
typedef herr_t (*H5P_cls_copy_func_t)(hid_t new_prop_id, hid_t old_prop_id, void *copy_data);
+//!
+
+//!
typedef herr_t (*H5P_cls_close_func_t)(hid_t prop_id, void *close_data);
+//!
/* Define property list callback function pointer types */
+//!
+/**
+ * \brief Callback function for H5Pregister2(),H5Pregister1(),H5Pinsert2(),H5Pinsert1()
+ *
+ * \param[in] name The name of the property
+ * \param[in] size The size of the property in bytes
+ * \param[in,out] value The value for the property
+ * \return \herr_t
+ *
+ * \details The H5P_prp_cb1_t() describes the parameters used by the
+ * property create,copy and close callback functions.
+ */
typedef herr_t (*H5P_prp_cb1_t)(const char *name, size_t size, void *value);
+//!
+
+//!
+/**
+ * \brief Callback function for H5Pregister2(),H5Pregister1(),H5Pinsert2(),H5Pinsert1()
+ *
+ * \plist_id{prop_id}
+ * \param[in] name The name of the property
+ * \param[in] size The size of the property in bytes
+ * \param[in] value The value for the property
+ * \return \herr_t
+ *
+ * \details The H5P_prp_cb2_t() describes the parameters used by the
+ * property set ,copy and delete callback functions.
+ */
typedef herr_t (*H5P_prp_cb2_t)(hid_t prop_id, const char *name, size_t size, void *value);
+//!
+
typedef H5P_prp_cb1_t H5P_prp_create_func_t;
typedef H5P_prp_cb2_t H5P_prp_set_func_t;
typedef H5P_prp_cb2_t H5P_prp_get_func_t;
@@ -126,56 +163,93 @@ typedef herr_t (*H5P_prp_encode_func_t)(const void *value, void **buf, size_t *s
typedef herr_t (*H5P_prp_decode_func_t)(const void **buf, void *value);
typedef H5P_prp_cb2_t H5P_prp_delete_func_t;
typedef H5P_prp_cb1_t H5P_prp_copy_func_t;
+
+//!
typedef int (*H5P_prp_compare_func_t)(const void *value1, const void *value2, size_t size);
+//!
+
typedef H5P_prp_cb1_t H5P_prp_close_func_t;
/* Define property list iteration function type */
+//!
typedef herr_t (*H5P_iterate_t)(hid_t id, const char *name, void *iter_data);
+//!
-/* Actual IO mode property */
+//!
+/**
+ * Actual IO mode property
+ *
+ * \details The default value, #H5D_MPIO_NO_CHUNK_OPTIMIZATION, is used for all
+ * I/O operations that do not use chunk optimizations, including
+ * non-collective I/O and contiguous collective I/O.
+ */
typedef enum H5D_mpio_actual_chunk_opt_mode_t {
- /* The default value, H5D_MPIO_NO_CHUNK_OPTIMIZATION, is used for all I/O
- * operations that do not use chunk optimizations, including non-collective
- * I/O and contiguous collective I/O.
- */
H5D_MPIO_NO_CHUNK_OPTIMIZATION = 0,
+ /**< No chunk optimization was performed. Either no collective I/O was
+ attempted or the dataset wasn't chunked. */
H5D_MPIO_LINK_CHUNK,
+ /**< Collective I/O is performed on all chunks simultaneously. */
H5D_MPIO_MULTI_CHUNK
+ /**< Each chunk was individually assigned collective or independent I/O based
+ on what fraction of processes access the chunk. If the fraction is greater
+ than the multi chunk ratio threshold, collective I/O is performed on that
+ chunk. The multi chunk ratio threshold can be set using
+ H5Pset_dxpl_mpio_chunk_opt_ratio(). The default value is 60%. */
} H5D_mpio_actual_chunk_opt_mode_t;
+//!
+//!
+/**
+ * The following values are conveniently defined as a bit field so that
+ * we can switch from the default to independent or collective and then to
+ * mixed without having to check the original value.
+ */
typedef enum H5D_mpio_actual_io_mode_t {
- /* The following four values are conveniently defined as a bit field so that
- * we can switch from the default to independent or collective and then to
- * mixed without having to check the original value.
- *
- * NO_COLLECTIVE means that either collective I/O wasn't requested or that
- * no I/O took place.
- *
- * CHUNK_INDEPENDENT means that collective I/O was requested, but the
- * chunk optimization scheme chose independent I/O for each chunk.
- */
- H5D_MPIO_NO_COLLECTIVE = 0x0,
+ H5D_MPIO_NO_COLLECTIVE = 0x0,
+ /**< No collective I/O was performed. Collective I/O was not requested or
+ collective I/O isn't possible on this dataset */
H5D_MPIO_CHUNK_INDEPENDENT = 0x1,
- H5D_MPIO_CHUNK_COLLECTIVE = 0x2,
- H5D_MPIO_CHUNK_MIXED = 0x1 | 0x2,
-
- /* The contiguous case is separate from the bit field. */
+ /**< HDF5 performed one the chunk collective optimization schemes and each
+ chunk was accessed independently */
+ H5D_MPIO_CHUNK_COLLECTIVE = 0x2,
+ /**< HDF5 performed one the chunk collective optimization schemes and each
+ chunk was accessed collectively */
+ H5D_MPIO_CHUNK_MIXED = 0x1 | 0x2,
+ /**< HDF5 performed one the chunk collective optimization schemes and some
+ chunks were accessed independently, some collectively. */
+ /** \internal The contiguous case is separate from the bit field. */
H5D_MPIO_CONTIGUOUS_COLLECTIVE = 0x4
+ /**< Collective I/O was performed on a contiguous dataset */
} H5D_mpio_actual_io_mode_t;
+//!
-/* Broken collective IO property */
+//!
+/**
+ * Broken collective IO property
+ */
typedef enum H5D_mpio_no_collective_cause_t {
- H5D_MPIO_COLLECTIVE = 0x00,
- H5D_MPIO_SET_INDEPENDENT = 0x01,
- H5D_MPIO_DATATYPE_CONVERSION = 0x02,
- H5D_MPIO_DATA_TRANSFORMS = 0x04,
- H5D_MPIO_MPI_OPT_TYPES_ENV_VAR_DISABLED = 0x08,
- H5D_MPIO_NOT_SIMPLE_OR_SCALAR_DATASPACES = 0x10,
- H5D_MPIO_NOT_CONTIGUOUS_OR_CHUNKED_DATASET = 0x20,
- H5D_MPIO_PARALLEL_FILTERED_WRITES_DISABLED = 0x40,
+ H5D_MPIO_COLLECTIVE = 0x00,
+ /**< Collective I/O was performed successfully */
+ H5D_MPIO_SET_INDEPENDENT = 0x01,
+ /**< Collective I/O was not performed because independent I/O was requested */
+ H5D_MPIO_DATATYPE_CONVERSION = 0x02,
+ /**< Collective I/O was not performed because datatype conversions were required */
+ H5D_MPIO_DATA_TRANSFORMS = 0x04,
+ /**< Collective I/O was not performed because data transforms needed to be applied */
+ H5D_MPIO_MPI_OPT_TYPES_ENV_VAR_DISABLED = 0x08,
+ /**< \todo FIXME! */
+ H5D_MPIO_NOT_SIMPLE_OR_SCALAR_DATASPACES = 0x10,
+ /**< Collective I/O was not performed because one of the dataspaces was neither simple nor scalar */
+ H5D_MPIO_NOT_CONTIGUOUS_OR_CHUNKED_DATASET = 0x20,
+ /**< Collective I/O was not performed because the dataset was neither contiguous nor chunked */
+ H5D_MPIO_PARALLEL_FILTERED_WRITES_DISABLED = 0x40,
+ /**< \todo FIXME! */
H5D_MPIO_ERROR_WHILE_CHECKING_COLLECTIVE_POSSIBLE = 0x80,
- H5D_MPIO_NO_COLLECTIVE_MAX_CAUSE = 0x100
+ /**< \todo FIXME! */
+ H5D_MPIO_NO_COLLECTIVE_MAX_CAUSE = 0x100
+ /**< Sentinel */
} H5D_mpio_no_collective_cause_t;
+//!
/********************/
/* Public Variables */
@@ -234,313 +308,9438 @@ H5_DLLVAR hid_t H5P_LST_REFERENCE_ACCESS_ID_g;
/*********************/
/* Generic property list routines */
-H5_DLL hid_t H5Pcreate_class(hid_t parent, const char *name, H5P_cls_create_func_t cls_create,
- void *create_data, H5P_cls_copy_func_t cls_copy, void *copy_data,
- H5P_cls_close_func_t cls_close, void *close_data);
-H5_DLL char * H5Pget_class_name(hid_t pclass_id);
-H5_DLL hid_t H5Pcreate(hid_t cls_id);
-H5_DLL herr_t H5Pregister2(hid_t cls_id, const char *name, size_t size, void *def_value,
- H5P_prp_create_func_t prp_create, H5P_prp_set_func_t prp_set,
- H5P_prp_get_func_t prp_get, H5P_prp_delete_func_t prp_del,
- H5P_prp_copy_func_t prp_copy, H5P_prp_compare_func_t prp_cmp,
- H5P_prp_close_func_t prp_close);
-H5_DLL herr_t H5Pinsert2(hid_t plist_id, const char *name, size_t size, void *value,
- H5P_prp_set_func_t prp_set, H5P_prp_get_func_t prp_get,
- H5P_prp_delete_func_t prp_delete, H5P_prp_copy_func_t prp_copy,
- H5P_prp_compare_func_t prp_cmp, H5P_prp_close_func_t prp_close);
-H5_DLL herr_t H5Pset(hid_t plist_id, const char *name, const void *value);
-H5_DLL htri_t H5Pexist(hid_t plist_id, const char *name);
+
+/**
+ * \ingroup GPLO
+ *
+ * \brief Terminates access to a property list
+ *
+ * \plist_id
+ *
+ * \return \herr_t
+ *
+ * \details H5Pclose() terminates access to a property list. All property
+ * lists should be closed when the application is finished
+ * accessing them. This frees resources used by the property
+ * list.
+ *
+ * \since 1.0.0
+ *
+ */
+H5_DLL herr_t H5Pclose(hid_t plist_id);
+/**
+ * \ingroup GPLOA
+ *
+ * \brief Closes an existing property list class
+ *
+ * \plistcls_id{plist_id}
+ *
+ * \return \herr_t
+ *
+ * \details H5Pclose_class() removes a property list class from the library.
+ * Existing property lists of this class will continue to exist,
+ * but new ones are not able to be created.
+ *
+ * \since 1.4.0
+ *
+ */
+H5_DLL herr_t H5Pclose_class(hid_t plist_id);
+/**
+ * \ingroup GPLO
+ *
+ * \brief Copies an existing property list to create a new property list
+ *
+ * \plist_id
+ *
+ * \return \hid_t{property list}
+ *
+ * \details H5Pcopy() copies an existing property list to create a new
+ * property list. The new property list has the same properties
+ * and values as the original property list.
+ *
+ * \since 1.0.0
+ *
+ */
+H5_DLL hid_t H5Pcopy(hid_t plist_id);
+/**
+ * \ingroup GPLOA
+ *
+ * \brief Copies a property from one list or class to another
+ *
+ * \param[in] dst_id Identifier of the destination property list or class
+ * \param[in] src_id Identifier of the source property list or class
+ * \param[in] name Name of the property to copy
+ *
+ * \return \herr_t
+ *
+ * \details H5Pcopy_prop() copies a property from one property list or
+ * class to another.
+ *
+ * If a property is copied from one class to another, all the
+ * property information will be first deleted from the destination
+ * class and then the property information will be copied from the
+ * source class into the destination class.
+ *
+ * If a property is copied from one list to another, the property
+ * will be first deleted from the destination list (generating a
+ * call to the close callback for the property, if one exists)
+ * and then the property is copied from the source list to the
+ * destination list (generating a call to the copy callback for
+ * the property, if one exists).
+ *
+ * If the property does not exist in the class or list, this
+ * call is equivalent to calling H5Pregister() or H5Pinsert() (for
+ * a class or list, as appropriate) and the create callback will
+ * be called in the case of the property being copied into a list
+ * (if such a callback exists for the property).
+ *
+ * \since 1.6.0
+ *
+ */
+H5_DLL herr_t H5Pcopy_prop(hid_t dst_id, hid_t src_id, const char *name);
+/**
+ * \ingroup GPLO
+ *
+ * \brief Creates a new property list as an instance of a property list class
+ *
+ * \plistcls_id{cls_id}
+ *
+ * \return \hid_t{property list}
+ *
+ * \details H5Pcreate() creates a new property list as an instance of
+ * some property list class. The new property list is initialized
+ * with default values for the specified class. The classes are as
+ * follows:
+ *
+ *
+ *
+ * Class Identifier |
+ * Class Name |
+ * Comments |
+ *
+ *
+ * #H5P_ATTRIBUTE_CREATE |
+ * attribute create |
+ * Properties for attribute creation |
+ *
+ *
+ * #H5P_DATASET_ACCESS |
+ * dataset access |
+ * Properties for dataset access |
+ *
+ *
+ * #H5P_DATASET_CREATE |
+ * dataset create |
+ * Properties for dataset creation |
+ *
+ *
+ * #H5P_DATASET_XFER |
+ * data transfer |
+ * Properties for raw data transfer |
+ *
+ *
+ * #H5P_DATATYPE_ACCESS |
+ * datatype access |
+ * Properties for datatype access |
+ *
+ *
+ * #H5P_DATATYPE_CREATE |
+ * datatype create |
+ * Properties for datatype creation |
+ *
+ *
+ * #H5P_FILE_ACCESS |
+ * file access |
+ * Properties for file access |
+ *
+ *
+ * #H5P_FILE_CREATE |
+ * file create |
+ * Properties for file creation |
+ *
+ *
+ * #H5P_FILE_MOUNT |
+ * file mount |
+ * Properties for file mounting |
+ *
+ *
+ * #H5P_GROUP_ACCESS |
+ * group access |
+ * Properties for group access |
+ *
+ *
+ * #H5P_GROUP_CREATE |
+ * group create |
+ * Properties for group creation |
+ *
+ *
+ * #H5P_LINK_ACCESS |
+ * link access |
+ * Properties governing link traversal when accessing objects |
+ *
+ *
+ * #H5P_LINK_CREATE |
+ * link create |
+ * Properties governing link creation |
+ *
+ *
+ * #H5P_OBJECT_COPY |
+ * object copy |
+ * Properties governing the object copying process |
+ *
+ *
+ * #H5P_OBJECT_CREATE |
+ * object create |
+ * Properties for object creation |
+ *
+ *
+ * #H5P_STRING_CREATE |
+ * string create |
+ * Properties for character encoding when encoding strings or
+ * object names |
+ *
+ *
+ * #H5P_VOL_INITIALIZE |
+ * vol initialize |
+ * Properties for VOL initialization |
+ *
+ *
+ *
+ * This property list must eventually be closed with H5Pclose();
+ * otherwise, errors are likely to occur.
+ *
+ * \version 1.12.0 The #H5P_VOL_INITIALIZE property list class was added
+ * \version 1.8.15 For each class, the class name returned by
+ * H5Pget_class_name() was added.
+ * The list of possible Fortran values was updated.
+ * \version 1.8.0 The following property list classes were added at this
+ * release: #H5P_DATASET_ACCESS, #H5P_GROUP_CREATE,
+ * #H5P_GROUP_ACCESS, #H5P_DATATYPE_CREATE,
+ * #H5P_DATATYPE_ACCESS, #H5P_ATTRIBUTE_CREATE
+ *
+ * \since 1.0.0
+ *
+ */
+H5_DLL hid_t H5Pcreate(hid_t cls_id);
+/**
+ * \ingroup GPLOA
+ *
+ * \brief Creates a new property list class
+ *
+ * \plistcls_id{parent}
+ * \param[in] name Name of property list class to register
+ * \param[in] create Callback routine called when a property list is
+ * created
+ * \param[in] create_data Pointer to user-defined class create data, to be
+ * passed along to class create callback
+ * \param[in] copy Callback routine called when a property list is
+ * copied
+ * \param[in] copy_data Pointer to user-defined class copy data, to be
+ * passed along to class copy callback
+ * \param[in] close Callback routine called when a property list is
+ * being closed
+ * \param[in] close_data Pointer to user-defined class close data, to be
+ * passed along to class close callback
+ *
+ * \return \hid_t{property list class}
+ *
+ * \details H5Pcreate_class() registers a new property list class with the
+ * library. The new property list class can inherit from an
+ * existing property list class, \p parent, or may be derived
+ * from the default “empty” class, NULL. New classes with
+ * inherited properties from existing classes may not remove
+ * those existing properties, only add or remove their own class
+ * properties. Property list classes defined and supported in the
+ * HDF5 library distribution are listed and briefly described in
+ * H5Pcreate(). The \p create routine is called when a new property
+ * list of this class is being created. The #H5P_cls_create_func_t
+ * callback function is defined as follows:
+ *
+ * \snippet this H5P_cls_create_func_t_snip
+ *
+ * The parameters to this callback function are defined as follows:
+ *
+ *
+ * \ref hid_t \c prop_id |
+ * IN: The identifier of the property list being created |
+ *
+ *
+ * \Code{void * create_data} |
+ * IN: User pointer to any class creation data required |
+ *
+ *
+ *
+ * The \p create routine is called after any registered
+ * \p create function is called for each property value. If the
+ * \p create routine returns a negative value, the new list is not
+ * returned to the user and the property list creation routine returns
+ * an error value.
+ *
+ * The \p copy routine is called when an existing property
+ * list of this class is copied. The #H5P_cls_copy_func_t callback
+ * function is defined as follows:
+ * \snippet this H5P_cls_copy_func_t_snip
+ *
+ * The parameters to this callback function are defined as follows:
+ *
+ *
+ * \ref hid_t \c prop_id |
+ * IN: The identifier of the property list created by copying |
+ *
+ *
+ * \Code{void * copy_data} |
+ * IN: User pointer to any class copy data required |
+ *
+ *
+ *
+ * The \p copy routine is called after any registered \p copy function
+ * is called for each property value. If the \p copy routine returns a
+ * negative value, the new list is not returned to the user and the
+ * property list \p copy routine returns an error value.
+ *
+ * The \p close routine is called when a property list of this class
+ * is being closed. The #H5P_cls_close_func_t callback function is
+ * defined as follows:
+ * \snippet this H5P_cls_close_func_t_snip
+ *
+ * The parameters to this callback function are defined as follows:
+ *
+ *
+ * \ref hid_t \c prop_id |
+ * IN: The identifier of the property list being closed |
+ *
+ *
+ * \Code{void * close_data} |
+ * IN: User pointer to any class close data required |
+ *
+ *
+ *
+ * The \p close routine is called before any registered \p close
+ * function is called for each property value. If the \p close routine
+ * returns a negative value, the property list close routine returns
+ * an error value but the property list is still closed.
+ *
+ * H5Pclose_class() can be used to release the property list class
+ * identifier returned by this function so that resources leaks will
+ * not develop.
+ *
+ * \since 1.4.0
+ *
+ */
+H5_DLL hid_t H5Pcreate_class(hid_t parent, const char *name, H5P_cls_create_func_t create, void *create_data,
+ H5P_cls_copy_func_t copy, void *copy_data, H5P_cls_close_func_t close,
+ void *close_data);
+/**
+ * \ingroup GPLO
+ *
+ * \brief Decodes property list received in a binary object buffer and
+ * returns a new property list identifier
+ *
+ * \param[in] buf Buffer holding the encoded property list
+ *
+ * \return \hid_tv{object}
+ *
+ * \details Given a binary property list description in a buffer, H5Pdecode()
+ * reconstructs the HDF5 property list and returns an identifier
+ * for the new property list. The binary description of the property
+ * list is encoded by H5Pencode().
+ *
+ * The user is responsible for passing in the correct buffer.
+ *
+ * The property list identifier returned by this function should be
+ * released with H5Pclose() when the identifier is no longer needed
+ * so that resource leaks will not develop.
+ *
+ * \note Some properties cannot be encoded and therefore will not be available
+ * in the decoded property list. These properties are discussed in
+ * H5Pencode().
+ *
+ * \since 1.10.0
+ *
+ */
+H5_DLL hid_t H5Pdecode(const void *buf);
+/**
+ * \ingroup GPLO
+ *
+ * \brief Encodes the property values in a property list into a binary
+ * buffer
+ *
+ * \plist_id
+ * \param[out] buf Buffer into which the property list will be encoded.
+ * If the provided buffer is NULL, the size of the
+ * buffer required is returned through \p nalloc; the
+ * function does nothing more.
+ * \param[out] nalloc The size of the required buffer
+ * \fapl_id
+ *
+ * \return \herr_t
+ *
+ * \details H5Pencode2() encodes the property list \p plist_id into the
+ * binary buffer \p buf, according to the file format setting
+ * specified by the file access property list \p fapl_id.
+ *
+ * If the required buffer size is unknown, \p buf can be passed
+ * in as NULL and the function will set the required buffer size
+ * in \p nalloc. The buffer can then be created and the property
+ * list encoded with a subsequent H5Pencode2() call.
+ *
+ * If the buffer passed in is not big enough to hold the encoded
+ * properties, the H5Pencode2() call can be expected to fail with
+ * a segmentation fault.
+ *
+ * The file access property list \p fapl_id is used to
+ * control the encoding via the \a libver_bounds property
+ * (see H5Pset_libver_bounds()). If the \a libver_bounds
+ * property is missing, H5Pencode2() proceeds as if the \a
+ * libver_bounds property were set to (#H5F_LIBVER_EARLIEST,
+ * #H5F_LIBVER_LATEST). (Functionally, H5Pencode1() is identical to
+ * H5Pencode2() with \a libver_bounds set to (#H5F_LIBVER_EARLIEST,
+ * #H5F_LIBVER_LATEST).)
+ * Properties that do not have encode callbacks will be skipped.
+ * There is currently no mechanism to register an encode callback for
+ * a user-defined property, so user-defined properties cannot currently
+ * be encoded.
+ *
+ * Some properties cannot be encoded, particularly properties that are
+ * reliant on local context.
+ *
+ * \b Motivation:
+ * This function was introduced in HDF5-1.12 as part of the \a H5Sencode
+ * format change to enable 64-bit selection encodings and a dataspace
+ * selection that is tied to a file.
+ *
+ * \since 1.12.0
+ *
+ */
H5_DLL herr_t H5Pencode2(hid_t plist_id, void *buf, size_t *nalloc, hid_t fapl_id);
-H5_DLL hid_t H5Pdecode(const void *buf);
-H5_DLL herr_t H5Pget_size(hid_t id, const char *name, size_t *size);
-H5_DLL herr_t H5Pget_nprops(hid_t id, size_t *nprops);
-H5_DLL hid_t H5Pget_class(hid_t plist_id);
-H5_DLL hid_t H5Pget_class_parent(hid_t pclass_id);
-H5_DLL herr_t H5Pget(hid_t plist_id, const char *name, void *value);
+/**
+ * \ingroup GPLOA
+ *
+ * \brief Compares two property lists or classes for equality
+ *
+ * \param[in] id1 First property object to be compared
+ * \param[in] id2 Second property object to be compared
+ *
+ * \return \htri_t
+ *
+ * \details H5Pequal() compares two property lists or classes to determine
+ * whether they are equal to one another.
+ *
+ * Either both \p id1 and \p id2 must be property lists or both
+ * must be classes; comparing a list to a class is an error.
+ *
+ * \since 1.4.0
+ *
+ */
H5_DLL htri_t H5Pequal(hid_t id1, hid_t id2);
-H5_DLL htri_t H5Pisa_class(hid_t plist_id, hid_t pclass_id);
-H5_DLL int H5Piterate(hid_t id, int *idx, H5P_iterate_t iter_func, void *iter_data);
-H5_DLL herr_t H5Pcopy_prop(hid_t dst_id, hid_t src_id, const char *name);
-H5_DLL herr_t H5Premove(hid_t plist_id, const char *name);
-H5_DLL herr_t H5Punregister(hid_t pclass_id, const char *name);
-H5_DLL herr_t H5Pclose_class(hid_t plist_id);
-H5_DLL herr_t H5Pclose(hid_t plist_id);
-H5_DLL hid_t H5Pcopy(hid_t plist_id);
-
-/* Object creation property list (OCPL) routines */
-H5_DLL herr_t H5Pset_attr_phase_change(hid_t plist_id, unsigned max_compact, unsigned min_dense);
-H5_DLL herr_t H5Pget_attr_phase_change(hid_t plist_id, unsigned *max_compact, unsigned *min_dense);
-H5_DLL herr_t H5Pset_attr_creation_order(hid_t plist_id, unsigned crt_order_flags);
-H5_DLL herr_t H5Pget_attr_creation_order(hid_t plist_id, unsigned *crt_order_flags);
-H5_DLL herr_t H5Pset_obj_track_times(hid_t plist_id, hbool_t track_times);
-H5_DLL herr_t H5Pget_obj_track_times(hid_t plist_id, hbool_t *track_times);
-H5_DLL herr_t H5Pmodify_filter(hid_t plist_id, H5Z_filter_t filter, unsigned int flags, size_t cd_nelmts,
- const unsigned int cd_values[/*cd_nelmts*/]);
-H5_DLL herr_t H5Pset_filter(hid_t plist_id, H5Z_filter_t filter, unsigned int flags, size_t cd_nelmts,
- const unsigned int c_values[]);
-H5_DLL int H5Pget_nfilters(hid_t plist_id);
-H5_DLL H5Z_filter_t H5Pget_filter2(hid_t plist_id, unsigned filter, unsigned int *flags /*out*/,
- size_t *cd_nelmts /*out*/, unsigned cd_values[] /*out*/, size_t namelen,
- char name[], unsigned *filter_config /*out*/);
-H5_DLL herr_t H5Pget_filter_by_id2(hid_t plist_id, H5Z_filter_t id, unsigned int *flags /*out*/,
- size_t *cd_nelmts /*out*/, unsigned cd_values[] /*out*/, size_t namelen,
- char name[] /*out*/, unsigned *filter_config /*out*/);
-H5_DLL htri_t H5Pall_filters_avail(hid_t plist_id);
-H5_DLL herr_t H5Premove_filter(hid_t plist_id, H5Z_filter_t filter);
-H5_DLL herr_t H5Pset_deflate(hid_t plist_id, unsigned aggression);
-H5_DLL herr_t H5Pset_fletcher32(hid_t plist_id);
-
-/* File creation property list (FCPL) routines */
-H5_DLL herr_t H5Pset_userblock(hid_t plist_id, hsize_t size);
-H5_DLL herr_t H5Pget_userblock(hid_t plist_id, hsize_t *size);
-H5_DLL herr_t H5Pset_sizes(hid_t plist_id, size_t sizeof_addr, size_t sizeof_size);
-H5_DLL herr_t H5Pget_sizes(hid_t plist_id, size_t *sizeof_addr /*out*/, size_t *sizeof_size /*out*/);
-H5_DLL herr_t H5Pset_sym_k(hid_t plist_id, unsigned ik, unsigned lk);
-H5_DLL herr_t H5Pget_sym_k(hid_t plist_id, unsigned *ik /*out*/, unsigned *lk /*out*/);
-H5_DLL herr_t H5Pset_istore_k(hid_t plist_id, unsigned ik);
-H5_DLL herr_t H5Pget_istore_k(hid_t plist_id, unsigned *ik /*out*/);
-H5_DLL herr_t H5Pset_shared_mesg_nindexes(hid_t plist_id, unsigned nindexes);
-H5_DLL herr_t H5Pget_shared_mesg_nindexes(hid_t plist_id, unsigned *nindexes);
-H5_DLL herr_t H5Pset_shared_mesg_index(hid_t plist_id, unsigned index_num, unsigned mesg_type_flags,
- unsigned min_mesg_size);
-H5_DLL herr_t H5Pget_shared_mesg_index(hid_t plist_id, unsigned index_num, unsigned *mesg_type_flags,
- unsigned *min_mesg_size);
-H5_DLL herr_t H5Pset_shared_mesg_phase_change(hid_t plist_id, unsigned max_list, unsigned min_btree);
-H5_DLL herr_t H5Pget_shared_mesg_phase_change(hid_t plist_id, unsigned *max_list, unsigned *min_btree);
-H5_DLL herr_t H5Pset_file_space_strategy(hid_t plist_id, H5F_fspace_strategy_t strategy, hbool_t persist,
- hsize_t threshold);
-H5_DLL herr_t H5Pget_file_space_strategy(hid_t plist_id, H5F_fspace_strategy_t *strategy, hbool_t *persist,
- hsize_t *threshold);
-H5_DLL herr_t H5Pset_file_space_page_size(hid_t plist_id, hsize_t fsp_size);
-H5_DLL herr_t H5Pget_file_space_page_size(hid_t plist_id, hsize_t *fsp_size);
-
-/* File access property list (FAPL) routines */
-H5_DLL herr_t H5Pset_alignment(hid_t fapl_id, hsize_t threshold, hsize_t alignment);
-H5_DLL herr_t H5Pget_alignment(hid_t fapl_id, hsize_t *threshold /*out*/, hsize_t *alignment /*out*/);
-H5_DLL herr_t H5Pset_driver(hid_t plist_id, hid_t driver_id, const void *driver_info);
-H5_DLL hid_t H5Pget_driver(hid_t plist_id);
-H5_DLL const void *H5Pget_driver_info(hid_t plist_id);
-H5_DLL herr_t H5Pset_vol(hid_t plist_id, hid_t new_vol_id, const void *new_vol_info);
-H5_DLL herr_t H5Pget_vol_id(hid_t plist_id, hid_t *vol_id);
-H5_DLL herr_t H5Pget_vol_info(hid_t plist_id, void **vol_info);
-H5_DLL herr_t H5Pset_family_offset(hid_t fapl_id, hsize_t offset);
-H5_DLL herr_t H5Pget_family_offset(hid_t fapl_id, hsize_t *offset);
-H5_DLL herr_t H5Pset_multi_type(hid_t fapl_id, H5FD_mem_t type);
-H5_DLL herr_t H5Pget_multi_type(hid_t fapl_id, H5FD_mem_t *type);
-H5_DLL herr_t H5Pset_cache(hid_t plist_id, int mdc_nelmts, size_t rdcc_nslots, size_t rdcc_nbytes,
- double rdcc_w0);
-H5_DLL herr_t H5Pget_cache(hid_t plist_id, int *mdc_nelmts, /* out */
- size_t *rdcc_nslots /*out*/, size_t *rdcc_nbytes /*out*/, double *rdcc_w0);
-H5_DLL herr_t H5Pset_mdc_config(hid_t plist_id, H5AC_cache_config_t *config_ptr);
-H5_DLL herr_t H5Pget_mdc_config(hid_t plist_id, H5AC_cache_config_t *config_ptr); /* out */
-H5_DLL herr_t H5Pset_gc_references(hid_t fapl_id, unsigned gc_ref);
-H5_DLL herr_t H5Pget_gc_references(hid_t fapl_id, unsigned *gc_ref /*out*/);
-H5_DLL herr_t H5Pset_fclose_degree(hid_t fapl_id, H5F_close_degree_t degree);
-H5_DLL herr_t H5Pget_fclose_degree(hid_t fapl_id, H5F_close_degree_t *degree);
-H5_DLL herr_t H5Pset_meta_block_size(hid_t fapl_id, hsize_t size);
-H5_DLL herr_t H5Pget_meta_block_size(hid_t fapl_id, hsize_t *size /*out*/);
-H5_DLL herr_t H5Pset_sieve_buf_size(hid_t fapl_id, size_t size);
-H5_DLL herr_t H5Pget_sieve_buf_size(hid_t fapl_id, size_t *size /*out*/);
-H5_DLL herr_t H5Pset_small_data_block_size(hid_t fapl_id, hsize_t size);
-H5_DLL herr_t H5Pget_small_data_block_size(hid_t fapl_id, hsize_t *size /*out*/);
-H5_DLL herr_t H5Pset_libver_bounds(hid_t plist_id, H5F_libver_t low, H5F_libver_t high);
-H5_DLL herr_t H5Pget_libver_bounds(hid_t plist_id, H5F_libver_t *low, H5F_libver_t *high);
-H5_DLL herr_t H5Pset_elink_file_cache_size(hid_t plist_id, unsigned efc_size);
-H5_DLL herr_t H5Pget_elink_file_cache_size(hid_t plist_id, unsigned *efc_size);
-H5_DLL herr_t H5Pset_file_image(hid_t fapl_id, void *buf_ptr, size_t buf_len);
-H5_DLL herr_t H5Pget_file_image(hid_t fapl_id, void **buf_ptr_ptr, size_t *buf_len_ptr);
-H5_DLL herr_t H5Pset_file_image_callbacks(hid_t fapl_id, H5FD_file_image_callbacks_t *callbacks_ptr);
-H5_DLL herr_t H5Pget_file_image_callbacks(hid_t fapl_id, H5FD_file_image_callbacks_t *callbacks_ptr);
-H5_DLL herr_t H5Pset_file_locking(hid_t fapl_id, hbool_t use_file_locking, hbool_t ignore_when_disabled);
-H5_DLL herr_t H5Pget_file_locking(hid_t fapl_id, hbool_t *use_file_locking, hbool_t *ignore_when_disabled);
-H5_DLL herr_t H5Pset_core_write_tracking(hid_t fapl_id, hbool_t is_enabled, size_t page_size);
-H5_DLL herr_t H5Pget_core_write_tracking(hid_t fapl_id, hbool_t *is_enabled, size_t *page_size);
-H5_DLL herr_t H5Pset_metadata_read_attempts(hid_t plist_id, unsigned attempts);
-H5_DLL herr_t H5Pget_metadata_read_attempts(hid_t plist_id, unsigned *attempts);
-H5_DLL herr_t H5Pset_object_flush_cb(hid_t plist_id, H5F_flush_cb_t func, void *udata);
-H5_DLL herr_t H5Pget_object_flush_cb(hid_t plist_id, H5F_flush_cb_t *func, void **udata);
-H5_DLL herr_t H5Pset_mdc_log_options(hid_t plist_id, hbool_t is_enabled, const char *location,
- hbool_t start_on_access);
-H5_DLL herr_t H5Pget_mdc_log_options(hid_t plist_id, hbool_t *is_enabled, char *location,
- size_t *location_size, hbool_t *start_on_access);
-H5_DLL herr_t H5Pset_evict_on_close(hid_t fapl_id, hbool_t evict_on_close);
-H5_DLL herr_t H5Pget_evict_on_close(hid_t fapl_id, hbool_t *evict_on_close);
-#ifdef H5_HAVE_PARALLEL
-H5_DLL herr_t H5Pset_all_coll_metadata_ops(hid_t plist_id, hbool_t is_collective);
-H5_DLL herr_t H5Pget_all_coll_metadata_ops(hid_t plist_id, hbool_t *is_collective);
-H5_DLL herr_t H5Pset_coll_metadata_write(hid_t plist_id, hbool_t is_collective);
-H5_DLL herr_t H5Pget_coll_metadata_write(hid_t plist_id, hbool_t *is_collective);
-H5_DLL herr_t H5Pget_mpi_params(hid_t fapl_id, MPI_Comm *comm, MPI_Info *info);
-H5_DLL herr_t H5Pset_mpi_params(hid_t fapl_id, MPI_Comm comm, MPI_Info info);
-#endif /* H5_HAVE_PARALLEL */
-H5_DLL herr_t H5Pset_mdc_image_config(hid_t plist_id, H5AC_cache_image_config_t *config_ptr);
-H5_DLL herr_t H5Pget_mdc_image_config(hid_t plist_id, H5AC_cache_image_config_t *config_ptr /*out*/);
-H5_DLL herr_t H5Pset_page_buffer_size(hid_t plist_id, size_t buf_size, unsigned min_meta_per,
- unsigned min_raw_per);
-H5_DLL herr_t H5Pget_page_buffer_size(hid_t plist_id, size_t *buf_size, unsigned *min_meta_per,
- unsigned *min_raw_per);
-/* VFD SWMR configuration */
-H5_DLL herr_t H5Pset_vfd_swmr_config(hid_t plist_id, H5F_vfd_swmr_config_t *config_ptr);
-H5_DLL herr_t H5Pget_vfd_swmr_config(hid_t plist_id, H5F_vfd_swmr_config_t *config_ptr);
-
-/* Dataset creation property list (DCPL) routines */
-H5_DLL herr_t H5Pset_layout(hid_t plist_id, H5D_layout_t layout);
-H5_DLL H5D_layout_t H5Pget_layout(hid_t plist_id);
-H5_DLL herr_t H5Pset_chunk(hid_t plist_id, int ndims, const hsize_t dim[/*ndims*/]);
-H5_DLL int H5Pget_chunk(hid_t plist_id, int max_ndims, hsize_t dim[] /*out*/);
-H5_DLL herr_t H5Pset_virtual(hid_t dcpl_id, hid_t vspace_id, const char *src_file_name,
- const char *src_dset_name, hid_t src_space_id);
-H5_DLL herr_t H5Pget_virtual_count(hid_t dcpl_id, size_t *count /*out*/);
-H5_DLL hid_t H5Pget_virtual_vspace(hid_t dcpl_id, size_t index);
-H5_DLL hid_t H5Pget_virtual_srcspace(hid_t dcpl_id, size_t index);
-H5_DLL ssize_t H5Pget_virtual_filename(hid_t dcpl_id, size_t index, char *name /*out*/, size_t size);
-H5_DLL ssize_t H5Pget_virtual_dsetname(hid_t dcpl_id, size_t index, char *name /*out*/, size_t size);
-H5_DLL herr_t H5Pset_external(hid_t plist_id, const char *name, off_t offset, hsize_t size);
-H5_DLL herr_t H5Pset_chunk_opts(hid_t plist_id, unsigned opts);
-H5_DLL herr_t H5Pget_chunk_opts(hid_t plist_id, unsigned *opts);
-H5_DLL int H5Pget_external_count(hid_t plist_id);
-H5_DLL herr_t H5Pget_external(hid_t plist_id, unsigned idx, size_t name_size, char *name /*out*/,
- off_t *offset /*out*/, hsize_t *size /*out*/);
-H5_DLL herr_t H5Pset_szip(hid_t plist_id, unsigned options_mask, unsigned pixels_per_block);
-H5_DLL herr_t H5Pset_shuffle(hid_t plist_id);
-H5_DLL herr_t H5Pset_nbit(hid_t plist_id);
-H5_DLL herr_t H5Pset_scaleoffset(hid_t plist_id, H5Z_SO_scale_type_t scale_type, int scale_factor);
-H5_DLL herr_t H5Pset_fill_value(hid_t plist_id, hid_t type_id, const void *value);
-H5_DLL herr_t H5Pget_fill_value(hid_t plist_id, hid_t type_id, void *value /*out*/);
-H5_DLL herr_t H5Pfill_value_defined(hid_t plist, H5D_fill_value_t *status);
-H5_DLL herr_t H5Pset_alloc_time(hid_t plist_id, H5D_alloc_time_t alloc_time);
-H5_DLL herr_t H5Pget_alloc_time(hid_t plist_id, H5D_alloc_time_t *alloc_time /*out*/);
-H5_DLL herr_t H5Pset_fill_time(hid_t plist_id, H5D_fill_time_t fill_time);
-H5_DLL herr_t H5Pget_fill_time(hid_t plist_id, H5D_fill_time_t *fill_time /*out*/);
-H5_DLL herr_t H5Pget_dset_no_attrs_hint(hid_t dcpl_id, hbool_t *minimize);
-H5_DLL herr_t H5Pset_dset_no_attrs_hint(hid_t dcpl_id, hbool_t minimize);
-
-/* Dataset access property list (DAPL) routines */
-H5_DLL herr_t H5Pset_chunk_cache(hid_t dapl_id, size_t rdcc_nslots, size_t rdcc_nbytes, double rdcc_w0);
-H5_DLL herr_t H5Pget_chunk_cache(hid_t dapl_id, size_t *rdcc_nslots /*out*/, size_t *rdcc_nbytes /*out*/,
- double *rdcc_w0 /*out*/);
-H5_DLL herr_t H5Pset_virtual_view(hid_t plist_id, H5D_vds_view_t view);
-H5_DLL herr_t H5Pget_virtual_view(hid_t plist_id, H5D_vds_view_t *view);
-H5_DLL herr_t H5Pset_virtual_printf_gap(hid_t plist_id, hsize_t gap_size);
-H5_DLL herr_t H5Pget_virtual_printf_gap(hid_t plist_id, hsize_t *gap_size);
-H5_DLL herr_t H5Pset_virtual_prefix(hid_t dapl_id, const char *prefix);
-H5_DLL ssize_t H5Pget_virtual_prefix(hid_t dapl_id, char *prefix /*out*/, size_t size);
-H5_DLL herr_t H5Pset_append_flush(hid_t plist_id, unsigned ndims, const hsize_t boundary[],
- H5D_append_cb_t func, void *udata);
-H5_DLL herr_t H5Pget_append_flush(hid_t plist_id, unsigned dims, hsize_t boundary[], H5D_append_cb_t *func,
- void **udata);
-H5_DLL herr_t H5Pset_efile_prefix(hid_t dapl_id, const char *prefix);
-H5_DLL ssize_t H5Pget_efile_prefix(hid_t dapl_id, char *prefix /*out*/, size_t size);
-
-/* Dataset xfer property list (DXPL) routines */
-H5_DLL herr_t H5Pset_data_transform(hid_t plist_id, const char *expression);
-H5_DLL ssize_t H5Pget_data_transform(hid_t plist_id, char *expression /*out*/, size_t size);
-H5_DLL herr_t H5Pset_buffer(hid_t plist_id, size_t size, void *tconv, void *bkg);
-H5_DLL size_t H5Pget_buffer(hid_t plist_id, void **tconv /*out*/, void **bkg /*out*/);
-H5_DLL herr_t H5Pset_preserve(hid_t plist_id, hbool_t status);
-H5_DLL int H5Pget_preserve(hid_t plist_id);
-H5_DLL herr_t H5Pset_edc_check(hid_t plist_id, H5Z_EDC_t check);
-H5_DLL H5Z_EDC_t H5Pget_edc_check(hid_t plist_id);
-H5_DLL herr_t H5Pset_filter_callback(hid_t plist_id, H5Z_filter_func_t func, void *op_data);
-H5_DLL herr_t H5Pset_btree_ratios(hid_t plist_id, double left, double middle, double right);
-H5_DLL herr_t H5Pget_btree_ratios(hid_t plist_id, double *left /*out*/, double *middle /*out*/,
- double *right /*out*/);
-H5_DLL herr_t H5Pset_vlen_mem_manager(hid_t plist_id, H5MM_allocate_t alloc_func, void *alloc_info,
- H5MM_free_t free_func, void *free_info);
-H5_DLL herr_t H5Pget_vlen_mem_manager(hid_t plist_id, H5MM_allocate_t *alloc_func, void **alloc_info,
- H5MM_free_t *free_func, void **free_info);
-H5_DLL herr_t H5Pset_hyper_vector_size(hid_t fapl_id, size_t size);
-H5_DLL herr_t H5Pget_hyper_vector_size(hid_t fapl_id, size_t *size /*out*/);
-H5_DLL herr_t H5Pset_type_conv_cb(hid_t dxpl_id, H5T_conv_except_func_t op, void *operate_data);
-H5_DLL herr_t H5Pget_type_conv_cb(hid_t dxpl_id, H5T_conv_except_func_t *op, void **operate_data);
-#ifdef H5_HAVE_PARALLEL
-H5_DLL herr_t H5Pget_mpio_actual_chunk_opt_mode(hid_t plist_id,
- H5D_mpio_actual_chunk_opt_mode_t *actual_chunk_opt_mode);
-H5_DLL herr_t H5Pget_mpio_actual_io_mode(hid_t plist_id, H5D_mpio_actual_io_mode_t *actual_io_mode);
-H5_DLL herr_t H5Pget_mpio_no_collective_cause(hid_t plist_id, uint32_t *local_no_collective_cause,
- uint32_t *global_no_collective_cause);
-#endif /* H5_HAVE_PARALLEL */
-
-/* Link creation property list (LCPL) routines */
-H5_DLL herr_t H5Pset_create_intermediate_group(hid_t plist_id, unsigned crt_intmd);
-H5_DLL herr_t H5Pget_create_intermediate_group(hid_t plist_id, unsigned *crt_intmd /*out*/);
-
-/* Group creation property list (GCPL) routines */
-H5_DLL herr_t H5Pset_local_heap_size_hint(hid_t plist_id, size_t size_hint);
-H5_DLL herr_t H5Pget_local_heap_size_hint(hid_t plist_id, size_t *size_hint /*out*/);
-H5_DLL herr_t H5Pset_link_phase_change(hid_t plist_id, unsigned max_compact, unsigned min_dense);
-H5_DLL herr_t H5Pget_link_phase_change(hid_t plist_id, unsigned *max_compact /*out*/,
- unsigned *min_dense /*out*/);
-H5_DLL herr_t H5Pset_est_link_info(hid_t plist_id, unsigned est_num_entries, unsigned est_name_len);
-H5_DLL herr_t H5Pget_est_link_info(hid_t plist_id, unsigned *est_num_entries /* out */,
- unsigned *est_name_len /* out */);
-H5_DLL herr_t H5Pset_link_creation_order(hid_t plist_id, unsigned crt_order_flags);
-H5_DLL herr_t H5Pget_link_creation_order(hid_t plist_id, unsigned *crt_order_flags /* out */);
-
-/* Map access property list (MAPL) routines */
-#ifdef H5_HAVE_MAP_API
-H5_DLL herr_t H5Pset_map_iterate_hints(hid_t mapl_id, size_t key_prefetch_size, size_t key_alloc_size);
-H5_DLL herr_t H5Pget_map_iterate_hints(hid_t mapl_id, size_t *key_prefetch_size /*out*/,
- size_t *key_alloc_size /*out*/);
-#endif /* H5_HAVE_MAP_API */
-
-/* String creation property list (STRCPL) routines */
-H5_DLL herr_t H5Pset_char_encoding(hid_t plist_id, H5T_cset_t encoding);
-H5_DLL herr_t H5Pget_char_encoding(hid_t plist_id, H5T_cset_t *encoding /*out*/);
-
-/* Link access property list (LAPL) routines */
-H5_DLL herr_t H5Pset_nlinks(hid_t plist_id, size_t nlinks);
-H5_DLL herr_t H5Pget_nlinks(hid_t plist_id, size_t *nlinks);
-H5_DLL herr_t H5Pset_elink_prefix(hid_t plist_id, const char *prefix);
-H5_DLL ssize_t H5Pget_elink_prefix(hid_t plist_id, char *prefix, size_t size);
-H5_DLL hid_t H5Pget_elink_fapl(hid_t lapl_id);
-H5_DLL herr_t H5Pset_elink_fapl(hid_t lapl_id, hid_t fapl_id);
-H5_DLL herr_t H5Pset_elink_acc_flags(hid_t lapl_id, unsigned flags);
-H5_DLL herr_t H5Pget_elink_acc_flags(hid_t lapl_id, unsigned *flags);
-H5_DLL herr_t H5Pset_elink_cb(hid_t lapl_id, H5L_elink_traverse_t func, void *op_data);
-H5_DLL herr_t H5Pget_elink_cb(hid_t lapl_id, H5L_elink_traverse_t *func, void **op_data);
-
-/* Object copy property list (OCPYPL) routines */
-H5_DLL herr_t H5Pset_copy_object(hid_t plist_id, unsigned crt_intmd);
-H5_DLL herr_t H5Pget_copy_object(hid_t plist_id, unsigned *crt_intmd /*out*/);
-H5_DLL herr_t H5Padd_merge_committed_dtype_path(hid_t plist_id, const char *path);
-H5_DLL herr_t H5Pfree_merge_committed_dtype_paths(hid_t plist_id);
-H5_DLL herr_t H5Pset_mcdt_search_cb(hid_t plist_id, H5O_mcdt_search_cb_t func, void *op_data);
-H5_DLL herr_t H5Pget_mcdt_search_cb(hid_t plist_id, H5O_mcdt_search_cb_t *func, void **op_data);
-
-/* Symbols defined for compatibility with previous versions of the HDF5 API.
+/**
+ * \ingroup GPLOA
+ *
+ * \brief Queries whether a property name exists in a property list or
+ * class
+ *
+ * \param[in] plist_id Identifier for the property list or class to query
+ * \param[in] name Name of property to check for
+ *
+ * \return \htri_t
+ *
+ * \details H5Pexist() determines whether a property exists within a
+ * property list or class.
+ *
+ * \since 1.4.0
*
- * Use of these symbols is deprecated.
*/
-#ifndef H5_NO_DEPRECATED_SYMBOLS
-
+H5_DLL htri_t H5Pexist(hid_t plist_id, const char *name);
+/**
+ * \ingroup GPLOA
+ *
+ * \brief Queries the value of a property
+ *
+ * \plist_id
+ * \param[in] name Name of property to query
+ * \param[out] value Pointer to a location to which to copy the value of
+ * the property
+ *
+ * \return \herr_t
+ *
+ * \details H5Pget() retrieves a copy of the value for a property in a
+ * property list. If there is a \p get callback routine registered
+ * for this property, the copy of the value of the property will
+ * first be passed to that routine and any changes to the copy of
+ * the value will be used when returning the property value from
+ * this routine.
+ *
+ * This routine may be called for zero-sized properties with the
+ * \p value set to NULL. The \p get routine will be called with
+ * a NULL value if the callback exists.
+ *
+ * The property name must exist or this routine will fail.
+ *
+ * If the \p get callback routine returns an error, \ value will
+ * not be modified.
+ *
+ * \since 1.4.0
+ *
+ */
+H5_DLL herr_t H5Pget(hid_t plist_id, const char *name, void *value);
+/**
+ *\ingroup GPLO
+ *
+ * \brief Returns the property list class identifier for a property list
+ *
+ * \plist_id
+ *
+ * \return \hid_t{property list class}
+ *
+ * \details H5Pget_class() returns the property list class identifier for
+ * the property list identified by the \p plist_id parameter.
+ *
+ * Note that H5Pget_class() returns a value of #hid_t type, an
+ * internal HDF5 identifier, rather than directly returning a
+ * property list class. That identifier can then be used with
+ * either H5Pequal() or H5Pget_class_name() to determine which
+ * predefined HDF5 property list class H5Pget_class() has returned.
+ *
+ * A full list of valid predefined property list classes appears
+ * in the description of H5Pcreate().
+ *
+ * Determining the HDF5 property list class name with H5Pequal()
+ * requires a series of H5Pequal() calls in an if-else sequence.
+ * An iterative sequence of H5Pequal() calls can compare the
+ * identifier returned by H5Pget_class() to members of the list of
+ * valid property list class names. A pseudo-code snippet might
+ * read as follows:
+ *
+ * \code
+ * plist_class_id = H5Pget_class (dsetA_plist);
+ *
+ * if H5Pequal (plist_class_id, H5P_OBJECT_CREATE) = TRUE;
+ * [ H5P_OBJECT_CREATE is the property list class ]
+ * [ returned by H5Pget_class. ]
+ *
+ * else if H5Pequal (plist_class_id, H5P_DATASET_CREATE) = TRUE;
+ * [ H5P_DATASET_CREATE is the property list class. ]
+ *
+ * else if H5Pequal (plist_class_id, H5P_DATASET_XFER) = TRUE;
+ * [ H5P_DATASET_XFER is the property list class. ]
+ *
+ * .
+ * . [ Continuing the iteration until a match is found. ]
+ * .
+ * \endcode
+ *
+ * H5Pget_class_name() returns the property list class name directly
+ * as a string:
+ *
+ * \code
+ * plist_class_id = H5Pget_class (dsetA_plist);
+ * plist_class_name = H5Pget_class_name (plist_class_id)
+ * \endcode
+ *
+ * Note that frequent use of H5Pget_class_name() can become a
+ * performance problem in a high-performance environment. The
+ * H5Pequal() approach is generally much faster.
+ *
+ * \version 1.6.0 Return type changed in this release.
+ * \since 1.0.0
+ *
+ */
+H5_DLL hid_t H5Pget_class(hid_t plist_id);
+/**
+ * \ingroup GPLOA
+ *
+ * \brief Retrieves the name of a class
+ *
+ * \plistcls_id{pclass_id}
+ *
+ * \return Returns a pointer to an allocated string containing the class
+ * name if successful, and NULL if not successful.
+ *
+ * \details H5Pget_class_name() retrieves the name of a generic property
+ * list class. The pointer to the name must be freed by the user
+ * with a call to H5free_memory() after each successful call.
+ *
+ *
+ *
+ * Class Name (class identifier) Returned |
+ * Property List Class |
+ * Expanded Name of the Property List Class |
+ * The Class Identifier Used with H5Pcreate |
+ * Comments |
+ *
+ *
+ * attribute create |
+ * acpl |
+ * Attribute Creation Property List |
+ * H5P_ATTRIBUTE_CREATE |
+ * |
+ *
+ *
+ * dataset access |
+ * dapl |
+ * Dataset Access Property List |
+ * H5P_DATASET_ACCESS |
+ * |
+ *
+ *
+ * dataset create |
+ * dcpl |
+ * Dataset Creation Property List |
+ * H5P_DATASET_CREATE |
+ * |
+ *
+ *
+ * data transfer |
+ * dxpl |
+ * Data Transfer Property List |
+ * H5P_DATASET_XFER |
+ * |
+ *
+ *
+ * datatype access |
+ * |
+ * |
+ * H5P_DATATYPE_ACCESS |
+ * This class can be created, but there are no properties
+ * in the class currently.
+ * |
+ *
+ *
+ * datatype create |
+ * |
+ * |
+ * H5P_DATATYPE_CREATE |
+ * This class can be created, but there
+ * are no properties in the class currently. |
+ *
+ *
+ * file access |
+ * fapl |
+ * File Access Property List |
+ * H5P_FILE_ACCESS |
+ * |
+ *
+ *
+ * file create |
+ * fcpl |
+ * File Creation Property List |
+ * H5P_FILE_CREATE |
+ * |
+ *
+ *
+ * file mount |
+ * fmpl |
+ * File Mount Property List |
+ * H5P_FILE_MOUNT |
+ * |
+ *
+ *
+ * group access |
+ * |
+ * |
+ * H5P_GROUP_ACCESS |
+ * This class can be created, but there
+ * are no properties in the class currently. |
+ *
+ *
+ * group create |
+ * gcpl |
+ * Group Creation Property List |
+ * H5P_GROUP_CREATE |
+ * |
+ *
+ *
+ * link access |
+ * lapl |
+ * Link Access Property List |
+ * H5P_LINK_ACCESS |
+ * |
+ *
+ *
+ * link create |
+ * lcpl |
+ * Link Creation Property List |
+ * H5P_LINK_CREATE |
+ * |
+ *
+ *
+ * object copy |
+ * ocpypl |
+ * Object Copy Property List |
+ * H5P_OBJECT_COPY |
+ * |
+ *
+ *
+ * object create |
+ * ocpl |
+ * Object Creation Property List |
+ * H5P_OBJECT_CREATE |
+ * |
+ *
+ *
+ * string create |
+ * strcpl |
+ * String Creation Property List |
+ * H5P_STRING_CREATE |
+ * |
+ *
+ *
+ *
+ * \since 1.4.0
+ *
+ */
+H5_DLL char *H5Pget_class_name(hid_t pclass_id);
+/**
+ * \ingroup GPLOA
+ *
+ * \brief Retrieves the parent class of a property class
+ *
+ * \plistcls_id{pclass_id}
+ *
+ * \return \hid_t{parent class object}
+ *
+ * \details H5Pget_class_parent() retrieves an identifier for the parent
+ * class of a property class.
+ *
+ * \since 1.4.0
+ *
+ */
+H5_DLL hid_t H5Pget_class_parent(hid_t pclass_id);
+/**
+ * \ingroup GPLOA
+ *
+ * \brief Queries the number of properties in a property list or class
+ *
+ * \param[in] id Identifier for property object to query
+ * \param[out] nprops Number of properties in object
+ *
+ * \return \herr_t
+ *
+ * \details H5Pget_nprops() retrieves the number of properties in a
+ * property list or property list class.
+ *
+ * If \p id is a property list identifier, the current number of
+ * properties in the list is returned in \p nprops.
+ *
+ * If \p id is a property list class identifier, the number of
+ * registered properties in the class is returned in \p nprops.
+ *
+ * \since 1.4.0
+ *
+ */
+H5_DLL herr_t H5Pget_nprops(hid_t id, size_t *nprops);
+/**
+ * \ingroup GPLOA
+ *
+ * \brief Queries the size of a property value in bytes
+ *
+ * \param[in] id Identifier of property object to query
+ * \param[in] name Name of property to query
+ * \param[out] size Size of property in bytes
+ *
+ * \return \herr_t
+ *
+ * \details H5Pget_size() retrieves the size of a property's value in
+ * bytes. This function operates on both property lists and
+ * property classes.
+ *
+ * Zero-sized properties are allowed and return 0.
+ *
+ * \since 1.4.0
+ *
+ */
+H5_DLL herr_t H5Pget_size(hid_t id, const char *name, size_t *size);
+/**
+ * \ingroup GPLOA
+ *
+ * \brief Registers a temporary property with a property list
+ *
+ * \plist_id
+ * \param[in] name Name of property to create
+ * \param[in] size Size of property in bytes
+ * \param[in] value Initial value for the property
+ * \param[in] set Callback routine called before a new value is copied
+ * into the property's value
+ * \param[in] get Callback routine called when a property value is
+ * retrieved from the property
+ * \param[in] prp_del Callback routine called when a property is deleted
+ * from a property list
+ * \param[in] copy Callback routine called when a property is copied
+ * from an existing property list
+ * \param[in] compare Callback routine called when a property is compared
+ * with another property list
+ * \param[in] close Callback routine called when a property list is
+ * being closed and the property value will be disposed
+ * of
+ *
+ * \return \herr_t
+ *
+ * \details H5Pinsert2() creates a new property in a property
+ * list. The property will exist only in this property list and
+ * copies made from it.
+ *
+ * The initial property value must be provided in \p value and
+ * the property value will be set accordingly.
+ *
+ * The name of the property must not already exist in this list,
+ * or this routine will fail.
+ *
+ * The \p set and \p get callback routines may be set to NULL
+ * if they are not needed.
+ *
+ * Zero-sized properties are allowed and do not store any data
+ * in the property list. The default value of a zero-size
+ * property may be set to NULL. They may be used to indicate the
+ * presence or absence of a particular piece of information.
+ *
+ * The \p set routine is called before a new value is copied
+ * into the property. The #H5P_prp_set_func_t callback function
+ * is defined as follows:
+ * \snippet this H5P_prp_cb2_t_snip
+ *
+ * The parameters to the callback function are defined as follows:
+ *
+ *
+ * \ref hid_t \c prop_id |
+ * IN: The identifier of the property list being
+ * modified |
+ *
+ *
+ * \Code{const char * name} |
+ * IN: The name of the property being modified |
+ *
+ *
+ * \Code{size_t size} |
+ * IN: The size of the property in bytes |
+ *
+ *
+ * \Code{void * value} |
+ * IN: Pointer to new value pointer for the property
+ * being modified |
+ *
+ *
+ *
+ * The \p set routine may modify the value pointer to be set and
+ * those changes will be used when setting the property's value.
+ * If the \p set routine returns a negative value, the new property
+ * value is not copied into the property and the \p set routine
+ * returns an error value. The \p set routine will be called for
+ * the initial value.
+ *
+ * \b Note: The \p set callback function may be useful to range
+ * check the value being set for the property or may perform some
+ * transformation or translation of the value set. The \p get
+ * callback would then reverse the transformation or translation.
+ * A single \p get or \p set callback could handle multiple
+ * properties by performing different actions based on the
+ * property name or other properties in the property list.
+ *
+ * The \p get routine is called when a value is retrieved from
+ * a property value. The #H5P_prp_get_func_t callback function
+ * is defined as follows:
+ *
+ * \snippet this H5P_prp_cb2_t_snip
+ *
+ * The parameters to the above callback function are:
+ *
+ *
+ *
+ * \ref hid_t \c prop_id |
+ * IN: The identifier of the property list being queried |
+ *
+ *
+ * \Code{const char * name} |
+ * IN: The name of the property being queried |
+ *
+ *
+ * \Code{size_t size} |
+ * IN: The size of the property in bytes |
+ *
+ *
+ * \Code{void * value} |
+ * IN: The value of the property being returned |
+ *
+ *
+ *
+ * The \p get routine may modify the value to be returned from
+ * the query and those changes will be preserved. If the \p get
+ * routine returns a negative value, the query routine returns
+ * an error value.
+ *
+ * The \p prp_del routine is called when a property is being
+ * deleted from a property list. The #H5P_prp_delete_func_t
+ * callback function is defined as follows:
+ *
+ * \snippet this H5P_prp_cb2_t_snip
+ *
+ * The parameters to the above callback function are:
+ *
+ *
+ *
+ * \ref hid_t \c prop_id |
+ * IN: The identifier of the property list the property is
+ * being deleted from |
+ *
+ *
+ * \Code{const char * name} |
+ * IN: The name of the property in the list |
+ *
+ *
+ * \Code{size_t size} |
+ * IN: The size of the property in bytes |
+ *
+ *
+ * \Code{void * value} |
+ * IN: The value for the property being deleted |
+ *
+ *
+ *
+ * The \p prp_del routine may modify the value passed in, but the
+ * value is not used by the library when the \p prp_del routine
+ * returns. If the \p prp_del routine returns a negative value,
+ * the property list \p prp_del routine returns an error value but
+ * the property is still deleted.
+ *
+ * The \p copy routine is called when a new property list with
+ * this property is being created through a \p copy operation.
+ *
+ * The #H5P_prp_copy_func_t callback function is defined as follows:
+ *
+ * \snippet this H5P_prp_cb1_t_snip
+ *
+ * The parameters to the above callback function are:
+ *
+ *
+ * \Code{const char * name} |
+ * IN: The name of the property being copied |
+ *
+ *
+ * \Code{size_t size} |
+ * IN: The size of the property in bytes |
+ *
+ *
+ * \Code{void * value} |
+ * IN/OUT: The value for the property being copied |
+ *
+ *
+ *
+ * The \p copy routine may modify the value to be set and those
+ * changes will be stored as the new value of the property. If the
+ * \p copy routine returns a negative value, the new property value
+ * is not copied into the property and the copy routine returns an
+ * error value.
+ *
+ * The \p compare routine is called when a property list with this
+ * property is compared to another property list with the same
+ * property.
+ *
+ * The #H5P_prp_compare_func_t callback function is defined as
+ * follows:
+ *
+ * \snippet this H5P_prp_compare_func_t_snip
+ *
+ * The parameters to the callback function are defined as follows:
+ *
+ *
+ *
+ * \Code{const void * value1} |
+ * IN: The value of the first property to compare |
+ *
+ *
+ * \Code{const void * value2} |
+ * IN: The value of the second property to compare |
+ *
+ *
+ * \Code{size_t size} |
+ * IN: The size of the property in bytes |
+ *
+ *
+ *
+ * The \p compare routine may not modify the values. The \p compare
+ * routine should return a positive value if \p value1 is greater
+ * than \p value2, a negative value if \p value2 is greater than
+ * \p value1 and zero if \p value1 and \p value2 are equal.
+ *
+ * The \p close routine is called when a property list with this
+ * property is being closed.
+ *
+ * The #H5P_prp_close_func_t callback function is defined as follows:
+ * \snippet this H5P_prp_cb1_t_snip
+ *
+ * The parameters to the callback function are defined as follows:
+ *
+ *
+ *
+ * \Code{const char * name} |
+ * IN: The name of the property in the list |
+ *
+ *
+ * \Code{size_t size} |
+ * IN: The size of the property in bytes |
+ *
+ *
+ * \Code{void * value} |
+ * IN: The value for the property being closed |
+ *
+ *
+ *
+ * The \p close routine may modify the value passed in, the
+ * value is not used by the library when the close routine
+ * returns. If the \p close routine returns a negative value,
+ * the property list \p close routine returns an error value
+ * but the property list is still closed.
+ *
+ * \b Note: There is no \p create callback routine for temporary
+ * property list objects; the initial value is assumed to
+ * have any necessary setup already performed on it.
+ *
+ * \since 1.8.0
+ *
+ */
+H5_DLL herr_t H5Pinsert2(hid_t plist_id, const char *name, size_t size, void *value, H5P_prp_set_func_t set,
+ H5P_prp_get_func_t get, H5P_prp_delete_func_t prp_del, H5P_prp_copy_func_t copy,
+ H5P_prp_compare_func_t compare, H5P_prp_close_func_t close);
+/**
+ * \ingroup GPLOA
+ *
+ * \brief Determines whether a property list is a member of a class
+ *
+ * \plist_id
+ * \plistcls_id{pclass_id}
+ *
+ * \return \htri_t
+ *
+ * \details H5Pisa_class() checks to determine whether the property list
+ * \p plist_id is a member of the property list class
+ * \p pclass_id.
+ *
+ * \see H5Pcreate()
+ *
+ * \since 1.6.0
+ *
+ */
+H5_DLL htri_t H5Pisa_class(hid_t plist_id, hid_t pclass_id);
+/**
+ * \ingroup GPLOA
+ *
+ * \brief Iterates over properties in a property class or list
+ *
+ * \param[in] id Identifier of property object to iterate over
+ * \param[in,out] idx Index of the property to begin with
+ * \param[in] iter_func Function pointer to function to be called
+ * with each property iterated over
+ * \param[in,out] iter_data Pointer to iteration data from user
+ *
+ * \return On success: the return value of the last call to \p iter_func if
+ * it was non-zero; zero if all properties have been processed.
+ * On Failure, a negative value
+ *
+ * \details H5Piterate() iterates over the properties in the property
+ * object specified in \p id, which may be either a property
+ * list or a property class, performing a specified operation
+ * on each property in turn.
+ *
+ * For each property in the object, \p iter_func and the
+ * additional information specified below are passed to the
+ * #H5P_iterate_t operator function.
+ *
+ * The iteration begins with the \p idx-th property in the
+ * object; the next element to be processed by the operator
+ * is returned in \p idx. If \p idx is NULL, the iterator
+ * starts at the first property; since no stopping point is
+ * returned in this case, the iterator cannot be restarted if
+ * one of the calls to its operator returns non-zero.
+ *
+ * The prototype for the #H5P_iterate_t operator is as follows:
+ * \snippet this H5P_iterate_t_snip
+ *
+ * The operation receives the property list or class
+ * identifier for the object being iterated over, \p id, the
+ * name of the current property within the object, \p name,
+ * and the pointer to the operator data passed in to H5Piterate(),
+ * \p iter_data. The valid return values from an operator are
+ * as follows:
+ *
+ *
+ *
+ * Zero |
+ * Causes the iterator to continue, returning zero when all
+ * properties have been processed |
+ *
+ *
+ * Positive |
+ * Causes the iterator to immediately return that positive
+ * value, indicating short-circuit success. The iterator
+ * can be restarted at the index of the next property |
+ *
+ *
+ * Negative |
+ * Causes the iterator to immediately return that value,
+ * indicating failure. The iterator can be restarted at the
+ * index of the next property |
+ *
+ *
+ * H5Piterate() assumes that the properties in the object
+ * identified by \p id remain unchanged through the iteration.
+ * If the membership changes during the iteration, the function's
+ * behavior is undefined.
+ *
+ * \since 1.4.0
+ *
+ */
+H5_DLL int H5Piterate(hid_t id, int *idx, H5P_iterate_t iter_func, void *iter_data);
+/**
+ * \ingroup GPLOA
+ *
+ * \brief Registers a permanent property with a property list class
+ *
+ * \plistcls_id{cls_id}
+ * \param[in] name Name of property to register
+ * \param[in] size Size of property in bytes
+ * \param[in] def_value Default value for property in newly created
+ * property lists
+ * \param[in] create Callback routine called when a property list is
+ * being created and the property value will be
+ * initialized
+ * \param[in] set Callback routine called before a new value is
+ * copied into the property's value
+ * \param[in] get Callback routine called when a property value is
+ * retrieved from the property
+ * \param[in] prp_del Callback routine called when a property is deleted
+ * from a property list
+ * \param[in] copy Callback routine called when a property is copied
+ * from a property list
+ * \param[in] compare Callback routine called when a property is compared
+ * with another property list
+ * \param[in] close Callback routine called when a property list is
+ * being closed and the property value will be
+ * disposed of
+ *
+ * \return \herr_t
+ *
+ * \details H5Pregister2() registers a new property with a property list
+ * class. The \p cls_id identifier can be obtained by calling
+ * H5Pcreate_class(). The property will exist in all property
+ * list objects of \p cl_id created after this routine finishes. The
+ * name of the property must not already exist, or this routine
+ * will fail. The default property value must be provided and all
+ * new property lists created with this property will have the
+ * property value set to the default value. Any of the callback
+ * routines may be set to NULL if they are not needed.
+ *
+ * Zero-sized properties are allowed and do not store any data in
+ * the property list. These may be used as flags to indicate the
+ * presence or absence of a particular piece of information. The
+ * default pointer for a zero-sized property may be set to NULL.
+ * The property \p create and \p close callbacks are called for
+ * zero-sized properties, but the \p set and \p get callbacks are
+ * never called.
+ *
+ * The \p create routine is called when a new property list with
+ * this property is being created. The #H5P_prp_create_func_t
+ * callback function is defined as follows:
+ *
+ * \snippet this H5P_prp_cb1_t_snip
+ *
+ * The parameters to this callback function are defined as follows:
+ *
+ *
+ *
+ * \Code{const char * name} |
+ * IN: The name of the property being modified |
+ *
+ *
+ * \Code{size_t size} |
+ * IN: The size of the property in bytes |
+ *
+ *
+ * \Code{void * value} |
+ * IN/OUT: The default value for the property being created,
+ * which will be passed to H5Pregister2() |
+ *
+ *
+ *
+ * The \p create routine may modify the value to be set and those
+ * changes will be stored as the initial value of the property.
+ * If the \p create routine returns a negative value, the new
+ * property value is not copied into the property and the
+ * \p create routine returns an error value.
+ *
+ * The \p set routine is called before a new value is copied into
+ * the property. The #H5P_prp_set_func_t callback function is defined
+ * as follows:
+ *
+ * \snippet this H5P_prp_cb2_t_snip
+ *
+ * The parameters to this callback function are defined as follows:
+ *
+ *
+ *
+ * \ref hid_t \c prop_id |
+ * IN: The identifier of the property list being modified |
+ *
+ *
+ * \Code{const char * name} |
+ * IN: The name of the property being modified |
+ *
+ *
+ * \Code{size_t size} |
+ * IN: The size of the property in bytes |
+ *
+ *
+ * \Code{void *value} |
+ * IN/OUT: Pointer to new value pointer for the property
+ * being modified |
+ *
+ *
+ *
+ * The \p set routine may modify the value pointer to be set and
+ * those changes will be used when setting the property's value.
+ * If the \p set routine returns a negative value, the new property
+ * value is not copied into the property and the \p set routine
+ * returns an error value. The \p set routine will not be called
+ * for the initial value; only the \p create routine will be called.
+ *
+ * \b Note: The \p set callback function may be useful to range
+ * check the value being set for the property or may perform some
+ * transformation or translation of the value set. The \p get
+ * callback would then reverse the transformation or translation.
+ * A single \p get or \p set callback could handle multiple
+ * properties by performing different actions based on the property
+ * name or other properties in the property list.
+ *
+ * The \p get routine is called when a value is retrieved from a
+ * property value. The #H5P_prp_get_func_t callback function is
+ * defined as follows:
+ *
+ * \snippet this H5P_prp_cb2_t_snip
+ *
+ * The parameters to the callback function are defined as follows:
+ *
+ *
+ *
+ * \ref hid_t \c prop_id |
+ * IN: The identifier of the property list being
+ * queried |
+ *
+ *
+ * \Code{const char * name} |
+ * IN: The name of the property being queried |
+ *
+ *
+ * \Code{size_t size} |
+ * IN: The size of the property in bytes |
+ *
+ *
+ * \Code{void * value} |
+ * IN/OUT: The value of the property being returned |
+ *
+ *
+ *
+ * The \p get routine may modify the value to be returned from the
+ * query and those changes will be returned to the calling routine.
+ * If the \p set routine returns a negative value, the query
+ * routine returns an error value.
+ *
+ * The \p prp_del routine is called when a property is being
+ * deleted from a property list. The #H5P_prp_delete_func_t
+ * callback function is defined as follows:
+ *
+ * \snippet this H5P_prp_cb2_t_snip
+ *
+ * The parameters to the callback function are defined as follows:
+ *
+ *
+ *
+ * \ref hid_t \c prop_id |
+ * IN: The identifier of the property list the property is
+ * being deleted from |
+ *
+ *
+ * \Code{const char * name} |
+ * IN: The name of the property in the list |
+ *
+ *
+ * \Code{size_t size} |
+ * IN: The size of the property in bytes |
+ *
+ *
+ * \Code{void * value} |
+ * IN: The value for the property being deleted |
+ *
+ *
+ *
+ * The \p prp_del routine may modify the value passed in, but the
+ * value is not used by the library when the \p prp_del routine
+ * returns. If the \p prp_del routine returns a negative value,
+ * the property list delete routine returns an error value but
+ * the property is still deleted.
+ *
+ * The \p copy routine is called when a new property list with
+ * this property is being created through a \p copy operation.
+ * The #H5P_prp_copy_func_t callback function is defined as follows:
+ *
+ * \snippet this H5P_prp_cb1_t_snip
+ *
+ * The parameters to the callback function are defined as follows:
+ *
+ *
+ *
+ * \Code{const char * name} |
+ * IN: The name of the property being copied |
+ *
+ *
+ * \Code{size_t size} |
+ * IN: The size of the property in bytes |
+ *
+ *
+ * \Code{void * value} |
+ * IN/OUT: The value for the property being copied |
+ *
+ *
+ *
+ * The \p copy routine may modify the value to be set and those
+ * changes will be stored as the new value of the property. If
+ * the \p copy routine returns a negative value, the new
+ * property value is not copied into the property and the \p copy
+ * routine returns an error value.
+ *
+ * The \p compare routine is called when a property list with this
+ * property is compared to another property list with the same
+ * property. The #H5P_prp_compare_func_t callback function is
+ * defined as follows:
+ *
+ * \snippet this H5P_prp_compare_func_t_snip
+ *
+ * The parameters to the callback function are defined as follows:
+ *
+ *
+ *
+ * \Code{const void * value1} |
+ * IN: The value of the first property to compare |
+ *
+ *
+ * \Code{const void * value2} |
+ * IN: The value of the second property to compare |
+ *
+ *
+ * \Code{size_t size} |
+ * IN: The size of the property in bytes |
+ *
+ *
+ *
+ * The \p compare routine may not modify the values. The \p compare
+ * routine should return a positive value if \p value1 is greater
+ * than \p value2, a negative value if \p value2 is greater than
+ * \p value1 and zero if \p value1 and \p value2 are equal.
+ *
+ * The \p close routine is called when a property list with this
+ * property is being closed. The #H5P_prp_close_func_t callback
+ * function is defined as follows:
+ *
+ * \snippet this H5P_prp_cb1_t_snip
+ *
+ * The parameters to the callback function are defined as follows:
+ *
+ *
+ *
+ * \Code{const char * name} |
+ * IN: The name of the property in the list |
+ *
+ *
+ * \Code{size_t size} |
+ * IN: The size of the property in bytes |
+ *
+ *
+ * \Code{void * value} |
+ * IN: The value for the property being closed |
+ *
+ *
+ *
+ * The \p close routine may modify the value passed in, but the
+ * value is not used by the library when the \p close routine returns.
+ * If the \p close routine returns a negative value, the property
+ * list close routine returns an error value but the property list is
+ * still closed.
+ *
+ * \since 1.8.0
+ *
+ */
+H5_DLL herr_t H5Pregister2(hid_t cls_id, const char *name, size_t size, void *def_value,
+ H5P_prp_create_func_t create, H5P_prp_set_func_t set, H5P_prp_get_func_t get,
+ H5P_prp_delete_func_t prp_del, H5P_prp_copy_func_t copy,
+ H5P_prp_compare_func_t compare, H5P_prp_close_func_t close);
+/**
+ * \ingroup GPLOA
+ *
+ * \brief Removes a property from a property list
+ *
+ * \plist_id
+ * \param[in] name Name of property to remove
+ *
+ * \return \herr_t
+ *
+ * \details H5Premove() removes a property from a property list. Both
+ * properties which were in existence when the property list was
+ * created (i.e. properties registered with H5Pregister()) and
+ * properties added to the list after it was created (i.e. added
+ * with H5Pinsert1() may be removed from a property list.
+ * Properties do not need to be removed from a property list
+ * before the list itself is closed; they will be released
+ * automatically when H5Pclose() is called.
+ *
+ * If a \p close callback exists for the removed property, it
+ * will be called before the property is released.
+ *
+ * \since 1.4.0
+ *
+ */
+H5_DLL herr_t H5Premove(hid_t plist_id, const char *name);
+/**
+ * \ingroup GPLOA
+ *
+ * \brief Sets a property list value
+ *
+ * \plist_id
+ * \param[in] name Name of property to modify
+ * \param[in] value Pointer to value to set the property to
+ *
+ * \return \herr_t
+ *
+ * \details H5Pset() sets a new value for a property in a property list.
+ * If there is a \p set callback routine registered for this
+ * property, the \p value will be passed to that routine and any
+ * changes to the \p value will be used when setting the property
+ * value. The information pointed to by the \p value pointer
+ * (possibly modified by the \p set callback) is copied into the
+ * property list value and may be changed by the application
+ * making the H5Pset() call without affecting the property value.
+ *
+ * The property name must exist or this routine will fail.
+ *
+ * If the \p set callback routine returns an error, the property
+ * value will not be modified.
+ *
+ * This routine may not be called for zero-sized properties and
+ * will return an error in that case.
+ *
+ * \since 1.4.0
+ *
+ */
+H5_DLL herr_t H5Pset(hid_t plist_id, const char *name, const void *value);
+/**
+ * \ingroup GPLOA
+ *
+ * \brief Removes a property from a property list class
+ *
+ * \plistcls_id{pclass_id}
+ * \param[in] name Name of property to remove
+ *
+ * \return \herr_t
+ *
+ * \details H5Punregister() removes a property from a property list class.
+ * Future property lists created of that class will not contain
+ * this property; existing property lists containing this property
+ * are not affected.
+ *
+ * \since 1.4.0
+ *
+ */
+H5_DLL herr_t H5Punregister(hid_t pclass_id, const char *name);
+
+/* Object creation property list (OCPL) routines */
+
+/**
+ * \ingroup DCPL
+ *
+ * \brief Verifies that all required filters are available
+ *
+ * \plist_id
+ *
+ * \return \htri_t
+ *
+ * \details H5Pall_filters_avail() verifies that all of the filters set in
+ * the dataset or group creation property list \p plist_id are
+ * currently available.
+ *
+ * \version 1.8.5 Function extended to work with group creation property
+ * lists.
+ * \since 1.6.0
+ *
+ */
+H5_DLL htri_t H5Pall_filters_avail(hid_t plist_id);
+/**
+ * \ingroup OCPL
+ *
+ * \brief Retrieves tracking and indexing settings for attribute creation
+ * order
+ *
+ * \plist_id
+ * \param[out] crt_order_flags Flags specifying whether to track and
+ * index attribute creation order
+ *
+ * \return \herr_t
+ *
+ * \details H5Pget_attr_creation_order() retrieves the settings for
+ * tracking and indexing attribute creation order on an object.
+ *
+ * \p plist_id is an object creation property list (\p ocpl),
+ * as it can be a dataset or group creation property list
+ * identifier. The term \p ocpl is used when different types
+ * of objects may be involved.
+ *
+ * \p crt_order_flags returns flags with the following meanings:
+ *
+ *
+ *
+ * #H5P_CRT_ORDER_TRACKED |
+ * Attribute creation order is tracked but not necessarily
+ * indexed. |
+ *
+ *
+ * #H5P_CRT_ORDER_INDEXED |
+ * Attribute creation order is indexed (requires
+ * #H5P_CRT_ORDER_TRACKED). |
+ *
+ *
+ *
+ * If \p crt_order_flags is returned with a value of 0 (zero),
+ * attribute creation order is neither tracked nor indexed.
+ *
+ * \since 1.8.0
+ *
+ */
+H5_DLL herr_t H5Pget_attr_creation_order(hid_t plist_id, unsigned *crt_order_flags);
+/**
+ * \ingroup OCPL
+ *
+ * \brief Retrieves attribute storage phase change thresholds
+ *
+ * \plist_id
+ * \param[out] max_compact Maximum number of attributes to be stored in
+ * compact storage (Default: 8)
+ * \param[out] min_dense Minimum number of attributes to be stored in
+ * dense storage (Default: 6)
+ *
+ * \return \herr_t
+ *
+ * \details H5Pget_attr_phase_change() retrieves threshold values for
+ * attribute storage on an object. These thresholds determine the
+ * point at which attribute storage changes from compact storage
+ * (i.e., storage in the object header) to dense storage (i.e.,
+ * storage in a heap and indexed with a B-tree).
+ *
+ * In the general case, attributes are initially kept in compact
+ * storage. When the number of attributes exceeds \p max_compact,
+ * attribute storage switches to dense storage. If the number of
+ * attributes subsequently falls below \p min_dense, the
+ * attributes are returned to compact storage.
+ *
+ * If \p max_compact is set to 0 (zero), dense storage always used.
+ *
+ * \p plist_id is an object creation property list (\p ocpl), as it
+ * can be a dataset or group creation property list identifier.
+ * The term \p ocpl is used when different types of objects may be
+ * involved.
+ *
+ * \since 1.8.0
+ *
+ */
+H5_DLL herr_t H5Pget_attr_phase_change(hid_t plist_id, unsigned *max_compact, unsigned *min_dense);
+/**
+ * \ingroup OCPL
+ *
+ * \brief Returns information about a filter in a pipeline
+ *
+ * \todo Signature for H5Pget_filter2 is different in H5Pocpl.c than in
+ * H5Ppublic.h
+ *
+ * \ocpl_id{plist_id}
+ * \param[in] idx Sequence number within the filter pipeline of the filter
+ * for which information is sought
+ * \param[out] flags Bit vector specifying certain general properties of the
+ * filter
+ * \param[in,out] cd_nelmts Number of elements in \p cd_values
+ * \param[out] cd_values Auxiliary data for the filter
+ * \param[in] namelen Anticipated number of characters in \p name
+ * \param[out] name Name of the filter
+ * \param[out] filter_config Bit field, as described in H5Zget_filter_info()
+ *
+ * \return Returns a negative value on failure, and the filter identifier
+ * if successful (see #H5Z_filter_t):
+ * - #H5Z_FILTER_DEFLATE Data compression filter,
+ * employing the gzip algorithm
+ * - #H5Z_FILTER_SHUFFLE Data shuffling filter
+ * - #H5Z_FILTER_FLETCHER32 Error detection filter, employing the
+ * Fletcher32 checksum algorithm
+ * - #H5Z_FILTER_SZIP Data compression filter, employing the
+ * SZIP algorithm
+ * - #H5Z_FILTER_NBIT Data compression filter, employing the
+ * N-bit algorithm
+ * - #H5Z_FILTER_SCALEOFFSET Data compression filter, employing the
+ * scale-offset algorithm
+ *
+ * \details H5Pget_filter2() returns information about a filter specified by
+ * its filter number, in a filter pipeline specified by the property
+ * list with which it is associated.
+ *
+ * \p plist_id must be a dataset or group creation property list.
+ *
+ * \p idx is a value between zero and N-1, as described in
+ * H5Pget_nfilters(). The function will return a negative value if
+ * the filter number is out of range.
+ *
+ * The structure of the \p flags argument is discussed in
+ * H5Pset_filter().
+ *
+ * On input, \p cd_nelmts indicates the number of entries in the
+ * \p cd_values array, as allocated by the caller; on return,
+ * \p cd_nelmts contains the number of values defined by the filter.
+ *
+ * If \p name is a pointer to an array of at least \p namelen bytes,
+ * the filter name will be copied into that array. The name will be
+ * null terminated if \p namelen is large enough. The filter name
+ * returned will be the name appearing in the file, the name
+ * registered for the filter, or an empty string.
+ *
+ * \p filter_config is the bit field described in
+ * H5Zget_filter_info().
+ *
+ * \version 1.8.5 Function extended to work with group creation property
+ * lists.
+ * \since 1.8.0
+ *
+ */
+H5_DLL H5Z_filter_t H5Pget_filter2(hid_t plist_id, unsigned idx, unsigned int *flags /*out*/,
+ size_t *cd_nelmts /*out*/, unsigned cd_values[] /*out*/, size_t namelen,
+ char name[], unsigned *filter_config /*out*/);
+/**
+ * \ingroup OCPL
+ *
+ * \brief Returns information about the specified filter
+ *
+ * \ocpl_id{plist_id}
+ * \param[in] filter_id Filter identifier
+ * \param[out] flags Bit vector specifying certain general
+ * properties of the filter
+ * \param[in,out] cd_nelmts Number of elements in \p cd_values
+ * \param[out] cd_values[] Auxiliary data for the filter
+ * \param[in] namelen Length of filter name and number of
+ * elements in \p name
+ * \param[out] name[] Name of filter
+ * \param[out] filter_config Bit field, as described in
+ * H5Zget_filter_info()
+ *
+ * \return \herr_t
+ *
+ * \details H5Pget_filter_by_id2() returns information about the filter
+ * specified in \p filter_id, a filter identifier.
+ *
+ * \p plist_id must be a dataset or group creation property list
+ * and \p filter_id must be in the associated filter pipeline.
+ *
+ * The \p filter_id and \p flags parameters are used in the same
+ * manner as described in the discussion of H5Pset_filter().
+ *
+ * Aside from the fact that they are used for output, the
+ * parameters \p cd_nelmts and \p cd_values[] are used in the same
+ * manner as described in the discussion of H5Pset_filter(). On
+ * input, the \p cd_nelmts parameter indicates the number of
+ * entries in the \p cd_values[] array allocated by the calling
+ * program; on exit it contains the number of values defined by
+ * the filter.
+ *
+ * On input, the \p namelen parameter indicates the number of
+ * characters allocated for the filter name by the calling program
+ * in the array \p name[]. On exit \p name[] contains the name of the
+ * filter with one character of the name in each element of the
+ * array.
+ *
+ * \p filter_config is the bit field described in
+ * H5Zget_filter_info().
+ *
+ * If the filter specified in \p filter_id is not set for the
+ * property list, an error will be returned and
+ * H5Pget_filter_by_id2() will fail.
+ *
+ * \version 1.8.5 Function extended to work with group creation property
+ * lists.
+ *
+ * \since 1.8.0
+ *
+ */
+H5_DLL herr_t H5Pget_filter_by_id2(hid_t plist_id, H5Z_filter_t filter_id, unsigned int *flags /*out*/,
+ size_t *cd_nelmts /*out*/, unsigned cd_values[] /*out*/, size_t namelen,
+ char name[] /*out*/, unsigned *filter_config /*out*/);
+/**
+ * \ingroup OCPL
+ *
+ * \brief Returns the number of filters in the pipeline
+ *
+ * \ocpl_id{plist_id}
+ *
+ * \return Returns the number of filters in the pipeline if successful;
+ * otherwise returns a negative value.
+ *
+ * \details H5Pget_nfilters() returns the number of filters defined in the
+ * filter pipeline associated with the property list \p plist_id.
+ *
+ * In each pipeline, the filters are numbered from 0 through \Code{N-1},
+ * where \c N is the value returned by this function. During output to
+ * the file, the filters are applied in increasing order; during
+ * input from the file, they are applied in decreasing order.
+ *
+ * H5Pget_nfilters() returns the number of filters in the pipeline,
+ * including zero (0) if there are none.
+ *
+ * \since 1.0.0
+ *
+ */
+H5_DLL int H5Pget_nfilters(hid_t plist_id);
+/**
+ * \ingroup OCPL
+ *
+ * \brief Determines whether times associated with an object
+ * are being recorded
+ *
+ * \plist_id
+ * \param[out] track_times Boolean value, 1 (TRUE) or 0 (FALSE),
+ * specifying whether object times are being recorded
+ *
+ * \return \herr_t
+ *
+ * \details H5Pget_obj_track_times() queries the object creation property
+ * list, \p plist_id, to determine whether object times are being
+ * recorded.
+ *
+ * If \p track_times is returned as 1, times are being recorded;
+ * if \p track_times is returned as 0, times are not being
+ * recorded.
+ *
+ * Time data can be retrieved with H5Oget_info(), which will return
+ * it in the #H5O_info_t struct.
+ *
+ * If times are not tracked, they will be reported as follows
+ * when queried: 12:00 AM UDT, Jan. 1, 1970
+ *
+ * See H5Pset_obj_track_times() for further discussion.
+ *
+ * \since 1.8.0
+ *
+ */
+H5_DLL herr_t H5Pget_obj_track_times(hid_t plist_id, hbool_t *track_times);
+/**
+ * \ingroup OCPL
+ *
+ * \brief Modifies a filter in the filter pipeline
+ *
+ * \ocpl_id{plist_id}
+ * \param[in] filter Filter to be modified
+ * \param[in] flags Bit vector specifying certain general properties
+ * of the filter
+ * \param[in] cd_nelmts Number of elements in \p cd_values
+ * \param[in] cd_values[] Auxiliary data for the filter
+ *
+ * \return \herr_t
+ *
+ * \details H5Pmodify_filter() modifies the specified \p filter in the
+ * filter pipeline. \p plist_id must be a dataset or group
+ * creation property list.
+ *
+ * The \p filter, \p flags \p cd_nelmts[], and \p cd_values
+ * parameters are used in the same manner and accept the same
+ * values as described in the discussion of H5Pset_filter().
+ *
+ * \version 1.8.5 Function extended to work with group creation property
+ * lists.
+ * \since 1.6.0
+ *
+ */
+H5_DLL herr_t H5Pmodify_filter(hid_t plist_id, H5Z_filter_t filter, unsigned int flags, size_t cd_nelmts,
+ const unsigned int cd_values[/*cd_nelmts*/]);
+/**
+ * \ingroup OCPL
+ *
+ * \brief Delete one or more filters in the filter pipeline
+ *
+ * \ocpl_id{plist_id}
+ * \param[in] filter Filter to be deleted
+ *
+ * \return \herr_t
+ *
+ * \details H5Premove_filter() removes the specified \p filter from the
+ * filter pipeline in the dataset or group creation property
+ * list \p plist_id.
+ *
+ * The \p filter parameter specifies the filter to be removed.
+ * Valid values for use in \p filter are as follows:
+ *
+ *
+ *
+ * #H5Z_FILTER_ALL |
+ * Removes all filters from the filter pipeline |
+ *
+ *
+ * #H5Z_FILTER_DEFLATE |
+ * Data compression filter, employing the gzip
+ * algorithm |
+ *
+ *
+ * #H5Z_FILTER_SHUFFLE |
+ * Data shuffling filter |
+ *
+ *
+ * #H5Z_FILTER_FLETCHER32 |
+ * Error detection filter, employing the Fletcher32
+ * checksum algorithm |
+ *
+ *
+ * #H5Z_FILTER_SZIP |
+ * Data compression filter, employing the SZIP
+ * algorithm |
+ *
+ *
+ * #H5Z_FILTER_NBIT |
+ * Data compression filter, employing the N-Bit
+ * algorithm |
+ *
+ *
+ * #H5Z_FILTER_SCALEOFFSET |
+ * Data compression filter, employing the scale-offset
+ * algorithm |
+ *
+ *
+ *
+ * Additionally, user-defined filters can be removed with this
+ * routine by passing the filter identifier with which they were
+ * registered with the HDF5 library.
+ *
+ * Attempting to remove a filter that is not in the filter
+ * pipeline is an error.
+ *
+ * \version 1.8.5 Function extended to work with group creation property
+ * lists.
+ * \since 1.6.3
+ *
+ */
+H5_DLL herr_t H5Premove_filter(hid_t plist_id, H5Z_filter_t filter);
+/**
+ * \ingroup OCPL
+ *
+ * \brief Sets tracking and indexing of attribute creation order
+ *
+ * \plist_id
+ * \param[in] crt_order_flags Flags specifying whether to track and index
+ * attribute creation order. \em Default: No
+ * flag set; attribute creation order is neither
+ * tracked not indexed
+ *
+ * \return \herr_t
+ *
+ * \details H5Pset_attr_creation_order() sets flags for tracking and
+ * indexing attribute creation order on an object.
+ *
+ * \p plist_id is a dataset or group creation property list
+ * identifier.
+ *
+ * \p crt_order_flags contains flags with the following meanings:
+ *
+ *
+ *
+ * #H5P_CRT_ORDER_TRACKED |
+ * Attribute creation order is tracked but not necessarily
+ * indexed. |
+ *
+ *
+ * #H5P_CRT_ORDER_INDEXED |
+ * Attribute creation order is indexed (requires
+ * #H5P_CRT_ORDER_TRACKED). |
+ *
+ *
+ *
+ * Default behavior is that attribute creation order is neither
+ * tracked nor indexed.
+ *
+ * H5Pset_attr_creation_order() can be used to set attribute
+ * creation order tracking, or to set attribute creation order
+ * tracking and indexing.
+ *
+ * \note If a creation order index is to be built, it must be specified in
+ * the object creation property list. HDF5 currently provides no
+ * mechanism to turn on attribute creation order tracking at object
+ * creation time and to build the index later.
+ *
+ * \since 1.8.0
+ *
+ */
+H5_DLL herr_t H5Pset_attr_creation_order(hid_t plist_id, unsigned crt_order_flags);
+/**
+ * \ingroup OCPL
+ *
+ * \brief Sets attribute storage phase change thresholds
+ *
+ * \plist_id
+ * \param[in] max_compact Maximum number of attributes to be stored in
+ * compact storage (\em Default: 8); must be greater
+ * than or equal to \p min_dense
+ *
+ * \param[in] min_dense Minimum number of attributes to be stored in
+ * dense storage (\em Default: 6)
+ *
+ * \return \herr_t
+ *
+ * \details H5Pset_attr_phase_change() sets threshold values for attribute
+ * storage on an object. These thresholds determine the point at
+ * which attribute storage changes from compact storage (i.e.,
+ * storage in the object header) to dense storage (i.e., storage
+ * in a heap and indexed with a B-tree).
+ *
+ * In the general case, attributes are initially kept in compact
+ * storage. When the number of attributes exceeds \p max_compact,
+ * attribute storage switches to dense storage. If the number of
+ * attributes subsequently falls below \p min_dense, the attributes
+ * are returned to compact storage.
+ *
+ * If \p max_compact is set to 0 (zero), dense storage is always
+ * used. \p min_dense must be set to 0 (zero) when \p max_compact
+ * is 0 (zero).
+ *
+ * \p plist_id is a dataset or group creation property list
+ * identifier.
+ *
+ * \since 1.8.0
+ *
+ */
+H5_DLL herr_t H5Pset_attr_phase_change(hid_t plist_id, unsigned max_compact, unsigned min_dense);
+/**
+ * \ingroup OCPL
+ *
+ * \brief Sets deflate (GNU gzip) compression method and compression level
+ *
+ * \ocpl_id{plist_id}
+ * \param[in] level Compression level
+ *
+ * \return \herr_t
+ *
+ * \details H5Pset_deflate() sets the deflate compression method and the
+ * compression level, \p level, for a dataset or group creation
+ * property list, \p plist_id.
+ *
+ * The filter identifier set in the property list is
+ * #H5Z_FILTER_DEFLATE.
+ *
+ * The compression level, \p level, is a value from zero to nine,
+ * inclusive. A compression level of 0 (zero) indicates no
+ * compression; compression improves but speed slows progressively
+ * from levels 1 through 9:
+ *
+ *
+ *
+ * Compression Level |
+ * Gzip Action |
+ *
+ *
+ * 0 |
+ * No compression |
+ *
+ *
+ * 1 |
+ * Best compression speed; least compression |
+ *
+ *
+ * 2 through 8 |
+ * Compression improves; speed degrades |
+ *
+ *
+ * 9 |
+ * Best compression ratio; slowest speed |
+ *
+ *
+ *
+ * Note that setting the compression level to 0 (zero) does not turn
+ * off use of the gzip filter; it simply sets the filter to perform
+ * no compression as it processes the data.
+ *
+ * HDF5 relies on GNU gzip for this compression.
+ *
+ * \version 1.8.5 Function extended to work with group creation property lists.
+ * \since 1.0.0
+ *
+ */
+H5_DLL herr_t H5Pset_deflate(hid_t plist_id, unsigned level);
+/**
+ * \ingroup OCPL
+ *
+ * \brief Adds a filter to the filter pipeline
+ *
+ * \ocpl_id{plist_id}
+ * \param[in] filter Filter identifier for the filter to be added to the
+ * pipeline
+ * \param[in] flags Bit vector specifying certain general properties of
+ * the filter
+ * \param[in] cd_nelmts Number of elements in \p c_values
+ * \param[in] c_values Auxiliary data for the filter
+ *
+ * \return \herr_t
+ *
+ * \details H5Pset_filter() adds the specified \p filter identifier and
+ * corresponding properties to the end of an output filter
+ * pipeline.
+ *
+ * \p plist_id must be either a dataset creation property list or
+ * group creation property list identifier. If \p plist_id is a
+ * dataset creation property list identifier, the filter is added
+ * to the raw data filter pipeline.
+ *
+ * If \p plist_id is a group creation property list identifier,
+ * the filter is added to the link filter pipeline, which filters
+ * the fractal heap used to store most of the link metadata in
+ * certain types of groups. The only predefined filters that can
+ * be set in a group creation property list are the gzip filter
+ * (#H5Z_FILTER_DEFLATE) and the Fletcher32 error detection filter
+ * (#H5Z_FILTER_FLETCHER32).
+ *
+ * The array \p c_values contains \p cd_nelmts integers which are
+ * auxiliary data for the filter. The integer values will be
+ * stored in the dataset object header as part of the filter
+ * information.
+ *
+ * The \p flags argument is a bit vector with the following
+ * fields specifying certain general properties of the filter:
+ *
+ *
+ *
+ * #H5Z_FLAG_OPTIONAL |
+ * If this bit is set then the filter is optional. If the
+ * filter fails (see below) during an H5Dwrite() operation
+ * then the filter is just excluded from the pipeline for
+ * the chunk for which it failed; the filter will not
+ * participate in the pipeline during an H5Dread() of the
+ * chunk. This is commonly used for compression filters:
+ * if the filter result would be larger than the input,
+ * then the compression filter returns failure and the
+ * uncompressed data is stored in the file.
+ * This flag should not be set for the Fletcher32 checksum
+ * filter as it will bypass the checksum filter without
+ * reporting checksum errors to an application. |
+ *
+ *
+ * #H5Z_FLAG_MANDATORY |
+ * If the filter is required, that is, set to mandatory,
+ * and the filter fails, the library’s behavior depends
+ * on whether the chunk cache is in use:
+ * \li If the chunk cache is enabled, data chunks will
+ * be flushed to the file during H5Dclose() and the
+ * library will return the failure in H5Dclose().
+ * \li When the chunk cache is disabled or not big enough,
+ * or the chunk is being evicted from the cache, the
+ * failure will happen during H5Dwrite().
+ *
+ * In each case, the library will still write to the file
+ * all data chunks that were processed by the filter
+ * before the failure occurred.
+ * For example, assume that an application creates a
+ * dataset of four chunks, the chunk cache is enabled and
+ * is big enough to hold all four chunks, and the filter
+ * fails when it tries to write the fourth chunk. The
+ * actual flush of the chunks will happen during
+ * H5Dclose(), not H5Dwrite(). By the time H5Dclose()
+ * fails, the first three chunks will have been written
+ * to the file. Even though H5Dclose() fails, all the
+ * resources will be released and the file can be closed
+ * properly.
+ * If, however, the filter fails on the second chunk, only
+ * the first chunk will be written to the file as nothing
+ * further can be written once the filter fails. |
+ *
+ *
+ * The \p filter parameter specifies the filter to be set. Valid
+ * pre-defined filter identifiers are as follows:
+ *
+ *
+ *
+ * #H5Z_FILTER_DEFLATE |
+ * Data compression filter, employing the gzip
+ * algorithm |
+ *
+ *
+ * #H5Z_FILTER_SHUFFLE |
+ * Data shuffling filter |
+ *
+ *
+ * #H5Z_FILTER_FLETCHER32 |
+ * Error detection filter, employing the Fletcher32
+ * checksum algorithm |
+ *
+ *
+ * #H5Z_FILTER_SZIP |
+ * Data compression filter, employing the SZIP
+ * algorithm |
+ *
+ *
+ * #H5Z_FILTER_NBIT |
+ * Data compression filter, employing the N-Bit
+ * algorithm |
+ *
+ *
+ * #H5Z_FILTER_SCALEOFFSET |
+ * Data compression filter, employing the scale-offset
+ * algorithm |
+ *
+ *
+ * Also see H5Pset_edc_check() and H5Pset_filter_callback().
+ *
+ * \note When a non-empty filter pipeline is used with a group creation
+ * property list, the group will be created with the new group file
+ * format. The filters will come into play only when dense storage
+ * is used (see H5Pset_link_phase_change()) and will be applied to
+ * the group’s fractal heap. The fractal heap will contain most of
+ * the the group’s link metadata, including link names.
+ *
+ * \note When working with group creation property lists, if you are
+ * adding a filter that is not in HDF5’s set of predefined filters,
+ * i.e., a user-defined or third-party filter, you must first
+ * determine that the filter will work for a group. See the
+ * discussion of the set local and can apply callback functions
+ * in H5Zregister().
+ *
+ * \note If multiple filters are set for a property list, they will be
+ * applied to each chunk of raw data for datasets or each block
+ * of the fractal heap for groups in the order in which they were
+ * set.
+ *
+ * \note Filters can be applied only to chunked datasets; they cannot be
+ * used with other dataset storage methods, such as contiguous,
+ * compact, or external datasets.
+ *
+ * \note Dataset elements of variable-length and dataset region
+ * reference datatypes are stored in separate structures in the
+ * file called heaps. Filters cannot currently be applied to
+ * these heaps.
+ *
+ * \note Filter Behavior in HDF5:
+ * Filters can be inserted into the HDF5 pipeline to perform
+ * functions such as compression and conversion. As such, they are
+ * a very flexible aspect of HDF5; for example, a user-defined
+ * filter could provide encryption for an HDF5 dataset.
+ *
+ * \note A filter can be declared as either required or optional.
+ * Required is the default status; optional status must be
+ * explicitly declared.
+ *
+ * \note A required filter that fails or is not defined causes an
+ * entire output operation to fail; if it was applied when the
+ * data was written, such a filter will cause an input operation
+ * to fail.
+ *
+ * \note The following table summarizes required filter behavior.
+ *
+ *
+ * |
+ * Required FILTER_X not available |
+ * FILTER_X available |
+ *
+ *
+ * H5Pset_ |
+ * Will fail. |
+ * Will succeed. |
+ *
+ *
+ * H5Dwrite with FILTER_X set |
+ * Will fail. |
+ * Will succeed; FILTER_X will be applied to
+ * the data. |
+ *
+ *
+ * H5Dread with FILTER_X set |
+ * Will fail. |
+ * Will succeed. |
+ *
+ *
+ * \note An optional filter can be set for an HDF5 dataset even when
+ * the filter is not available. Such a filter can then be
+ * applied to the dataset when it becomes available on the
+ * original system or when the file containing the dataset is
+ * processed on a system on which it is available.
+ *
+ * \note A filter can be declared as optional through the use of the
+ * #H5Z_FLAG_OPTIONAL flag with H5Pset_filter().
+ *
+ * \note Consider a situation where one is creating files that will
+ * normally be used only on systems where the optional (and
+ * fictional) filter FILTER_Z is routinely available. One can
+ * create those files on system A, which lacks FILTER_Z, create
+ * chunked datasets in the files with FILTER_Z defined in the
+ * dataset creation property list, and even write data to those
+ * datasets. The dataset object header will indicate that FILTER_Z
+ * has been associated with this dataset. But since system A does
+ * not have FILTER_Z, dataset chunks will be written without it
+ * being applied.
+ *
+ * \note HDF5 has a mechanism for determining whether chunks are
+ * actually written with the filters specified in the object
+ * header, so while the filter remains unavailable, system A will
+ * be able to read the data. Once the file is moved to system B,
+ * where FILTER_Z is available, HDF5 will apply FILTER_Z to any
+ * data rewritten or new data written in these datasets. Dataset
+ * chunks that have been written on system B will then be
+ * unreadable on system A; chunks that have not been re-written
+ * since being written on system A will remain readable on system
+ * A. All chunks will be readable on system B.
+ *
+ * \note The following table summarizes optional filter behavior.
+ *
+ *
+ * |
+ * FILTER_Z not available |
+ * FILTER_Z available with encode and decode |
+ * FILTER_Z available decode only |
+ *
+ *
+ * H5Pset_ |
+ * Will succeed. |
+ * Will succeed. |
+ * Will succeed. |
+ *
+ *
+ * H5Dread with FILTER_Z set |
+ * Will succeed if FILTER_Z has not actually
+ * been applied to data. |
+ * Will succeed. |
+ * Will succeed. |
+ *
+ *
+ * H5Dwrite with FILTER_Z set |
+ * Will succeed;
+ * FILTER_Z will not be applied to the data. |
+ * Will succeed;
+ * FILTER_Z will be applied to the data. |
+ * Will succeed;
+ * FILTER_Z will not be applied to the data. |
+ *
+ *
+ * \note The above principles apply generally in the use of HDF5
+ * optional filters insofar as HDF5 does as much as possible to
+ * complete an operation when an optional filter is unavailable.
+ * (The SZIP filter is an exception to this rule; see H5Pset_szip()
+ * for details.)
+ *
+ * \see \ref_filter_pipe, \ref_group_impls
+ *
+ * \version 1.8.5 Function applied to group creation property lists.
+ * \since 1.6.0
+ *
+ */
+H5_DLL herr_t H5Pset_filter(hid_t plist_id, H5Z_filter_t filter, unsigned int flags, size_t cd_nelmts,
+ const unsigned int c_values[]);
+/**
+ * \ingroup OCPL
+ *
+ * \brief Sets up use of the Fletcher32 checksum filter
+ *
+ * \ocpl_id{plist_id}
+ *
+ * \return \herr_t
+ *
+ * \details H5Pset_fletcher32() sets the Fletcher32 checksum filter in the
+ * dataset or group creation property list \p plist_id.
+ *
+ * \attention The Fletcher32 EDC checksum filter was added in HDF5 Release
+ * 1.6.0. In the original implementation, however, the checksum
+ * value was calculated incorrectly on little-endian systems.
+ * The error was fixed in HDF5 Release 1.6.3.
+ *
+ * \attention As a result of this fix, an HDF5 library of Release 1.6.0
+ * through Release 1.6.2 cannot read a dataset created or written
+ * with Release 1.6.3 or later if the dataset was created with
+ * the checksum filter and the filter is enabled in the reading
+ * library. (Libraries of Release 1.6.3 and later understand the
+ * earlier error and compensate appropriately.)
+ *
+ * \attention \b Work-around: An HDF5 library of Release 1.6.2 or earlier
+ * will be able to read a dataset created or written with the
+ * checksum filter by an HDF5 library of Release 1.6.3 or later
+ * if the checksum filter is disabled for the read operation.
+ * This can be accomplished via a call to H5Pset_edc_check()
+ * with the value #H5Z_DISABLE_EDC in the second parameter.
+ * This has the obvious drawback that the application will be
+ * unable to verify the checksum, but the data does remain
+ * accessible.
+ *
+ * \version 1.8.5 Function extended to work with group creation property
+ * lists.
+ * \version 1.6.3 Error in checksum calculation on little-endian systems
+ * corrected in this release.
+ * \since 1.6.0
+ *
+ */
+H5_DLL herr_t H5Pset_fletcher32(hid_t plist_id);
+/**
+ * \ingroup OCPL
+ *
+ * \brief Sets the recording of times associated with an object
+ *
+ * \param[in] plist_id Object creation property list identifier
+ * \param[in] track_times Boolean value, 1 or 0, specifying whether object
+ * times are to be tracked
+ *
+ * \return \herr_t
+ *
+ * \details H5Pset_obj_track_times() sets a property in the object creation
+ * property list, \p plist_id, that governs the recording of times
+ * associated with an object.
+ *
+ * If \p track_times is set to 1, time data will be recorded. If
+ * \p track_times is set to 0, time data will not be recorded.
+ *
+ * Time data can be retrieved with H5Oget_info(), which will
+ * return it in the #H5O_info_t struct.
+ *
+ * If times are not tracked, they will be reported as follows when queried:
+ * \Code{ 12:00 AM UDT, Jan. 1, 1970}
+ *
+ * That date and time are commonly used to represent the beginning of the UNIX epoch.
+ *
+ * \since 1.8.0
+ *
+ */
+H5_DLL herr_t H5Pset_obj_track_times(hid_t plist_id, hbool_t track_times);
+
+/* File creation property list (FCPL) routines */
+/**
+ * \ingroup FCPL
+ *
+ * \brief Retrieves the file space page size for a file creation property
+ * list
+ *
+ * \fcpl_id{plist_id}
+ * \param[out] fsp_size File space page size
+ *
+ * \return \herr_t
+ *
+ * \details H5Pget_file_space_page_size() retrieves the file space page
+ * size for paged aggregation in the parameter \p fsp_size.
+ *
+ * The library default is 4KB (4096) if \p fsp_size is not
+ * previously set via a call to H5Pset_file_space_page_size().
+ *
+ * \since 1.10.1
+ *
+ */
+H5_DLL herr_t H5Pget_file_space_page_size(hid_t plist_id, hsize_t *fsp_size);
+/**
+ * \ingroup FCPL
+ *
+ * \brief Retrieves the file space handling strategy, persisting free-space
+ * condition and threshold value for a file creation property list
+ *
+ * \fcpl_id{plist_id}
+ * \param[out] strategy The file space handling strategy
+ * \param[out] persist The boolean value indicating whether free space is
+ * persistent or not
+ * \param[out] threshold The free-space section size threshold value
+ *
+ * \return \herr_t
+ *
+ * \details H5Pget_file_space_strategy() retrieves the file space handling
+ * strategy, the persisting free-space condition and the threshold
+ * value in the parameters \p strategy, \p persist and
+ * \p threshold respectively.
+ *
+ * The library default values returned when
+ * H5Pset_file_space_strategy() has not been called are:
+ *
+ * \li \p strategy - #H5F_FSPACE_STRATEGY_FSM_AGGR
+ * \li \p persist - 0
+ * \li \p threshold - 1
+ *
+ * \since 1.10.1
+ *
+ */
+H5_DLL herr_t H5Pget_file_space_strategy(hid_t plist_id, H5F_fspace_strategy_t *strategy, hbool_t *persist,
+ hsize_t *threshold);
+/**
+ * \ingroup FCPL
+ *
+ * \brief Queries the 1/2 rank of an indexed storage B-tree
+ *
+ * \fcpl_id{plist_id}
+ * \param[out] ik Pointer to location to return the chunked storage B-tree
+ * 1/2 rank (Default value of B-tree 1/2 rank: 32)
+ *
+ * \return \herr_t
+ *
+ * \details H5Pget_istore_k() queries the 1/2 rank of an indexed storage
+ * B-tree.
+ *
+ * The argument \p ik may be the null pointer (NULL).
+ * This function is valid only for file creation property lists.
+ *
+ * \see H5Pset_istore_k()
+ *
+ * \version 1.6.4 \p ik parameter type changed to \em unsigned.
+ * \since 1.0.0
+ *
+ */
+H5_DLL herr_t H5Pget_istore_k(hid_t plist_id, unsigned *ik /*out*/);
+/**
+ * \ingroup FCPL
+ *
+ * \brief Retrieves the configuration settings for a shared message index
+ *
+ * \fcpl_id{plist_id}
+ * \param[in] index_num Index being configured
+ * \param[out] mesg_type_flags Types of messages that may be stored in
+ * this index
+ * \param[out] min_mesg_size Minimum message size
+ *
+ * \return \herr_t
+ *
+ * \details H5Pget_shared_mesg_index() retrieves the message type and
+ * minimum message size settings from the file creation property
+ * list \p plist_id for the shared object header message index
+ * specified by \p index_num.
+ *
+ * \p index_num specifies the index. \p index_num is zero-indexed,
+ * so in a file with three indexes, they will be numbered 0, 1,
+ * and 2.
+ *
+ * \p mesg_type_flags and \p min_mesg_size will contain,
+ * respectively, the types of messages and the minimum size, in
+ * bytes, of messages that can be stored in this index.
+ *
+ * Valid message types are described in H5Pset_shared_mesg_index().
+ *
+ * \since 1.8.0
+ *
+ */
+H5_DLL herr_t H5Pget_shared_mesg_index(hid_t plist_id, unsigned index_num, unsigned *mesg_type_flags,
+ unsigned *min_mesg_size);
+/**
+ * \ingroup FCPL
+ *
+ * \brief Retrieves the number of shared object header message indexes in file
+ * creation property list
+ *
+ * \fcpl_id{plist_id}
+ * \param[out] nindexes Number of shared object header message indexes
+ * available in files created with this property list
+ *
+ * \return \herr_t
+ *
+ * \details H5Pget_shared_mesg_nindexes() retrieves the number of shared
+ * object header message indexes in the specified file creation
+ * property list \p plist_id.
+ *
+ * If the value of \p nindexes is 0 (zero), shared object header
+ * messages are disabled in files created with this property list.
+ *
+ * \since 1.8.0
+ *
+ */
+H5_DLL herr_t H5Pget_shared_mesg_nindexes(hid_t plist_id, unsigned *nindexes);
+/**
+ * \ingroup FCPL
+ *
+ * \brief Retrieves shared object header message phase change information
+ *
+ * \fcpl_id{plist_id}
+ * \param[out] max_list Threshold above which storage of a shared object
+ * header message index shifts from list to B-tree
+ * \param[out] min_btree Threshold below which storage of a shared object
+ * header message index reverts to list format
+ *
+ * \return \herr_t
+ *
+ * \details H5Pget_shared_mesg_phase_change() retrieves the threshold values
+ * for storage of shared object header message indexes in a file.
+ * These phase change thresholds determine the point at which the
+ * index storage mechanism changes from a more compact list format
+ * to a more performance-oriented B-tree format, and vice-versa.
+ *
+ * By default, a shared object header message index is initially
+ * stored as a compact list. When the number of messages in an
+ * index exceeds the specified \p max_list threshold, storage
+ * switches to a B-tree format for improved performance. If the
+ * number of messages subsequently falls below the \p min_btree
+ * threshold, the index will revert to the list format.
+ *
+ * If \p max_list is set to 0 (zero), shared object header message
+ * indexes in the file will always be stored as B-trees.
+ *
+ * \p plist_id specifies the file creation property list.
+ *
+ * \since 1.8.0
+ *
+ */
+H5_DLL herr_t H5Pget_shared_mesg_phase_change(hid_t plist_id, unsigned *max_list, unsigned *min_btree);
+/**
+ * \ingroup FCPL
+ *
+ * \brief Retrieves the size of the offsets and lengths used in an HDF5
+ * file
+ *
+ * \fcpl_id{plist_id}
+ * \param[out] sizeof_addr Pointer to location to return offset size in
+ * bytes
+ * \param[out] sizeof_size Pointer to location to return length size in
+ * bytes
+ *
+ * \return \herr_t
+ *
+ * \details H5Pget_sizes() retrieves the size of the offsets and lengths
+ * used in an HDF5 file. This function is only valid for file
+ * creation property lists.
+ *
+ * \since 1.0.0
+ *
+ */
+H5_DLL herr_t H5Pget_sizes(hid_t plist_id, size_t *sizeof_addr /*out*/, size_t *sizeof_size /*out*/);
+/**
+ * \ingroup FCPL
+ *
+ * \brief Retrieves the size of the symbol table B-tree 1/2 rank and the
+ * symbol table leaf node 1/2 size
+ *
+ * \fcpl_id{plist_id}
+ * \param[out] ik Pointer to location to return the symbol table's B-tree
+ * 1/2 rank (Default value of B-tree 1/2 rank: 16)
+ * \param[out] lk Pointer to location to return the symbol table's leaf
+ * node 1/2 size (Default value of leaf node 1/2
+ * size: 4)
+ *
+ * \return \herr_t
+ *
+ * \details H5Pget_sym_k() retrieves the size of the symbol table B-tree
+ * 1/2 rank and the symbol table leaf node 1/2 size.
+ *
+ * This function is valid only for file creation property lists.
+ *
+ * If a parameter value is set to NULL, that parameter is not
+ * retrieved.
+ *
+ * \see H5Pset_sym_k()
+ *
+ * \version 1.6.4 \p ik parameter type changed to \em unsigned
+ * \version 1.6.0 The \p ik parameter has changed from type int to
+ * \em unsigned
+ *
+ * \since 1.0.0
+ *
+ */
+H5_DLL herr_t H5Pget_sym_k(hid_t plist_id, unsigned *ik /*out*/, unsigned *lk /*out*/);
+/**
+ * \ingroup FCPL
+ *
+ * \brief Retrieves the size of a user block
+ *
+ * \fcpl_id{plist_id}
+ * \param[out] size Pointer to location to return user-block size
+ *
+ * \return \herr_t
+ *
+ * \details H5Pget_userblock() retrieves the size of a user block in a
+ * file creation property list.
+ *
+ * \since 1.0.0
+ *
+ */
+H5_DLL herr_t H5Pget_userblock(hid_t plist_id, hsize_t *size);
+/**
+ * \ingroup FCPL
+ *
+ * \brief Sets the file space page size for a file creation property list
+ *
+ * \fcpl_id{plist_id}
+ * \param[in] fsp_size File space page size
+ *
+ * \return \herr_t
+ *
+ * \details H5Pset_file_space_page_size() sets the file space page size
+ * \p fsp_size used in paged aggregation and paged buffering.
+ *
+ * \p fsp_size has a minimum size of 512. Setting a value less
+ * than 512 will return an error. The library default size for
+ * the file space page size when not set is 4096.
+ *
+ * The size set via this routine may not be changed for the life
+ * of the file.
+ *
+ * \since 1.10.1
+ *
+ */
+H5_DLL herr_t H5Pset_file_space_page_size(hid_t plist_id, hsize_t fsp_size);
+/**
+ * \ingroup FCPL
+ *
+ * \brief Sets the file space handling strategy and persisting free-space
+ * values for a file creation property list
+ *
+ * \fcpl_id{plist_id}
+ * \param[in] strategy The file space handling strategy to be used. See:
+ * #H5F_fspace_strategy_t
+ * \param[in] persist A boolean value to indicate whether free space
+ * should be persistent or not
+ * \param[in] threshold The smallest free-space section size that the free
+ * space manager will track
+ *
+ * \return \herr_t
+ *
+ * \details H5Pset_file_space_strategy() sets the file space handling
+ * \p strategy, specifies persisting free-space or not (\p persist),
+ * and sets the free-space section size \p threshold in the file
+ * creation property list \p plist_id.
+ *
+ * #H5F_fspace_strategy_t is a struct defined in H5Fpublic.h as
+ * follows:
+ *
+ * \snippet H5Fpublic.h H5F_fspace_strategy_t_snip
+ *
+ * This setting cannot be changed for the life of the file.
+ *
+ * As the #H5F_FSPACE_STRATEGY_AGGR and #H5F_FSPACE_STRATEGY_NONE
+ * strategies do not use the free-space managers, the \p persist
+ * and \p threshold settings will be ignored for those strategies.
+ *
+ * \since 1.10.1
+ *
+ */
+H5_DLL herr_t H5Pset_file_space_strategy(hid_t plist_id, H5F_fspace_strategy_t strategy, hbool_t persist,
+ hsize_t threshold);
+/**
+ * \ingroup FCPL
+ *
+ * \brief Sets the size of the parameter used to control the B-trees for
+ * indexing chunked datasets
+ *
+ * \fcpl_id{plist_id}
+ * \param[in] ik 1/2 rank of chunked storage B-tree
+ *
+ * \return \herr_t
+ *
+ * \details H5Pset_istore_k() sets the size of the parameter used to
+ * control the B-trees for indexing chunked datasets. This
+ * function is valid only for file creation property lists.
+ *
+ * \p ik is one half the rank of a tree that stores chunked
+ * raw data. On average, such a tree will be 75% full, or have
+ * an average rank of 1.5 times the value of \p ik.
+ *
+ * The HDF5 library uses (\p ik*2) as the maximum # of entries
+ * before splitting a B-tree node. Since only 2 bytes are used
+ * in storing # of entries for a B-tree node in an HDF5 file,
+ * (\p ik*2) cannot exceed 65536. The default value for
+ * \p ik is 32.
+ *
+ * \version 1.6.4 \p ik parameter type changed to \p unsigned.
+ * \since 1.0.0
+ *
+ */
+H5_DLL herr_t H5Pset_istore_k(hid_t plist_id, unsigned ik);
+/**
+ * \ingroup FCPL
+ *
+ * \brief Configures the specified shared object header message index
+ *
+ * \fcpl_id{plist_id}
+ * \param[in] index_num Index being configured
+ * \param[in] mesg_type_flags Types of messages that should be stored in
+ * this index
+ * \param[in] min_mesg_size Minimum message size
+ *
+ * \return \herr_t
+ *
+ * \details H5Pset_shared_mesg_index() is used to configure the specified
+ * shared object header message index, setting the types of
+ * messages that may be stored in the index and the minimum size
+ * of each message.
+ *
+ * \p plist_id specifies the file creation property list.
+ *
+ * \p index_num specifies the index to be configured.
+ * \p index_num is zero-indexed, so in a file with three indexes,
+ * they will be numbered 0, 1, and 2.
+ *
+ * \p mesg_type_flags and \p min_mesg_size specify, respectively,
+ * the types and minimum size of messages that can be stored in
+ * this index.
+ *
+ * Valid message types are as follows:
+ *
+ *
+ *
+ * #H5O_SHMESG_NONE_FLAG |
+ * No shared messages |
+ *
+ *
+ * #H5O_SHMESG_SDSPACE_FLAG |
+ * Simple dataspace message |
+ *
+ *
+ * #H5O_SHMESG_DTYPE_FLAG |
+ * Datatype message |
+ *
+ *
+ * #H5O_SHMESG_FILL_FLAG |
+ * Fill value message |
+ *
+ *
+ * #H5O_SHMESG_PLINE_FLAG |
+ * Filter pipeline message |
+ *
+ *
+ * #H5O_SHMESG_ATTR_FLAG |
+ * Attribute message |
+ *
+ *
+ * #H5O_SHMESG_ALL_FLAG |
+ * All message types; i.e., equivalent to the following:
+ * (#H5O_SHMESG_SDSPACE_FLAG | #H5O_SHMESG_DTYPE_FLAG |
+ * #H5O_SHMESG_FILL_FLAG | #H5O_SHMESG_PLINE_FLAG |
+ * #H5O_SHMESG_ATTR_FLAG) |
+ *
+ *
+ *
+ * \since 1.8.0
+ *
+ */
+H5_DLL herr_t H5Pset_shared_mesg_index(hid_t plist_id, unsigned index_num, unsigned mesg_type_flags,
+ unsigned min_mesg_size);
+/**
+ * \ingroup FCPL
+ *
+ * \brief Sets number of shared object header message indexes
+ *
+ * \fcpl_id{plist_id}
+ * \param[in] nindexes Number of shared object header message indexes to be
+ * available in files created with this property list
+ * (\p nindexes must be <= #H5O_SHMESG_MAX_NINDEXES (8))
+ *
+ * \return \herr_t
+ *
+ * \details H5Pset_shared_mesg_nindexes() sets the number of shared object
+ * header message indexes in the specified file creation property
+ * list.
+ *
+ * This setting determines the number of shared object header
+ * message indexes, \p nindexes, that will be available in files
+ * created with this property list. These indexes can then be
+ * configured with H5Pset_shared_mesg_index().
+ *
+ * If \p nindexes is set to 0 (zero), shared object header messages
+ * are disabled in files created with this property list.
+ *
+ * There is a limit of #H5O_SHMESG_MAX_NINDEXES (8) that can be set
+ * with H5Pset_shared_mesg_nindexes(). An error will occur if
+ * specifying a value of \p nindexes that is greater than this value.
+ *
+ * \since 1.8.0
+ *
+ */
+H5_DLL herr_t H5Pset_shared_mesg_nindexes(hid_t plist_id, unsigned nindexes);
+/**
+ * \ingroup FCPL
+ *
+ * \brief Sets shared object header message storage phase change thresholds
+ *
+ * \fcpl_id{plist_id}
+ * \param[in] max_list Threshold above which storage of a shared object
+ * header message index shifts from list to B-tree
+ * \param[in] min_btree Threshold below which storage of a shared object
+ * header message index reverts to list format
+ *
+ * \return \herr_t
+ *
+ * \details H5Pset_shared_mesg_phase_change() sets threshold values for
+ * storage of shared object header message indexes in a file.
+ * These phase change thresholds determine the point at which the
+ * index storage mechanism changes from a more compact list format
+ * to a more performance-oriented B-tree format, and vice-versa.
+ *
+ * By default, a shared object header message index is initially
+ * stored as a compact list. When the number of messages in an
+ * index exceeds the threshold value of \p max_list, storage
+ * switches to a B-tree for improved performance. If the number
+ * of messages subsequently falls below the \p min_btree threshold,
+ * the index will revert to the list format.
+ *
+ * If \p max_list is set to 0 (zero), shared object header message
+ * indexes in the file will be created as B-trees and will never
+ * revert to lists.
+ *
+ * \p plist_id specifies the file creation property list.
+ *
+ * \since 1.8.0
+ *
+ */
+H5_DLL herr_t H5Pset_shared_mesg_phase_change(hid_t plist_id, unsigned max_list, unsigned min_btree);
+/**
+ * \ingroup FCPL
+ *
+ * \brief Sets the byte size of the offsets and lengths used to address
+ * objects in an HDF5 file
+ *
+ * \fcpl_id{plist_id}
+ * \param[in] sizeof_addr Size of an object offset in bytes
+ * \param[in] sizeof_size Size of an object length in bytes
+ *
+ * \return \herr_t
+ *
+ * \details H5Pset_sizes() sets the byte size of the offsets and lengths
+ * used to address objects in an HDF5 file. This function is only
+ * valid for file creation property lists. Passing in a value
+ * of 0 for one of the parameters retains the current value. The
+ * default value for both values is the same as sizeof(hsize_t)
+ * in the library (normally 8 bytes). Valid values currently
+ * are 2, 4, 8 and 16.
+ *
+ * \since 1.0.0
+ *
+ */
+H5_DLL herr_t H5Pset_sizes(hid_t plist_id, size_t sizeof_addr, size_t sizeof_size);
+/**
+ * \ingroup FCPL
+ *
+ * \brief
+ *
+ * \fcpl_id{plist_id}
+ * \param[in] ik Symbol table tree rank
+ * \param[in] lk Symbol table node size
+ *
+ * \return \herr_t
+ *
+ * \details H5Pset_sym_k() sets the size of parameters used to control the
+ * symbol table nodes.
+ *
+ * This function is valid only for file creation property lists.
+ * Passing in a value of zero (0) for one of the parameters retains
+ * the current value.
+ *
+ * \p ik is one half the rank of a B-tree that stores a symbol
+ * table for a group. Internal nodes of the symbol table are on
+ * average 75% full. That is, the average rank of the tree is
+ * 1.5 times the value of \p ik. The HDF5 library uses (\p ik*2) as
+ * the maximum # of entries before splitting a B-tree node. Since
+ * only 2 bytes are used in storing # of entries for a B-tree node
+ * in an HDF5 file, (\p ik*2) cannot exceed 65536. The default value
+ * for \p ik is 16.
+ *
+ * \p lk is one half of the number of symbols that can be stored in
+ * a symbol table node. A symbol table node is the leaf of a symbol
+ * table tree which is used to store a group. When symbols are
+ * inserted randomly into a group, the group's symbol table nodes are
+ * 75% full on average. That is, they contain 1.5 times the number of
+ * symbols specified by \p lk. The default value for \p lk is 4.
+ *
+ * \version 1.6.4 \p ik parameter type changed to \em unsigned.
+ * \version 1.6.0 The \p ik parameter has changed from type int to
+ * \em unsigned.
+ *
+ * \since 1.0.0
+ *
+ */
+H5_DLL herr_t H5Pset_sym_k(hid_t plist_id, unsigned ik, unsigned lk);
+/**
+ * \ingroup FCPL
+ *
+ * \brief Sets user block size
+ *
+ * \fcpl_id{plist_id}
+ * \param[in] size Size of the user-block in bytes
+ *
+ * \return \herr_t
+ *
+ * \details H5Pset_userblock() sets the user block size of a file creation
+ * property list. The default user block size is 0; it may be set
+ * to any power of 2 equal to 512 or greater (512, 1024, 2048, etc.).
+ *
+ * \since 1.0.0
+ *
+ */
+H5_DLL herr_t H5Pset_userblock(hid_t plist_id, hsize_t size);
+
+/* File access property list (FAPL) routines */
+/**
+ * \ingroup FAPL
+ *
+ * \brief Retrieves the current settings for alignment properties from a
+ * file access property list
+ *
+ * \fapl_id
+ * \param[out] threshold Pointer to location of return threshold value
+ * \param[out] alignment Pointer to location of return alignment value
+ *
+ * \return \herr_t
+ *
+ * \details H5Pget_alignment() retrieves the current settings for
+ * alignment properties from a file access property list. The
+ * \p threshold and/or \p alignment pointers may be null
+ * pointers (NULL).
+ *
+ * \since 1.0.0
+ *
+ */
+H5_DLL herr_t H5Pget_alignment(hid_t fapl_id, hsize_t *threshold /*out*/, hsize_t *alignment /*out*/);
+/**
+ * \ingroup FAPL
+ *
+ * \brief Queries the raw data chunk cache parameters
+ *
+ * \fapl_id{plist_id}
+ * \param[in,out] mdc_nelmts No longer used
+ * \param[in,out] rdcc_nslots Number of elements (objects) in the raw data
+ * chunk cache
+ * \param[in,out] rdcc_nbytes Total size of the raw data chunk cache, in
+ * bytes
+ * \param[in,out] rdcc_w0 Preemption policy
+ *
+ * \return \herr_t
+ *
+ * \details H5Pget_cache() retrieves the maximum possible number of
+ * elements in the raw data chunk cache, the maximum possible
+ * number of bytes in the raw data chunk cache, and the
+ * preemption policy value.
+ *
+ * Any (or all) arguments may be null pointers, in which case
+ * the corresponding datum is not returned.
+ *
+ * Note that the \p mdc_nelmts parameter is no longer used.
+ *
+ * \version 1.8.0 Use of the \p mdc_nelmts parameter discontinued.
+ * Metadata cache configuration is managed with
+ * H5Pset_mdc_config() and H5Pget_mdc_config()
+ * \version 1.6.0 The \p rdcc_nbytes and \p rdcc_nslots parameters changed
+ * from type int to size_t.
+ *
+ * \since 1.0.0
+ *
+ */
+H5_DLL herr_t H5Pget_cache(hid_t plist_id, int *mdc_nelmts, /* out */
+ size_t *rdcc_nslots /*out*/, size_t *rdcc_nbytes /*out*/, double *rdcc_w0);
+/**
+ * \ingroup FAPL
+ *
+ * \brief Gets information about the write tracking feature used by
+ * the core VFD
+ *
+ * \fapl_id
+ * \param[out] is_enabled Whether the feature is enabled
+ * \param[out] page_size Size, in bytes, of write aggregation pages
+ *
+ * \return \herr_t
+ *
+ * \details H5Pget_core_write_tracking() retrieves information about the
+ * write tracking feature used by the core VFD.
+ *
+ * When a file is created or opened for writing using the core
+ * virtual file driver (VFD) with the backing store option turned
+ * on, the VFD can be configured to track changes to the file
+ * and only write out the modified bytes. To avoid a large number
+ * of small writes, the changes can be aggregated into pages of
+ * a user-specified size. The core VFD is also known as the
+ * memory VFD. The driver identifier is #H5FD_CORE.
+ *
+ * \note This function is only for use with the core VFD and must be used
+ * after the call to H5Pset_fapl_core(). It is an error to use this
+ * function with any other VFD.
+ *
+ * \note This function only applies to the backing store write operation
+ * which typically occurs when the file is flushed or closed. This
+ * function has no relationship to the increment parameter passed
+ * to H5Pset_fapl_core().
+ *
+ * \note For optimum performance, the \p page_size parameter should be
+ * a power of two.
+ *
+ * \since 1.8.13
+ *
+ */
+H5_DLL herr_t H5Pget_core_write_tracking(hid_t fapl_id, hbool_t *is_enabled, size_t *page_size);
+/**
+ * \ingroup FAPL
+ *
+ * \brief Returns low-lever driver identifier
+ *
+ * \plist_id
+ *
+ * \return \hid_t{low level driver}
+ *
+ * \details H5Pget_driver() returns the identifier of the low-level file
+ * driver associated with the file access property list or
+ * data transfer property list \p plist_id.
+ *
+ * Valid driver identifiers distributed with HDF5 are listed and
+ * described in the following table.
+ *
+ *
+ *
+ * Driver Name |
+ * Driver Identifier |
+ * Description |
+ * Related Function |
+ *
+ *
+ * POSIX |
+ * #H5FD_SEC2 |
+ * This driver uses POSIX file-system functions like read and
+ * write to perform I/O to a single, permanent file on local disk
+ * with no system buffering. This driver is POSIX-compliant and
+ * is the default file driver for all systems. |
+ * H5Pset_fapl_sec2() |
+ *
+ *
+ * Direct |
+ * #H5FD_DIRECT |
+ * This is the #H5FD_SEC2 driver except data is written to or
+ * read from the file synchronously without being cached by the
+ * system. |
+ * H5Pset_fapl_direct() |
+ *
+ *
+ * Log |
+ * #H5FD_LOG |
+ * This is the #H5FD_SEC2 driver with logging capabilities. |
+ * H5Pset_fapl_log() |
+ *
+ *
+ * Windows |
+ * #H5FD_WINDOWS |
+ * This driver was modified in HDF5-1.8.8 to be a wrapper of the
+ * POSIX driver, #H5FD_SEC2. This change should not affect user
+ * applications. |
+ * H5Pset_fapl_windows() |
+ *
+ *
+ * STDIO |
+ * #H5FD_STDIO |
+ * This driver uses functions from the standard C stdio.h to
+ * perform I/O to a single, permanent file on local disk with
+ * additional system buffering. |
+ * H5Pset_fapl_stdio() |
+ *
+ *
+ * Memory |
+ * #H5FD_CORE |
+ * With this driver, an application can work with a file in
+ * memory for faster reads and writes. File contents are kept in
+ * memory until the file is closed. At closing, the memory
+ * version of the file can be written back to disk or abandoned.
+ * |
+ * H5Pset_fapl_core() |
+ *
+ *
+ * Family |
+ * #H5FD_FAMILY |
+ * With this driver, the HDF5 file’s address space is partitioned
+ * into pieces and sent to separate storage files using an
+ * underlying driver of the user’s choice. This driver is for
+ * systems that do not support files larger than 2 gigabytes.
+ * |
+ * H5Pset_fapl_family() |
+ *
+ *
+ * Multi |
+ * #H5FD_MULTI |
+ * With this driver, data can be stored in multiple files
+ * according to the type of the data. I/O might work better if
+ * data is stored in separate files based on the type of data.
+ * The Split driver is a special case of this driver. |
+ * H5Pset_fapl_multi() |
+ *
+ *
+ * Parallel |
+ * #H5FD_MPIO |
+ * This is the standard HDF5 file driver for parallel file
+ * systems. This driver uses the MPI standard for both
+ * communication and file I/O. |
+ * H5Pset_fapl_mpio() |
+ *
+ *
+ * Parallel POSIX |
+ * H5FD_MPIPOSIX |
+ * This driver is no longer available. |
+ * |
+ *
+ *
+ * Stream |
+ * H5FD_STREAM |
+ * This driver is no longer available. |
+ * |
+ *
+ *
+ *
+ * This list does not include custom drivers that might be
+ * defined and registered by a user.
+ *
+ * The returned driver identifier is only valid as long as the
+ * file driver remains registered.
+ *
+ *
+ * \since 1.4.0
+ *
+ */
+H5_DLL hid_t H5Pget_driver(hid_t plist_id);
+/**
+ * \ingroup FAPL
+ *
+ * \brief Returns a pointer to file driver information
+ *
+ * \param[in] plist_id File access or data transfer property list
+ * identifier
+ *
+ * \return Returns a pointer to a struct containing low-level driver
+ * information. Otherwise returns NULL. NULL is also returned if
+ * no driver-specific properties have been registered. No error
+ * is pushed on the stack in this case.
+ *
+ * \details H5Pget_driver_info() returns a pointer to file driver-specific
+ * information for the low-level driver associated with the file
+ * access or data transfer property list \p plist_id.
+ *
+ * The pointer returned by this function points to an “uncopied”
+ * struct. Driver-specific versions of that struct are defined
+ * for each low-level driver in the relevant source code file
+ * H5FD*.c. For example, the struct used for the MULTI driver is
+ * \c H5FD_multi_fapl_t defined in H5FDmulti.c.
+ *
+ * If no driver-specific properties have been registered,
+ * H5Pget_driver_info() returns NULL.
+ *
+ * \note H5Pget_driver_info() and H5Pset_driver() are used only when
+ * creating a virtual file driver (VFD) in the virtual file
+ * layer (VFL).
+ *
+ * \version 1.10.1 Return value was changed from \em void * to
+ * \em const \em void *.
+ * \version 1.8.2 Function publicized in this release; previous releases
+ * described this function only in the virtual file driver
+ * documentation.
+ *
+ */
+H5_DLL const void *H5Pget_driver_info(hid_t plist_id);
+/**
+ * \ingroup FAPL
+ *
+ * \brief Retrieves the size of the external link open file cache
+ *
+ * \fapl_id{plist_id}
+ * \param[out] efc_size External link open file cache size in number of files
+ *
+ * \return \herr_t
+ *
+ * \details H5Pget_elink_file_cache_size() retrieves the number of files that
+ * can be held open in an external link open file cache.
+ *
+ * \since 1.8.7
+ *
+ */
+H5_DLL herr_t H5Pget_elink_file_cache_size(hid_t plist_id, unsigned *efc_size);
+/**
+ * \ingroup FAPL
+ *
+ * \brief Retrieves the file access property list setting that determines
+ * whether an HDF5 object will be evicted from the library's metadata
+ * cache when it is closed
+ *
+ * \fapl_id
+ * \param[out] evict_on_close Pointer to a variable that will indicate if
+ * the object will be evicted on close
+ *
+ * \return \herr_t
+ *
+ * \details The library's metadata cache is fairly conservative about holding on
+ * to HDF5 object metadata (object headers, chunk index structures,
+ * etc.), which can cause the cache size to grow, resulting in memory
+ * pressure on an application or system. When enabled, the "evict on
+ * close" property will cause all metadata for an object to be
+ * immediately evicted from the cache as long as it is not referenced
+ * by any other open object.
+ *
+ * See H5Pset_evict_on_close() for additional notes on behavior.
+ *
+ * \since 1.10.1
+ *
+ */
+H5_DLL herr_t H5Pget_evict_on_close(hid_t fapl_id, hbool_t *evict_on_close);
+/**
+ * \ingroup FAPL
+ *
+ * \brief Retrieves a data offset from the file access property list
+ *
+ * \fapl_id
+ * \param[out] offset Offset in bytes within the HDF5 file
+ *
+ * \return \herr_t
+ *
+ * \details H5Pget_family_offset() retrieves the value of offset from the
+ * file access property list \p fapl_id so that the user
+ * application can retrieve a file handle for low-level access to
+ * a particular member of a family of files. The file handle is
+ * retrieved with a separate call to H5Fget_vfd_handle() (or,
+ * in special circumstances, to H5FDget_vfd_handle(), see \ref VFL).
+ *
+ * \since 1.6.0
+ *
+ */
+H5_DLL herr_t H5Pget_family_offset(hid_t fapl_id, hsize_t *offset);
+/**
+ * \ingroup FAPL
+ *
+ * \brief Returns the file close degree
+ *
+ * \fapl_id
+ * \param[out] degree Pointer to a location to which to return the file
+ * close degree property, the value of \p degree
+ *
+ * \return \herr_t
+ *
+ * \details H5Pget_fclose_degree() returns the current setting of the file
+ * close degree property \p degree in the file access property
+ * list \p fapl_id. The value of \p degree determines how
+ * aggressively H5Fclose() deals with objects within a file that
+ * remain open when H5Fclose() is called to close that file.
+ *
+ * \since 1.6.0
+ *
+ */
+H5_DLL herr_t H5Pget_fclose_degree(hid_t fapl_id, H5F_close_degree_t *degree);
+/**
+ * \ingroup FAPL
+ *
+ * \brief Retrieves a copy of the file image designated as the initial content
+ * and structure of a file
+ *
+ * \fapl_id
+ * \param[in,out] buf_ptr_ptr On input, \c NULL or a pointer to a
+ * pointer to a buffer that contains the
+ * file image.\n On successful return, if \p buf_ptr_ptr is not
+ * \c NULL, \Code{*buf_ptr_ptr} will contain a pointer to a copy
+ * of the initial image provided in the last call to
+ * H5Pset_file_image() for the supplied \p fapl_id. If no initial
+ * image has been set, \Code{*buf_ptr_ptr} will be \c NULL.
+ * \param[in,out] buf_len_ptr On input, \c NULL or a pointer to a buffer
+ * specifying the required size of the buffer to hold the file
+ * image.\n On successful return, if \p buf_len_ptr was not
+ * passed in as \c NULL, \p buf_len_ptr will return the required
+ * size in bytes of the buffer to hold the initial file image in
+ * the supplied file access property list, \p fapl_id. If no
+ * initial image is set, the value of \Code{*buf_len_ptr} will be
+ * set to 0 (zero)
+ * \return \herr_t
+ *
+ * \details H5Pget_file_image() allows an application to retrieve a copy of the
+ * file image designated for a VFD to use as the initial contents of a file.
+ *
+ * If file image callbacks are defined, H5Pget_file_image() will use
+ * them when allocating and loading the buffer to return to the
+ * application (see H5Pset_file_image_callbacks()). If file image
+ * callbacks are not defined, the function will use \c malloc and \c
+ * memcpy. When \c malloc and \c memcpy are used, it is the caller’s
+ * responsibility to discard the returned buffer with a call to \c
+ * free.
+ *
+ * It is the responsibility of the calling application to free the
+ * buffer whose address is returned in \p buf_ptr_ptr. This can be
+ * accomplished with \c free if file image callbacks have not been set
+ * (see H5Pset_file_image_callbacks()) or with the appropriate method
+ * if file image callbacks have been set.
+ *
+ * \see H5LTopen_file_image(), H5Fget_file_image(), H5Pset_file_image(),
+ * H5Pset_file_image_callbacks(), H5Pget_file_image_callbacks(),
+ * \ref H5FD_file_image_callbacks_t, \ref H5FD_file_image_op_t,
+ *
+ * HDF5 File Image Operations.
+ *
+ *
+ * \since 1.8.9
+ *
+ */
+H5_DLL herr_t H5Pget_file_image(hid_t fapl_id, void **buf_ptr_ptr, size_t *buf_len_ptr);
+/**
+ * \ingroup FAPL
+ *
+ * \brief Retrieves callback routines for working with file images
+ *
+ * \fapl_id
+ * \param[in,out] callbacks_ptr Pointer to the instance of the
+ * #H5FD_file_image_callbacks_t struct in which the callback
+ * routines are to be returned\n
+ * Struct fields must be initialized to NULL before the call
+ * is made.\n
+ * Struct field contents upon return will match those passed in
+ * in the last H5Pset_file_image_callbacks() call for the file
+ * access property list \p fapl_id.
+ * \return \herr_t
+ *
+ * \details H5Pget_file_image_callbacks() retrieves the callback routines set for
+ * working with file images opened with the file access property list
+ * \p fapl_id.
+ *
+ * The callbacks must have been previously set with
+ * H5Pset_file_image_callbacks() in the file access property list.
+ *
+ * Upon the successful return of H5Pset_file_image_callbacks(), the
+ * fields in the instance of the #H5FD_file_image_callbacks_t struct
+ * pointed to by \p callbacks_ptr will contain the same values as were
+ * passed in the most recent H5Pset_file_image_callbacks() call for the
+ * file access property list \p fapl_id.
+ *
+ * \see H5LTopen_file_image(), H5Fget_file_image(), H5Pset_file_image(),
+ * H5Pset_file_image_callbacks(), H5Pget_file_image_callbacks(),
+ * \ref H5FD_file_image_callbacks_t, \ref H5FD_file_image_op_t,
+ *
+ * HDF5 File Image Operations.
+ *
+ * \since 1.8.9
+ *
+ */
+H5_DLL herr_t H5Pget_file_image_callbacks(hid_t fapl_id, H5FD_file_image_callbacks_t *callbacks_ptr);
+/**
+ * \ingroup FAPL
+ *
+ * \brief Retrieves the file locking property values
+ *
+ * \fapl_id
+ * \param[out] use_file_locking File locking flag
+ * \param[out] ignore_when_disabled Ignore when disabled flag
+ * \return \herr_t
+ *
+ * \details H5Pget_file_locking() retrieves the file locking property values for
+ * the file access property list specified by \p fapl_id.
+ *
+ * \since 1.10.7
+ *
+ */
+H5_DLL herr_t H5Pget_file_locking(hid_t fapl_id, hbool_t *use_file_locking, hbool_t *ignore_when_disabled);
+/**
+ * \ingroup FAPL
+ *
+ * \brief Returns garbage collecting references setting
+ *
+ * \fapl_id
+ * \param[out] gc_ref Flag returning the state of reference garbage
+ * collection. A returned value of 1 indicates that
+ * garbage collection is on while 0 indicates that
+ * garbage collection is off.
+ *
+ * \return \herr_t
+ *
+ * \details H5Pget_gc_references() returns the current setting for the
+ * garbage collection references property from the specified
+ * file access property list. The garbage collection references
+ * property is set by H5Pset_gc_references().
+ *
+ * \since 1.2.0
+ *
+ */
+H5_DLL herr_t H5Pget_gc_references(hid_t fapl_id, unsigned *gc_ref /*out*/);
+/**
+ * \ingroup FAPL
+ *
+ * \brief Retrieves library version bounds settings that indirectly control
+ * the format versions used when creating objects
+ *
+ * \fapl_id{plist_id}
+ * \param[out] low The earliest version of the library that will be used
+ * for writing objects
+ * \param[out] high The latest version of the library that will be used for
+ * writing objects
+ *
+ * \return \herr_t
+ *
+ * \details H5Pget_libver_bounds() retrieves the lower and upper bounds on
+ * the HDF5 library release versions that indirectly determine the
+ * object format versions used when creating objects in the file.
+ *
+ * This property is retrieved from the file access property list
+ * specified by the parameter \p fapl_id.
+ *
+ * The value returned in the parameters \p low and \p high is one
+ * of the enumerated values in the #H5F_libver_t struct, which is
+ * defined in H5Fpublic.h.
+ *
+ * \version 1.10.2 Add #H5F_LIBVER_V18 to the enumerated defines in
+ * #H5F_libver_t
+ * \since 1.8.0
+ *
+ */
+H5_DLL herr_t H5Pget_libver_bounds(hid_t plist_id, H5F_libver_t *low, H5F_libver_t *high);
+/**
+ * \ingroup FAPL
+ *
+ * \brief Get the current initial metadata cache configuration from the
+ * provided file access property list
+ *
+ * \fapl_id{plist_id}
+ * \param[in,out] config_ptr Pointer to the instance of #H5AC_cache_config_t
+ * in which the current metadata cache configuration is to be
+ * reported
+ * \return \herr_t
+ *
+ * \note The \c in direction applies only to the \ref H5AC_cache_config_t.version
+ * field. All other fields are \c out parameters.
+ *
+ * \details The fields of the #H5AC_cache_config_t structure are shown
+ * below:
+ * \snippet H5ACpublic.h H5AC_cache_config_t_snip
+ * \click4more
+ *
+ * H5Pget_mdc_config() gets the initial metadata cache configuration
+ * contained in a file access property list and loads it into the
+ * instance of #H5AC_cache_config_t pointed to by the \p config_ptr
+ * parameter. This configuration is used when the file is opened.
+ *
+ * Note that the version field of \Code{*config_ptr} must be
+ * initialized; this allows the library to support earlier versions of
+ * the #H5AC_cache_config_t structure.
+ *
+ * See the overview of the metadata cache in the special topics section
+ * of the user guide for details on the configuration data returned. If
+ * you haven't read and understood that documentation, the results of
+ * this call will not make much sense.
+ *
+ * \since 1.8.0
+ *
+ */
+H5_DLL herr_t H5Pget_mdc_config(hid_t plist_id, H5AC_cache_config_t *config_ptr); /* out */
+/**
+ * \ingroup FAPL
+ *
+ * \brief Retrieves the metadata cache image configuration values for a file
+ * access property list
+ *
+ * \fapl_id{plist_id}
+ * \param[out] config_ptr Pointer to metadata cache image configuration values
+ * \return \herr_t
+ *
+ * \details H5Pget_mdc_image_config() retrieves the metadata cache image values
+ * into \p config_ptr for the file access property list specified in \p
+ * plist_id.
+ *
+ * #H5AC_cache_image_config_t is defined as follows:
+ * \snippet H5ACpublic.h H5AC_cache_image_config_t_snip
+ * \click4more
+ *
+ * \since 1.10.1
+ */
+H5_DLL herr_t H5Pget_mdc_image_config(hid_t plist_id, H5AC_cache_image_config_t *config_ptr /*out*/);
+/**
+ * \ingroup FAPL
+ *
+ * \brief Gets metadata cache logging options
+ *
+ * \fapl_id{plist_id}
+ * \param[out] is_enabled Flag whether logging is enabled
+ * \param[out] location Location of log in UTF-8/ASCII (file path/name) (On
+ * Windows, this must be ASCII)
+ * \param[out] location_size Size in bytes of the location string
+ * \param[out] start_on_access Whether the logging begins as soon as the file is
+ * opened or created
+ * \return \herr_t
+ *
+ * \details The metadata cache is a central part of the HDF5 library through
+ * which all file metadata reads and writes take place. File metadata
+ * is normally invisible to the user and is used by the library for
+ * purposes such as locating and indexing data. File metadata should
+ * not be confused with user metadata, which consists of attributes
+ * created by users and attached to HDF5 objects such as datasets via
+ * \ref H5A API calls.
+ *
+ * Due to the complexity of the cache, a trace/logging feature has been
+ * created that can be used by HDF5 developers for debugging and
+ * performance analysis. The functions that control this functionality
+ * will normally be of use to a very limited number of developers
+ * outside of The HDF Group. The functions have been documented to help
+ * users create logs that can be sent with bug reports.
+ *
+ * Control of the log functionality is straightforward. Logging is
+ * enabled via the H5Pset_mdc_log_options() function, which will modify
+ * the file access property list used to open or create a file. This
+ * function has a flag that determines whether logging begins at file
+ * open or starts in a paused state. Log messages can then be
+ * controlled via the H5Fstart_mdc_logging() / H5Fstop_mdc_logging()
+ * functions. H5Pget_mdc_log_options() can be used to examine a file
+ * access property list, and H5Fget_mdc_logging_status() will return
+ * the current state of the logging flags.
+ *
+ * The log format is described in the
+ * Metadata Cache Logging document.
+ *
+ * \since 1.10.0
+ */
+H5_DLL herr_t H5Pget_mdc_log_options(hid_t plist_id, hbool_t *is_enabled, char *location,
+ size_t *location_size, hbool_t *start_on_access);
+/**
+ * \ingroup FAPL
+ *
+ * \brief Returns the current metadata block size setting
+ *
+ * \fapl_id{fapl_id}
+ * \param[out] size Minimum size, in bytes, of metadata block allocations
+ *
+ * \return \herr_t
+ *
+ * \details Returns the current minimum size, in bytes, of new
+ * metadata block allocations. This setting is retrieved from the
+ * file access property list \p fapl_id.
+ *
+ * This value is set by H5Pset_meta_block_size() and is
+ * retrieved from the file access property list \p fapl_id.
+ *
+ * \since 1.4.0
+ */
+H5_DLL herr_t H5Pget_meta_block_size(hid_t fapl_id, hsize_t *size);
+/**
+ * \ingroup FAPL
+ *
+ * \brief Retrieves the number of read attempts from a file access
+ * property list
+ *
+ * \fapl_id{plist_id}
+ * \param[out] attempts The number of read attempts
+ *
+ * \return \herr_t
+ *
+ * \details H5Pget_metadata_read_attempts() retrieves the number of read
+ * attempts that is set in the file access property list \p plist_id.
+ *
+ * For a default file access property list, the value retrieved
+ * will depend on whether the user sets the number of attempts via
+ * H5Pset_metadata_read_attempts():
+ *
+ *
+ *
+ * - If the number of attempts is set to N, the value
+ * returned will be N.
+ *
- If the number of attempts is not set, the value returned
+ * will be the default for non-SWMR access (1). SWMR is short
+ * for single-writer/multiple-reader.
+ *
+ *
+ * For the file access property list of a specified HDF5 file,
+ * the value retrieved will depend on how the file is opened
+ * and whether the user sets the number of read attempts via
+ * H5Pset_metadata_read_attempts():
+ *
+ *
+ * - For a file opened with SWMR access:
+ *
+ *
+ * - If the number of attempts is set to N, the value
+ * returned will be N.
+ *
- If the number of attempts is not set, the value
+ * returned will be the default for SWMR access (100).
+ *
+ * - For a file opened without SWMR access, the value
+ * retrieved will always be the default for non-SWMR access
+ * (1). The value set via H5Pset_metadata_read_attempts() does
+ * not have any effect on non-SWMR access.
+ *
+ *
+ * \par Failure Modes
+ * \parblock
+ *
+ * When the input property list is not a file access property list.
+ *
+ * When the library is unable to retrieve the number of read attempts from
+ * the file access property list.
+ *
+ * \endparblock
+ *
+ * \par Examples
+ * \parblock
+ *
+ * The first example illustrates the two cases for retrieving the number
+ * of read attempts from a default file access property list.
+ *
+ * \include H5Pget_metadata_read_attempts.1.c
+ *
+ * The second example illustrates the two cases for retrieving the
+ * number of read attempts from the file access property list of a file
+ * opened with SWMR acccess.
+ *
+ * \include H5Pget_metadata_read_attempts.2.c
+ *
+ * The third example illustrates the two cases for retrieving the number
+ * of read attempts from the file access property list of a file opened
+ * with non-SWMR acccess.
+ *
+ * \include H5Pget_metadata_read_attempts.3.c
+ *
+ * \endparblock
+ *
+ * \since 1.10.0
+ */
+H5_DLL herr_t H5Pget_metadata_read_attempts(hid_t plist_id, unsigned *attempts);
+/**
+ * \ingroup FAPL
+ *
+ * \brief Retrieves type of data property for MULTI driver
+ *
+ * \param[in] fapl_id File access property list or data transfer property
+ * list identifier
+ * \param[out] type Type of data
+ *
+ * \return \herr_t
+ *
+ * \details H5Pget_multi_type() retrieves the type of data setting from
+ * the file access or data transfer property list \p fapl_id.
+ * This enables a user application to specify the type of data
+ * the application wishes to access so that the application can
+ * retrieve a file handle for low-level access to the particular
+ * member of a set of MULTI files in which that type of data is
+ * stored. The file handle is retrieved with a separate call to
+ * H5Fget_vfd_handle() (or, in special circumstances, to
+ * H5FDget_vfd_handle(); see the Virtual File Layer documentation
+ * for more information.
+ *
+ * The type of data returned in \p type will be one of those
+ * listed in the discussion of the \p type parameter in the the
+ * description of the function H5Pset_multi_type().
+ *
+ * Use of this function is only appropriate for an HDF5 file
+ * written as a set of files with the MULTI file driver.
+ *
+ * \since 1.6.0
+ *
+ */
+H5_DLL herr_t H5Pget_multi_type(hid_t fapl_id, H5FD_mem_t *type);
+/**
+ * \ingroup FAPL
+ *
+ * \brief Retrieves the object flush property values from the file access property list
+ *
+ * \fapl_id{plist_id}
+ * \param[in] func The user-defined callback function
+ * \param[in] udata The user-defined input data for the callback function
+ *
+ * \return \herr_t
+ *
+ * \details H5Pget_object_flush_cb() gets the user-defined callback
+ * function that is set in the file access property list
+ * \p fapl_id and stored in the parameter \p func. The callback is
+ * invoked whenever an object flush occurs in the file. This
+ * routine also obtains the user-defined input data that is
+ * passed along to the callback function in the parameter
+ * \p udata.
+ *
+ * \par Example
+ * \parblock
+ * The example below illustrates the usage of this routine to obtain the
+ * object flush property values.
+ *
+ * \include H5Pget_object_flush_cb.c
+ * \endparblock
+ *
+ * \since 1.10.0
+ */
+H5_DLL herr_t H5Pget_object_flush_cb(hid_t plist_id, H5F_flush_cb_t *func, void **udata);
+/**
+ * \ingroup FAPL
+ *
+ * \brief Retrieves the maximum size for the page buffer and the minimum
+ percentage for metadata and raw data pages
+ *
+ * \fapl_id{plist_id}
+ * \param[out] buf_size Maximum size, in bytes, of the page buffer
+ * \param[out] min_meta_perc Minimum metadata percentage to keep in the
+ * page buffer before allowing pages containing metadata to
+ * be evicted
+ *
+ * \param[out] min_raw_perc Minimum raw data percentage to keep in the
+ * page buffer before allowing pages containing raw data to
+ * be evicted
+ *
+ * \return \herr_t
+ *
+ * \details H5Pget_page_buffer_size() retrieves \p buf_size, the maximum
+ * size in bytes of the page buffer, \p min_meta_perc, the
+ * minimum metadata percentage, and \p min_raw_perc, the
+ * minimum raw data percentage.
+ *
+ * \since 1.10.1
+ */
+H5_DLL herr_t H5Pget_page_buffer_size(hid_t plist_id, size_t *buf_size, unsigned *min_meta_perc,
+ unsigned *min_raw_perc);
+/**
+ * \ingroup FAPL
+ *
+ * \brief Returns maximum data sieve buffer size
+ *
+ * \fapl_id{fapl_id}
+ * \param[in] size Maximum size, in bytes, of data sieve buffer
+ *
+ * \return \herr_t
+ *
+ * \details H5Pget_sieve_buf_size() retrieves, size, the current maximum
+ * size of the data sieve buffer.
+ *
+ * This value is set by H5Pset_sieve_buf_size() and is retrieved
+ * from the file access property list fapl_id.
+ *
+ * \version 1.6.0 The \p size parameter has changed from type \c hsize_t
+ * to \c size_t
+ * \since 1.4.0
+ */
+H5_DLL herr_t H5Pget_sieve_buf_size(hid_t fapl_id, size_t *size /*out*/);
+/**
+ * \ingroup FAPL
+ *
+ * \brief Retrieves the current small data block size setting
+ *
+ * \fapl_id{fapl_id}
+ * \param[out] size Maximum size, in bytes, of the small data block
+ *
+ * \result \herr_t
+ *
+ * \details H5Pget_small_data_block_size() retrieves the current setting
+ * for the size of the small data block.
+ *
+ * If the returned value is zero (0), the small data block
+ * mechanism has been disabled for the file.
+ *
+ * \since 1.4.4
+ */
+H5_DLL herr_t H5Pget_small_data_block_size(hid_t fapl_id, hsize_t *size /*out*/);
+/**
+ * \todo Add missing documentation
+ */
+H5_DLL herr_t H5Pget_vfd_swmr_config(hid_t plist_id, H5F_vfd_swmr_config_t *config_ptr);
+/**
+ * \ingroup FAPL
+ *
+ * \brief Returns the identifier of the current VOL connector
+ *
+ * \fapl_id{plist_id}
+ * \param[out] vol_id Current VOL connector identifier
+ *
+ * \return \herr_t
+ *
+ * \details H5Pget_vol_id() returns the VOL connector identifier \p vol_id for
+ * the file access property list \p plist_id. This identifier should
+ * be closed with H5VLclose().
+ *
+ * \since 1.12.0
+ *
+ */
+H5_DLL herr_t H5Pget_vol_id(hid_t plist_id, hid_t *vol_id);
+/**
+ * \ingroup FAPL
+ *
+ * \brief Returns a copy of the VOL information for a connector
+ *
+ * \fapl_id{plist_id}
+ * \param[out] vol_info The VOL information for a connector
+ *
+ * \return \herr_t
+ *
+ * \details H5Pget_vol_info() returns a copy of the VOL information \p vol_info
+ * for a connector specified by the file access property list
+ * \p plist_id.
+ *
+ * \since 1.12.0
+ *
+ */
+H5_DLL herr_t H5Pget_vol_info(hid_t plist_id, void **vol_info);
+/**
+ * \ingroup FAPL
+ *
+ * \brief Sets alignment properties of a file access property list
+ *
+ * \fapl_id
+ * \param[in] threshold Threshold value. Note that setting the threshold
+ * value to 0 (zero) has the effect of a special case,
+ * forcing everything to be aligned
+ * \param[in] alignment Alignment value
+ *
+ * \return \herr_t
+ *
+ * \details H5Pset_alignment() sets the alignment properties of a
+ * file access property list so that any file object greater
+ * than or equal in size to \p threshold bytes will be aligned
+ * on an address which is a multiple of \p alignment. The
+ * addresses are relative to the end of the user block; the
+ * alignment is calculated by subtracting the user block size
+ * from the absolute file address and then adjusting the address
+ * to be a multiple of \p alignment.
+ *
+ * Default values for \p threshold and \p alignment are one,
+ * implying no alignment. Generally the default values will
+ * result in the best performance for single-process access to
+ * the file. For MPI IO and other parallel systems, choose an
+ * alignment which is a multiple of the disk block size.
+ *
+ * If the file space handling strategy is set to
+ * #H5F_FSPACE_STRATEGY_PAGE, then the alignment set via this
+ * routine is ignored. The file space handling strategy is set
+ * by H5Pset_file_space_strategy().
+ *
+ * \since 1.0.0
+ *
+ */
+H5_DLL herr_t H5Pset_alignment(hid_t fapl_id, hsize_t threshold, hsize_t alignment);
+/**
+ * \ingroup FAPL
+ *
+ * \brief Sets the raw data chunk cache parameters
+ *
+ * \fapl_id{plist_id}
+ * \param[in] mdc_nelmts No longer used; any value passed is ignored
+ * \param[in] rdcc_nslots The number of chunk slots in the raw data chunk
+ * cache for this dataset. Increasing this value
+ * reduces the number of cache collisions, but
+ * slightly increases the memory used. Due to the
+ * hashing strategy, this value should ideally be a
+ * prime number. As a rule of thumb, this value
+ * should be at least 10 times the number of chunks
+ * that can fit in \p rdcc_nbytes bytes. For
+ * maximum performance, this value should be set
+ * approximately 100 times that number of chunks.
+ * The default value is 521.
+ * \param[in] rdcc_nbytes Total size of the raw data chunk cache in bytes.
+ * The default size is 1 MB per dataset.
+ * \param[in] rdcc_w0 The chunk preemption policy for all datasets.
+ * This must be between 0 and 1 inclusive and
+ * indicates the weighting according to which chunks
+ * which have been fully read or written are
+ * penalized when determining which chunks to flush
+ * from cache. A value of 0 means fully read or
+ * written chunks are treated no differently than
+ * other chunks (the preemption is strictly LRU)
+ * while a value of 1 means fully read or written
+ * chunks are always preempted before other chunks.
+ * If your application only reads or writes data once,
+ * this can be safely set to 1. Otherwise, this should
+ * be set lower depending on how often you re-read or
+ * re-write the same data. The default value is 0.75.
+ * If the value passed is #H5D_CHUNK_CACHE_W0_DEFAULT,
+ * then the property will not be set on the dataset
+ * access property list, and the parameter will come
+ * from the file access property list.
+ *
+ * \return \herr_t
+ *
+ * \details H5Pset_cache() sets the number of elements, the total number of
+ * bytes, and the preemption policy value for all datasets in a file
+ * on the file’s file access property list.
+ *
+ * The raw data chunk cache inserts chunks into the cache by first
+ * computing a hash value using the address of a chunk and then by
+ * using that hash value as the chunk’s index into the table of
+ * cached chunks. In other words, the size of this hash table and the
+ * number of possible hash values is determined by the \p rdcc_nslots
+ * parameter. If a different chunk in the cache has the same hash value,
+ * a collision will occur, which will reduce efficiency. If inserting
+ * the chunk into the cache would cause the cache to be too big, then
+ * the cache will be pruned according to the \p rdcc_w0 parameter.
+ *
+ * The \p mdc_nelmts parameter is no longer used; any value passed
+ * in that parameter will be ignored.
+ *
+ * \b Motivation: Setting raw data chunk cache parameters
+ * can be done with H5Pset_cache(), H5Pset_chunk_cache(),
+ * or a combination of both. H5Pset_cache() is used to
+ * adjust the chunk cache parameters for all datasets via
+ * a global setting for the file, and H5Pset_chunk_cache()
+ * is used to adjust the chunk cache parameters for
+ * individual datasets. When both are used, parameters
+ * set with H5Pset_chunk_cache() will override any parameters
+ * set with H5Pset_cache().
+ *
+ * \note Optimum chunk cache parameters may vary widely depending
+ * on different data layout and access patterns. For datasets
+ * with low performance requirements for example, changing
+ * the cache settings can save memory.
+ *
+ * \note Note: Raw dataset chunk caching is not currently
+ * supported when using the MPI I/O and MPI POSIX file drivers
+ * in read/write mode; see H5Pset_fapl_mpio() and
+ * H5Pset_fapl_mpiposix(), respectively. When using one of these
+ * file drivers, all calls to H5Dread() and H5Dwrite() will access
+ * the disk directly, and H5Pset_cache() will have no effect on
+ * performance.
+ *
+ * \note Raw dataset chunk caching is supported when these drivers are
+ * used in read-only mode.
+ *
+ * \todo Check on H5Pset_fapl_mpio() and H5Pset_fapl_mpiposix().
+ *
+ * \version 1.8.0 The use of the \p mdc_nelmts parameter was discontinued.
+ * Metadata cache configuration is managed with
+ * H5Pset_mdc_config() and H5Pget_mdc_config().
+ * \version 1.6.0 The \p rdcc_nbytes and \p rdcc_nelmts parameters
+ * changed from type int to size_t.
+ * \since 1.0.0
+ *
+ */
+H5_DLL herr_t H5Pset_cache(hid_t plist_id, int mdc_nelmts, size_t rdcc_nslots, size_t rdcc_nbytes,
+ double rdcc_w0);
+/**
+ * \ingroup FAPL
+ *
+ * \brief Sets write tracking information for core driver, #H5FD_CORE
+ *
+ * \fapl_id{fapl_id}
+ * \param[in] is_enabled Boolean value specifying whether feature is
+ enabled
+ * \param[in] page_size Positive integer specifying size, in bytes, of
+ * write aggregation pages Value of 1 (one) enables
+ * tracking with no paging.
+ *
+ * \return \herr_t
+ *
+ * \details When a file is created or opened for writing using the core
+ * virtual file driver (VFD) with the backing store option
+ * turned on, the core driver can be configured to track
+ * changes to the file and write out only the modified bytes.
+ *
+ * This write tracking feature is enabled and disabled with \p
+ * is_enabled. The default setting is that write tracking is
+ * disabled, or off.
+ *
+ * To avoid a large number of small writes, changes can
+ * be aggregated into pages of a user-specified size, \p
+ * page_size.
+ *
+ * Setting \p page_size to 1 enables tracking with no page
+ * aggregation.
+ *
+ * The backing store option is set via the function
+ * H5Pset_fapl_core.
+ *
+ * \attention
+ * \parblock
+ * This function is only for use with the core VFD and must
+ * be used after the call to H5Pset_fapl_core(). It is an error
+ * to use this function with any other VFD.
+ *
+ * It is an error to use this function when the backing store
+ * flag has not been set using H5Pset_fapl_core().
+ *
+ * This function only applies to the backing store write
+ * operation which typically occurs when the file is flushed
+ * or closed. This function has no relationship to the
+ * increment parameter passed to H5Pset_fapl_core().
+ *
+ * For optimum performance, the \p page_size parameter should be
+ * a power of two.
+ *
+ * It is an error to set the page size to 0.
+ * \endparblock
+ *
+ * \version 1.8.14 C function modified in this release to return error
+ * if \p page_size is set to 0 (zero).
+ * \since 1.8.13
+ *
+ */
+H5_DLL herr_t H5Pset_core_write_tracking(hid_t fapl_id, hbool_t is_enabled, size_t page_size);
+/**
+ * \ingroup FAPL
+ *
+ * \brief Sets a file driver
+ *
+ * \plist_id
+ * \param[in] driver_id The new driver identifier
+ * \param[in] driver_info Optional struct containing driver properties
+ *
+ * \return \herr_t
+ *
+ * \details H5Pset_driver() sets the file driver, driver_id, for a file
+ * access or data transfer property list, \p plist_id, and
+ * supplies an optional struct containing the driver-specific
+ * properties, \p driver_info.
+ *
+ * The driver properties will be copied into the property list
+ * and the reference count on the driver will be incremented,
+ * allowing the caller to close the driver identifier but still
+ * use the property list.
+ *
+ * \version 1.8.2 Function publicized in this release; previous releases
+ * described this function only in the virtual file driver
+ * documentation.
+ *
+ */
+H5_DLL herr_t H5Pset_driver(hid_t plist_id, hid_t driver_id, const void *driver_info);
+/**
+ * \ingroup FAPL
+ *
+ * \brief Sets the number of files that can be held open in an external
+ * link open file cache
+ *
+ * \par Motivation
+ * \parblock
+ * The external link open file cache holds files open after
+ * they have been accessed via an external link. This cache reduces
+ * the number of times such files are opened when external links are
+ * accessed repeatedly and can siginificantly improves performance in
+ * certain heavy-use situations and when low-level file opens or closes
+ * are expensive.
+ *
+ * H5Pset_elink_file_cache_size() sets the number of files
+ * that will be held open in an external link open file
+ * cache. H5Pget_elink_file_cache_size() retrieves the size of an existing
+ * cache; and H5Fclear_elink_file_cache() clears an existing cache without
+ * closing it.
+ * \endparblock
+ *
+ * \fapl_id{plist_id}
+ * \param[in] efc_size External link open file cache size in number of files
+ * Default setting is 0 (zero).
+ *
+ * \return \herr_t
+ *
+ * \details H5Pset_elink_file_cache_size() specifies the number of files
+ * that will be held open in an external link open file cache.
+ *
+ * The default external link open file cache size is 0 (zero),
+ * meaning that files accessed via an external link are not
+ * held open. Setting the cache size to a positive integer
+ * turns on the cache; setting the size back to zero turns it
+ * off.
+ *
+ * With this property set, files are placed in the external
+ * link open file cache cache when they are opened via an
+ * external link. Files are then held open until either
+ * they are evicted from the cache or the parent file is
+ * closed. This property setting can improve performance when
+ * external links are repeatedly accessed.
+ *
+ * When the cache is full, files will be evicted using a least
+ * recently used (LRU) scheme; the file which has gone the
+ * longest time without being accessed through the parent file
+ * will be evicted and closed if nothing else is holding that
+ * file open.
+ *
+ * Files opened through external links inherit the parent
+ * file’s file access property list by default, and therefore
+ * inherit the parent file’s external link open file cache
+ * setting.
+ *
+ * When child files contain external links of their own, the
+ * caches can form a graph of cached external files. Closing
+ * the last external reference to such a graph will recursively
+ * close all files in the graph, even if cycles are present.
+ * \par Example
+ * \parblock
+ * The following code sets up an external link open file cache that will
+ * hold open up to 8 files reached through external links:
+ *
+ * \code
+ * status = H5Pset_elink_file_cache_size(fapl_id, 8);
+ * \endcode
+ * \endparblock
+ *
+ * \since 1.8.7
+ */
+H5_DLL herr_t H5Pset_elink_file_cache_size(hid_t plist_id, unsigned efc_size);
+/**
+ * \ingroup FAPL
+ *
+ * \brief Controls the library's behavior of evicting metadata associated with
+ * a closed object
+ *
+ * \fapl_id
+ * \param[in] evict_on_close Whether the HDF5 object should be evicted on close
+ *
+ * \return \herr_t
+ *
+ * \details The library's metadata cache is fairly conservative about holding
+ * on to HDF5 object metadata(object headers, chunk index structures,
+ * etc.), which can cause the cache size to grow, resulting in memory
+ * pressure on an application or system. When enabled, the "evict on
+ * close" property will cause all metadata for an object to be evicted
+ * from the cache as long as metadata is not referenced by any other
+ * open object.
+ *
+ * This function only applies to file access property lists.
+ *
+ * The default library behavior is to not evict on object or file
+ * close.
+ *
+ * When applied to a file access property list, any subsequently opened
+ * object will inherit the "evict on close" property and will have
+ * its metadata evicted when the object is closed.
+ *
+ * \since 1.10.1
+ *
+ */
+H5_DLL herr_t H5Pset_evict_on_close(hid_t fapl_id, hbool_t evict_on_close);
+/**
+ * \ingroup FAPL
+ *
+ * \brief Sets offset property for low-level access to a file in a family of
+ * files
+ *
+ * \fapl_id
+ * \param[in] offset Offset in bytes within the HDF5 file
+ *
+ * \return \herr_t
+ *
+ * \details H5Pset_family_offset() sets the offset property in the file access
+ * property list \p fapl_id so that the user application can
+ * retrieve a file handle for low-level access to a particular member
+ * of a family of files. The file handle is retrieved with a separate
+ * call to H5Fget_vfd_handle() (or, in special circumstances, to
+ * H5FDget_vfd_handle(); see \ref VFL).
+ *
+ * The value of \p offset is an offset in bytes from the beginning of
+ * the HDF5 file, identifying a user-determined location within the
+ * HDF5 file.
+ * The file handle the user application is seeking is for the specific
+ * member-file in the associated family of files to which this offset
+ * is mapped.
+ *
+ * Use of this function is only appropriate for an HDF5 file written as
+ * a family of files with the \c FAMILY file driver.
+ *
+ * \since 1.6.0
+ *
+ */
+H5_DLL herr_t H5Pset_family_offset(hid_t fapl_id, hsize_t offset);
+/**
+ * \ingroup FAPL
+ *
+ * \brief Sets the file close degree
+ *
+ * \fapl_id
+ * \param[in] degree Pointer to a location containing the file close
+ * degree property, the value of \p degree
+ *
+ * \return \herr_t
+ *
+ * \details H5Pset_fclose_degree() sets the file close degree property
+ * \p degree in the file access property list \p fapl_id.
+ *
+ * The value of \p degree determines how aggressively
+ * H5Fclose() deals with objects within a file that remain open
+ * when H5Fclose() is called to close that file. \p degree can
+ * have any one of four valid values:
+ *
+ *
+ *
+ * Degree name |
+ * H5Fclose behavior with no open object in file |
+ * H5Fclose behavior with open object(s) in file |
+ *
+ *
+ * #H5F_CLOSE_WEAK |
+ * Actual file is closed. |
+ * Access to file identifier is terminated; actual file
+ * close is delayed until all objects in file are closed
+ * |
+ *
+ *
+ * #H5F_CLOSE_SEMI |
+ * Actual file is closed. |
+ * Function returns FAILURE |
+ *
+ *
+ * #H5F_CLOSE_STRONG |
+ * Actual file is closed. |
+ * All open objects remaining in the file are closed then
+ * file is closed |
+ *
+ *
+ * #H5F_CLOSE_DEFAULT |
+ * The VFL driver chooses the behavior. Currently, all VFL
+ * drivers set this value to #H5F_CLOSE_WEAK, except for the
+ * MPI-I/O driver, which sets it to #H5F_CLOSE_SEMI. |
+ * |
+ *
+ *
+ *
+ * \warning If a file is opened multiple times without being closed, each
+ * open operation must use the same file close degree setting.
+ * For example, if a file is already open with #H5F_CLOSE_WEAK,
+ * an H5Fopen() call with #H5F_CLOSE_STRONG will fail.
+ *
+ * \since 1.6.0
+ *
+ */
+H5_DLL herr_t H5Pset_fclose_degree(hid_t fapl_id, H5F_close_degree_t degree);
+/**
+ * \ingroup FAPL
+ *
+ * \brief Sets an initial file image in a memory buffer
+ *
+ * \fapl_id
+ * \param[in] buf_ptr Pointer to the initial file image, or
+ * NULL if no initial file image is desired
+ * \param[in] buf_len Size of the supplied buffer, or
+ * 0 (zero) if no initial image is desired
+ *
+ * \return \herr_t
+ *
+ * \details H5Pset_file_image() allows an application to provide a file image
+ * to be used as the initial contents of a file.
+ * Calling H5Pset_file_image()makes a copy of the buffer specified in
+ * \p buf_ptr of size \p buf_len.
+ *
+ * \par Motivation:
+ * H5Pset_file_image() and other elements of HDF5 are
+ * used to load an image of an HDF5 file into system memory and open
+ * that image as a regular HDF5 file. An application can then use the
+ * file without the overhead of disk I/O.
+ *
+ * \par Recommended Reading:
+ * This function is part of the file image
+ * operations feature set. It is highly recommended to study the guide
+ * [HDF5 File Image Operations]
+ * (https://portal.hdfgroup.org/display/HDF5/HDF5+File+Image+Operations
+ * ) before using this feature set. See the “See Also” section below
+ * for links to other elements of HDF5 file image operations.
+ *
+ * \see
+ * \li H5LTopen_file_image()
+ * \li H5Fget_file_image()
+ * \li H5Pget_file_image()
+ * \li H5Pset_file_image_callbacks()
+ * \li H5Pget_file_image_callbacks()
+ *
+ * \li [HDF5 File Image Operations]
+ * (https://portal.hdfgroup.org/display/HDF5/HDF5+File+Image+Operations)
+ * in [Advanced Topics in HDF5]
+ * (https://portal.hdfgroup.org/display/HDF5/Advanced+Topics+in+HDF5)
+ *
+ * \li Within H5Pset_file_image_callbacks():
+ * \li Callback #H5FD_file_image_callbacks_t
+ * \li Callback #H5FD_file_image_op_t
+ *
+ * \version 1.8.13 Fortran subroutine added in this release.
+ * \since 1.8.9
+ *
+ */
+H5_DLL herr_t H5Pset_file_image(hid_t fapl_id, void *buf_ptr, size_t buf_len);
+/**
+ * \ingroup FAPL
+ *
+ * \brief Sets the callbacks for working with file images
+ *
+ * \note **Motivation:** H5Pset_file_image_callbacks() and other elements
+ * of HDF5 are used to load an image of an HDF5 file into system
+ * memory and open that image as a regular HDF5 file. An application
+ * can then use the file without the overhead of disk I/O.\n
+ * **Recommended Reading:** This function is part of the file
+ * image operations feature set. It is highly recommended to study
+ * the guide [HDF5 File Image Operations]
+ * (https://portal.hdfgroup.org/display/HDF5/HDF5+File+Image+Operations
+ * ) before using this feature set. See the “See Also” section below
+ * for links to other elements of HDF5 file image operations.
+ *
+ * \fapl_id
+ * \param[in,out] callbacks_ptr Pointer to the instance of the
+ * #H5FD_file_image_callbacks_t structure
+ *
+ * \return \herr_t \n
+ * **Failure Modes**: Due to interactions between this function and
+ * H5Pset_file_image() and H5Pget_file_image(),
+ * H5Pset_file_image_callbacks() will fail if a file image has
+ * already been set in the target file access property list, \p fapl_id.
+ *
+ * \details H5Pset_file_image_callbacks() sets callback functions for working
+ * with file images in memory.
+ *
+ * H5Pset_file_image_callbacks() allows an application to control the
+ * management of file image buffers through user defined callbacks.
+ * These callbacks can be used in the management of file image buffers
+ * in property lists and with certain file drivers.
+ *
+ * H5Pset_file_image_callbacks() must be used before any file image has
+ * been set in the file access property list. Once a file image has
+ * been set, the function will fail.
+ *
+ * The callback routines set up by H5Pset_file_image_callbacks() are
+ * invoked when a new file image buffer is allocated, when an existing
+ * file image buffer is copied or resized, or when a file image buffer
+ * is released from use.
+ *
+ * Some file drivers allow the use of user-defined callback functions
+ * for allocating, freeing, and copying the driver’s internal buffer,
+ * potentially allowing optimizations such as avoiding large \c malloc
+ * and \c memcpy operations, or to perform detailed logging.
+ *
+ * From the perspective of the HDF5 library, the operations of the
+ * \ref H5FD_file_image_callbacks_t.image_malloc "image_malloc",
+ * \ref H5FD_file_image_callbacks_t.image_memcpy "image_memcpy",
+ * \ref H5FD_file_image_callbacks_t.image_realloc "image_realloc", and
+ * \ref H5FD_file_image_callbacks_t.image_free "image_free" callbacks
+ * must be identical to those of the
+ * corresponding C standard library calls (\c malloc, \c memcpy,
+ * \c realloc, and \c free). While the operations must be identical,
+ * the file image callbacks have more parameters. The return values
+ * of \ref H5FD_file_image_callbacks_t.image_malloc "image_malloc" and
+ * \ref H5FD_file_image_callbacks_t.image_realloc "image_realloc" are identical to
+ * the return values of \c malloc and \c realloc. The return values of
+ * \ref H5FD_file_image_callbacks_t.image_malloc "image_malloc" and
+ * \ref H5FD_file_image_callbacks_t.image_free "image_free" differ from the return
+ * values of \c memcpy and \c free in that the return values of
+ * \ref H5FD_file_image_callbacks_t.image_memcpy "image_memcpy" and
+ * \ref H5FD_file_image_callbacks_t.image_free "image_free" can also indicate failure.
+ *
+ * The callbacks and their parameters, along with a struct and
+ * an \c ENUM required for their use, are described below.
+ *
+ * Callback struct and \c ENUM:
+ *
+ * The callback functions set up by H5Pset_file_image_callbacks() use
+ * a struct and an \c ENUM that are defined as follows
+ *
+ * The struct #H5FD_file_image_callbacks_t serves as a container
+ * for the callback functions and a pointer to user-supplied data.
+ * The struct is defined as follows:
+ * \snippet H5FDpublic.h H5FD_file_image_callbacks_t_snip
+ *
+ * Elements of the #H5FD_file_image_op_t are used by the
+ * callbacks to invoke certain operations on file images. The ENUM is
+ * defined as follows:
+ * \snippet H5FDpublic.h H5FD_file_image_op_t_snip
+ *
+ * The elements of the #H5FD_file_image_op_t are used in the following
+ * callbacks:
+ *
+ * - The \ref H5FD_file_image_callbacks_t.image_malloc "image_malloc" callback
+ * contains a pointer to a function that must appear to HDF5 to have
+ * functionality identical to that of the standard C library \c malloc() call.
+ *
+ * - Signature in #H5FD_file_image_callbacks_t:
+ * \snippet H5FDpublic.h image_malloc_snip
+ * \n
+ * - The \ref H5FD_file_image_callbacks_t.image_memcpy "image_memcpy"
+ * callback contains a pointer to a function
+ * that must appear to HDF5 to have functionality identical to that
+ * of the standard C library \c memcopy() call, except that it returns
+ * a \p NULL on failure. (The \c memcpy C Library routine is defined
+ * to return the \p dest parameter in all cases.)
+ *
+ * - Setting \ref H5FD_file_image_callbacks_t.image_memcpy "image_memcpy"
+ * to \c NULL indicates that HDF5 should invoke
+ * the standard C library \c memcpy() routine when copying buffers.
+ *
+ * - Signature in #H5FD_file_image_callbacks_t:
+ * \snippet H5FDpublic.h image_memcpy_snip
+ * \n
+ * - The \ref H5FD_file_image_callbacks_t.image_realloc "image_realloc" callback
+ * contains a pointer to a function that must appear to HDF5 to have
+ * functionality identical to that of the standard C library \c realloc() call.
+ *
+ * - Setting \ref H5FD_file_image_callbacks_t.image_realloc "image_realloc"
+ * to \p NULL indicates that HDF5 should
+ * invoke the standard C library \c realloc() routine when resizing
+ * file image buffers.
+ *
+ * - Signature in #H5FD_file_image_callbacks_t:
+ * \snippet H5FDpublic.h image_realloc_snip
+ * \n
+ * - The \ref H5FD_file_image_callbacks_t.image_free "image_free" callback contains
+ * a pointer to a function that must appear to HDF5 to have functionality
+ * identical to that of the standard C library \c free() call, except
+ * that it will return \c 0 (\c SUCCEED) on success and \c -1 (\c FAIL) on failure.
+ *
+ * - Setting \ref H5FD_file_image_callbacks_t.image_free "image_free"
+ * to \c NULL indicates that HDF5 should invoke
+ * the standard C library \c free() routine when releasing file image
+ * buffers.
+ *
+ * - Signature in #H5FD_file_image_callbacks_t:
+ * \snippet H5FDpublic.h image_free_snip
+ * \n
+ * - The \ref H5FD_file_image_callbacks_t.udata_copy "udata_copy"
+ * callback contains a pointer to a function
+ * that, from the perspective of HDF5, allocates a buffer of suitable
+ * size, copies the contents of the supplied \p udata into the new
+ * buffer, and returns the address of the new buffer. The function
+ * returns NULL on failure. This function is necessary if a non-NULL
+ * \p udata parameter is supplied, so that property lists containing
+ * the image callbacks can be copied. If the \p udata parameter below
+ * is \c NULL, then this parameter should be \c NULL as well.
+ *
+ * - Signature in #H5FD_file_image_callbacks_t:
+ * \snippet H5FDpublic.h udata_copy_snip
+ * \n
+ * - The \ref H5FD_file_image_callbacks_t.udata_free "udata_free"
+ * callback contains a pointer to a function
+ * that, from the perspective of HDF5, frees a user data block. This
+ * function is necessary if a non-NULL udata parameter is supplied so
+ * that property lists containing image callbacks can be discarded
+ * without a memory leak. If the udata parameter below is \c NULL,
+ * this parameter should be \c NULL as well.
+ *
+ * - Signature in #H5FD_file_image_callbacks_t:
+ * \snippet H5FDpublic.h udata_free_snip
+ *
+ * - \p **udata**, the final field in the #H5FD_file_image_callbacks_t
+ * struct, provides a pointer to user-defined data. This pointer will
+ * be passed to the
+ * \ref H5FD_file_image_callbacks_t.image_malloc "image_malloc",
+ * \ref H5FD_file_image_callbacks_t.image_memcpy "image_memcpy",
+ * \ref H5FD_file_image_callbacks_t.image_realloc "image_realloc", and
+ * \ref H5FD_file_image_callbacks_t.image_free "image_free" callbacks.
+ * Define udata as \c NULL if no user-defined data is provided.
+ *
+ * \since 1.8.9
+ *
+ */
+H5_DLL herr_t H5Pset_file_image_callbacks(hid_t fapl_id, H5FD_file_image_callbacks_t *callbacks_ptr);
+/**
+ * \ingroup FAPL
+ *
+ * \brief Sets the file locking property values
+ *
+ * \fapl_id
+ * \param[in] use_file_locking Toggle to specify file locking (or not)
+ * \param[in] ignore_when_disabled Toggle to ignore when disabled (or not)
+ *
+ * \return \herr_t
+ *
+ * \details H5Pset_file_locking() overrides the default file locking flag
+ * setting that was set when the library was configured.
+ *
+ * This setting can be overridden by the \c HDF5_USE_FILE_LOCKING
+ * environment variable.
+ *
+ * File locking is used when creating/opening a file to prevent
+ * problematic file accesses.
+ *
+ * \since 1.10.7
+ *
+ */
+H5_DLL herr_t H5Pset_file_locking(hid_t fapl_id, hbool_t use_file_locking, hbool_t ignore_when_disabled);
+/**
+ * \ingroup FAPL
+ *
+ * \brief Sets garbage collecting references flag
+ *
+ * \fapl_id
+ * \param[in] gc_ref Flag setting reference garbage collection to on (1) or off (0)
+ *
+ * \return \herr_t
+ *
+ * \details H5Pset_gc_references() sets the flag for garbage collecting
+ * references for the file.
+ *
+ * Dataset region references and other reference types use space in an
+ * HDF5 file's global heap. If garbage collection is on and the user
+ * passes in an uninitialized value in a reference structure, the heap
+ * might get corrupted. When garbage collection is off, however, and
+ * the user re-uses a reference, the previous heap block will be
+ * orphaned and not returned to the free heap space.
+ *
+ * When garbage collection is on, the user must initialize the
+ * reference structures to 0 or risk heap corruption.
+ *
+ * The default value for garbage collecting references is off.
+ *
+ */
+H5_DLL herr_t H5Pset_gc_references(hid_t fapl_id, unsigned gc_ref);
+/**
+ * \ingroup FAPL
+ *
+ * \brief Controls the range of library release versions used when creating
+ * objects in a file
+ *
+ * \fapl_id{plist_id}
+ * \param[in] low The earliest version of the library that will be used
+ * for writing objects
+ * \param[in] high The latest version of the library that will be used for
+ * writing objects
+ *
+ * \return \herr_t
+ *
+ * \details H5Pset_libver_bounds() controls the range of library release
+ * versions that will be used when creating objects in a file.
+ * The object format versions are determined indirectly from the
+ * library release versions specified in the call.
+ *
+ * This property is set in the file access property list
+ * specified by the parameter \p fapl_id.
+ *
+ * The parameter \p low sets the earliest possible format
+ * versions that the library will use when creating objects in
+ * the file. Note that earliest possible is different from
+ * earliest, as some features introduced in library versions
+ * later than 1.0.0 resulted in updates to object formats.
+ * The parameter \p high sets the latest format versions that
+ * the library will be allowed to use when creating objects in
+ * the file.
+ *
+ * The parameters \p low and \p high must be one of the
+ * enumerated values in the #H5F_libver_t struct, which is
+ * defined in H5Fpublic.h.
+ *
+ * The macro #H5F_LIBVER_LATEST is aliased to the highest
+ * enumerated value in #H5F_libver_t, indicating that this is
+ * currently the latest format available.
+ *
+ * The library supports the following five pairs of
+ * (\p low, \p high) combinations as derived from the values
+ * in #H5F_libver_t:
+ *
+ *
+ *
+ * Value of \p low and \p high |
+ * Result |
+ *
+ *
+ * \p low=#H5F_LIBVER_EARLIEST
+ * \p high=#H5F_LIBVER_V18 |
+ *
+ * \li The library will create objects with the earliest
+ * possible format versions.
+ * \li The library will allow objects to be created with the
+ * latest format versions available to library release 1.8.x.
+ * \li API calls that create objects or features that are
+ * available to versions of the library greater than 1.8.x
+ * release will fail.
+ * |
+ *
+ *
+ * \p low=#H5F_LIBVER_EARLIEST
+ * \p high=#H5F_LIBVER_V110 |
+ *
+ * \li The library will create objects with the earliest possible
+ * format versions.
+ * \li The library will allow objects to be created with the latest
+ * format versions available to library release 1.10.x.
+ * Since 1.10.x is also #H5F_LIBVER_LATEST, there is no upper
+ * limit on the format versions to use. For example, if a newer
+ * format version is required to support a feature e.g. virtual
+ * dataset, this setting will allow the object to be created.
+ * \li This is the library default setting and provides the greatest
+ * format compatibility.
+ * |
+ *
+ *
+ * \p low=#H5F_LIBVER_V18
+ * \p high=#H5F_LIBVER_V18 |
+ *
+ * \li The library will create objects with the latest format
+ * versions available to library release 1.8.x.
+ * \li API calls that create objects or features that are available
+ * to versions of the library greater than 1.8.x release will
+ * fail.
+ * \li Earlier versions of the library may not be able to access
+ * objects created with this setting. |
+ *
+ *
+ * \p low=#H5F_LIBVER_V18
+ * \p high=#H5F_LIBVER_V110 |
+ *
+ * \li The library will create objects with the latest format
+ * versions available to library release 1.8.x.
+ * \li The library will allow objects to be created with the latest
+ * format versions available to library release 1.10.x.
+ * Since 1.10.x is also #H5F_LIBVER_LATEST, there is no upper
+ * limit on the format versions to use. For example, if a
+ * newer format version is required to support a feature e.g.
+ * virtual dataset, this setting will allow the object to be
+ * created.
+ * \li Earlier versions of the library may not be able to access
+ * objects created with this setting. |
+ *
+ *
+ * \p low=#H5F_LIBVER_V110
+ * \p high=#H5F_LIBVER_V110
+ * |
+ *
+ * \li The library will create objects with the latest format
+ * versions available to library release 1.10.x.
+ * \li The library will allow objects to be created with the latest
+ * format versions available to library release 1.10.x.
+ * Since 1.10.x is also #H5F_LIBVER_LATEST, there is no upper
+ * limit on the format versions to use. For example, if a
+ * newer format version is required to support a feature e.g.
+ * virtual dataset, this setting will allow the object to be
+ * created.
+ * \li This setting allows users to take advantage of the latest
+ * features and performance enhancements in the library.
+ * However, objects written with this setting may be
+ * accessible to a smaller range of library versions than
+ * would be the case if low is set to #H5F_LIBVER_EARLIEST.
+ * \li Earlier versions of the library may not be able to access
+ * objects created with this
+ * setting.
+ * |
+ *
+ *
+ *
+ * \version 1.10.2 #H5F_LIBVER_V18 added to the enumerated defines in
+ * #H5F_libver_t.
+ *
+ * \since 1.8.0
+ *
+ */
+H5_DLL herr_t H5Pset_libver_bounds(hid_t plist_id, H5F_libver_t low, H5F_libver_t high);
+/**
+ * \ingroup FAPL
+ *
+ * \brief Set the initial metadata cache configuration in the indicated File
+ * Access Property List to the supplied value
+ *
+ * \fapl_id{plist_id}
+ * \param[in] config_ptr Pointer to the instance of \p H5AC_cache_config_t
+ * containing the desired configuration
+ * \return \herr_t
+ *
+ * \details The fields of the #H5AC_cache_config_t structure are shown
+ * below:
+ * \snippet H5ACpublic.h H5AC_cache_config_t_snip
+ * \click4more
+ *
+ * \details H5Pset_mdc_config() attempts to set the initial metadata cache
+ * configuration to the supplied value. It will fail if an invalid
+ * configuration is detected. This configuration is used when the file
+ * is opened.
+ *
+ * See the overview of the metadata cache in the special topics section
+ * of the user manual for details on what is being configured. If you
+ * have not read and understood that documentation, you really should
+ * not be using this API call.
+ *
+ * \since 1.8.0
+ *
+ */
+H5_DLL herr_t H5Pset_mdc_config(hid_t plist_id, H5AC_cache_config_t *config_ptr);
+/**
+ * \ingroup FAPL
+ *
+ * \brief Sets metadata cache logging options
+ *
+ * \fapl_id{plist_id}
+ * \param[in] is_enabled Whether logging is enabled
+ * \param[in] location Location of log in UTF-8/ASCII (file path/name)
+ * (On Windows, this must be ASCII)
+ * \param[in] start_on_access Whether the logging will begin as soon as the
+ * file is opened or created
+ *
+ * \return \herr_t
+ *
+ * \details The metadata cache is a central part of the HDF5 library through
+ * which all file metadata reads and writes take place. File metadata
+ * is normally invisible to the user and is used by the library for
+ * purposes such as locating and indexing data. File metadata should
+ * not be confused with user metadata, which consists of attributes
+ * created by users and attached to HDF5 objects such as datasets via
+ * H5A API calls.
+ *
+ * Due to the complexity of the cache, a trace/logging feature has
+ * been created that can be used by HDF5 developers for debugging and
+ * performance analysis. The functions that control this functionality
+ * will normally be of use to a very limited number of developers
+ * outside of The HDF Group. The functions have been documented to
+ * help users create logs that can be sent with bug reports.
+ *
+ * Control of the log functionality is straightforward. Logging is
+ * enabled via the H5Pset_mdc_log_options() function,
+ * which will modify the file access property list used to open or
+ * create a file. This function has a flag that determines whether
+ * logging begins at file open or starts in a paused state. Log
+ * messages can then be controlled via the H5Fstart_mdc_logging()
+ * and H5Fstop_mdc_logging() function.
+ *
+ * H5Pget_mdc_log_options() can be used to examine a file access
+ * property list, and H5Fget_mdc_logging_status() will return the
+ * current state of the logging flags.
+ *
+ * The log format is described in [Metadata Cache Logging]
+ * (https://portal.hdfgroup.org/display/HDF5/Fine-tuning+the+Metadata+Cache).
+ *
+ * \since 1.10.0
+ *
+ */
+H5_DLL herr_t H5Pset_mdc_log_options(hid_t plist_id, hbool_t is_enabled, const char *location,
+ hbool_t start_on_access);
+/**
+ * \ingroup FAPL
+ *
+ * \brief Sets the minimum metadata block size
+ *
+ * \fapl_id{fapl_id}
+ * \param[in] size Minimum size, in bytes, of metadata block allocations
+ *
+ * \return \herr_t
+ *
+ * \details H5Pset_meta_block_size() sets the minimum size, in bytes, of
+ * metadata block allocations when #H5FD_FEAT_AGGREGATE_METADATA is set by a VFL
+ * driver.
+
+ * Each raw metadata block is initially allocated to be of the given size.
+ * Specific metadata objects (e.g., object headers, local heaps, B-trees) are then
+ * sub-allocated from this block.
+ *
+ * The default setting is 2048 bytes, meaning that the library will
+ * attempt to aggregate metadata in at least 2K blocks in the file.
+ * Setting the value to zero (\Code{0}) with this function will turn
+ * off metadata aggregation, even if the VFL driver attempts to use the
+ * metadata aggregation strategy.
+ *
+ * Metadata aggregation reduces the number of small data objects in the file that
+ * would otherwise be required for metadata. The aggregated block of metadata is
+ * usually written in a single write action and always in a contiguous block,
+ * potentially significantly improving library and application performance.
+ *
+ * \since 1.4.0
+ */
+H5_DLL herr_t H5Pset_meta_block_size(hid_t fapl_id, hsize_t size);
+/**
+ * \ingroup FAPL
+ *
+ * \brief Sets the number of read attempts in a file access property list
+ *
+ * \fapl_id{plist_id}
+ * \param[in] attempts The number of read attempts. Must be a value greater than \Code{0}
+ *
+ * \return \herr_t
+ *
+ * \return Failure Modes:
+ * - When the user sets the number of read attempts to \Code{0}.
+ * - When the input property list is not a file access property list.
+ * - When the library is unable to set the number of read attempts in the file access property list.
+ *
+ * \details H5Pset_metadata_read_attempts() sets the number of reads that the
+ * library will try when reading checksummed metadata in an HDF5 file opened
+ * with SWMR access. When reading such metadata, the library will compare the
+ * checksum computed for the metadata just read with the checksum stored within
+ * the piece of checksum. When performing SWMR operations on a file, the
+ * checksum check might fail when the library reads data on a system that is not
+ * atomic. To remedy such situations, the library will repeatedly read the piece
+ * of metadata until the check passes or finally fails the read when the allowed
+ * number of attempts is reached.
+ *
+ * The number of read attempts used by the library will depend on how the file is
+ * opened and whether the user sets the number of read attempts via this routine:
+
+ * - For a file opened with SWMR access:
+ * - If the user sets the number of attempts to \Code{N}, the library will use \Code{N}.
+ * - If the user does not set the number of attempts, the library will use the
+ * default for SWMR access (\Code{100}).
+ * - For a file opened with non-SWMR access, the library will always use the default
+ * for non-SWMR access (\Code{1}). The value set via this routine does not have any effect
+ * during non-SWMR access.
+ *
+ * \b Example: The first example illustrates the case in setting the number of read attempts for a file
+ * opened with SWMR access.
+ *
+ * \snippet H5Pset_metadata_read_attempts.c SWMR Access
+ *
+ * \b Example: The second example illustrates the case in setting the number of
+ * read attempts for a file opened with non-SWMR access. The value
+ * set in the file access property list does not have any effect.
+ *
+ * \snippet H5Pset_metadata_read_attempts.c non-SWMR Access
+ *
+ * \note \b Motivation: On a system that is not atomic, the library might
+ * possibly read inconsistent metadata with checksum when performing
+ * single-writer/multiple-reader (SWMR) operations for an HDF5 file. Upon
+ * encountering such situations, the library will try reading the metadata
+ * again to obtain consistent data. This routine provides the means to set
+ * the number of read attempts other than the library default.
+ *
+ * \since 1.10.0
+ */
+H5_DLL herr_t H5Pset_metadata_read_attempts(hid_t plist_id, unsigned attempts);
+/**
+ * \ingroup FAPL
+ *
+ * \brief Specifies type of data to be accessed via the \Code{MULTI} driver,
+ * enabling more direct access
+ *
+ * \fapl_id{fapl_id}
+ * \param[in] type Type of data to be accessed
+ *
+ * \return \herr_t
+ *
+ * \details H5Pset_multi_type() sets the \Emph{type of data} property in the file
+ * access property list \p fapl_id. This setting enables a user
+ * application to specify the type of data the application wishes to
+ * access so that the application can retrieve a file handle for
+ * low-level access to the particular member of a set of \Code{MULTI}
+ * files in which that type of data is stored. The file handle is
+ * retrieved with a separate call to H5Fget_vfd_handle() (or, in special
+ * circumstances, to H5FDget_vfd_handle(); see \ref VFL.
+ *
+ * The type of data specified in \p type may be one of the following:
+ *
+ *
+ *
+ * #H5FD_MEM_SUPER | Super block data |
+ *
+ *
+ * #H5FD_MEM_BTREE | B-tree data |
+ *
+ *
+ * #H5FD_MEM_DRAW | Dataset raw data |
+ *
+ *
+ * #H5FD_MEM_GHEAP | Global heap data |
+ *
+ *
+ * #H5FD_MEM_LHEAP | Local Heap data |
+ *
+ *
+ * #H5FD_MEM_OHDR | Object header data |
+ *
+ *
+ *
+ * This function is for use only when accessing an HDF5 file written as a set of
+ * files with the \Code{MULTI} file driver.
+ *
+ * \since 1.6.0
+ */
+H5_DLL herr_t H5Pset_multi_type(hid_t fapl_id, H5FD_mem_t type);
+/**
+ * \ingroup FAPL
+ *
+ * \brief Sets a callback function to invoke when an object flush occurs in the file
+ *
+ * \fapl_id{plist_id}
+ * \op{func}
+ * \op_data_in{udata}
+ *
+ * \return \herr_t
+ *
+ * \details H5Pset_object_flush_cb() sets the callback function to invoke in the
+ * file access property list \p plist_id whenever an object flush occurs in
+ * the file. Library objects are group, dataset, and committed
+ * datatype.
+ *
+ * The callback function \p func must conform to the prototype defined below:
+ * \code
+ * typedef herr_t (*H5F_flush_cb_t)(hid_t object_id, void *user_data)
+ * \endcode
+ *
+ * The parameters of the callback function, per the above prototypes, are defined as follows:
+ * - \Code{object_id} is the identifier of the object which has just been flushed.
+ * - \Code{user_data} is the user-defined input data for the callback function.
+ *
+ * \b Example: The example below illustrates the usage of this routine to set
+ * the callback function to invoke when an object flush occurs.
+ *
+ * \include H5Pset_object_flush_cb.c
+ *
+ * \since 1.10.0
+ */
+H5_DLL herr_t H5Pset_object_flush_cb(hid_t plist_id, H5F_flush_cb_t func, void *udata);
+/**
+ * \ingroup FAPL
+ *
+ * \brief Sets the maximum size of the data sieve buffer
+ *
+ * \fapl_id{fapl_id}
+ * \param[in] size Maximum size, in bytes, of data sieve buffer
+ *
+ * \return \herr_t
+ *
+ * \details H5Pset_sieve_buf_size() sets \p size, the maximum size in bytes of the
+ * data sieve buffer, which is used by file drivers that are capable of
+ * using data sieving.
+ *
+ * The data sieve buffer is used when performing I/O on datasets in the
+ * file. Using a buffer which is large enough to hold several pieces of
+ * the dataset being read in for hyperslab selections boosts
+ * performance by quite a bit.
+ *
+ * The default value is set to 64KB, indicating that file I/O for raw
+ * data reads and writes will occur in at least 64KB blocks. Setting
+ * the value to zero (\Code{0}) with this API function will turn off
+ * the data sieving, even if the VFL driver attempts to use that
+ * strategy.
+ *
+ * Internally, the library checks the storage sizes of the datasets in
+ * the file. It picks the smaller one between the size from the file
+ * access property and the size of the dataset to allocate the sieve
+ * buffer for the dataset in order to save memory usage.
+ *
+ * \version 1.6.0 The \p size parameter has changed from type \Code{hsize_t} to \Code{size_t}.
+ *
+ * \since 1.4.0
+ */
+H5_DLL herr_t H5Pset_sieve_buf_size(hid_t fapl_id, size_t size);
+/**
+ * \ingroup FAPL
+ *
+ * \brief Sets the size of a contiguous block reserved for small data
+ *
+ * \fapl_id{fapl_id}
+ * \param[in] size Maximum size, in bytes, of the small data block.
+ The default size is \Code{2048}.
+ *
+ * \return \herr_t
+ *
+ * \details H5Pset_small_data_block_size() reserves blocks of \p size bytes for the
+ * contiguous storage of the raw data portion of \Emph{small} datasets. The
+ * HDF5 library then writes the raw data from small datasets to this
+ * reserved space, thus reducing unnecessary discontinuities within
+ * blocks of meta data and improving I/O performance.
+ *
+ * A small data block is actually allocated the first time a qualifying
+ * small dataset is written to the file. Space for the raw data portion
+ * of this small dataset is suballocated within the small data block.
+ * The raw data from each subsequent small dataset is also written to
+ * the small data block until it is filled; additional small data
+ * blocks are allocated as required.
+ *
+ * The HDF5 library employs an algorithm that determines whether I/O
+ * performance is likely to benefit from the use of this mechanism with
+ * each dataset as storage space is allocated in the file. A larger
+ * \p size will result in this mechanism being employed with larger
+ * datasets.
+ *
+ * The small data block size is set as an allocation property in the
+ * file access property list identified by \p fapl_id.
+ *
+ * Setting \p size to zero (\Code{0}) disables the small data block mechanism.
+ *
+ * \since 1.4.4
+ */
+H5_DLL herr_t H5Pset_small_data_block_size(hid_t fapl_id, hsize_t size);
+/**
+ * \ingroup FAPL
+ *
+ * \brief Set the file VOL connector for a file access property list
+ *
+ * \fapl_id{plist_id}
+ * \param[in] new_vol_id VOL connector identifier
+ * \param[in] new_vol_info Optional VOL information
+ *
+ * \return \herr_t
+ *
+ * \details H5Pset_vol() sets the VOL connector \p new_vol_id for a file access
+ * property list \p plist_id using the (optional) VOL information in
+ * \p new_vol_info.
+ *
+ * \since 1.12.0
+ *
+ */
+H5_DLL herr_t H5Pset_vol(hid_t plist_id, hid_t new_vol_id, const void *new_vol_info);
+
+#ifdef H5_HAVE_PARALLEL
+/**
+ * \ingroup GACPL
+ *
+ * \brief Sets metadata I/O mode for read operations to collective or independent (default)
+ *
+ * \gacpl_id
+ * \param[in] is_collective Boolean value indicating whether metadata reads are collective
+ * (\Code{1}) or independent (\Code{0}).
+ * Default mode: Independent (\Code{0})
+ *
+ * \return \herr_t
+ *
+ * \details H5Pset_all_coll_metadata_ops() sets the metadata I/O mode for read
+ * operations in the access property list \p plist_id.
+ *
+ * When engaging in parallel I/O, all metadata write operations must be
+ * collective. If \p is_collective is \Code{1}, this property specifies
+ * that the HDF5 library will perform all metadata read operations
+ * collectively; if \p is_collective is \Code{0}, such operations may
+ * be performed independently.
+ *
+ * Users must be aware that several HDF5 operations can potentially
+ * issue metadata reads. These include opening a dataset, datatype, or
+ * group; reading an attribute; or issuing a \Emph{get info} call such
+ * as getting information for a group with H5Fget_info(). Collective
+ * I/O requirements must be kept in mind when issuing such calls in the
+ * context of parallel I/O.
+ *
+ * If this property is collective on a file access property list that
+ * is used in creating or opening a file, then the HDF5 library will
+ * assume that all metadata read operations issued on that file
+ * identifier will be issued collectively from all ranks irrespective
+ * of the individual setting of a particular operation. If this
+ * assumption is not adhered to, corruption will be introduced in the
+ * metadata cache and HDF5’s behavior will be undefined.
+ *
+ * Alternatively, a user may wish to avoid setting this property
+ * globally on the file access property list, and individually set it
+ * on particular object access property lists (dataset, group, link,
+ * datatype, attribute access property lists) for certain operations.
+ * This will indicate that only the operations issued with such an
+ * access property list will be called collectively and other
+ * operations may potentially be called independently. There are,
+ * however, several HDF5 operations that can issue metadata reads but
+ * have no property list in their function signatures to allow passing
+ * the collective requirement property. For those operations, the only
+ * option is to set the global collective requirement property on the
+ * file access property list; otherwise the metadata reads that can be
+ * triggered from those operations will be done independently by each
+ * process.
+ *
+ * Functions that do not accommodate an access property list but that
+ * might issue metadata reads are listed in \ref maybe_metadata_reads.
+ *
+ * \attention As noted above, corruption will be introduced into the metadata
+ * cache and HDF5 library behavior will be undefined when both of the following
+ * conditions exist:
+ * - A file is created or opened with a file access property list in which the
+ * collective metadata I/O property is set to \Code{1}.
+ * - Any function is called that triggers an independent metadata read while the
+ * file remains open with that file access property list.
+ *
+ * \attention An approach that avoids this corruption risk is described above.
+ *
+ * \sa_metadata_ops
+ *
+ * \since 1.10.0
+ */
+H5_DLL herr_t H5Pset_all_coll_metadata_ops(hid_t plist_id, hbool_t is_collective);
+/**
+ * \ingroup GACPL
+ *
+ * \brief Retrieves metadata read mode setting
+ *
+ * \gacpl_id
+ * \param[out] is_collective Pointer to a buffer containing the Boolean value indicating whether metadata
+ * reads are collective (\Code{>0}) or independent (\Code{0}).
+ * Default mode: Independent (\Code{0})
+ *
+ * \return \herr_t
+ *
+ * \details H5Pget_all_coll_metadata_ops() retrieves the collective metadata read setting from the access
+ * property list \p plist_id into \p is_collective.
+ *
+ * \sa_metadata_ops
+ *
+ * \since 1.10.0
+ */
+H5_DLL herr_t H5Pget_all_coll_metadata_ops(hid_t plist_id, hbool_t *is_collective);
+/**
+ * \ingroup FAPL
+ *
+ * \brief Sets metadata write mode to collective or independent (default)
+ *
+ * \fapl_id{plist_id}
+ * \param[out] is_collective Boolean value indicating whether metadata
+ * writes are collective (\Code{>0}) or independent (\Code{0}).
+ * \Emph{Default mode:} Independent (\Code{0})
+ * \return \herr_t
+ *
+ * \details H5Pset_coll_metadata_write() tells the HDF5 library whether to
+ * perform metadata writes collectively (1) or independently (0).
+ *
+ * If collective access is selected, then on a flush of the metadata
+ * cache, all processes will divide the metadata cache entries to be
+ * flushed evenly among themselves and issue a single MPI-IO collective
+ * write operation. This is the preferred method when the size of the
+ * metadata created by the application is large.
+ *
+ * If independent access is selected, the library uses the default
+ * method for doing metadata I/O either from process zero or
+ * independently from each process.
+ *
+ * \sa_metadata_ops
+ *
+ * \since 1.10.0
+ */
+H5_DLL herr_t H5Pset_coll_metadata_write(hid_t plist_id, hbool_t is_collective);
+/**
+ * \ingroup FAPL
+ *
+ * \brief Retrieves metadata write mode setting
+ *
+ * \fapl_id{plist_id}
+ * \param[out] is_collective Pointer to a boolean value indicating whether
+ * metadata writes are collective (\Code{>0}) or independent (\Code{0}).
+ * \Emph{Default mode:} Independent (\Code{0})
+ * \return \herr_t
+ *
+ * \details H5Pget_coll_metadata_write() retrieves the collective metadata write
+ * setting from the file access property into \p is_collective.
+ *
+ * \sa_metadata_ops
+ *
+ * \since 1.10.0
+ */
+H5_DLL herr_t H5Pget_coll_metadata_write(hid_t plist_id, hbool_t *is_collective);
+
+/**
+ * \todo Add missing documentation
+ */
+H5_DLL herr_t H5Pget_mpi_params(hid_t fapl_id, MPI_Comm *comm, MPI_Info *info);
+
+/**
+ * \todo Add missing documentation
+ */
+H5_DLL herr_t H5Pset_mpi_params(hid_t fapl_id, MPI_Comm comm, MPI_Info info);
+#endif /* H5_HAVE_PARALLEL */
+/**
+ * \ingroup FAPL
+ *
+ * \brief Sets the metadata cache image option for a file access property list
+ *
+ * \fapl_id{plist_id}
+ * \param[out] config_ptr Pointer to metadata cache image configuration values
+ * \return \herr_t
+ *
+ * \details H5Pset_mdc_image_config() sets the metadata cache image option with
+ * configuration values specified by \p config_ptr for the file access
+ * property list specified in \p plist_id.
+ *
+ * #H5AC_cache_image_config_t is defined as follows:
+ * \snippet H5ACpublic.h H5AC_cache_image_config_t_snip
+ * \click4more
+ *
+ * \par Limitations: While it is an obvious error to request a cache image when
+ * opening the file read only, it is not in general possible to test for
+ * this error in the H5Pset_mdc_image_config() call. Rather than fail the
+ * subsequent file open, the library silently ignores the file image
+ * request in this case.\n It is also an error to request a cache image on
+ * a file that does not support superblock extension messages (i.e. a
+ * superblock version less than 2). As above, it is not always possible to
+ * detect this error in the H5Pset_mdc_image_config() call, and thus the
+ * request for a cache image will fail silently in this case as well.\n
+ * Creation of cache images is currently disabled in parallel -- as above,
+ * any request for a cache image in this context will fail silently.\n
+ * Files with cache images may be read in parallel applications, but note
+ * that the load of the cache image is a collective operation triggered by
+ * the first operation that accesses metadata after file open (or, if
+ * persistent free space managers are enabled, on the first allocation or
+ * deallocation of file space, or read of file space manager status,
+ * whichever comes first). Thus the parallel process may deadlock if any
+ * process does not participate in this access.\n
+ * In long sequences of file closes and opens, infrequently accessed
+ * metadata can accumulate in the cache image to the point where the cost
+ * of storing and restoring this metadata exceeds the benefit of retaining
+ * frequently used metadata in the cache image. When implemented, the
+ * #H5AC_cache_image_config_t::entry_ageout should address this problem. In
+ * the interim, not requesting a cache image every n file close/open cycles
+ * may be an acceptable work around. The choice of \c n will be driven by
+ * application behavior, but \Code{n = 10} seems a good starting point.
+ *
+ * \since 1.10.1
+ */
+H5_DLL herr_t H5Pset_mdc_image_config(hid_t plist_id, H5AC_cache_image_config_t *config_ptr);
+/**
+ * \ingroup FAPL
+ *
+ * \brief Sets the maximum size for the page buffer and the minimum percentage
+ * for metadata and raw data pages
+ *
+ * \fapl_id{plist_id}
+ * \param[in] buf_size Maximum size, in bytes, of the page buffer
+ * \param[in] min_meta_per Minimum metadata percentage to keep in the page buffer
+ * before allowing pages containing metadata to be evicted (Default is 0)
+ * \param[in] min_raw_per Minimum raw data percentage to keep in the page buffer
+ * before allowing pages containing raw data to be evicted (Default is 0)
+ * \return \herr_t
+ *
+ * \details H5Pset_page_buffer_size() sets buf_size, the maximum size in bytes
+ * of the page buffer. The default value is zero, meaning that page
+ * buffering is disabled. When a non-zero page buffer size is set, the
+ * library will enable page buffering if that size is larger or equal
+ * than a single page size if a paged file space strategy is enabled
+ * using the functions H5Pset_file_space_strategy() and
+ * H5Pset_file_space_page_size().
+ *
+ * The page buffer layer captures all I/O requests before they are
+ * issued to the VFD and "caches" them in fixed sized pages. Once the
+ * total number of pages exceeds the page buffer size, the library
+ * evicts pages from the page buffer by writing them to the VFD. At
+ * file close, the page buffer is flushed writing all the pages to the
+ * file.
+ *
+ * If a non-zero page buffer size is set, and the file space strategy
+ * is not set to paged or the page size for the file space strategy is
+ * larger than the page buffer size, the subsequent call to H5Fcreate()
+ * or H5Fopen() using the \p plist_id will fail.
+ *
+ * The function also allows setting the minimum percentage of pages for
+ * metadata and raw data to prevent a certain type of data to evict hot
+ * data of the other type.
+ *
+ * \since 1.10.1
+ *
+ */
+H5_DLL herr_t H5Pset_page_buffer_size(hid_t plist_id, size_t buf_size, unsigned min_meta_per,
+ unsigned min_raw_per);
+/**
+ * \todo Add missing documentation
+ */
+H5_DLL herr_t H5Pset_vfd_swmr_config(hid_t plist_id, H5F_vfd_swmr_config_t *config_ptr);
+
+/* Dataset creation property list (DCPL) routines */
+/**
+ * \ingroup DCPL
+ *
+ * \brief Determines whether fill value is defined
+ *
+ * \dcpl_id{plist}
+ * \param[out] status Status of fill value in property list
+ *
+ * \return \herr_t
+ *
+ * \details H5Pfill_value_defined() determines whether a fill value is
+ * defined in the dataset creation property list \p plist. Valid
+ * values returned in status are as follows:
+ *
+ *
+ *
+ * #H5D_FILL_VALUE_UNDEFINED |
+ * Fill value is undefined. |
+ *
+ *
+ * #H5D_FILL_VALUE_DEFAULT |
+ * Fill value is the library default. |
+ *
+ *
+ * #H5D_FILL_VALUE_USER_DEFINED |
+ * Fill value is defined by the application. |
+ *
+ *
+ *
+ * \since 1.6.0
+ *
+ */
+H5_DLL herr_t H5Pfill_value_defined(hid_t plist, H5D_fill_value_t *status);
+/**
+ * \ingroup DCPL
+ *
+ * \brief Retrieves the timing for storage space allocation
+ *
+ * \dcpl_id{plist_id}
+ * \param[out] alloc_time The timing setting for allocating dataset
+ * storage space
+ *
+ * \return \herr_t
+ *
+ * \details H5Pget_alloc_time() retrieves the timing for allocating storage
+ * space for a dataset's raw data. This property is set in the
+ * dataset creation property list \p plist_id. The timing setting
+ * is returned in \p alloc_time as one of the following values:
+ *
+ *
+ *
+ * #H5D_ALLOC_TIME_DEFAULT |
+ * Uses the default allocation time, based on the dataset
+ * storage method. See the \p alloc_time description in
+ * H5Pset_alloc_time() for default allocation times for
+ * various storage methods. |
+ *
+ *
+ * #H5D_ALLOC_TIME_EARLY |
+ * All space is allocated when the dataset is created. |
+ *
+ *
+ * #H5D_ALLOC_TIME_INCR |
+ * Space is allocated incrementally as data is written
+ * to the dataset. |
+ *
+ *
+ * #H5D_ALLOC_TIME_LATE |
+ * All space is allocated when data is first written to
+ * the dataset. |
+ *
+ *
+ *
+ * \note H5Pget_alloc_time() is designed to work in concert with the
+ * dataset fill value and fill value write time properties, set
+ * with the functions H5Pget_fill_value() and H5Pget_fill_time().
+ *
+ * \since 1.6.0
+ *
+ */
+H5_DLL herr_t H5Pget_alloc_time(hid_t plist_id, H5D_alloc_time_t *alloc_time /*out*/);
+/**
+ * \ingroup DCPL
+ *
+ * \brief Retrieves the size of chunks for the raw data of a chunked
+ * layout dataset
+ *
+ * \dcpl_id{plist_id}
+ * \param[in] max_ndims Size of the \p dims array
+ * \param[out] dim Array to store the chunk dimensions
+ *
+ * \return Returns chunk dimensionality if successful;
+ * otherwise returns a negative value.
+ *
+ * \details H5Pget_chunk() retrieves the size of chunks for the raw data
+ * of a chunked layout dataset. This function is only valid for
+ * dataset creation property lists. At most, \p max_ndims elements
+ * of \p dim will be initialized.
+ *
+ * \since 1.0.0
+ *
+ */
+H5_DLL int H5Pget_chunk(hid_t plist_id, int max_ndims, hsize_t dim[] /*out*/);
+/**
+ *
+ * \ingroup DCPL
+ *
+ * \brief Retrieves the edge chunk option setting from a dataset creation
+ * property list
+ *
+ * \dcpl_id{plist_id}
+ * \param[out] opts Edge chunk option flag. Valid values are described in
+ * H5Pset_chunk_opts(). The option status can be
+ * retrieved using the bitwise AND operator ( & ). For
+ * example, the expression
+ * (optsH5D_CHUNK_DONT_FILTER_PARTIAL_CHUNKS) will
+ * evaluate to #H5D_CHUNK_DONT_FILTER_PARTIAL_CHUNKS if
+ * that option has been enabled. Otherwise, it will
+ * evaluate to 0 (zero).
+ *
+ * \return \herr_t
+ *
+ * \details H5Pget_chunk_opts() retrieves the edge chunk option setting
+ * stored in the dataset creation property list \p plist_id.
+ *
+ * \since 1.10.0
+ *
+ */
+H5_DLL herr_t H5Pget_chunk_opts(hid_t plist_id, unsigned *opts);
+/**
+ * \ingroup DCPL
+ *
+ * \brief Retrieves the setting for whether or not to create minimized
+ * dataset object headers
+ *
+ * \dcpl_id
+ * \param[out] minimize Flag indicating whether the library will or will
+ * not create minimized dataset object headers
+ *
+ * \return \herr_t
+ *
+ * \details H5Pget_dset_no_attrs_hint() retrieves the
+ * no dataset attributes hint setting for the dataset
+ * creation property list \p dcpl_id. This setting is used to
+ * inform the library to create minimized dataset object headers
+ * when TRUE. The setting value is returned in the boolean pointer
+ * \p minimize.
+ *
+ * \since 1.10.5
+ *
+ */
+H5_DLL herr_t H5Pget_dset_no_attrs_hint(hid_t dcpl_id, hbool_t *minimize);
+/**
+ * \ingroup DCPL
+ *
+ * \brief Returns information about an external file
+ *
+ * \dcpl_id{plist_id}
+ * \param[in] idx External file index
+ * \param[in] name_size Maximum length of \p name array
+ * \param[out] name Name of the external file
+ * \param[out] offset Pointer to a location to return an offset value
+ * \param[out] size Pointer to a location to return the size of the
+ * external file data
+ *
+ * \return \herr_t
+ *
+ * \details H5Pget_external() returns information about an external file.
+ * The external file is specified by its index, \p idx, which
+ * is a number from zero to N-1, where N is the value returned
+ * by H5Pget_external_count(). At most \p name_size characters
+ * are copied into the \p name array. If the external file name
+ * is longer than \p name_size with the null terminator, the
+ * return value is not null terminated (similar to strncpy()).
+ *
+ * If \p name_size is zero or \p name is the null pointer, the
+ * external file name is not returned. If \p offset or \p size
+ * are null pointers then the corresponding information is not
+ * returned.
+ *
+ * \version 1.6.4 \p idx parameter type changed to unsigned.
+ * \since 1.0.0
+ *
+ */
+H5_DLL herr_t H5Pget_external(hid_t plist_id, unsigned idx, size_t name_size, char *name /*out*/,
+ off_t *offset /*out*/, hsize_t *size /*out*/);
+/**
+ * \ingroup DCPL
+ *
+ * \brief Returns the number of external files for a dataset
+ *
+ * \dcpl_id{plist_id}
+ *
+ * \return Returns the number of external files if successful; otherwise
+ * returns a negative value.
+ *
+ * \details H5Pget_external_count() returns the number of external files
+ * for the specified dataset.
+ *
+ * \since 1.0.0
+ *
+ */
+H5_DLL int H5Pget_external_count(hid_t plist_id);
+/**
+ * \ingroup DCPL
+ *
+ * \brief Retrieves the time when fill values are written to a dataset
+ *
+ * \dcpl_id{plist_id}
+ * \param[out] fill_time Setting for the timing of writing fill values to
+ * the dataset
+ *
+ * \return \herr_t
+ *
+ * \details H5Pget_fill_time() examines the dataset creation property list
+ * \p plist_id to determine when fill values are to be written to
+ * a dataset. Valid values returned in \p fill_time are as
+ * follows:
+ *
+ *
+ *
+ * #H5D_FILL_TIME_IFSET |
+ * Fill values are written to the dataset when storage
+ * space is allocated only if there is a user-defined fill
+ * value, i.e., one set with H5Pset_fill_value(). (Default)
+ * |
+ *
+ *
+ * #H5D_FILL_TIME_ALLOC |
+ * Fill values are written to the dataset when storage
+ * space is allocated. |
+ *
+ *
+ * #H5D_FILL_TIME_NEVER |
+ * Fill values are never written to the dataset. |
+ *
+ *
+ *
+ * \note H5Pget_fill_time() is designed to work in coordination with the
+ * dataset fill value and dataset storage allocation time properties,
+ * retrieved with the functions H5Pget_fill_value() and
+ * H5Pget_alloc_time().
+ *
+ * \since 1.6.0
+ *
+ */
+H5_DLL herr_t H5Pget_fill_time(hid_t plist_id, H5D_fill_time_t *fill_time /*out*/);
+/**
+ * \ingroup DCPL
+ *
+ * \brief Retrieves a dataset fill value
+ *
+ * \dcpl_id{plist_id}
+ * \param[in] type_id Datatype identifier for the value passed via
+ * \p value
+ * \param[out] value Pointer to buffer to contain the returned
+ * fill value
+ *
+ * \return \herr_t
+ *
+ * \details H5Pget_fill_value() returns the dataset fill value defined in
+ * the dataset creation property list \p plist_id. The fill value
+ * is returned through the \p value pointer and will be converted
+ * to the datatype specified by \p type_id. This datatype may
+ * differ from the fill value datatype in the property list, but
+ * the HDF5 library must be able to convert between the two
+ * datatypes.
+ *
+ * If the fill value is undefined, i.e., set to NULL in the
+ * property list, H5Pget_fill_value() will return an error.
+ * H5Pfill_value_defined() should be used to check for this
+ * condition before H5Pget_fill_value() is called.
+ *
+ * Memory must be allocated by the calling application.
+ *
+ * \note H5Pget_fill_value() is designed to coordinate with the dataset
+ * storage allocation time and fill value write time properties,
+ * which can be retrieved with the functions H5Pget_alloc_time()
+ * and H5Pget_fill_time(), respectively.
+ *
+ * \since 1.0.0
+ *
+ */
+H5_DLL herr_t H5Pget_fill_value(hid_t plist_id, hid_t type_id, void *value /*out*/);
+/**
+ * \ingroup DCPL
+ *
+ * \brief Returns the layout of the raw data for a dataset
+ *
+ * \dcpl_id{plist_id}
+ *
+ * \return Returns the layout type (a non-negative value) of a dataset
+ * creation property list if successful. Valid return values are:
+ * - #H5D_COMPACT: Raw data is stored in the object header in the
+ * file.
+ * - #H5D_CONTIGUOUS: Raw data is stored separately from the object
+ * header in one contiguous chunk in the file.
+ * - #H5D_CHUNKED: Raw data is stored separately from the object
+ * header in chunks in separate locations in the
+ * file.
+ * - #H5D_VIRTUAL: Raw data is drawn from multiple datasets in
+ * different files.
+ * \return
+ * Otherwise, returns a negative value indicating failure.
+ *
+ * \details H5Pget_layout() returns the layout of the raw data for a
+ * dataset. This function is only valid for dataset creation
+ * property lists.
+ *
+ * Note that a compact storage layout may affect writing data to
+ * the dataset with parallel applications. See the H5Dwrite()
+ * documentation for details.
+ *
+ * \version 1.10.0 #H5D_VIRTUAL added in this release.
+ *
+ * \since 1.0.0
+ *
+ */
+H5_DLL H5D_layout_t H5Pget_layout(hid_t plist_id);
+/**
+ * \ingroup DCPL
+ *
+ * \brief Gets the number of mappings for the virtual dataset
+ *
+ * \dcpl_id
+ * \param[out] count The number of mappings
+ *
+ * \return \herr_t
+ *
+ * \details H5Pget_virtual_count() gets the number of mappings for a
+ * virtual dataset that has the creation property list specified
+ * by \p dcpl_id.
+ *
+ * \see_virtual
+ *
+ * \since 1.10.0
+ *
+ */
+H5_DLL herr_t H5Pget_virtual_count(hid_t dcpl_id, size_t *count /*out*/);
+/**
+ * \ingroup DCPL
+ *
+ * \brief Gets the name of a source dataset used in the mapping
+ *
+ * \dcpl_id
+ * \param[in] index Mapping index. The value of \p index is 0 (zero) or
+ * greater and less than \p count
+ * (0 ≤ \p index < \p count), where \p count is the
+ * number of mappings returned by H5Pget_virtual_count().
+ * \param[out] name A buffer containing the name of the source dataset
+ * \param[in] size The size, in bytes, of the name buffer. Must be the
+ * size of the dataset name in bytes plus 1 for a NULL
+ * terminator
+ *
+ * \return Returns the length of the dataset name if successful;
+ * otherwise returns a negative value.
+ *
+ * \details H5Pget_virtual_dsetname() takes the dataset creation property
+ * list for the virtual dataset, \p dcpl_id, the mapping index,
+ * \p index, the size of the dataset name for a source dataset,
+ * \p size, and retrieves the name of the source dataset used in
+ * the mapping.
+ *
+ * Up to \p size characters of the dataset name are returned in
+ * \p name; additional characters, if any, are not returned to
+ * the user application.
+ *
+ * If the length of the dataset name, which determines the
+ * required value of \p size, is unknown, a preliminary call
+ * to H5Pget_virtual_dsetname() with the last two parameters
+ * set to NULL and zero respectively can be made. The return
+ * value of this call will be the size in bytes of the dataset
+ * name. That value, plus 1 for a NULL terminator, must then be
+ * assigned to \p size for a second H5Pget_virtual_dsetname()
+ * call, which will retrieve the actual dataset name.
+ *
+ * \see_virtual
+ *
+ * \since 1.10.0
+ *
+ */
+H5_DLL ssize_t H5Pget_virtual_dsetname(hid_t dcpl_id, size_t index, char *name /*out*/, size_t size);
+/**
+ * \ingroup DCPL
+ *
+ * \brief Gets the filename of a source dataset used in the mapping
+ *
+ * \dcpl_id
+ * \param[in] index Mapping index. The value of \p index is 0 (zero) or
+ * greater and less than \p count
+ * (0 ≤ \p index < \p count), where \p count is the
+ * number of mappings returned by H5Pget_virtual_count().
+ * \param[out] name A buffer containing the name of the file containing
+ * the source dataset
+ * \param[in] size The size, in bytes, of the name buffer. Must be the
+ * size of the filename in bytes plus 1 for a NULL
+ * terminator
+ *
+ * \return Returns the length of the filename if successful; otherwise
+ * returns a negative value.
+ *
+ * \details H5Pget_virtual_filename() takes the dataset creation property
+ * list for the virtual dataset, \p dcpl_id, the mapping index,
+ * \p index, the size of the filename for a source dataset,
+ * \p size, and retrieves the name of the file for a source dataset
+ * used in the mapping.
+ *
+ * Up to \p size characters of the filename are returned in
+ * \p name; additional characters, if any, are not returned to
+ * the user application.
+ *
+ * If the length of the filename, which determines the required
+ * value of \p size, is unknown, a preliminary call to
+ * H5Pget_virtual_filename() with the last two parameters set
+ * to NULL and zero respectively can be made. The return value
+ * of this call will be the size in bytes of the filename. That
+ * value, plus 1 for a NULL terminator, must then be assigned to
+ * \p size for a second H5Pget_virtual_filename() call, which
+ * will retrieve the actual filename.
+ *
+ * \see_virtual
+ *
+ * \since 1.10.0
+ *
+ */
+H5_DLL ssize_t H5Pget_virtual_filename(hid_t dcpl_id, size_t index, char *name /*out*/, size_t size);
+/**
+ * \ingroup DCPL
+ *
+ * \brief Gets a dataspace identifier for the selection within the source
+ * dataset used in the mapping
+ *
+ * \dcpl_id
+ * \param[in] index Mapping index. The value of \p index is 0 (zero) or
+ * greater and less than \p count
+ * (0 ≤ \p index < \p count), where \p count is the number
+ * of mappings returned by H5Pget_virtual_count().
+ *
+ * \return \hid_t{valid dataspace identifier}
+ *
+ * \details H5Pget_virtual_srcspace() takes the dataset creation property
+ * list for the virtual dataset, \p dcpl_id, and the mapping
+ * index, \p index, and returns a dataspace identifier for the
+ * selection within the source dataset used in the mapping.
+ *
+ * \see_virtual
+ *
+ * \since 1.10.0
+ *
+ */
+H5_DLL hid_t H5Pget_virtual_srcspace(hid_t dcpl_id, size_t index);
+/**
+ * \ingroup DCPL
+ *
+ * \brief Gets a dataspace identifier for the selection within the virtual
+ * dataset used in the mapping
+ *
+ * \dcpl_id
+ * \param[in] index Mapping index. The value of \p index is 0 (zero) or
+ * greater and less than \p count
+ * (0 ≤ \p index < \p count), where \p count is the number
+ * of mappings returned by H5Pget_virtual_count()
+ *
+ * \return \hid_t{valid dataspace identifier}
+ *
+ * \details H5Pget_virtual_vspace() takes the dataset creation property
+ * list for the virtual dataset, \p dcpl_id, and the mapping
+ * index, \p index, and returns a dataspace identifier for the
+ * selection within the virtual dataset used in the mapping.
+ *
+ * \see_virtual
+ *
+ * \since 1.10.0
+ *
+ */
+H5_DLL hid_t H5Pget_virtual_vspace(hid_t dcpl_id, size_t index);
+/**
+ * \ingroup DCPL
+ *
+ * \brief Sets the timing for storage space allocation
+ *
+ * \dcpl_id{plist_id}
+ * \param[in] alloc_time When to allocate dataset storage space
+ *
+ * \return \herr_t
+ *
+ * \details H5Pset_alloc_time() sets up the timing for the allocation of
+ * storage space for a dataset's raw data. This property is set
+ * in the dataset creation property list \p plist_id. Timing is
+ * specified in \p alloc_time with one of the following values:
+ *
+ *
+ *
+ * #H5D_ALLOC_TIME_DEFAULT |
+ * Allocate dataset storage space at the default time
+ * (Defaults differ by storage method.) |
+ *
+ *
+ * #H5D_ALLOC_TIME_EARLY |
+ * Allocate all space when the dataset is created
+ * (Default for compact datasets.) |
+ *
+ *
+ * #H5D_ALLOC_TIME_INCR |
+ * Allocate space incrementally, as data is written to
+ * the dataset (Default for chunked storage datasets.)
+ *
+ * \li Chunked datasets: Storage space allocation for each
+ * chunk is deferred until data is written to the chunk.
+ * \li Contiguous datasets: Incremental storage space
+ * allocation for contiguous data is treated as late
+ * allocation.
+ * \li Compact datasets: Incremental allocation is not
+ * allowed with compact datasets; H5Pset_alloc_time()
+ * will return an error. |
+ *
+ *
+ * #H5D_ALLOC_TIME_LATE |
+ * Allocate all space when data is first written to the
+ * dataset
+ * (Default for contiguous datasets.) |
+ *
+ *
+ *
+ * \note H5Pset_alloc_time() is designed to work in concert with the
+ * dataset fill value and fill value write time properties, set
+ * with the functions H5Pset_fill_value() and H5Pset_fill_time().
+ *
+ * \note See H5Dcreate() for further cross-references.
+ *
+ * \since 1.6.0
+ *
+ */
+H5_DLL herr_t H5Pset_alloc_time(hid_t plist_id, H5D_alloc_time_t alloc_time);
+/**
+ * \ingroup DCPL
+ *
+ * \brief Sets the size of the chunks used to store a chunked layout
+ * dataset
+ *
+ * \dcpl_id{plist_id}
+ * \param[in] ndims The number of dimensions of each chunk
+ * \param[in] dim An array defining the size, in dataset elements, of
+ * each chunk
+ *
+ * \return \herr_t
+ * \details H5Pset_chunk() sets the size of the chunks used to store a
+ * chunked layout dataset. This function is only valid for dataset
+ * creation property lists.
+ *
+ * The \p ndims parameter currently must be the same size as the
+ * rank of the dataset.
+ *
+ * The values of the \p dim array define the size of the chunks
+ * to store the dataset's raw data. The unit of measure for \p dim
+ * values is dataset elements.
+ *
+ * As a side-effect of this function, the layout of the dataset is
+ * changed to #H5D_CHUNKED, if it is not already so set.
+ *
+ * \note Chunk size cannot exceed the size of a fixed-size dataset. For
+ * example, a dataset consisting of a 5x4 fixed-size array cannot be
+ * defined with 10x10 chunks. Chunk maximums:
+ * - The maximum number of elements in a chunk is 232-1 which
+ * is equal to 4,294,967,295. If the number of elements in a chunk is
+ * set via H5Pset_chunk() to a value greater than 232-1,
+ * then H5Pset_chunk() will fail.
+ * - The maximum size for any chunk is 4GB. If a chunk that is larger
+ * than 4GB attempts to be written with H5Dwrite(), then H5Dwrite()
+ * will fail.
+ *
+ * \see H5Pset_layout(), H5Dwrite()
+ *
+ * \since 1.0.0
+ *
+ */
+H5_DLL herr_t H5Pset_chunk(hid_t plist_id, int ndims, const hsize_t dim[/*ndims*/]);
+/**
+ * \ingroup DCPL
+ *
+ * \brief Sets the edge chunk option in a dataset creation property list
+ *
+ * \dcpl_id{plist_id}
+ * \param[in] opts Edge chunk option flag. Valid values are:
+ * \li #H5D_CHUNK_DONT_FILTER_PARTIAL_CHUNKS
+ * When enabled, filters are not applied to partial
+ * edge chunks. When disabled, partial edge chunks are
+ * filtered. Enabling this option will improve
+ * performance when appending to the dataset and, when
+ * compression filters are used, prevent reallocation
+ * of these chunks. Datasets created with this option
+ * enabled will be inaccessible with HDF5 library
+ * versions before Release 1.10. Default: \e Disabled
+ * \li 0 (zero) Disables option; partial edge chunks
+ * will be compressed.
+ *
+ * \return \herr_t
+ *
+ * \details H5Pset_chunk_opts() sets the edge chunk option in the
+ * dataset creation property list \p dcpl_id.
+ *
+ * The available option is detailed in the parameters section.
+ * Only chunks that are not completely filled by the dataset’s
+ * dataspace are affected by this option. Such chunks are
+ * referred to as partial edge chunks.
+ *
+ * \b Motivation: H5Pset_chunk_opts() is used to specify storage
+ * options for chunks on the edge of a dataset’s dataspace. This
+ * capability allows the user to tune performance in cases where
+ * the dataset size may not be a multiple of the chunk size and
+ * the handling of partial edge chunks can impact performance.
+ *
+ * \since 1.10.0
+ *
+ */
+H5_DLL herr_t H5Pset_chunk_opts(hid_t plist_id, unsigned opts);
+/**
+ * \ingroup DCPL
+ *
+ * \brief Sets the flag to create minimized dataset object headers
+ *
+ * \dcpl_id
+ * \param[in] minimize Flag for indicating whether or not a dataset's
+ * object header will be minimized
+ *
+ * \return \herr_t
+ *
+ * \details H5Pset_dset_no_attrs_hint() sets the no dataset attributes
+ * hint setting for the dataset creation property list \p dcpl_id.
+ * Datasets created with the dataset creation property list
+ * \p dcpl_id will have their object headers minimized if the
+ * boolean flag \p minimize is set to TRUE. By setting \p minimize
+ * to TRUE, the library expects that no attributes will be added
+ * to the dataset. Attributes can be added, but they are appended
+ * with a continuation message, which can reduce performance.
+ *
+ * This setting interacts with H5Fset_dset_no_attrs_hint(): if
+ * either is set to TRUE, then the created dataset's object header
+ * will be minimized.
+ *
+ * \since 1.10.5
+ *
+ */
+H5_DLL herr_t H5Pset_dset_no_attrs_hint(hid_t dcpl_id, hbool_t minimize);
+/**
+ * \ingroup DCPL
+ *
+ * \brief Adds an external file to the list of external files
+ *
+ * \dcpl_id{plist_id}
+ * \param[in] name Name of an external file
+ * \param[in] offset Offset, in bytes, from the beginning of the file to
+ * the location in the file where the data starts
+ * \param[in] size Number of bytes reserved in the file for the data
+ *
+ * \return \herr_t
+ *
+ * \details The first call to H5Pset_external() sets the external
+ * storage property in the property list, thus designating that
+ * the dataset will be stored in one or more non-HDF5 file(s)
+ * external to the HDF5 file. This call also adds the file
+ * \p name as the first file in the list of external files.
+ * Subsequent calls to the function add the named file as the
+ * next file in the list.
+ *
+ * If a dataset is split across multiple files, then the files
+ * should be defined in order. The total size of the dataset is
+ * the sum of the \p size arguments for all the external files.
+ * If the total size is larger than the size of a dataset then
+ * the dataset can be extended (provided the data space also
+ * allows the extending).
+ *
+ * The \p size argument specifies the number of bytes reserved
+ * for data in the external file. If \p size is set to
+ * #H5F_UNLIMITED, the external file can be of unlimited size
+ * and no more files can be added to the external files list.
+ * If \p size is set to 0 (zero), no external file will actually
+ * be created.
+ *
+ * All of the external files for a given dataset must be specified
+ * with H5Pset_external() before H5Dcreate() is called to create
+ * the dataset. If one these files does not exist on the system
+ * when H5Dwrite() is called to write data to it, the library
+ * will create the file.
+ *
+ * \since 1.0.0
+ *
+ */
+H5_DLL herr_t H5Pset_external(hid_t plist_id, const char *name, off_t offset, hsize_t size);
+/**
+ * \ingroup DCPL
+ *
+ * \brief Sets the time when fill values are written to a dataset
+ *
+ * \dcpl_id{plist_id}
+ * \param[in] fill_time When to write fill values to a dataset
+ *
+ * \return \herr_t
+ *
+ * \details H5Pset_fill_time() sets up the timing for writing fill values
+ * to a dataset. This property is set in the dataset creation
+ * property list \p plist_id. Timing is specified in \p fill_time
+ * with one of the following values:
+ *
+ *
+ *
+ * #H5D_FILL_TIME_IFSET |
+ * Write fill values to the dataset when storage space is
+ * allocated only if there is a user-defined fill value,
+ * i.e.,one set with H5Pset_fill_value(). (Default) |
+ *
+ *
+ * #H5D_FILL_TIME_ALLOC |
+ * Write fill values to the dataset when storage space is
+ * allocated. |
+ *
+ *
+ * #H5D_FILL_TIME_NEVER |
+ * Never write fill values to the dataset. |
+ *
+ *
+ *
+ * \note H5Pset_fill_time() is designed for coordination with the dataset
+ * fill value and dataset storage allocation time properties, set
+ * with the functions H5Pset_fill_value() and H5Pset_alloc_time().
+ * See H5Dcreate() for further cross-references.
+ *
+ * \since 1.6.0
+ *
+ */
+H5_DLL herr_t H5Pset_fill_time(hid_t plist_id, H5D_fill_time_t fill_time);
+/**
+ * \ingroup DCPL
+ *
+ * \brief Sets the fill value for a dataset
+ *
+ * \dcpl_id{plist_id}
+ * \param[in] type_id Datatype of \p value
+ * \param[in] value Pointer to buffer containing value to use as
+ * fill value
+ *
+ * \return \herr_t
+ *
+ * \details H5Pset_fill_value() sets the fill value for a dataset in the
+ * dataset creation property list. \p value is interpreted as
+ * being of datatype \p type_id. This datatype may differ from
+ * that of the dataset, but the HDF5 library must be able to
+ * convert \p value to the dataset datatype when the dataset is
+ * created.
+ *
+ * The default fill value is 0 (zero), which is interpreted
+ * according to the actual dataset datatype.
+ *
+ * Setting \p value to NULL indicates that the fill value is to
+ * be undefined.
+ *
+ * \note Applications sometimes write data only to portions of an allocated
+ * dataset. It is often useful in such cases to fill the unused space
+ * with a known fill value. This function allows the user application
+ * to set that fill value; the functions H5Dfill() and
+ * H5Pset_fill_time(), respectively, provide the ability to apply the
+ * fill value on demand or to set up its automatic application.
+ *
+ * \note A fill value should be defined so that it is appropriate for the
+ * application. While the HDF5 default fill value is 0 (zero), it is
+ * often appropriate to use another value. It might be useful, for
+ * example, to use a value that is known to be impossible for the
+ * application to legitimately generate.
+ *
+ * \note H5Pset_fill_value() is designed to work in concert with
+ * H5Pset_alloc_time() and H5Pset_fill_time(). H5Pset_alloc_time()
+ * and H5Pset_fill_time() govern the timing of dataset storage
+ * allocation and fill value write operations and can be important in
+ * tuning application performance.
+ *
+ * \note See H5Dcreate() for further cross-references.
+ *
+ * \since 1.0.0
+ *
+ */
+H5_DLL herr_t H5Pset_fill_value(hid_t plist_id, hid_t type_id, const void *value);
+/**
+ * \ingroup DCPL
+ *
+ * \brief Sets up use of the shuffle filter
+ *
+ * \dcpl_id{plist_id}
+ *
+ * \return \herr_t
+ *
+ * \details H5Pset_shuffle() sets the shuffle filter, #H5Z_FILTER_SHUFFLE,
+ * in the dataset creation property list \p plist_id. The shuffle
+ * filter de-interlaces a block of data by reordering the bytes.
+ * All the bytes from one consistent byte position of each data
+ * element are placed together in one block; all bytes from a
+ * second consistent byte position of each data element are placed
+ * together a second block; etc. For example, given three data
+ * elements of a 4-byte datatype stored as 012301230123, shuffling
+ * will re-order data as 000111222333. This can be a valuable step
+ * in an effective compression algorithm because the bytes in each
+ * byte position are often closely related to each other and
+ * putting them together can increase the compression ratio.
+ *
+ * As implied above, the primary value of the shuffle filter lies
+ * in its coordinated use with a compression filter; it does not
+ * provide data compression when used alone. When the shuffle
+ * filter is applied to a dataset immediately prior to the use of
+ * a compression filter, the compression ratio achieved is often
+ * superior to that achieved by the use of a compression filter
+ * without the shuffle filter.
+ *
+ * \since 1.6.0
+ *
+ */
+H5_DLL herr_t H5Pset_shuffle(hid_t plist_id);
+/**
+ * \ingroup DCPL
+ *
+ * \brief Sets the type of storage used to store the raw data for a dataset
+ *
+ * \dcpl_id{plist_id}
+ * \param[in] layout Type of storage layout for raw data
+ *
+ * \return \herr_t
+ * \details H5Pset_layout() sets the type of storage used to store the raw
+ * data for a dataset. This function is only valid for dataset
+ * creation property lists.
+ *
+ * Valid values for \p layout are:
+ * - #H5D_COMPACT: Store raw data in the dataset object header
+ * in file. This should only be used for datasets
+ * with small amounts of raw data. The raw data
+ * size limit is 64K (65520 bytes). Attempting
+ * to create a dataset with raw data larger than
+ * this limit will cause the H5Dcreate() call to
+ * fail.
+ * - #H5D_CONTIGUOUS: Store raw data separately from the object
+ * header in one large chunk in the file.
+ * - #H5D_CHUNKED: Store raw data separately from the object header
+ * as chunks of data in separate locations in
+ * the file.
+ * - #H5D_VIRTUAL: Draw raw data from multiple datasets in
+ * different files.
+ *
+ * Note that a compact storage layout may affect writing data to
+ * the dataset with parallel applications. See the note in
+ * H5Dwrite() documentation for details.
+ * \version 1.10.0 #H5D_VIRTUAL added in this release.
+ * \since 1.0.0
+ *
+ */
+H5_DLL herr_t H5Pset_layout(hid_t plist_id, H5D_layout_t layout);
+/**
+ * \ingroup DCPL
+ *
+ * \brief Sets up the use of the N-Bit filter
+ *
+ * \dcpl_id{plist_id}
+ *
+ * \return \herr_t
+ *
+ * \details H5Pset_nbit() sets the N-Bit filter, #H5Z_FILTER_NBIT, in the
+ * dataset creation property list \p plist_id.
+ *
+ * The HDF5 user can create an N-Bit datatype with the following
+ * code:
+ *
+ * hid_t nbit_datatype = H5Tcopy(H5T_STD_I32LE);
+ * H5Tset_precision(nbit_datatype, 16);
+ * H5Tset_offset(nbit_datatype, 4);
+ *
+ *
+ * In memory, one value of the N-Bit datatype in the above example
+ * will be stored on a little-endian machine as follows:
+ *
+ *
+ *
+ * byte 3 |
+ * byte 2 |
+ * byte 1 |
+ * byte 0 |
+ *
+ *
+ * ???????? |
+ * ????SPPP |
+ * PPPPPPPP |
+ * PPPP???? |
+ *
+ *
+ * Note: S - sign bit, P - significant bit, ? - padding bit; For
+ * signed integer, the sign bit is included in the precision.
+ *
+ * When data of the above datatype is stored on disk using the
+ * N-bit filter, all padding bits are chopped off and only
+ * significant bits are stored. The values on disk will be
+ * something like:
+ *
+ *
+ *
+ * 1st value |
+ * 2nd value |
+ * ... |
+ *
+ *
+ * SPPPPPPPPPPPPPPP |
+ * SPPPPPPPPPPPPPPP |
+ * ... |
+ *
+ *
+ * The N-Bit filter is used effectively for compressing data of
+ * an N-Bit datatype as well as a compound and an array
+ * datatype with N-Bit fields. However, the datatype classes of
+ * the N-Bit datatype or the N-Bit field of the compound
+ * datatype or the array datatype are limited to integer or
+ * floating-point.
+ *
+ * The N-Bit filter supports complex situations where a compound
+ * datatype contains member(s) of a compound datatype or an array
+ * datatype that has a compound datatype as the base type.
+ * However, it does not support the situation where an array
+ * datatype has a variable-length or variable-length string as
+ * its base datatype. The filter does support the situation where
+ * a variable-length or variable-length string is a member of a
+ * compound datatype.
+ *
+ * The N-Bit filter allows all other HDF5 datatypes (such as
+ * time, string, bitfield, opaque, reference, enum, and variable
+ * length) to pass through as a no-op.
+ *
+ * Like other I/O filters supported by the HDF5 library,
+ * application using the N-Bit filter must store data with
+ * chunked storage.
+ *
+ * By nature, the N-Bit filter should not be used together with
+ * other I/O filters.
+ *
+ * \version 1.8.8 Fortran subroutine introduced in this release.
+ *
+ * \since 1.8.0
+ *
+ */
+H5_DLL herr_t H5Pset_nbit(hid_t plist_id);
+/**
+ * \ingroup DCPL
+ *
+ * \brief Sets up the use of the scale-offset filter
+ *
+ * \dcpl_id{plist_id}
+ * \param[in] scale_type Flag indicating compression method
+ * \param[in] scale_factor Parameter related to scale. Must be
+ * non-negative
+ *
+ * \return \herr_t
+ *
+ * \details H5Pset_scaleoffset() sets the scale-offset filter,
+ * #H5Z_FILTER_SCALEOFFSET, for a dataset.
+ *
+ * Generally speaking, scale-offset compression performs a scale and/or
+ * offset operation on each data value and truncates the resulting
+ * value to a minimum number of bits (MinBits) before storing it. The
+ * current scale-offset filter supports integer and floating-point
+ * datatypes.
+ *
+ * For an integer datatype, the parameter \p scale_type should be set
+ * to #H5Z_SO_INT (2). The parameter \p scale_factor denotes MinBits.
+ * If the user sets it to H5Z_SO_INT_MINBITS_DEFAULT (0), the filter
+ * will calculate MinBits. If \p scale_factor is set to a positive
+ * integer, the filter does not do any calculation and just uses the
+ * number as MinBits. However, if the user gives a MinBits that is less
+ * than what would be generated by the filter, the compression will be
+ * lossy. Also, the MinBits supplied by the user cannot exceed the
+ * number of bits to store one value of the dataset datatype.
+ *
+ * For a floating-point datatype, the filter adopts the GRiB data
+ * packing mechanism, which offers two alternate methods: E-scaling and
+ * D-scaling. Both methods are lossy compression. If the parameter
+ * \p scale_type is set to #H5Z_SO_FLOAT_DSCALE (0), the filter will
+ * use the D-scaling method; if it is set to #H5Z_SO_FLOAT_ESCALE (1),
+ * the filter will use the E-scaling method. Since only the D-scaling
+ * method is implemented, \p scale_type should be set to
+ * #H5Z_SO_FLOAT_DSCALE or 0.
+ *
+ * When the D-scaling method is used, the original data is "D" scaled
+ * — multiplied by 10 to the power of \p scale_factor, and the
+ * "significant" part of the value is moved to the left of the decimal
+ * point. Care should be taken in setting the decimal \p scale_factor
+ * so that the integer part will have enough precision to contain the
+ * appropriate information of the data value. For example, if
+ * \p scale_factor is set to 2, the number 104.561 will be 10456.1
+ * after "D" scaling. The last digit 1 is not "significant" and is
+ * thrown off in the process of rounding. The user should make sure that
+ * after "D" scaling and rounding, the data values are within the range
+ * that can be represented by the integer (same size as the
+ * floating-point type).
+ *
+ * Valid values for scale_type are as follows:
+ *
+ *
+ *
+ * #H5Z_SO_FLOAT_DSCALE (0) |
+ * Floating-point type, using variable MinBits method |
+ *
+ *
+ * #H5Z_SO_FLOAT_ESCALE (1) |
+ * Floating-point type, using fixed MinBits method |
+ *
+ *
+ * #H5Z_SO_INT (2) |
+ * Integer type |
+ *
+ *
+ *
+ * The meaning of \p scale_factor varies according to the value
+ * assigned to \p scale_type:
+ *
+ *
+ *
+ * \p scale_type value |
+ * \p scale_factor description |
+ *
+ *
+ * #H5Z_SO_FLOAT_DSCALE |
+ * Denotes the decimal scale factor for D-scaling and can be
+ * positive, negative or zero. This is the current
+ * implementation of the library. |
+ *
+ *
+ * #H5Z_SO_FLOAT_ESCALE |
+ * Denotes MinBits for E-scaling and must be a positive integer.
+ * This is not currently implemented by the library. |
+ *
+ *
+ * #H5Z_SO_INT |
+ * Denotes MinBits and it should be a positive integer or
+ * #H5Z_SO_INT_MINBITS_DEFAULT (0). If it is less than 0, the
+ * library will reset it to 0 since it is not implemented.
+ * |
+ *
+ *
+ * Like other I/O filters supported by the HDF5 library, an
+ * application using the scale-offset filter must store data with
+ * chunked storage.
+ *
+ * \version 1.8.8 Fortran90 subroutine introduced in this release.
+ *
+ * \since 1.8.0
+ *
+ */
+H5_DLL herr_t H5Pset_scaleoffset(hid_t plist_id, H5Z_SO_scale_type_t scale_type, int scale_factor);
+/**
+ * \ingroup DCPL
+ *
+ * \brief Sets up use of the SZIP compression filter
+ *
+ * \dcpl_id{plist_id}
+ * \param[in] options_mask A bit-mask conveying the desired SZIP options;
+ * Valid values are #H5_SZIP_EC_OPTION_MASK and
+ * #H5_SZIP_NN_OPTION_MASK.
+ * \param[in] pixels_per_block The number of pixels or data elements in each
+ * data block
+ *
+ * \return \herr_t
+ *
+ * \details H5Pset_szip() sets an SZIP compression filter, #H5Z_FILTER_SZIP,
+ * for a dataset. SZIP is a compression method designed for use with
+ * scientific data.
+ *
+ * Before proceeding, all users should review the “Limitations”
+ * section below.
+ *
+ * Users familiar with SZIP outside the HDF5 context may benefit
+ * from reviewing the Note “For Users Familiar with SZIP in Other
+ * Contexts” below.
+ *
+ * In the text below, the term pixel refers to an HDF5 data element.
+ * This terminology derives from SZIP compression's use with image
+ * data, where pixel referred to an image pixel.
+ *
+ * The SZIP \p bits_per_pixel value (see Note, below) is automatically
+ * set, based on the HDF5 datatype. SZIP can be used with atomic
+ * datatypes that may have size of 8, 16, 32, or 64 bits.
+ * Specifically, a dataset with a datatype that is 8-, 16-, 32-, or
+ * 64-bit signed or unsigned integer; char; or 32- or 64-bit float
+ * can be compressed with SZIP. See Note, below, for further
+ * discussion of the the SZIP \p bits_per_pixel setting.
+ *
+ * SZIP options are passed in an options mask, \p options_mask,
+ * as follows.
+ *
+ *
+ *
+ * Option |
+ * Description (Mutually exclusive; select one.) |
+ *
+ *
+ * #H5_SZIP_EC_OPTION_MASK |
+ * Selects entropy coding method |
+ *
+ *
+ * #H5_SZIP_NN_OPTION_MASK |
+ * Selects nearest neighbor coding method |
+ *
+ *
+ *
+ * The following guidelines can be used in determining which
+ * option to select:
+ *
+ * - The entropy coding method, the EC option specified by
+ * #H5_SZIP_EC_OPTION_MASK, is best suited for data that has been
+ * processed. The EC method works best for small numbers.
+ * - The nearest neighbor coding method, the NN option specified
+ * by #H5_SZIP_NN_OPTION_MASK, preprocesses the data then the
+ * applies EC method as above.
+ *
+ * Other factors may affect results, but the above criteria
+ * provides a good starting point for optimizing data compression.
+ *
+ * SZIP compresses data block by block, with a user-tunable block
+ * size. This block size is passed in the parameter
+ * \p pixels_per_block and must be even and not greater than 32,
+ * with typical values being 8, 10, 16, or 32. This parameter
+ * affects compression ratio; the more pixel values vary, the
+ * smaller this number should be to achieve better performance.
+ *
+ * In HDF5, compression can be applied only to chunked datasets.
+ * If \p pixels_per_block is bigger than the total number of
+ * elements in a dataset chunk, H5Pset_szip() will succeed but
+ * the subsequent call to H5Dcreate() will fail; the conflict
+ * can be detected only when the property list is used.
+ *
+ * To achieve optimal performance for SZIP compression, it is
+ * recommended that a chunk's fastest-changing dimension be equal
+ * to N times \p pixels_per_block where N is the maximum number of
+ * blocks per scan line allowed by the SZIP library. In the
+ * current version of SZIP, N is set to 128.
+ *
+ * SZIP compression is an optional HDF5 filter.
+ *
+ * \b Limitations:
+ *
+ * - SZIP compression cannot be applied to compound, array,
+ * variable-length, enumeration, or any other user-defined
+ * datatypes. If an SZIP filter is set in a dataset creation
+ * property list used to create a dataset containing a
+ * non-allowed datatype, the call to H5Dcreate() will fail; the
+ * conflict can be detected only when the property list is used.
+ * - Users should be aware that there are factors that affect one’s
+ * rights and ability to use SZIP compression by reviewing the
+ * SZIP copyright notice.
+ *
+ * \note \b For \b Users \b Familiar \b with \b SZIP \b in \b Other \b Contexts:
+ *
+ * \note The following notes are of interest primarily to those who have
+ * used SZIP compression outside of the HDF5 context.
+ * In non-HDF5 applications, SZIP typically requires that the user
+ * application supply additional parameters:
+ * - \p pixels_in_object, the number of pixels in the object to
+ * be compressed
+ * - \p bits_per_pixel, the number of bits per pixel
+ * - \p pixels_per_scanline, the number of pixels per scan line
+ *
+ * \note These values need not be independently supplied in the HDF5
+ * environment as they are derived from the datatype and dataspace,
+ * which are already known. In particular, HDF5 sets
+ * \p pixels_in_object to the number of elements in a chunk and
+ * \p bits_per_pixel to the size of the element or pixel datatype.
+ *
+ * \note The following algorithm is used to set \p pixels_per_scanline:
+ * - If the size of a chunk's fastest-changing dimension, size,
+ * is greater than 4K, set \p pixels_per_scanline to 128 times
+ * \p pixels_per_block.
+ * - If size is less than 4K but greater than \p pixels_per_block,
+ * set \p pixels_per_scanline to the minimum of size and 128
+ * times \p pixels_per_block.
+ * - If size is less than \p pixels_per_block but greater than the
+ * number elements in the chunk, set \p pixels_per_scanline to
+ * the minimum of the number elements in the chunk and 128 times
+ * \p pixels_per_block.
+ *
+ * \note The HDF5 datatype may have precision that is less than the full
+ * size of the data element, e.g., an 11-bit integer can be defined
+ * using H5Tset_precision(). To a certain extent, SZIP can take
+ * advantage of the precision of the datatype to improve compression:
+ * - If the HDF5 datatype size is 24-bit or less and the offset of
+ * the bits in the HDF5 datatype is zero (see H5Tset_offset() or
+ * H5Tget_offset()), the data is the in lowest N bits of the data
+ * element. In this case, the SZIP \p bits_per_pixel is set to the
+ * precision of the HDF5 datatype.
+ * - If the offset is not zero, the SZIP \p bits_per_pixel will be
+ * set to the number of bits in the full size of the data element.
+ * - If the HDF5 datatype precision is 25-bit to 32-bit, the SZIP
+ * \p bits_per_pixel will be set to 32.
+ * - If the HDF5 datatype precision is 33-bit to 64-bit, the SZIP
+ * \p bits_per_pixel will be set to 64.
+ *
+ * \note HDF5 always modifies the options mask provided by the user to set up
+ * usage of RAW_OPTION_MASK, ALLOW_K13_OPTION_MASK, and one of
+ * LSB_OPTION_MASK or MSB_OPTION_MASK, depending on endianness of the
+ * datatype.
+ *
+ * \since 1.6.0
+ *
+ */
+H5_DLL herr_t H5Pset_szip(hid_t plist_id, unsigned options_mask, unsigned pixels_per_block);
+
+/**
+ * \ingroup DCPL
+ *
+ * \brief Sets the mapping between virtual and source datasets
+ *
+ * \dcpl_id
+ * \param[in] vspace_id The dataspace identifier with the selection within the
+ * virtual dataset applied, possibly an unlimited selection
+ * \param[in] src_file_name The name of the HDF5 file where the source dataset is
+ * located or a \Code{"."} (period) for a source dataset in the same
+ * file. The file might not exist yet. The name can be specified using
+ * a C-style \c printf statement as described below.
+ * \param[in] src_dset_name The path to the HDF5 dataset in the file specified by
+ * \p src_file_name. The dataset might not exist yet. The dataset name
+ * can be specified using a C-style \c printf statement as described below.
+ * \param[in] src_space_id The source dataset’s dataspace identifier with a
+ * selection applied, possibly an unlimited selection
+ * \return \herr_t
+ *
+ * \details H5Pset_virtual() maps elements of the virtual dataset (VDS)
+ * described by the virtual dataspace identifier \p vspace_id to the
+ * elements of the source dataset described by the source dataset
+ * dataspace identifier \p src_space_id. The source dataset is
+ * identified by the name of the file where it is located,
+ * \p src_file_name, and the name of the dataset, \p src_dset_name.
+ *
+ * \par C-style \c printf Formatting Statements:
+ * C-style \c printf formatting allows a pattern to be specified in the name
+ * of a source file or dataset. Strings for the file and dataset names are
+ * treated as literals except for the following substitutions:
+ *
+ *
+ * \Code{"%%"} |
+ * Replaced with a single \Code{"%"} (percent) character. |
+ *
+ *
+ * "%b" |
+ * Where "" is the virtual dataset dimension axis (0-based)
+ * and \Code{"b"} indicates that the block count of the selection in that
+ * dimension should be used. The full expression (for example, \Code{"%0b"})
+ * is replaced with a single numeric value when the mapping is evaluated at
+ * VDS access time. Example code for many source and virtual dataset mappings
+ * is available in the "Examples of Source to Virtual Dataset Mapping"
+ * chapter in the
+ *
+ * RFC: HDF5 Virtual Dataset.
+ * |
+ *
+ *
+ * If the printf form is used for the source file or dataset names, the
+ * selection in the source dataset’s dataspace must be fixed-size.
+ *
+ * \par Source File Resolutions:
+ * When a source dataset residing in a different file is accessed, the
+ * library will search for the source file \p src_file_name as described
+ * below:
+ * \li If \p src_file_name is a \Code{"."} (period) then it refers to the
+ * file containing the virtual dataset.
+ * \li If \p src_file_name is a relative pathname, the following steps are
+ * performed:
+ * - The library will get the prefix(es) set in the environment
+ * variable \c HDF5_VDS_PREFIX and will try to prepend each prefix
+ * to \p src_file_name to form a new \p src_file_name. If the new
+ * \p src_file_name does not exist or if \c HDF5_VDS_PREFIX is not
+ * set, the library will get the prefix set via H5Pset_virtual_prefix()
+ * and prepend it to \p src_file_name to form a new \p src_file_name.
+ * If the new \p src_file_name does not exist or no prefix is being
+ * set by H5Pset_virtual_prefix() then the path of the file containing
+ * the virtual dataset is obtained. This path can be the absolute path
+ * or the current working directory plus the relative path of that
+ * file when it is created/opened. The library will prepend this path
+ * to \p src_file_name to form a new \p src_file_name.
+ * - If the new \p src_file_name does not exist, then the library will
+ * look for \p src_file_name and will return failure/success accordingly.
+ * \li If \p src_file_name is an absolute pathname, the library will first
+ * try to find \p src_file_name. If \p src_file_name does not exist,
+ * \p src_file_name is stripped of directory paths to form a new
+ * \p src_file_name. The search for the new \p src_file_name then follows
+ * the same steps as described above for a relative pathname. See
+ * examples below illustrating how \p src_file_name is stripped to form
+ * a new \p src_file_name.
+ * \par
+ * Note that \p src_file_name is considered to be an absolute pathname when
+ * the following condition is true:
+ * \li For Unix, the first character of \p src_file_name is a slash
+ * (\Code{/}).\n For example, consider a \p src_file_name of
+ * \Code{/tmp/A.h5}. If that source file does not exist, the new
+ * \p src_file_name after stripping will be \Code{A.h5}.
+ * \li For Windows, there are 6 cases:
+ * 1. \p src_file_name is an absolute drive with absolute pathname.\n
+ * For example, consider a \p src_file_name of \Code{/tmp/A.h5}.
+ * If that source file does not exist, the new \p src_file_name
+ * after stripping will be \Code{A.h5}.
+ * 2. \p src_file_name is an absolute pathname without specifying
+ * drive name.\n For example, consider a \p src_file_name of
+ * \Code{/tmp/A.h5}. If that source file does not exist, the new
+ * \p src_file_name after stripping will be \Code{A.h5}.
+ * 3. \p src_file_name is an absolute drive with relative pathname.\n
+ * For example, consider a \p src_file_name of \Code{/tmp/A.h5}.
+ * If that source file does not exist, the new \p src_file_name
+ * after stripping will be \Code{tmp/A.h5}.
+ * 4. \p src_file_name is in UNC (Uniform Naming Convention) format
+ * with server name, share name, and pathname.\n
+ * For example, consider a \p src_file_name of \Code{/tmp/A.h5}.
+ * If that source file does not exist, the new \p src_file_name
+ * after stripping will be \Code{A.h5}.
+ * 5. \p src_file_name is in Long UNC (Uniform Naming Convention)
+ * format with server name, share name, and pathname.\n
+ * For example, consider a \p src_file_name of \Code{/tmp/A.h5}.
+ * If that source file does not exist, the new \p src_file_name
+ * after stripping will be \Code{A.h5}.
+ * 6. \p src_file_name is in Long UNC (Uniform Naming Convention)
+ * format with an absolute drive and an absolute pathname.\n
+ * For example, consider a \p src_file_name of \Code{/tmp/A.h5}.
+ * If that source file does not exist, the new \p src_file_name
+ * after stripping will be \Code{A.h5}
+ *
+ * \see
+ * Virtual Dataset Overview
+ *
+ * \see_virtual
+ *
+ * \version 1.10.2 A change was made to the method of searching for VDS source files.
+ * \since 1.10.0
+ *
+ */
+H5_DLL herr_t H5Pset_virtual(hid_t dcpl_id, hid_t vspace_id, const char *src_file_name,
+ const char *src_dset_name, hid_t src_space_id);
+
+/* Dataset access property list (DAPL) routines */
+/**
+ * \ingroup DAPL
+ *
+ * \brief Retrieves the values of the append property that is set up in
+ * the dataset access property list
+ *
+ * \dapl_id
+ * \param[in] dims The number of elements for \p boundary
+ * \param[in] boundary The dimension sizes used to determine the boundary
+ * \param[in] func The user-defined callback function
+ * \param[in] udata The user-defined input data
+ *
+ * \return \herr_t
+ *
+ * \details H5Pget_append_flush() obtains the following information
+ * from the dataset access property list, \p dapl_id.
+ *
+ * \p boundary consists of the sizes set up in the access
+ * property list that are used to determine when a dataset
+ * dimension size hits the boundary. Only at most \p dims
+ * boundary sizes are retrieved, and \p dims will not exceed
+ * the corresponding value that is set in the property list.
+ *
+ * \p func is the user-defined callback function to invoke when
+ * a dataset’s appended dimension size reaches a boundary and
+ * \p udata is the user-defined input data for the callback
+ * function.
+ *
+ * \since 1.10.0
+ *
+ */
+H5_DLL herr_t H5Pget_append_flush(hid_t dapl_id, unsigned dims, hsize_t boundary[], H5D_append_cb_t *func,
+ void **udata);
+/**
+ * \ingroup DAPL
+ *
+ * \brief Retrieves the raw data chunk cache parameters
+ *
+ * \dapl_id
+ * \param[out] rdcc_nslots Number of chunk slots in the raw data chunk
+ * cache hash table
+ * \param[out] rdcc_nbytes Total size of the raw data chunk cache, in
+ * bytes
+ * \param[out] rdcc_w0 Preemption policy
+ *
+ * \return \herr_t
+ *
+ * \details H5Pget_chunk_cache() retrieves the number of chunk slots in
+ * the raw data chunk cache hash table, the maximum possible
+ * number of bytes in the raw data chunk cache, and the
+ * preemption policy value.
+ *
+ * These values are retrieved from a dataset access property
+ * list. If the values have not been set on the property list,
+ * then values returned will be the corresponding values from
+ * a default file access property list.
+ *
+ * Any (or all) pointer arguments may be null pointers, in which
+ * case the corresponding data is not returned.
+ *
+ * \since 1.8.3
+ *
+ */
+H5_DLL herr_t H5Pget_chunk_cache(hid_t dapl_id, size_t *rdcc_nslots /*out*/, size_t *rdcc_nbytes /*out*/,
+ double *rdcc_w0 /*out*/);
+/**
+ * \ingroup DAPL
+ *
+ * \brief Retrieves the prefix for external raw data storage files as set
+ * in the dataset access property list
+ *
+ * \dapl_id
+ * \param[in,out] prefix Dataset external storage prefix in UTF-8 or
+ * ASCII (\em Path and \em filename must be ASCII
+ * on Windows systems.)
+ * \param[in] size Size of prefix buffer in bytes
+ *
+ * \return Returns the size of \p prefix and the prefix string will be
+ * stored in \p prefix if successful.
+ * Otherwise returns a negative value and the contents of \p prefix
+ * will be undefined.
+ *
+ * \details H5Pget_efile_prefix() retrieves the file system path prefix
+ * for locating external files associated with a dataset that
+ * uses external storage. This will be the value set with
+ * H5Pset_efile_prefix() or the HDF5 library’s default.
+ *
+ * The value of \p size is the size in bytes of the prefix,
+ * including the NULL terminator. If the size is unknown, a
+ * preliminary H5Pget_elink_prefix() call with the pointer
+ * \p prefix set to NULL will return the size of the prefix
+ * without the NULL terminator.
+ *
+ * The \p prefix buffer must be allocated by the caller. In a
+ * call that retrieves the actual prefix, that buffer must be
+ * of the size specified in \p size.
+ *
+ * \note See H5Pset_efile_prefix() for a more complete description of
+ * file location behavior and for notes on the use of the
+ * HDF5_EXTFILE_PREFIX environment variable.
+ *
+ * \since 1.10.0, 1.8.17
+ *
+ */
+H5_DLL ssize_t H5Pget_efile_prefix(hid_t dapl_id, char *prefix /*out*/, size_t size);
+/**
+ * \ingroup DAPL
+ *
+ * \brief Retrieves prefix applied to VDS source file paths
+ *
+ * \dapl_id
+ * \param[out] prefix Prefix applied to VDS source file paths
+ * \param[in] size Size of prefix, including null terminator
+ *
+ * \return If successful, returns a non-negative value specifying the size
+ * in bytes of the prefix without the NULL terminator; otherwise
+ * returns a negative value.
+ *
+ * \details H5Pget_virtual_prefix() retrieves the prefix applied to the
+ * path of any VDS source files traversed.
+ *
+ * When an VDS source file is traversed, the prefix is retrieved
+ * from the dataset access property list \p dapl_id, returned
+ * in the user-allocated buffer pointed to by \p prefix, and
+ * prepended to the filename stored in the VDS virtual file, set
+ * with H5Pset_virtual().
+ *
+ * The size in bytes of the prefix, including the NULL terminator,
+ * is specified in \p size. If \p size is unknown, a preliminary
+ * H5Pget_virtual_prefix() call with the pointer \p prefix set to
+ * NULL will return the size of the prefix without the NULL
+ * terminator.
+ *
+ * \see_virtual
+ *
+ * \since 1.10.2
+ *
+ */
+H5_DLL ssize_t H5Pget_virtual_prefix(hid_t dapl_id, char *prefix /*out*/, size_t size);
+/**
+ * \ingroup DAPL
+ *
+ * \brief Returns the maximum number of missing source files and/or datasets
+ * with the printf-style names when getting the extent for an unlimited
+ * virtual dataset
+ *
+ * \dapl_id
+ * \param[out] gap_size Maximum number of the files and/or datasets
+ * allowed to be missing for determining the extent
+ * of an unlimited virtual dataset with printf-style
+ * mappings. (\em Default: 0)
+ *
+ * \return \herr_t
+ *
+ * \details H5Pget_virtual_printf_gap() returns the maximum number of
+ * missing printf-style files and/or datasets for determining the
+ * extent of an unlimited virtual dataaset, \p gap_size, using
+ * the access property list for the virtual dataset, \p dapl_id.
+ *
+ * The default library value for \p gap_size is 0 (zero).
+ *
+ * \since 1.10.0
+ *
+ */
+H5_DLL herr_t H5Pget_virtual_printf_gap(hid_t dapl_id, hsize_t *gap_size);
+/**
+ * \ingroup DAPL
+ *
+ * \brief Retrieves the view of a virtual dataset accessed with
+ * \p dapl_id
+ *
+ * \dapl_id
+ * \param[out] view The flag specifying the view of the virtual dataset.
+ * Valid values are:
+ * \li #H5D_VDS_FIRST_MISSING
+ * \li #H5D_VDS_LAST_AVAILABLE
+ *
+ * \return \herr_t
+ *
+ * \details H5Pget_virtual_view() takes the virtual dataset access property
+ * list, \p dapl_id, and retrieves the flag, \p view, set by the
+ * H5Pset_virtual_view() call.
+ *
+ * \see_virtual
+ *
+ * \since 1.10.0
+ *
+ */
+H5_DLL herr_t H5Pget_virtual_view(hid_t dapl_id, H5D_vds_view_t *view);
+/**
+ * \ingroup DAPL
+ *
+ * \brief Sets two actions to perform when the size of a dataset’s
+ * dimension being appended reaches a specified boundary
+ *
+ * \dapl_id
+ * \param[in] ndims The number of elements for boundary
+ * \param[in] boundary The dimension sizes used to determine the boundary
+ * \param[in] func The user-defined callback function
+ * \param[in] udata The user-defined input data
+ *
+ * \return \herr_t
+ *
+ * \details H5Pset_append_flush() sets the following two actions to
+ * perform for a dataset associated with the dataset access
+ * property list \p dapl_id:
+ *
+ * \li Call the callback function \p func set in the property
+ * list
+ * \li Flush the dataset associated with the dataset access
+ * property list
+ *
+ * When a user is appending data to a dataset via H5DOappend()
+ * and the dataset’s newly extended dimension size hits a
+ * specified boundary, the library will perform the first action
+ * listed above. Upon return from the callback function, the
+ * library will then perform the second action listed above and
+ * return to the user. If no boundary is hit or set, the two
+ * actions above are not invoked.
+ *
+ * The specified boundary is indicated by the parameter
+ * \p boundary. It is a 1-dimensional array with \p ndims
+ * elements, which should be the same as the rank of the
+ * dataset’s dataspace. While appending to a dataset along a
+ * particular dimension index via H5Dappend(), the library
+ * determines a boundary is reached when the resulting dimension
+ * size is divisible by \p boundary[index]. A zero value for
+ * \p boundary[index] indicates no boundary is set for that
+ * dimension index.
+ *
+ * The setting of this property will apply only for a chunked
+ * dataset with an extendible dataspace. A dataspace is extendible
+ * when it is defined with either one of the following:
+ *
+ * \li A dataspace with fixed current and maximum dimension sizes
+ * \li A dataspace with at least one unlimited dimension for its
+ * maximum dimension size
+ *
+ * When creating or opening a chunked dataset, the library will
+ * check whether the boundary as specified in the access property
+ * list is set up properly. The library will fail the dataset
+ * create or open if the following conditions are true:
+ *
+ * \li \p ndims, the number of elements for boundary, is not the
+ * same as the rank of the dataset’s dataspace.
+ * \li A non-zero boundary value is specified for a non-extendible
+ * dimension.
+ *
+ * The callback function \p func must conform to the following
+ * prototype:
+ * \snippet H5Dpublic.h H5D_append_cb_t_snip
+ *
+ * The parameters of the callback function, per the above
+ * prototype, are defined as follows:
+ *
+ * \li \p dataset_id is the dataset identifier.
+ * \li \p cur_dims is the dataset’s current dimension sizes when
+ * a boundary is hit.
+ * \li \p user_data is the user-defined input data.
+ *
+ * \since 1.10.0
+ *
+ */
+H5_DLL herr_t H5Pset_append_flush(hid_t dapl_id, unsigned ndims, const hsize_t boundary[],
+ H5D_append_cb_t func, void *udata);
+/**
+ * \ingroup DAPL
+ *
+ * \brief Sets the raw data chunk cache parameters
+ *
+ * \dapl_id
+ * \param[in] rdcc_nslots The number of chunk slots in the raw data chunk
+ * cache for this dataset. Increasing this value
+ * reduces the number of cache collisions, but
+ * slightly increases the memory used. Due to the
+ * hashing strategy, this value should ideally be a
+ * prime number. As a rule of thumb, this value
+ * should be at least 10 times the number of chunks
+ * that can fit in \p rdcc_nbytes bytes. For maximum
+ * performance, this value should be set
+ * approximately 100 times that number of chunks.
+ * The default value is 521. If the value passed is
+ * #H5D_CHUNK_CACHE_NSLOTS_DEFAULT, then the
+ * property will not be set on \p dapl_id and the
+ * parameter will come from the file access
+ * property list used to open the file.
+ * \param[in] rdcc_nbytes The total size of the raw data chunk cache for
+ * this dataset. In most cases increasing this
+ * number will improve performance, as long as
+ * you have enough free memory.
+ * The default size is 1 MB. If the value passed is
+ * #H5D_CHUNK_CACHE_NBYTES_DEFAULT, then the
+ * property will not be set on \p dapl_id and the
+ * parameter will come from the file access
+ * property list.
+ * \param[in] rdcc_w0 The chunk preemption policy for this dataset.
+ * This must be between 0 and 1 inclusive and
+ * indicates the weighting according to which chunks
+ * which have been fully read or written are
+ * penalized when determining which chunks to flush
+ * from cache. A value of 0 means fully read or
+ * written chunks are treated no differently than
+ * other chunks (the preemption is strictly LRU)
+ * while a value of 1 means fully read or written
+ * chunks are always preempted before other chunks.
+ * If your application only reads or writes data
+ * once, this can be safely set to 1. Otherwise,
+ * this should be set lower, depending on how often
+ * you re-read or re-write the same data.
+ * The default value is 0.75. If the value passed is
+ * #H5D_CHUNK_CACHE_W0_DEFAULT, then the property
+ * will not be set on \p dapl_id and the parameter
+ * will come from the file access property list.
+ *
+ * \return \herr_t
+ *
+ * \details H5Pset_chunk_cache() sets the number of elements, the total
+ * number of bytes, and the preemption policy value in the raw
+ * data chunk cache on a dataset access property list. After
+ * calling this function, the values set in the property list
+ * will override the values in the file's file access property
+ * list.
+ *
+ * The raw data chunk cache inserts chunks into the cache
+ * by first computing a hash value using the address of a chunk,
+ * then using that hash value as the chunk's index into the table
+ * of cached chunks. The size of this hash table, i.e., and the
+ * number of possible hash values, is determined by the
+ * \p rdcc_nslots parameter. If a different chunk in the cache
+ * has the same hash value, this causes a collision, which
+ * reduces efficiency. If inserting the chunk into cache would
+ * cause the cache to be too big, then the cache is pruned
+ * according to the \p rdcc_w0 parameter.
+ *
+ * \b Motivation: H5Pset_chunk_cache() is used to adjust the chunk
+ * cache parameters on a per-dataset basis, as opposed to a global
+ * setting for the file using H5Pset_cache(). The optimum chunk
+ * cache parameters may vary widely with different data layout and
+ * access patterns, so for optimal performance they must be set
+ * individually for each dataset. It may also be beneficial to
+ * reduce the size of the chunk cache for datasets whose
+ * performance is not important in order to save memory space.
+ *
+ * \b Example \b Usage: The following code sets the chunk cache to
+ * use a hash table with 12421 elements and a maximum size of
+ * 16 MB, while using the preemption policy specified for the
+ * entire file:
+ * \Code{
+ * H5Pset_chunk_cache(dapl_id, 12421, 16*1024*1024,
+ * H5D_CHUNK_CACHE_W0_DEFAULT);}
+ *
+ * \b Usage \b Notes: The chunk cache size is a property for
+ * accessing a dataset and is not stored with a dataset or a
+ * file. To guarantee the same chunk cache settings each time
+ * the dataset is opened, call H5Dopen() with a dataset access
+ * property list where the chunk cache size is set by calling
+ * H5Pset_chunk_cache() for that property list. The property
+ * list can be used for multiple accesses in the same
+ * application.
+ *
+ * For files where the same chunk cache size will be
+ * appropriate for all or most datasets, H5Pset_cache() can
+ * be called with a file access property list to set the
+ * chunk cache size for accessing all datasets in the file.
+ *
+ * Both methods can be used in combination, in which case
+ * the chunk cache size set by H5Pset_cache() will apply
+ * except for specific datasets where H5Dopen() is called
+ * with dataset property list with the chunk cache size
+ * set by H5Pset_chunk_cache().
+ *
+ * In the absence of any cache settings, H5Dopen() will
+ * by default create a 1 MB chunk cache for the opened
+ * dataset. If this size happens to be appropriate, no
+ * call will be needed to either function to set the
+ * chunk cache size.
+ *
+ * It is also possible that a change in access pattern
+ * for later access to a dataset will change the
+ * appropriate chunk cache size.
+ *
+ * \since 1.8.3
+ *
+ */
+H5_DLL herr_t H5Pset_chunk_cache(hid_t dapl_id, size_t rdcc_nslots, size_t rdcc_nbytes, double rdcc_w0);
+/**
+ * \ingroup DAPL
+ *
+ * \brief Sets the external dataset storage file prefix in the dataset
+ * access property list
+ *
+ * \dapl_id
+ * \param[in] prefix Dataset external storage prefix in UTF-8 or ASCII
+ * (Path and filename must be ASCII on Windows systems.)
+ *
+ * \return \herr_t
+ *
+ * \details H5Pset_efile_prefix() sets the prefix used to locate raw data
+ * files for a dataset that uses external storage. This prefix
+ * can provide either an absolute path or a relative path to the
+ * external files.
+ *
+ * H5Pset_efile_prefix() is used in conjunction with
+ * H5Pset_external() to control the behavior of the HDF5 library
+ * when searching for the raw data files associated with a dataset
+ * that uses external storage:
+ *
+ * \li The default behavior of the library is to search for the
+ * dataset’s external storage raw data files in the same
+ * directory as the HDF5 file which contains the dataset.
+ * \li If the prefix is set to an absolute path, the target
+ * directory will be searched for the dataset’s external
+ * storage raw data files.
+ * \li If the prefix is set to a relative path, the target
+ * directory, relative to the current working directory, will
+ * be searched for the dataset’s external storage raw data
+ * files.
+ * \li If the prefix is set to a relative path that begins with
+ * the special token ${ORIGIN}, that directory, relative to
+ * the HDF5 file containing the dataset, will be searched for
+ * the dataset’s external storage raw data files.
+ *
+ * The HDF5_EXTFILE_PREFIX environment variable can be used to
+ * override the above behavior (the environment variable
+ * supersedes the API call). Setting the variable to a path
+ * string and calling H5Dcreate() or H5Dopen() is the equivalent
+ * of calling H5Pset_efile_prefix() and calling the same create
+ * or open function. The environment variable is checked at the
+ * time of the create or open action and copied so it can be
+ * safely changed after the H5Dcreate() or H5Dopen() call.
+ *
+ * Calling H5Pset_efile_prefix() with \p prefix set to NULL or
+ * the empty string returns the search path to the default. The
+ * result would be the same as if H5Pset_efile_prefix() had never
+ * been called.
+ *
+ * \note If the external file prefix is not an absolute path and the HDF5
+ * file is moved, the external storage files will also need to be
+ * moved so they can be accessed at the new location.
+ *
+ * \note As stated above, the use of the HDF5_EXTFILE_PREFIX environment
+ * variable overrides any property list setting.
+ * H5Pset_efile_prefix() and H5Pget_efile_prefix(), being property
+ * functions, set and retrieve only the property list setting; they
+ * are unaware of the environment variable.
+ *
+ * \note On Windows, the prefix must be an ASCII string since the Windows
+ * standard C library’s I/O functions cannot handle UTF-8 file names.
+ *
+ * \since 1.10.0, 1.8.17
+ *
+ */
+H5_DLL herr_t H5Pset_efile_prefix(hid_t dapl_id, const char *prefix);
+/**
+ * \ingroup DAPL
+ *
+ * \brief Sets prefix to be applied to VDS source file paths
+ *
+ * \dapl_id
+ * \param[in] prefix Prefix to be applied to VDS source file paths
+ *
+ * \return \herr_t
+ *
+ * \details H5Pset_virtual_prefix() sets the prefix to be applied to the
+ * path of any VDS source files traversed. The prefix is prepended
+ * to the filename stored in the VDS virtual file, set with
+ * H5Pset_virtual().
+ *
+ * The prefix is specified in the user-allocated buffer \p prefix
+ * and set in the dataset access property list \p dapl_id. The
+ * buffer should not be freed until the property list has been
+ * closed.
+ *
+ * \see_virtual
+ *
+ * \since 1.10.2
+ *
+ */
+H5_DLL herr_t H5Pset_virtual_prefix(hid_t dapl_id, const char *prefix);
+/**
+ * \ingroup DAPL
+ *
+ * \brief Sets the maximum number of missing source files and/or datasets
+ * with the printf-style names when getting the extent of an
+ * unlimited virtual dataset
+ *
+ * \dapl_id
+ * \param[in] gap_size Maximum number of files and/or datasets allowed to
+ * be missing for determining the extent of an
+ * unlimited virtual dataset with printf-style
+ * mappings (Default value: 0)
+ *
+ * \return \herr_t
+ *
+ * \details H5Pset_virtual_printf_gap() sets the access property list for
+ * the virtual dataset, \p dapl_id, to instruct the library to
+ * stop looking for the mapped data stored in the files and/or
+ * datasets with the printf-style names after not finding
+ * \p gap_size files and/or datasets. The found source files and
+ * datasets will determine the extent of the unlimited virtual
+ * dataset with the printf-style mappings.
+ *
+ * Consider the following examples where the regularly spaced
+ * blocks of a virtual dataset are mapped to datasets with the
+ * names d-1, d-2, d-3, ..., d-N, ... :
+ *
+ * \li If the dataset d-2 is missing and \p gap_size is set to 0,
+ * then the virtual dataset will contain only data found
+ * in d-1.
+ * \li If d-2 and d-3 are missing and \p gap_size is set to 2,
+ * then the virtual dataset will contain the data from
+ * d-1, d-3, ..., d-N, ... . The blocks that are mapped to
+ * d-2 and d-3 will be filled according to the virtual
+ * dataset’s fill value setting.
+ *
+ * \see_virtual
+ *
+ * \since 1.10.0
+ *
+ */
+H5_DLL herr_t H5Pset_virtual_printf_gap(hid_t dapl_id, hsize_t gap_size);
+/**
+ * \ingroup DAPL
+ *
+ * \brief Sets the view of the virtual dataset (VDS) to include or exclude
+ * missing mapped elements
+ *
+ * \dapl_id
+ * \param[in] view Flag specifying the extent of the data to be included
+ * in the view. Valid values are:
+ * \li #H5D_VDS_FIRST_MISSING: View includes all data
+ * before the first missing mapped data
+ * \li #H5D_VDS_LAST_AVAILABLE View includes all
+ * available mapped data
+ *
+ * \return \herr_t
+ *
+ * \details H5Pset_virtual_view() takes the access property list for the
+ * virtual dataset, \p dapl_id, and the flag, \p view, and sets
+ * the VDS view according to the flag value.
+ *
+ * If \p view is set to #H5D_VDS_FIRST_MISSING, the view includes
+ * all data before the first missing mapped data. This setting
+ * provides a view containing only the continuous data starting
+ * with the dataset’s first data element. Any break in
+ * continuity terminates the view.
+ *
+ * If \p view is set to #H5D_VDS_LAST_AVAILABLE, the view
+ * includes all available mapped data.
+ *
+ * Missing mapped data is filled with the fill value set in the
+ * VDS creation property list.
+ *
+ * \see_virtual
+ *
+ * \since 1.10.0
+ *
+ */
+H5_DLL herr_t H5Pset_virtual_view(hid_t dapl_id, H5D_vds_view_t view);
+
+/* Dataset xfer property list (DXPL) routines */
+/**
+ *
+ * \ingroup DXPL
+ *
+ * \brief Gets B-tree split ratios for a dataset transfer property list
+ *
+ * \dxpl_id{plist_id}
+ * \param[out] left The B-tree split ratio for left-most nodes
+ * \param[out] middle The B-tree split ratio for right-most nodes and lone nodes
+ * \param[out] right The B-tree split ratio for all other nodes
+ * \return \herr_t
+ *
+ * \details H5Pget_btree_ratios() returns the B-tree split ratios for a dataset
+ * transfer property list.
+ *
+ * The B-tree split ratios are returned through the non-NULL arguments
+ * \p left, \p middle, and \p right, as set by the H5Pset_btree_ratios()
+ * function.
+ *
+ */
+H5_DLL herr_t H5Pget_btree_ratios(hid_t plist_id, double *left /*out*/, double *middle /*out*/,
+ double *right /*out*/);
+/**
+ *
+ * \ingroup DXPL
+ *
+ * \brief Reads buffer settings
+ *
+ * \param[in] plist_id Identifier for the dataset transfer property list
+ * \param[out] tconv Address of the pointer to application-allocated type
+ * conversion buffer
+ * \param[out] bkg Address of the pointer to application-allocated
+ * background buffer
+ *
+ * \return Returns buffer size, in bytes, if successful; otherwise 0 on failure.
+ *
+ * \details H5Pget_buffer() reads values previously set with H5Pset_buffer().
+ *
+ * \version 1.6.0 The return type changed from \p hsize_t to \p size_t.
+ * \version 1.4.0 The return type changed to \p hsize_t.
+ *
+ */
+H5_DLL size_t H5Pget_buffer(hid_t plist_id, void **tconv /*out*/, void **bkg /*out*/);
+/**
+ *
+ * \ingroup DXPL
+ *
+ * \brief Retrieves a data transform expression
+ *
+ * \param[in] plist_id Identifier of the property list or class
+ * \param[out] expression Pointer to memory where the transform expression will
+ * be copied
+ * \param[in] size Number of bytes of the transform expression to copy
+ * to
+ *
+ * \return Success: the size of the transform expression. Failure: a negative
+ * value.
+ *
+ * \details H5Pget_data_transform() retrieves the data transform expression
+ * previously set in the dataset transfer property list \p plist_id
+ * by H5Pset_data_transform().
+ *
+ * H5Pget_data_transform() can be used to both retrieve the transform
+ * expression and query its size.
+ *
+ * If \p expression is non-NULL, up to \p size bytes of the data
+ * transform expression are written to the buffer. If \p expression
+ * is NULL, \p size is ignored, and the function does not write
+ * anything to the buffer. The function always returns the size of
+ * the data transform expression.
+ *
+ * If 0 is returned for the size of the expression, no data transform
+ * expression exists for the property list.
+ *
+ * If an error occurs, the buffer pointed to by \p expression is
+ * unchanged, and the function returns a negative value.
+ *
+ * \par Example
+ * An example snippet from examples/h5_dtransform.c:
+ * \snippet h5_dtransform.c H5Pget_data_transform_snip
+ *
+ * \since 1.8.0
+ *
+ */
+H5_DLL ssize_t H5Pget_data_transform(hid_t plist_id, char *expression /*out*/, size_t size);
+/**
+ *
+ * \ingroup DXPL
+ *
+ * \brief Determines whether error-detection is enabled for dataset reads
+ *
+ * \param[in] plist_id Dataset transfer property list identifier
+ *
+ * \return Returns \p H5Z_ENABLE_EDC or \p H5Z_DISABLE_EDC if successful;
+ * otherwise returns a negative value.
+ *
+ * \details H5Pget_edc_check() queries the dataset transfer property
+ * list \p plist to determine whether error detection is enabled for
+ * data read operations.
+ *
+ * \since 1.6.0
+ *
+ */
+H5_DLL H5Z_EDC_t H5Pget_edc_check(hid_t plist_id);
+/**
+ *
+ * \ingroup DXPL
+ *
+ * \brief Retrieves number of I/O vectors to be read/written in hyperslab I/O
+ *
+ * \param[in] fapl_id Dataset transfer property list identifier
+ * \param[out] size Number of I/O vectors to accumulate in memory for I/O operations
+ *
+ * \return \herr_t
+ *
+ * \details H5Pget_hyper_vector_size() retrieves the number of I/O vectors to be accumulated in
+ * memory before being issued to the lower levels of the HDF5 library for reading or
+ * writing the actual data.
+ *
+ * The number of I/O vectors set in the dataset transfer property list \p fapl_id is
+ * returned in \p size. Unless the default value is in use, \p size was
+ * previously set with a call to H5Pset_hyper_vector_size().
+ *
+ * \since 1.6.0
+ *
+ */
+H5_DLL herr_t H5Pget_hyper_vector_size(hid_t fapl_id, size_t *size /*out*/);
+/**
+ *
+ * \ingroup DXPL
+ *
+ * \brief Checks status of the dataset transfer property list (\b DEPRECATED)
+ *
+ * \deprecated{H5Pget_preserve() is deprecated as it is no longer useful;
+ * compound datatype field preservation is now core functionality
+ * in the HDF5 library.}
+ *
+ * \param[in] plist_id Identifier for the dataset transfer property list
+ *
+ * \return Returns 1 or 0 if successful; otherwise returns a negative value.
+ *
+ * \details H5Pget_preserve() checks the status of the dataset transfer
+ * property list.
+ *
+ * \version 1.6.0 The flag parameter was changed from INTEGER to LOGICAL to
+ * better match the C API. (Fortran 90)
+ *
+ */
+H5_DLL int H5Pget_preserve(hid_t plist_id);
+/**
+ *
+ * \ingroup DXPL
+ *
+ * \brief Gets user-defined datatype conversion callback function
+ *
+ * \param[in] dxpl_id Dataset transfer property list identifier
+ * \param[out] op User-defined type conversion callback function
+ * \param[out] operate_data User-defined input data for the callback function
+ *
+ * \return \herr_t
+ *
+ * \details H5Pget_type_conv_cb() gets the user-defined datatype conversion
+ * callback function \p op in the dataset transfer property list
+ * \p dxpl_id.
+ *
+ * The parameter \p operate_data is a pointer to user-defined input
+ * data for the callback function.
+ *
+ * The callback function \p op defines the actions an application is
+ * to take when there is an exception during datatype conversion.
+ *
+ * Please refer to the function H5Pset_type_conv_cb() for more details.
+ *
+ */
+H5_DLL herr_t H5Pget_type_conv_cb(hid_t dxpl_id, H5T_conv_except_func_t *op, void **operate_data);
+/**
+ *
+ * \ingroup DXPL
+ *
+ * \brief Gets the memory manager for variable-length datatype allocation in H5Dread() and H5Dvlen_reclaim()
+ *
+ * \param[in] plist_id Identifier for the dataset transfer property list
+ * \param[out] alloc_func User's allocate routine, or NULL for system malloc
+ * \param[out] alloc_info Extra parameter for user’s allocation routine.
+ * Contents are ignored if preceding
+ * parameter is NULL \param[out] free_func User's free routine, or NULL for
+ * system free \param[out] free_info
+ * Extra parameter for user’s free routine. Contents are ignored if preceding
+ * parameter is NULL
+ *
+ * \return \herr_t
+ *
+ * \details H5Pget_vlen_mem_manager() is the companion function to
+ * H5Pset_vlen_mem_manager(), returning the parameters set by
+ * that function.
+ *
+ */
+H5_DLL herr_t H5Pget_vlen_mem_manager(hid_t plist_id, H5MM_allocate_t *alloc_func, void **alloc_info,
+ H5MM_free_t *free_func, void **free_info);
+/**
+ *
+ * \ingroup DXPL
+ *
+ * \brief Sets B-tree split ratios for a dataset transfer property list
+ *
+ * \param[in] plist_id The dataset transfer property list identifier
+ * \param[in] left The B-tree split ratio for left-most nodes
+ * \param[in] middle The B-tree split ratio for all other nodes
+ * \param[in] right The B-tree split ratio for right-most nodes and lone
+ * nodes
+ *
+ * \return \herr_t
+ *
+ * \details H5Pset_btree_ratios() sets the B-tree split ratios for a dataset
+ * transfer property list. The split ratios determine what percent of
+ * children go in the first node when a node splits.
+ *
+ * The ratio \p left is used when the splitting node is the left-most
+ * node at its level in the tree;
+ * the ratio \p right is used when the splitting node is the right-most
+ * node at its level; and
+ * the ratio \p middle is used for all other cases.
+ *
+ * A node that is the only node at its level in the tree uses the
+ * ratio \p right when it splits.
+ *
+ * All ratios are real numbers between 0 and 1, inclusive.
+ *
+ */
+H5_DLL herr_t H5Pset_btree_ratios(hid_t plist_id, double left, double middle, double right);
+
+/**
+ *
+ * \ingroup DXPL
+ *
+ * \brief Sets type conversion and background buffers
+ *
+ * \dxpl_id{plist_id}
+ * \param[in] size Size, in bytes, of the type conversion and background buffers
+ * \param[in] tconv Pointer to application-allocated type conversion buffer
+ * \param[in] bkg Pointer to application-allocated background buffer
+ * \return \herr_t
+ *
+ * \details Given a dataset transfer property list, H5Pset_buffer() sets the
+ * maximum size for the type conversion buffer and background buffer
+ * and optionally supplies pointers to application-allocated
+ * buffers. If the buffer size is smaller than the entire amount of
+ * data being transferred between the application and the file, and a
+ * type conversion buffer or background buffer is required, then strip
+ * mining will be used.
+ *
+ * Note that there are minimum size requirements for the buffer. Strip
+ * mining can only break the data up along the first dimension, so the
+ * buffer must be large enough to accommodate a complete slice that
+ * encompasses all of the remaining dimensions. For example, when strip
+ * mining a \Code{100x200x300} hyperslab of a simple data space, the
+ * buffer must be large enough to hold \Code{1x200x300} data
+ * elements. When strip mining a \Code{100x200x300x150} hyperslab of a
+ * simple data space, the buffer must be large enough to hold
+ * \Code{1x200x300x150} data elements.
+ *
+ * If \p tconv and/or \p bkg are null pointers, then buffers will be
+ * allocated and freed during the data transfer.
+ *
+ * The default value for the maximum buffer is 1 MiB.
+ *
+ * \version 1.6.0 The \p size parameter has changed from type hsize_t to \c size_t.
+ * \version 1.4.0 The \p size parameter has changed to type hsize_t.
+ *
+ */
+H5_DLL herr_t H5Pset_buffer(hid_t plist_id, size_t size, void *tconv, void *bkg);
+
+/**
+ * \ingroup DXPL
+ *
+ * \brief Sets a data transform expression
+ *
+ * \dxpl_id{plist_id}
+ * \param[in] expression Pointer to the null-terminated data transform
+ * expression
+ * \return \herr_t
+ *
+ * \details H5Pset_data_transform() sets the data transform to be used for
+ * reading and writing data. This function operates on the dataset
+ * transfer property list \p plist_id.
+ *
+ * The \p expression parameter is a string containing an algebraic
+ * expression, such as \Code{(5/9.0)*(x-32)} or \Code{x*(x-5)}. When a
+ * dataset is read or written with this property list, the transform
+ * expression is applied with the \c x being replaced by the values in
+ * the dataset. When reading data, the values in the file are not
+ * changed and the transformed data is returned to the user.
+ *
+ * Data transforms can only be applied to integer or
+ * floating-point datasets. Order of operations is obeyed and
+ * the only supported operations are +, -, *, and /. Parentheses
+ * can be nested arbitrarily and can be used to change precedence.
+ * When writing data back to the dataset, the transformed data is
+ * written to the file and there is no way to recover the original
+ * values to which the transform was applied.
+ *
+ * \since 1.8.0
+ *
+ */
+H5_DLL herr_t H5Pset_data_transform(hid_t plist_id, const char *expression);
+
+/**
+ * \ingroup DXPL
+ *
+ * \brief Sets the dataset transfer property list to enable or disable error
+ * detection when reading data
+ *
+ * \dxpl_id{plist_id}
+ * \param[in] check Specifies whether error checking is enabled or disabled
+ * for dataset read operations
+ * \return \herr_t
+ *
+ * \details H5Pset_edc_check() sets the dataset transfer property list \p plist
+ * to enable or disable error detection when reading data.
+ *
+ * Whether error detection is enabled or disabled is specified in the
+ * \p check parameter. Valid values are #H5Z_ENABLE_EDC (default) and
+ * #H5Z_DISABLE_EDC.
+ *
+ * \note The initial error detection implementation, Fletcher32 checksum,
+ * supports error detection for chunked datasets only.
+ *
+ * \attention The Fletcher32 EDC checksum filter, set with H5Pset_fletcher32(),
+ * was added in HDF5 Release 1.6.0. In the original implementation,
+ * however, the checksum value was calculated incorrectly on
+ * little-endian systems. The error was fixed in HDF5 Release 1.6.3.\n
+ * As a result of this fix, an HDF5 library of Release 1.6.0 through
+ * Release 1.6.2 cannot read a dataset created or written with
+ * Release 1.6.3 or later if the dataset was created with the
+ * checksum filter and the filter is enabled in the reading
+ * library. (Libraries of Release 1.6.3 and later understand the
+ * earlier error and compensate appropriately.)\n
+ * \Bold{Work-around:} An HDF5 library of Release 1.6.2 or earlier
+ * will be able to read a dataset created or written with the
+ * checksum filter by an HDF5 library of Release 1.6.3 or later if
+ * the checksum filter is disabled for the read operation. This can
+ * be accomplished via an H5Pset_edc_check() call with the value
+ * #H5Z_DISABLE_EDC in the second parameter. This has the obvious
+ * drawback that the application will be unable to verify the
+ * checksum, but the data does remain accessible.
+ *
+ * \version 1.6.3 Error in checksum calculation on little-endian systems
+ * corrected in this release.
+ * \since 1.6.0
+ *
+ */
+H5_DLL herr_t H5Pset_edc_check(hid_t plist_id, H5Z_EDC_t check);
+
+/**
+ * \ingroup DXPL
+ *
+ * \brief Sets user-defined filter callback function
+ *
+ * \dxpl_id{plist_id}
+ * \param[in] func User-defined filter callback function
+ * \param[in] op_data User-defined input data for the callback function
+ * \return \herr_t
+ *
+ * \details H5Pset_filter_callback() sets the user-defined filter callback
+ * function \p func in the dataset transfer property list \p plist_id.
+ *
+ * The parameter \p op_data is a pointer to user-defined input data for
+ * the callback function and will be passed through to the callback
+ * function.
+ *
+ * The callback function \p func defines the actions an application is
+ * to take when a filter fails. The function prototype is as follows:
+ * \snippet H5Zpublic.h H5Z_filter_func_t_snip
+ * where \c filter indicates which filter has failed, \c buf and \c buf_size
+ * are used to pass in the failed data, and op_data is the required
+ * input data for this callback function.
+ *
+ * Valid callback function return values are #H5Z_CB_FAIL and #H5Z_CB_CONT.
+ *
+ * \since 1.6.0
+ *
+ */
+H5_DLL herr_t H5Pset_filter_callback(hid_t plist_id, H5Z_filter_func_t func, void *op_data);
+
+/**
+ * \ingroup DXPL
+ *
+ * \brief Sets number of I/O vectors to be read/written in hyperslab I/O
+ *
+ * \dxpl_id{plist_id}
+ * \param[in] size Number of I/O vectors to accumulate in memory for I/O
+ * operations\n
+ * Must be greater than 1 (one)\n
+ * Default value: 1024
+ * \return \herr_t
+ *
+ * \details H5Pset_hyper_vector_size() sets the number of I/O vectors to be
+ * accumulated in memory before being issued to the lower levels of
+ * the HDF5 library for reading or writing the actual data.
+ *
+ * The I/O vectors are hyperslab offset and length pairs and are
+ * generated during hyperslab I/O.
+ *
+ * The number of I/O vectors is passed in \p size to be set in the
+ * dataset transfer property list \p plist_id. \p size must be
+ * greater than 1 (one).
+ *
+ * H5Pset_hyper_vector_size() is an I/O optimization function;
+ * increasing vector_size should provide better performance, but the
+ * library will use more memory during hyperslab I/O. The default value
+ * of \p size is 1024.
+ *
+ * \since 1.6.0
+ *
+ */
+H5_DLL herr_t H5Pset_hyper_vector_size(hid_t plist_id, size_t size);
+
+/**
+ * \ingroup DXPL
+ *
+ * \brief Sets the dataset transfer property list \p status
+ *
+ * \dxpl_id{plist_id}
+ * \param[in] status Status toggle of the dataset transfer property list
+ * \return \herr_t
+ *
+ * \deprecated This function is deprecated as it no longer has any effect;
+ * compound datatype field preservation is now core functionality in
+ * the HDF5 library.
+ *
+ * \details H5Pset_preserve() sets the dataset transfer property list status to
+ * \c 1 or \c 0.
+ *
+ * When reading or writing compound datatypes and the destination is
+ * partially initialized and the read/write is intended to initialize
+ * the other members, one must set this property to \c 1. Otherwise the
+ * I/O pipeline treats the destination datapoints as completely
+ * uninitialized.
+ *
+ * \todo Add missing version information: introduction, deprecation, etc.
+ * Why is the declaration not in the deprecated section?
+ *
+ */
+H5_DLL herr_t H5Pset_preserve(hid_t plist_id, hbool_t status);
+
+/**
+ * \ingroup DXPL
+ *
+ * \brief Sets user-defined datatype conversion callback function
+ *
+ * \dxpl_id
+ * \param[in] op User-defined type conversion callback function
+ * \param[in] operate_data User-defined input data for the callback function
+ * \return \herr_t
+ *
+ * \details H5Pset_type_conv_cb() sets the user-defined datatype conversion
+ * callback function \p op in the dataset transfer property list \p
+ * dxpl_id
+ *
+ * The parameter operate_data is a pointer to user-defined input data
+ * for the callback function and will be passed through to the callback
+ * function.
+ *
+ * The callback function \p op defines the actions an application is to
+ * take when there is an exception during datatype conversion. The
+ * function prototype is as follows:
+ * \snippet H5Tpublic.h H5T_conv_except_func_t_snip
+ *
+ * \todo Add version information.
+ *
+ */
+H5_DLL herr_t H5Pset_type_conv_cb(hid_t dxpl_id, H5T_conv_except_func_t op, void *operate_data);
+
+/**
+ * \ingroup DXPL
+ *
+ * \brief Sets the memory manager for variable-length datatype allocation in
+ * H5Dread() and H5Dvlen_reclaim()
+ *
+ * \dxpl_id{plist_id}
+ * \param[in] alloc_func User's allocate routine, or \c NULL for system \c malloc
+ * \param[in] alloc_info Extra parameter for user's allocation routine.
+ * Contents are ignored if preceding parameter is \c NULL.
+ * \param[in] free_func User's free routine, or \c NULL for system \c free
+ * \param[in] free_info Extra parameter for user's free routine. Contents are
+ * ignored if preceding parameter is \c NULL
+ * \return \herr_t
+ *
+ * \details H5Pset_vlen_mem_manager() sets the memory manager for
+ * variable-length datatype allocation in H5Dread() and free in
+ * H5Dvlen_reclaim().
+ *
+ * The \p alloc_func and \p free_func parameters identify the memory
+ * management routines to be used. If the user has defined custom
+ * memory management routines, \p alloc_func and/or free_func should be
+ * set to make those routine calls (i.e., the name of the routine is
+ * used as the value of the parameter); if the user prefers to use the
+ * system's \c malloc and/or \c free, the \p alloc_func and \p
+ * free_func parameters, respectively, should be set to \c NULL
+ *
+ * The prototypes for these user-defined functions are as follows:
+ * \snippet H5MMpublic.h H5MM_allocate_t_snip
+ *
+ * \snippet H5MMpublic.h H5MM_free_t_snip
+ *
+ * The \p alloc_info and \p free_info parameters can be used to pass
+ * along any required information to the user's memory management
+ * routines.
+ *
+ * In summary, if the user has defined custom memory management
+ * routines, the name(s) of the routines are passed in the \p
+ * alloc_func and \p free_func parameters and the custom routines'
+ * parameters are passed in the \p alloc_info and \p free_info
+ * parameters. If the user wishes to use the system \c malloc and \c
+ * free functions, the \p alloc_func and/or \p free_func parameters are
+ * set to \c NULL and the \p alloc_info and \p free_info parameters are
+ * ignored.
+ *
+ * \todo Add version information.
+ */
+H5_DLL herr_t H5Pset_vlen_mem_manager(hid_t plist_id, H5MM_allocate_t alloc_func, void *alloc_info,
+ H5MM_free_t free_func, void *free_info);
+
+#ifdef H5_HAVE_PARALLEL
+/**
+ * \ingroup DXPL
+ *
+ * \brief Retrieves the type of chunk optimization that HDF5 actually performed
+ * on the last parallel I/O call (not necessarily the type requested)
+ *
+ * \dxpl_id{plist_id}
+ * \param[out] actual_chunk_opt_mode The type of chunk optimization performed by HDF5
+ * \return \herr_t
+ *
+ * \par Motivation:
+ * A user can request collective I/O via a data transfer property list
+ * (DXPL) that has been suitably modified with H5Pset_dxpl_mpio().
+ * However, HDF5 will sometimes ignore this request and perform independent
+ * I/O instead. This property allows the user to see what kind of I/O HDF5
+ * actually performed. Used in conjunction with H5Pget_mpio_actual_io_mode(),
+ * this property allows the user to determine exactly what HDF5 did when
+ * attempting collective I/O.
+ *
+ * \details H5Pget_mpio_actual_chunk_opt_mode() retrieves the type of chunk
+ * optimization performed when collective I/O was requested. This
+ * property is set before I/O takes place, and will be set even if I/O
+ * fails.
+ *
+ * Valid values returned in \p actual_chunk_opt_mode:
+ * \snippet this H5D_mpio_actual_chunk_opt_mode_t_snip
+ * \click4more
+ *
+ * \since 1.8.8
+ *
+ */
+H5_DLL herr_t H5Pget_mpio_actual_chunk_opt_mode(hid_t plist_id,
+ H5D_mpio_actual_chunk_opt_mode_t *actual_chunk_opt_mode);
+/**
+ * \ingroup DXPL
+ *
+ * \brief Retrieves the type of I/O that HDF5 actually performed on the last
+ * parallel I/O call (not necessarily the type requested)
+ *
+ * \dxpl_id{plist_id}
+ * \param[out] actual_io_mode The type of I/O performed by this process
+ * \return \herr_t
+ *
+ * \par Motivation:
+ * A user can request collective I/O via a data transfer property list
+ * (DXPL) that has been suitably modified with H5Pset_dxpl_mpio().
+ * However, HDF5 will sometimes ignore this request and perform independent
+ * I/O instead. This property allows the user to see what kind of I/O HDF5
+ * actually performed. Used in conjunction with H5Pget_mpio_actual_chunk_opt_mode(),
+ * this property allows the user to determine exactly HDF5 did when
+ * attempting collective I/O.
+ *
+ * \details H5Pget_mpio_actual_io_mode() retrieves the type of I/O performed on
+ * the selection of the current process. This property is set after all
+ * I/O is completed; if I/O fails, it will not be set.
+ *
+ * Valid values returned in \p actual_io_mode:
+ * \snippet this H5D_mpio_actual_io_mode_t_snip
+ * \click4more
+ *
+ * \attention All processes do not need to have the same value. For example, if
+ * I/O is being performed using the multi chunk optimization scheme,
+ * one process's selection may include only chunks accessed
+ * collectively, while another may include chunks accessed
+ * independently. In this case, the first process will report
+ * #H5D_MPIO_CHUNK_COLLECTIVE while the second will report
+ * #H5D_MPIO_CHUNK_INDEPENDENT.
+ *
+ * \see H5Pget_mpio_no_collective_cause(), H5Pget_mpio_actual_chunk_opt_mode()
+ *
+ * \since 1.8.8
+ *
+ */
+H5_DLL herr_t H5Pget_mpio_actual_io_mode(hid_t plist_id, H5D_mpio_actual_io_mode_t *actual_io_mode);
+/**
+ * \ingroup DXPL
+ *
+ * \brief Retrieves local and global causes that broke collective I/O on the last
+ * parallel I/O call
+ *
+ * \dxpl_id{plist_id}
+ * \param[out] local_no_collective_cause An enumerated set value indicating the
+ * causes that prevented collective I/O in the local process
+ * \param[out] global_no_collective_cause An enumerated set value indicating
+ * the causes across all processes that prevented collective I/O
+ * \return \herr_t
+ *
+ * \par Motivation:
+ * A user can request collective I/O via a data transfer property list (DXPL)
+ * that has been suitably modified with H5P_SET_DXPL_MPIO. However, there are
+ * conditions that can cause HDF5 to forgo collective I/O and perform
+ * independent I/O. Such causes can be different across the processes of a
+ * parallel application. This function allows the user to determine what
+ * caused the HDF5 library to skip collective I/O locally, that is in the
+ * local process, and globally, across all processes.
+ *
+ * \details H5Pget_mpio_no_collective_cause() serves two purposes. It can be
+ * used to determine whether collective I/O was used for the last
+ * preceding parallel I/O call. If collective I/O was not used, the
+ * function retrieves the local and global causes that broke collective
+ * I/O on that parallel I/O call. The properties retrieved by this
+ * function are set before I/O takes place and are retained even when
+ * I/O fails.
+ *
+ * Valid values returned in \p local_no_collective_cause and \p
+ * global_no_collective_cause are as follows or, if there are multiple
+ * causes, a bitwise OR of the relevant causes; the numbers in the
+ * center column are the bitmask values:
+ * \snippet this H5D_mpio_no_collective_cause_t_snip
+ * \click4more
+ *
+ * \attention Each process determines whether it can perform collective I/O and
+ * broadcasts the result. Those results are combined to make a
+ * collective decision; collective I/O will be performed only if all
+ * processes can perform collective I/O.\n
+ * If collective I/O was not used, the causes that prevented it are
+ * reported by individual process by means of an enumerated set. The
+ * causes may differ among processes, so H5Pget_mpio_no_collective_cause()
+ * returns two property values. The first value is the one produced
+ * by the local process to report local causes. This local information
+ * is encoded in an enumeration, the \ref H5D_mpio_no_collective_cause_t
+ * described above, with all individual causes combined into a single
+ * enumeration value by means of a bitwise OR operation. The second
+ * value reports global causes; this global value is the result of a
+ * bitwise-OR operation across the values returned by all the processes.
+ *
+ * \since 1.8.10
+ *
+ */
+H5_DLL herr_t H5Pget_mpio_no_collective_cause(hid_t plist_id, uint32_t *local_no_collective_cause,
+ uint32_t *global_no_collective_cause);
+#endif /* H5_HAVE_PARALLEL */
+
+/* Link creation property list (LCPL) routines */
+/**
+ * \ingroup ALCAPL
+ *
+ * \brief Determines whether property is set to enable creating missing
+ * intermediate groups
+ *
+ * \lcpl_id{plist_id}
+ * \param[out] crt_intmd Flag specifying whether to create intermediate
+ * groups upon creation of an object
+ *
+ * \return \herr_t
+ *
+ * \details H5Pget_create_intermediate_group() determines whether the link
+ * creation property list \p plist_id is set to allow functions
+ * that create objects in groups different from the current
+ * working group to create intermediate groups that may be
+ * missing in the path of a new or moved object.
+ *
+ * Functions that create objects in or move objects to a group
+ * other than the current working group make use of this
+ * property. H5Gcreate_anon() and H5Lmove() are examples of such
+ * functions.
+ *
+ * If \p crt_intmd is positive, missing intermediate groups will
+ * be created; if \p crt_intmd is non-positive, missing intermediate
+ * groups will not be created.
+ *
+ * \since 1.8.0
+ *
+ */
+H5_DLL herr_t H5Pget_create_intermediate_group(hid_t plist_id, unsigned *crt_intmd /*out*/);
+/**
+ * \ingroup ALCAPL
+ *
+ * \brief Specifies in property list whether to create missing
+ * intermediate groups
+ *
+ * \lcpl_id{plist_id}
+ * \param[in] crt_intmd Flag specifying whether to create intermediate
+ * groups upon the creation of an object
+ *
+ * \return \herr_t
+ *
+ * \details H5Pset_create_intermediate_group()
+ *
+ * \since
+ *
+ */
+H5_DLL herr_t H5Pset_create_intermediate_group(hid_t plist_id, unsigned crt_intmd);
+
+/* Group creation property list (GCPL) routines */
+
+/**
+ * \ingroup GCPL
+ *
+ * \brief Returns the estimated link count and average link name length in a group
+ *
+ * \gcpl_id{plist_id}
+ * \param[out] est_num_entries The estimated number of links in the group
+ * referenced by \p plist_id
+ * \param[out] est_name_len The estimated average length of line names in the group
+ * referenced by \p plist_id
+ * \return \herr_t
+ *
+ * \details H5Pget_est_link_info() retrieves two settings from the group creation
+ * property list \p plist_id: the estimated number of links that are
+ * expected to be inserted into a group created with the property list
+ * and the estimated average length of those link names.
+ *
+ * The estimated number of links is returned in \p est_num_entries. The
+ * limit for \p est_num_entries is 64 K.
+ *
+ * The estimated average length of the anticipated link names is returned
+ * in \p est_name_len. The limit for \p est_name_len is 64 K.
+ *
+ * See \ref_group_impls for a discussion of the available types of HDF5
+ * group structures.
+ *
+ * \since 1.8.0
+ *
+ */
+H5_DLL herr_t H5Pget_est_link_info(hid_t plist_id, unsigned *est_num_entries /* out */,
+ unsigned *est_name_len /* out */);
+/**
+ * \ingroup GCPL
+ *
+ * \brief Queries whether link creation order is tracked and/or indexed in
+ * a group
+ *
+ * \param[in] plist_id Group or file creation property list
+ * identifier
+ * \param[out] crt_order_flags Creation order flag(s)
+ *
+ * \return \herr_t
+ *
+ * \details H5Pget_link_creation_order() queries the group or file creation
+ * property list, \p plist_id, and returns a flag indicating whether
+ * link creation order is tracked and/or indexed in a group.
+ *
+ * See H5Pset_link_creation_order() for a list of valid creation
+ * order flags, as passed in \p crt_order_flags, and their
+ * meanings.
+ *
+ * \since 1.8.0
+ *
+ */
+H5_DLL herr_t H5Pget_link_creation_order(hid_t plist_id, unsigned *crt_order_flags /* out */);
+/**
+ * \ingroup GCPL
+ *
+ * \brief Queries the settings for conversion between compact and dense
+ * groups
+ *
+ * \gcpl_id{plist_id}
+ * \param[out] max_compact Maximum number of links for compact storage
+ * \param[out] min_dense Minimum number of links for dense storage
+ *
+ * \return \herr_t
+ *
+ * \details H5Pget_link_phase_change() queries the maximum number of
+ * entries for a compact group and the minimum number of links
+ * to require before converting a group to a dense form.
+ *
+ * In the compact format, links are stored as messages in the
+ * group’s header. In the dense format, links are stored in a
+ * fractal heap and indexed with a version 2 B-tree.
+ *
+ * \p max_compact is the maximum number of links to store as
+ * header messages in the group header before converting the
+ * group to the dense format. Groups that are in the compact
+ * format and exceed this number of links are automatically
+ * converted to the dense format.
+ *
+ * \p min_dense is the minimum number of links to store in the
+ * dense format. Groups which are in dense format and in which
+ * the number of links falls below this number are automatically
+ * converted back to the compact format.
+ *
+ * In the compact format, links are stored as messages in the
+ * group’s header. In the dense format, links are stored in a
+ * fractal heap and indexed with a version 2 B-tree.
+ *
+ * See H5Pset_link_phase_change() for a discussion of
+ * traditional, compact, and dense group storage.
+ *
+ * \since 1.8.0
+ *
+ */
+H5_DLL herr_t H5Pget_link_phase_change(hid_t plist_id, unsigned *max_compact /*out*/,
+ unsigned *min_dense /*out*/);
+/**
+ * \ingroup GCPL
+ *
+ * \brief Retrieves the anticipated size of the local heap for original-style
+ * groups
+ *
+ * \gcpl_id{plist_id}
+ * \param[out] size_hint Anticipated size of local heap
+ * \return \herr_t
+ *
+ * \details H5Pget_local_heap_size_hint() queries the group creation property
+ * list, \p plist_id, for the anticipated size of the local heap, \p
+ * size_hint, for original-style groups, i.e., for groups of the style
+ * used prior to HDF5 Release 1.8.0. See H5Pset_local_heap_size_hint()
+ * for further discussion.
+ *
+ * \since 1.8.0
+ *
+ */
+H5_DLL herr_t H5Pget_local_heap_size_hint(hid_t plist_id, size_t *size_hint /*out*/);
+/**
+ * \ingroup GCPL
+ *
+ * \brief Sets estimated number of links and length of link names in a group
+ *
+ * \gcpl_id{plist_id}
+ * \param[in] est_num_entries Estimated number of links to be inserted into group
+ * \param[in] est_name_len Estimated average length of link names
+ * \return \herr_t
+ *
+ * \details H5Pset_est_link_info() inserts two settings into the group creation
+ * property list plist_id: the estimated number of links that are
+ * expected to be inserted into a group created with the property list
+ * and the estimated average length of those link names.
+ *
+ * The estimated number of links is passed in \p est_num_entries. The
+ * limit for \p est_num_entries is 64 K.
+ *
+ * The estimated average length of the anticipated link names is passed
+ * in \p est_name_len. The limit for \p est_name_len is 64 K.
+ *
+ * The values for these two settings are multiplied to compute the
+ * initial local heap size (for old-style groups, if the local heap
+ * size hint is not set) or the initial object header size for
+ * (new-style compact groups; see \ref_group_impls). Accurately setting
+ * these parameters will help reduce wasted file space.
+ *
+ * If a group is expected to have many links and to be stored in dense
+ * format, set \p est_num_entries to 0 (zero) for maximum
+ * efficiency. This will prevent the group from being created in the
+ * compact format.
+ *
+ * See \ref_group_impls for a discussion of the available types of HDF5
+ * group structures.
+ *
+ * \since 1.8.0
+ *
+ */
+H5_DLL herr_t H5Pset_est_link_info(hid_t plist_id, unsigned est_num_entries, unsigned est_name_len);
+/**
+ * \ingroup GCPL
+ *
+ * \brief Sets creation order tracking and indexing for links in a group
+ *
+ * \param[in] plist_id Group or file creation property list
+ * identifier
+ * \param[out] crt_order_flags Creation order flag(s)
+ *
+ * \return \herr_t
+ *
+ * \details H5Pset_link_creation_order() sets flags for tracking and
+ * indexing links on creation order in groups created with the
+ * group (or file) creation property list \p plist_id.
+ *
+ * \p crt_order_flags contains flags with the following meanings:
+ *
+ *
+ *
+ * #H5P_CRT_ORDER_TRACKED |
+ * Link creation order is tracked but not necessarily
+ * indexed |
+ *
+ *
+ * #H5P_CRT_ORDER_INDEXED |
+ * Link creation order is indexed (requires
+ * #H5P_CRT_ORDER_TRACKED) |
+ *
+ *
+ *
+ * The default behavior is that links are tracked and indexed by
+ * name, and link creation order is neither tracked nor indexed.
+ * The name is always the primary index for links in a group.
+ *
+ * H5Pset_link_creation_order() can be used to set link creation
+ * order tracking, or to set link creation order tracking and
+ * indexing.
+ *
+ * If (#H5P_CRT_ORDER_TRACKED | #H5P_CRT_ORDER_INDEXED) is
+ * specified for \p crt_order_flags, then links will be tracked
+ * and indexed by creation order. The creation order is added as
+ * a secondary index and enables faster queries and iterations
+ * by creation order.
+ *
+ * If just #H5P_CRT_ORDER_TRACKED is specified for
+ * \p crt_order_flags, then links will be tracked by creation
+ * order, but not indexed by creation order. Queries and iterations
+ * by creation order will work but will be much slower for large
+ * groups than if #H5P_CRT_ORDER_INDEXED had been included.
+ *
+ * \note If a creation order index is to be built, it must be specified in
+ * the group creation property list. HDF5 currently provides no
+ * mechanism to turn on link creation order tracking at group
+ * creation time and to build the index later.
+ *
+ * \since 1.8.0
+ *
+ */
+H5_DLL herr_t H5Pset_link_creation_order(hid_t plist_id, unsigned crt_order_flags);
+/**
+ * \ingroup GCPL
+ *
+ * \brief Sets the parameters for conversion between compact and dense
+ * groups
+ *
+ * \gcpl_id{plist_id}
+ * \param[in] max_compact Maximum number of links for compact storage
+ * (\a Default: 8)
+ * \param[in] min_dense Minimum number of links for dense storage
+ * (\a Default: 6)
+ *
+ * \return \herr_t
+ *
+ * \details H5Pset_link_phase_change() sets the maximum number of entries
+ * for a compact group and the minimum number of links to allow
+ * before converting a dense group back to the compact format.
+ *
+ * \p max_compact is the maximum number of links to store as
+ * header messages in the group header before converting the
+ * group to the dense format. Groups that are in compact format
+ * and which exceed this number of links are automatically
+ * converted to dense format.
+ *
+ * \p min_dense is the minimum number of links to store in the
+ * dense format. Groups which are in dense format and in which
+ * the number of links falls below this threshold are
+ * automatically converted to compact format.
+ *
+ * \since 1.8.0
+ *
+ */
+H5_DLL herr_t H5Pset_link_phase_change(hid_t plist_id, unsigned max_compact, unsigned min_dense);
+/**
+ * \ingroup GCPL
+ *
+ * \brief Specifies the anticipated maximum size of a local heap
+ *
+ * \gcpl_id{plist_id}
+ * \param[in] size_hint Anticipated maximum size in bytes of local heap
+ * \return \herr_t
+ *
+ * \details H5Pset_local_heap_size_hint() is used with original-style HDF5
+ * groups (see “Motivation” below) to specify the anticipated maximum
+ * local heap size, size_hint, for groups created with the group
+ * creation property list \p plist_id. The HDF5 library then uses \p
+ * size_hint to allocate contiguous local heap space in the file for
+ * each group created with \p plist_id.
+ *
+ * For groups with many members or very few members, an appropriate
+ * initial value of \p size_hint would be the anticipated number of
+ * group members times the average length of group member names, plus a
+ * small margin:
+ * \code
+ * size_hint = max_number_of_group_members *
+ * (average_length_of_group_member_link_names + 2)
+ * \endcode
+ * If it is known that there will be groups with zero members, the use
+ * of a group creation property list with \p size_hint set to to 1 (one)
+ * will guarantee the smallest possible local heap for each of those groups.
+ *
+ * Setting \p size_hint to zero (0) causes the library to make a
+ * reasonable estimate for the default local heap size.
+ *
+ * \par Motivation:
+ * In situations where backward-compatibility is required, specifically, when
+ * libraries prior to HDF5 Release 1.8.0 may be used to read the file, groups
+ * must be created and maintained in the original style. This is HDF5’s default
+ * behavior. If backward compatibility with pre-1.8.0 libraries is not a concern,
+ * greater efficiencies can be obtained with the new-format compact and indexed
+ * groups. See Group
+ * implementations in HDF5 in the \ref H5G API introduction (at the bottom).\n
+ * H5Pset_local_heap_size_hint() is useful for tuning file size when files
+ * contain original-style groups with either zero members or very large
+ * numbers of members.\n
+ * The original style of HDF5 groups, the only style available prior to HDF5
+ * Release 1.8.0, was well-suited for moderate-sized groups but was not optimized
+ * for either very small or very large groups. This original style remains the
+ * default, but two new group implementations were introduced in HDF5 Release 1.8.0:
+ * compact groups to accommodate zero to small numbers of members and indexed groups
+ * for thousands or tens of thousands of members ... or millions, if that's what
+ * your application requires.\n
+ * The local heap size hint, \p size_hint, is a performance tuning parameter for
+ * original-style groups. As indicated above, an HDF5 group may have zero, a handful,
+ * or tens of thousands of members. Since the original style of HDF5 groups stores the
+ * metadata for all of these group members in a uniform format in a local heap, the size
+ * of that metadata (and hence, the size of the local heap) can vary wildly from group
+ * to group. To intelligently allocate space and to avoid unnecessary fragmentation of
+ * the local heap, it can be valuable to provide the library with a hint as to the local
+ * heap’s likely eventual size. This can be particularly valuable when it is known that
+ * a group will eventually have a great many members. It can also be useful in conserving
+ * space in a file when it is known that certain groups will never have any members.
+ *
+ * \since 1.8.0
+ *
+ */
+H5_DLL herr_t H5Pset_local_heap_size_hint(hid_t plist_id, size_t size_hint);
+
+/* Map access property list (MAPL) routines */
+#ifdef H5_HAVE_MAP_API
+/**
+ * \ingroup MAPL
+ *
+ * \brief Set map iteration hints
+ *
+ * \mapl_id
+ * \param[in] key_prefetch_size Number of keys to prefetch at a time during
+ * iteration
+ * \param[in] key_alloc_size The initial size of the buffer allocated to hold
+ * prefetched keys
+ * \return \herr_t
+ *
+ * \details H5Pset_map_iterate_hints() adjusts the behavior of H5Miterate() when
+ * prefetching keys for iteration. The \p key_prefetch_size parameter
+ * specifies the number of keys to prefetch at a time during
+ * iteration. The \p key_alloc_size parameter specifies the initial
+ * size of the buffer allocated to hold these prefetched keys. If this
+ * buffer is too small it will be reallocated to a larger size, though
+ * this may result in an additional I/O.
+ *
+ * \since 1.12.0
+ *
+ */
+H5_DLL herr_t H5Pset_map_iterate_hints(hid_t mapl_id, size_t key_prefetch_size, size_t key_alloc_size);
+/**
+ * \ingroup MAPL
+ *
+ * \brief Set map iteration hints
+ *
+ * \mapl_id
+ * \param[out] key_prefetch_size Pointer to number of keys to prefetch at a time
+ * during iteration
+ * \param[out] key_alloc_size Pointer to the initial size of the buffer allocated
+ * to hold prefetched keys
+ * \return \herr_t
+ *
+ * \details H5Pget_map_iterate() returns the map iterate hints, \p key_prefetch_size
+ * and \p key_alloc_size, as set by H5Pset_map_iterate_hints().
+ *
+ * \since 1.12.0
+ *
+ */
+H5_DLL herr_t H5Pget_map_iterate_hints(hid_t mapl_id, size_t *key_prefetch_size /*out*/,
+ size_t *key_alloc_size /*out*/);
+#endif /* H5_HAVE_MAP_API */
+
+/* String creation property list (STRCPL) routines */
+/**
+ * \ingroup ALCAPL
+ *
+ * \brief Retrieves the character encoding used to create a link or
+ * attribute name
+ *
+ * \param[in] plist_id Link creation or attribute creation property list
+ * identifier
+ * \param[out] encoding String encoding character set
+ *
+ * \return \herr_t
+ *
+ * \details H5Pget_char_encoding() retrieves the character encoding used
+ * to encode link or attribute names that are created with the
+ * property list \p plist_id.
+ *
+ * Valid values for \p encoding are defined in H5Tpublic.h and
+ * include the following:
+ *
+ * \csets
+ *
+ * \note H5Pget_char_encoding() retrieves the character set used for an
+ * HDF5 link or attribute name while H5Tget_cset() retrieves the
+ * character set used in a character or string datatype.
+ *
+ * \since 1.8.0
+ *
+ */
+H5_DLL herr_t H5Pget_char_encoding(hid_t plist_id, H5T_cset_t *encoding /*out*/);
+/**
+ * \ingroup ALCAPL
+ *
+ * \brief Sets the character encoding used to encode link and attribute
+ * names
+ *
+ * \param[in] plist_id Link creation or attribute creation property list
+ * identifier
+ * \param[in] encoding String encoding character set
+ *
+ * \return \herr_t
+ *
+ * \details H5Pset_char_encoding() sets the character encoding used for
+ * the names of links (which provide the names by which objects
+ * are referenced) or attributes created with the property list
+ * \p plist_id.
+ *
+ * Valid values for encoding include the following:
+ * \csets
+ * \details For example, if the character set for the property list
+ * \p plist_id is set to #H5T_CSET_UTF8, link names pointing to
+ * objects created with the link creation property list
+ * \p plist_id will be encoded using the UTF-8 character set.
+ * Similarly, names of attributes created with the attribute
+ * creation property list \p plist_id will be encoded as UTF-8.
+ *
+ * ASCII and UTF-8 Unicode are the only currently supported
+ * character encodings. Extended ASCII encodings (for example,
+ * ISO 8859) are not supported. This encoding policy is not
+ * enforced by the HDF5 library. Using encodings other than
+ * ASCII and UTF-8 can lead to compatibility and usability
+ * problems.
+ *
+ * \note H5Pset_char_encoding() sets the character set used for an
+ * HDF5 link or attribute name while H5Tset_cset() sets the
+ * character set used in a character or string datatype.
+ *
+ * \since 1.8.0
+ *
+ */
+H5_DLL herr_t H5Pset_char_encoding(hid_t plist_id, H5T_cset_t encoding);
+
+/* Link access property list (LAPL) routines */
+/**
+ * \ingroup LAPL
+ *
+ * \brief Retrieves the external link traversal file access flag from the
+ * specified link access property list
+ *
+ * \lapl_id
+ * \param[out] flags File access flag for link traversal
+ *
+ * \return \herr_t
+ *
+ * \details H5Pget_elink_acc_flags() retrieves the file access flag used
+ * to open an external link target file from the specified link
+ * access property list.
+ *
+ * Valid values for \p flags include:
+ * \li #H5F_ACC_RDWR - Files opened through external links will
+ * be opened with write access
+ * \li #H5F_ACC_RDONLY - Files opened through external links will
+ * be opened with read-only access
+ * \li #H5F_ACC_DEFAULT - Files opened through external links will
+ * be opened with the same access flag as
+ * the parent file
+ *
+ * The value returned, if it is not #H5F_ACC_DEFAULT, will
+ * override the default access flag, which is the access flag
+ * used to open the parent file.
+ *
+ * Example Usage:
+ * The following code retrieves the external link access flag
+ * settings on the link access property list \p lapl_id into a
+ * local variable:
+ *
+ * unsigned acc_flags;
+ * status = H5Pget_elink_acc_flags(lapl_id, &acc_flags);
+ *
+ *
+ * \since 1.8.3
+ *
+ */
+H5_DLL herr_t H5Pget_elink_acc_flags(hid_t lapl_id, unsigned *flags);
+/**
+ * \ingroup LAPL
+ *
+ * \brief Retrieves the external link traversal callback function from the
+ * specified link access property list
+ *
+ * \lapl_id
+ * \param[out] func User-defined external link traversal callback
+ * function
+ * \param[out] op_data User-defined input data for the callback function
+ *
+ * \return \herr_t
+ *
+ * \details H5Pget_elink_cb() retrieves the user-defined external link
+ * traversal callback function defined in the specified link
+ * access property list.
+ *
+ * The callback function may adjust the file access property
+ * list and file access flag to use when opening a file through
+ * an external link. The callback will be executed by the HDF5
+ * library immediately before opening the target file.
+ *
+ * Failure Modes: H5Pget_elink_cb() will fail if the link
+ * access property list identifier, \p lapl_id, is invalid.
+ *
+ * An invalid function pointer or data pointer, \p func or
+ * \p op_data respectively, may cause a segmentation fault or an
+ * invalid memory access.
+ *
+ * Example Usage: The following code retrieves the external
+ * link callback settings on the link access property list
+ * \p lapl_id into local variables:
+ *
+ * H5L_elink_traverse_t elink_callback_func;
+ * void *elink_callback_udata;
+ * status = H5Pget_elink_cb (lapl_id, &elink_callback_func,
+ * &elink_callback_udata);
+ *
+ *
+ * \since 1.8.3
+ *
+ */
+H5_DLL herr_t H5Pget_elink_cb(hid_t lapl_id, H5L_elink_traverse_t *func, void **op_data);
+/**
+ * \ingroup LAPL
+ *
+ * \brief Retrieves the file access property list identifier associated
+ * with the link access property list
+ *
+ * \lapl_id
+ *
+ * \return \hid_t{file access property list}
+ *
+ * \details H5Pget_elink_fapl() retrieves the file access property list
+ * identifier that is set for the link access property list
+ * identifier, \p lapl_id. The library uses this file access
+ * property list identifier to open the target file for the
+ * external link access. When no such identifier is set, this
+ * routine returns #H5P_DEFAULT.
+ *
+ * \see H5Pset_elink_fapl() and H5Lcreate_external().
+ *
+ * \since 1.8.0
+ *
+ */
+H5_DLL hid_t H5Pget_elink_fapl(hid_t lapl_id);
+/**
+ * \ingroup LAPL
+ *
+ * \brief Retrieves prefix applied to external link paths
+ *
+ * \lapl_id{plist_id}
+ * \param[out] prefix Prefix applied to external link paths
+ * \param[in] size Size of prefix, including null terminator
+ *
+ * \return If successful, returns a non-negative value specifying the size
+ * in bytes of the prefix without the NULL terminator; otherwise
+ * returns a negative value.
+ *
+ * \details H5Pget_elink_prefix() retrieves the prefix applied to the
+ * path of any external links traversed.
+ *
+ * When an external link is traversed, the prefix is retrieved
+ * from the link access property list \p plist_id, returned in
+ * the user-allocated buffer pointed to by \p prefix, and
+ * prepended to the filename stored in the external link.
+ *
+ * The size in bytes of the prefix, including the NULL terminator,
+ * is specified in \p size. If size is unknown, a preliminary
+ * H5Pget_elink_prefix() call with the pointer \p prefix set to
+ * NULL will return the size of the prefix without the NULL
+ * terminator.
+ *
+ * \since 1.8.0
+ *
+ */
+H5_DLL ssize_t H5Pget_elink_prefix(hid_t plist_id, char *prefix, size_t size);
+/**
+ * \ingroup LAPL
+ *
+ * \brief Retrieves the maximum number of link traversals
+ *
+ * \lapl_id{plist_id}
+ * \param[out] nlinks Maximum number of links to traverse
+ *
+ * \return \herr_t
+ *
+ * \details H5Pget_nlinks() retrieves the maximum number of soft or
+ * user-defined link traversals allowed, \p nlinks, before the
+ * library assumes it has found a cycle and aborts the traversal.
+ * This value is retrieved from the link access property list
+ * \p plist_id.
+ *
+ * The limit on the number of soft or user-defined link traversals
+ * is designed to terminate link traversal if one or more links
+ * form a cycle. User control is provided because some files may
+ * have legitimate paths formed of large numbers of soft or
+ * user-defined links. This property can be used to allow
+ * traversal of as many links as desired.
+ *
+ * \since 1.8.0
+ *
+ */
+H5_DLL herr_t H5Pget_nlinks(hid_t plist_id, size_t *nlinks);
+/**
+ * \ingroup LAPL
+ *
+ * \brief Sets the external link traversal file access flag in a link
+ * access property list
+ *
+ * \lapl_id
+ * \param[in] flags The access flag for external link traversal
+ *
+ * \return \herr_t
+ *
+ * \details H5Pset_elink_acc_flags() specifies the file access flag to use
+ * to open the target file of an external link. This allows
+ * read-only access of files reached through an external link in
+ * a file opened with write access, or vice-versa.
+ *
+ * Valid values for \p flags include:
+ * \li #H5F_ACC_RDWR - Causes files opened through external links
+ * to be opened with write access
+ * \li #H5F_ACC_RDONLY - Causes files opened through external
+ * links to be opened with read-only access
+ * \li #H5F_ACC_DEFAULT - Removes any external link file access
+ * flag setting from \p lapl_id, causing the file access flag
+ * setting to be taken from the parent file
+ *
+ * The library will normally use the file access flag used to
+ * open the parent file as the file access flag for the target
+ * file. This function provides a way to override that behavior.
+ * The external link traversal callback function set by
+ * H5Pset_elink_cb() can override the setting from
+ * H5Pset_elink_acc_flags().
+ *
+ * Motivation: H5Pset_elink_acc_flags() is used to adjust the
+ * file access flag used to open files reached through external links.
+ * This may be useful to, for example, prevent modifying files
+ * accessed through an external link. Otherwise, the target file is
+ * opened with whatever flag was used to open the parent.
+ *
+ * Example Usage: The following code sets the link access
+ * property list \p lapl_id to open external link target files with
+ * read-only access:
+ *
+ * status = H5Pset_elink_acc_flags(lapl_id, H5F_ACC_RDONLY);
+ *
+ *
+ * \since 1.8.3
+ *
+ */
+H5_DLL herr_t H5Pset_elink_acc_flags(hid_t lapl_id, unsigned flags);
+/**
+ * \ingroup LAPL
+ *
+ * \brief Sets the external link traversal callback function in a link
+ * access property list
+ *
+ * \lapl_id
+ * \param[in] func User-defined external link traversal callback
+ * function
+ * \param[in] op_data User-defined input data for the callback function
+ *
+ * \return \herr_t
+ *
+ * \details H5Pset_elink_cb() sets a user-defined external link traversal
+ * callback function in the link access property list \p lapl_id.
+ * The callback function \p func must conform to the prototype
+ * specified in #H5L_elink_traverse_t.
+ *
+ * The callback function may adjust the file access property
+ * list and file access flags to use when opening a file through
+ * an external link. The callback will be executed by the HDF5
+ * library immediately before opening the target file.
+ *
+ * The callback will be made after the file access property list
+ * set by H5Pset_elink_fapl() and the file access flag set by
+ * H5Pset_elink_acc_flags() are applied, so changes made by this
+ * callback function will take precedence.
+ *
+ * \attention A file close degree property setting (H5Pset_fclose_degree())
+ * in this callback function or an associated property list will
+ * be ignored. A file opened by means of traversing an external
+ * link is always opened with the weak file close degree
+ * property setting, #H5F_CLOSE_WEAK.
+ *
+ * Motivation: H5Pset_elink_cb() is used to specify a
+ * callback function that is executed by the HDF5 library when
+ * traversing an external link. This provides a mechanism to set
+ * specific access permissions, modify the file access property
+ * list, modify the parent or target file, or take any other
+ * user-defined action. This callback function is used in
+ * situations where the HDF5 library's default behavior is not
+ * suitable.
+ *
+ * Failure Modes: H5Pset_elink_cb() will fail if the link
+ * access property list identifier, \p lapl_id, is invalid or if
+ * the function pointer, \p func, is NULL.
+ *
+ * An invalid function pointer, \p func, will cause a segmentation
+ * fault or other failure when an attempt is subsequently made to
+ * traverse an external link.
+ *
+ * Example Usage:
+ * This example defines a callback function that prints the name
+ * of the target file every time an external link is followed, and
+ * sets this callback function on \p lapl_id.
+ *
+ * herr_t elink_callback(const char *parent_file_name, const char
+ * *parent_group_name, const char *child_file_name, const char
+ * *child_object_name, unsigned *acc_flags, hid_t fapl_id, void *op_data) {
+ * puts(child_file_name);
+ * return 0;
+ * }
+ * int main(void) {
+ * hid_t lapl_id = H5Pcreate(H5P_LINK_ACCESS);
+ * H5Pset_elink_cb(lapl_id, elink_callback, NULL);
+ * ...
+ * }
+ *
+ *
+ *
+ * \since 1.8.3
+ *
+ */
+H5_DLL herr_t H5Pset_elink_cb(hid_t lapl_id, H5L_elink_traverse_t func, void *op_data);
+/**
+ * \ingroup LAPL
+ *
+ * \brief Sets a file access property list for use in accessing a file
+ * pointed to by an external link
+ *
+ * \lapl_id
+ * \fapl_id
+ *
+ * \return \herr_t
+ *
+ * \details H5Pset_elink_fapl() sets the file access property list,
+ * \p fapl_id, to be used when accessing the target file of an
+ * external link associated with \p lapl_id.
+ *
+ * \since 1.8.0
+ *
+ */
+H5_DLL herr_t H5Pset_elink_fapl(hid_t lapl_id, hid_t fapl_id);
+/**
+ * \ingroup LAPL
+ *
+ * \brief Sets prefix to be applied to external link paths
+ *
+ * \lapl_id{plist_id}
+ * \param[in] prefix Prefix to be applied to external link paths
+ *
+ * \return \herr_t
+ *
+ * \details H5Pset_elink_prefix() sets the prefix to be applied to the
+ * path of any external links traversed. The prefix is prepended
+ * to the filename stored in the external link.
+ *
+ * The prefix is specified in the user-allocated buffer \p prefix
+ * and set in the link access property list \p plist_id. The buffer
+ * should not be freed until the property list has been closed.
+ *
+ * \since 1.8.0
+ *
+ */
+H5_DLL herr_t H5Pset_elink_prefix(hid_t plist_id, const char *prefix);
+/**
+ * \ingroup LAPL
+ *
+ * \brief Sets maximum number of soft or user-defined link traversals
+ *
+ * \lapl_id{plist_id}
+ * \param[in] nlinks Maximum number of links to traverse
+ *
+ * \return \herr_t
+ *
+ * \details H5Pset_nlinks() sets the maximum number of soft or user-defined
+ * link traversals allowed, \p nlinks, before the library assumes
+ * it has found a cycle and aborts the traversal. This value is
+ * set in the link access property list \p plist_id.
+ *
+ * The limit on the number of soft or user-defined link traversals
+ * is designed to terminate link traversal if one or more links
+ * form a cycle. User control is provided because some files may
+ * have legitimate paths formed of large numbers of soft or
+ * user-defined links. This property can be used to allow
+ * traversal of as many links as desired.
+ *
+ * \since 1.8.0
+ *
+ */
+H5_DLL herr_t H5Pset_nlinks(hid_t plist_id, size_t nlinks);
+
+/* Object copy property list (OCPYPL) routines */
+/**
+ * \ingroup OCPPL
+ *
+ * \brief Adds a path to the list of paths that will be searched in the
+ * destination file for a matching committed datatype
+ *
+ * \param[in] plist_id Object copy property list identifier
+ * \param[in] path The path to be added
+ *
+ * \return \herr_t
+ *
+ * \details H5Padd_merge_committed_dtype_path() adds a path, \p path,
+ * which points to a committed datatype, to the current list of
+ * suggested paths stored in the object copy property list
+ * \p plist_id. The search as described in the next paragraph is
+ * effective only if the #H5O_COPY_MERGE_COMMITTED_DTYPE_FLAG is
+ * enabled in the object copy property list via
+ * H5Pset_copy_object().
+ *
+ * When copying a committed datatype, a dataset with a committed
+ * datatype, or an object with an attribute of a committed
+ * datatype, the default behavior of H5Ocopy() is to search for
+ * a matching committed datatype:
+ *
+ * - First search the list of suggested paths in the object
+ * copy property list.
+ * - Then, if no match has been found, search all the committed
+ * datatypes in the destination file.
+ *
+ * The default Step 2 in this search process can be changed by
+ * setting a callback function (see H5Pset_mcdt_search_cb()).
+ *
+ * Two datatypes are determined equal if their descriptions are
+ * identical, in a manner similar to H5Tequal(). If either
+ * committed datatype has one or more attributes, then all
+ * attributes must be present in both committed datatypes and they
+ * must be identical. Two attributes are considered identical if
+ * their datatype description, dataspace, and raw data values are
+ * the same. However, if an attribute uses a committed datatype,
+ * that committed datatype’s attributes will not be compared.
+ *
+ * If a match is found, H5Ocopy() will perform the following in
+ * the destination file:
+ * \li For a committed datatype, the library will create a hard
+ * link to the found datatype.
+ * \li For a dataset that uses a committed datatype, the library
+ * will modify the copied dataset to use the found committed
+ * datatype as its datatype.
+ * \li For an object with an attribute of a committed datatype,
+ * the library will modify the copied object’s attribute to
+ * use the found committed datatype as its datatype.
+ *
+ * If no match is found, H5Ocopy() will perform the following in
+ * the destination file:
+ * \li For a committed datatype, the library will copy it as it
+ * would any other object, creating a named committed
+ * datatype at the destination. That is, the library will
+ * create a committed datatype that is accessible in the
+ * file by a unique path.
+ * \li For a dataset that uses a committed datatype, the
+ * library will copy the datatype as an anonymous
+ * committed datatype and use that as the dataset’s
+ * datatype.
+ * \li For an object with an attribute of a committed datatype,
+ * the library will copy the datatype as an anonymous
+ * committed datatype and use that as the attribute’s
+ * datatype.
+ *
+ * \b Motivation: H5Padd_merge_committed_dtype_path() provides a
+ * means to override the default behavior of H5Ocopy() when
+ * #H5O_COPY_MERGE_COMMITTED_DTYPE_FLAG is set in an object
+ * copy property list.
+ * H5Padd_merge_committed_dtype_path() is the mechanism for
+ * suggesting search paths where H5Ocopy() will look for a
+ * matching committed datatype. This can be substantially
+ * faster than the default approach of searching the entire
+ * destination file for a match.
+ *
+ * \b Example \b Usage: This example adds two paths to the object
+ * copy property list. H5Ocopy() will search the two suggested
+ * paths for a match before searching all the committed datatypes
+ * in the destination file.
+ *
+ *
+ * int main(void) {
+ * hid_t ocpypl_id = H5Pcreate(H5P_OBJECT_COPY);
+ *
+ * H5Pset_copy_object(ocpypl_id, H5O_COPY_MERGE_COMMITTED_DTYPE_FLAG);
+ * H5Padd_merge_committed_dtype_path(ocpypl_id, "/group/committed_dtypeA");
+ * H5Padd_merge_committed_dtype_path(ocpypl_id, "/group2/committed_dset");
+ * H5Ocopy(...ocpypl_id...);
+ * ...
+ * ...
+ * }
+ *
+ *
+ * \note H5Padd_merge_committed_dtype_path() will fail if the object
+ * copy property list is invalid.
+ * It will also fail if there is insufficient memory when
+ * duplicating \p path.
+ *
+ * \see
+ * \li H5Ocopy()
+ * \li #H5O_mcdt_search_cb_t
+ * \li H5Padd_merge_committed_dtype_path()
+ * \li H5Pfree_merge_committed_dtype_paths()
+ * \li H5Pget_mcdt_search_cb()
+ * \li H5Pset_copy_object()
+ * \li H5Pset_mcdt_search_cb()
+ * \li \ref_h5ocopy
+ *
+ * \since 1.8.9
+ *
+ */
+H5_DLL herr_t H5Padd_merge_committed_dtype_path(hid_t plist_id, const char *path);
+/**
+ * \ingroup OCPPL
+ *
+ * \brief Clears the list of paths stored in the object copy property list
+ *
+ * \param[in] plist_id Object copy property list identifier
+ *
+ * \return \herr_t
+ *
+ * \details H5Pfree_merge_committed_dtype_paths() clears the suggested
+ * paths stored in the object copy property list \p plist_id.
+ * These are the suggested paths previously set with
+ * H5Padd_merge_committed_dtype_path().
+ *
+ * \b Example \b Usage: This example adds a suggested path to the
+ * object copy property list, does the copy, clears the list, and
+ * then adds a new suggested path to the list for another copy.
+ *
+ *
+ * int main(void) {
+ * hid_t ocpypl_id = H5Pcreate(H5P_OBJECT_COPY);
+ *
+ * H5Pset_copy_object(ocpypl_id, H5O_COPY_MERGE_COMMITTED_DTYPE_FLAG);
+ * H5Padd_merge_committed_dtype_path(ocpypl_id, "/group/committed_dtypeA");
+ * H5Ocopy(...ocpypl_id...);
+ * ...
+ * ...
+ * H5Pfree_merge_committed_dtype_paths(ocpypl_id);
+ * H5Padd_merge_committed_dtype_path(ocpypl_id, "/group2/committed_dtypeB");
+ * H5Ocopy(...ocpypl_id...);
+ * ...
+ * ...
+ * }
+ *
+ *
+ * \note H5Pfree_merge_committed_dtype_paths() will fail if the
+ * object copy property list is invalid.
+ *
+ * \see
+ * \li H5Ocopy()
+ * \li #H5O_mcdt_search_cb_t
+ * \li H5Padd_merge_committed_dtype_path()
+ * \li H5Pfree_merge_committed_dtype_paths()
+ * \li H5Pget_mcdt_search_cb()
+ * \li H5Pset_copy_object()
+ * \li H5Pset_mcdt_search_cb()
+ *
+ * \since 1.8.9
+ *
+ */
+H5_DLL herr_t H5Pfree_merge_committed_dtype_paths(hid_t plist_id);
+/**
+ * \ingroup OCPPL
+ *
+ * \brief Retrieves the properties to be used when an object is copied
+ *
+ * \param[in] plist_id Object copy property list identifier
+ * \param[out] copy_options Copy option(s) set in the object copy property
+ * list
+ *
+ * \return \herr_t
+ *
+ * \details H5Pget_copy_object() retrieves the properties currently
+ * specified in the object copy property list \p plist_id, which
+ * will be invoked when a new copy is made of an existing object.
+ *
+ * \p copy_options is a bit map indicating the flags, or
+ * properties, governing object copying that are set in the
+ * property list \p plist_id.
+ *
+ * The available flags are described in H5Pset_copy_object().
+ *
+ * \since 1.8.0
+ *
+ */
+H5_DLL herr_t H5Pget_copy_object(hid_t plist_id, unsigned *copy_options /*out*/);
+/**
+ * \ingroup OCPPL
+ *
+ * \brief Retrieves the callback function from the specified object copy
+ * property list
+ *
+ * \param[in] plist_id Object copy property list identifier
+ * \param[out] func User-defined callback function
+ * \param[out] op_data User-defined data for the callback
+ * function
+ *
+ * \return \herr_t
+ *
+ * \details H5Pget_mcdt_search_cb() retrieves the user-defined callback
+ * function and the user data that are set via
+ * H5Pset_mcdt_search_cb() in the object copy property list
+ * \p plist_id.
+ *
+ * The callback function will be returned in the parameter \p func
+ * and the user data will be returned in the parameter \p op_data.
+ *
+ * \note H5Pget_mcdt_search_cb() will fail if the object copy property
+ * list is invalid.
+ *
+ * \see
+ * \li H5Ocopy()
+ * \li #H5O_mcdt_search_cb_t
+ * \li H5Padd_merge_committed_dtype_path()
+ * \li H5Pfree_merge_committed_dtype_paths()
+ * \li H5Pget_mcdt_search_cb()
+ * \li H5Pset_copy_object()
+ * \li H5Pset_mcdt_search_cb()
+ * \li \ref_h5ocopy
+ *
+ * \since 1.8.9
+ *
+ */
+H5_DLL herr_t H5Pget_mcdt_search_cb(hid_t plist_id, H5O_mcdt_search_cb_t *func, void **op_data);
+/**
+ * \ingroup OCPPL
+ *
+ * \brief Sets properties to be used when an object is copied
+ *
+ * \param[in] plist_id Object copy property list identifier
+ * \param[out] copy_options Copy option(s) to be set
+ *
+ * \return \herr_t
+ *
+ * \details H5Pset_copy_object() sets properties in the object copy
+ * property list \p plist_id. When an existing object is copied,
+ * that property list will determine how the new copy is created.
+ *
+ * The following flags are available for use in an object copy
+ * property list:
+ *
+ *
+ *
+ * #H5O_COPY_SHALLOW_HIERARCHY_FLAG |
+ * Copy only immediate members of a group
+ * Default behavior, without flag: Recursively
+ * copy all objects in and below the group. |
+ *
+ *
+ * #H5O_COPY_EXPAND_SOFT_LINK_FLAG |
+ * Expand soft links into new objects
+ * Default behavior, without flag: Copy soft
+ * links as they are. |
+ *
+ *
+ * #H5O_COPY_EXPAND_EXT_LINK_FLAG |
+ * Expand external link into new objects
+ * Default behavior, without flag: Copy external
+ * links as they are. |
+ *
+ *
+ * #H5O_COPY_EXPAND_REFERENCE_FLAG |
+ * Copy objects that are pointed to by references and
+ * update reference values in destination file
+ * Default behavior, without flag: Set reference
+ * values in destination file to zero (0) |
+ *
+ *
+ * #H5O_COPY_WITHOUT_ATTR_FLAG |
+ * Copy object without copying attributes
+ * Default behavior, without flag: Copy object
+ * with all its attributes |
+ *
+ *
+ * #H5O_COPY_MERGE_COMMITTED_DTYPE_FLAG |
+ * Use a matching committed datatype in the destination
+ * file when copying a committed datatype, a dataset with
+ * a committed datatype, or an object with an attribute
+ * of committed datatype
+ * Default behavior without flag:
+ *
+ * \li A committed datatype in the source will be copied to
+ * the destination as a committed datatype.
+ * \li If a dataset in the source uses a committed
+ * datatype or an object in the source has an attribute
+ * of a committed datatype, that committed datatype will
+ * be written to the destination as an anonymous
+ * committed datatype.
+ * If copied in a single H5Ocopy() operation, objects
+ * that share a committed datatype in the source will
+ * share an anonymous committed dataype in the
+ * destination copy. Subsequent H5Ocopy() operations,
+ * however, will be unaware of prior anonymous committed
+ * dataypes and will create new ones.
+ *
+ * See the “See Also” section immediately below for
+ * functions related to the use of this flag. |
+ *
+ *
+ *
+ * \see
+ * Functions and a callback function used to tune committed datatype
+ * copying behavior:
+ * \li #H5O_mcdt_search_cb_t
+ * \li H5Padd_merge_committed_dtype_path()
+ * \li H5Pfree_merge_committed_dtype_paths()
+ * \li H5Pget_mcdt_search_cb()
+ * \li H5Pset_copy_object()
+ * \li H5Pset_mcdt_search_cb()
+ * \li \ref_h5ocopy
+ *
+ * \version 1.8.9 #H5O_COPY_MERGE_COMMITTED_DTYPE_FLAG added in this release.
+ *
+ * \since 1.8.0
+ *
+ */
+H5_DLL herr_t H5Pset_copy_object(hid_t plist_id, unsigned copy_options);
+/**
+ * \ingroup OCPPL
+ *
+ * \brief Sets the callback function that H5Ocopy() will invoke before
+ * searching the entire destination file for a matching committed
+ * datatype
+ *
+ * \param[in] plist_id Object copy property list identifier
+ * \param[in] func User-defined callback function
+ * \param[in] op_data User-defined input data for the callback function
+ *
+ * \return \herr_t
+ *
+ * \details H5Pset_mcdt_search_cb() allows an application to set a
+ * callback function, \p func, that will be invoked before
+ * searching the destination file for a matching committed
+ * datatype. The default, global search process is described in
+ * H5Padd_merge_committed_dtype_path().
+ *
+ * The callback function must conform to the #H5O_mcdt_search_cb_t
+ * prototype and will return an instruction for one of the
+ * following actions:
+ *
+ * \li Continue the search for a matching committed datatype in
+ * the destination file.
+ * \li Discontinue the search for a matching committed datatype.
+ * H5Ocopy() will then apply the default behavior of creating
+ * an anonymous committed datatype.
+ * \li Abort the copy operation and exit H5Ocopy().
+ *
+ * \b Motivation: H5Pset_mcdt_search_cb() provides the means to
+ * define a callback function. An application can then use that
+ * callback to take an additional action before the default search
+ * of all committed datatypes in the destination file or to take an
+ * action that replaces the default search. This mechanism is
+ * intended to improve performance when the global search might
+ * take a long time.
+ *
+ * \b Example \b Usage: This example defines a callback function in
+ * the object copy property list.
+ *
+ *
+ * static H5O_mcdt_search_ret_t
+ * mcdt_search_cb(void *_udata)
+ * {
+ * H5O_mcdt_search_ret_t action = *((H5O_mcdt_search_ret_t *)_udata);
+ *
+ * return(action);
+ * }
+ *
+ * int main(void) {
+ * hid_t ocpypl_id = H5Pcreate(H5P_OBJECT_COPY);
+ *
+ * H5Pset_copy_object(ocpypl_id, H5O_COPY_MERGE_COMMITTED_DTYPE_FLAG);
+ * H5Padd_merge_committed_dtype_path(ocpypl_id, "/group/committed_dtypeA");
+ *
+ * action = H5O_MCDT_SEARCH_STOP;
+ * H5Pset_mcdt_search_cb(ocpypl_id, mcdt_search_cb, &action);
+ * H5Ocopy(...ocpypl_id...);
+ * ...
+ * ...
+ * }
+ *
+ *
+ * \note H5Pset_mcdt_search_cb() will fail if the
+ * object copy property list is invalid.
+ *
+ * \warning If the callback function return value causes H5Ocopy() to
+ * abort, the destination file may be left in an inconsistent or
+ * corrupted state.
+ *
+ * \see
+ * \li H5Ocopy()
+ * \li #H5O_mcdt_search_cb_t
+ * \li H5Padd_merge_committed_dtype_path()
+ * \li H5Pfree_merge_committed_dtype_paths()
+ * \li H5Pget_mcdt_search_cb()
+ * \li H5Pset_copy_object()
+ * \li H5Pset_mcdt_search_cb()
+ * \li \ref_h5ocopy
+ *
+ * \since 1.8.9
+ *
+ */
+H5_DLL herr_t H5Pset_mcdt_search_cb(hid_t plist_id, H5O_mcdt_search_cb_t func, void *op_data);
+
+/* Symbols defined for compatibility with previous versions of the HDF5 API.
+ *
+ * Use of these symbols is deprecated.
+ */
+#ifndef H5_NO_DEPRECATED_SYMBOLS
+
/* Macros */
/* We renamed the "root" of the property list class hierarchy */
#define H5P_NO_CLASS H5P_ROOT
/* Typedefs */
+/**
+ * \ingroup GPLOA
+ *
+ * \brief Registers a permanent property with a property list class
+ *
+ * \plistcls_id{cls_id}
+ * \param[in] name Name of property to register
+ * \param[in] size Size of property in bytes
+ * \param[in] def_value Default value for property in newly created
+ * property lists
+ * \param[in] prp_create Callback routine called when a property list is
+ * being created and the property value will be
+ * initialized
+ * \param[in] prp_set Callback routine called before a new value is
+ * copied into the property's value
+ * \param[in] prp_get Callback routine called when a property value is
+ * retrieved from the property
+ * \param[in] prp_del Callback routine called when a property is deleted
+ * from a property list
+ * \param[in] prp_copy Callback routine called when a property is copied
+ * from a property list
+ * \param[in] prp_close Callback routine called when a property list is
+ * being closed and the property value will be
+ * disposed of
+ *
+ * \return \herr_t
+ *
+ * \deprecated As of HDF5-1.8 this function was deprecated in favor of
+ * H5Pregister2() or the macro H5Pregister().
+ *
+ * \details H5Pregister1() registers a new property with a property list
+ * class. The property will exist in all property list objects
+ * of that class after this routine is finished. The name of
+ * the property must not already exist. The default property
+ * value must be provided and all new property lists created
+ * with this property will have the property value set to the
+ * default provided. Any of the callback routines may be set
+ * to NULL if they are not needed.
+ *
+ * Zero-sized properties are allowed and do not store any data in
+ * the property list. These may be used as flags to indicate the
+ * presence or absence of a particular piece of information. The
+ * default pointer for a zero-sized property may be set to NULL.
+ * The property \p prp_create and \p prp_close callbacks are called for
+ * zero-sized properties, but the \p prp_set and \p prp_get callbacks
+ * are never called.
+ *
+ * The \p prp_create routine is called when a new property list with
+ * this property is being created. The #H5P_prp_create_func_t
+ * callback function is defined as #H5P_prp_cb1_t.
+ *
+ * The \p prp_create routine may modify the value to be set and those
+ * changes will be stored as the initial value of the property.
+ * If the \p prp_create routine returns a negative value, the new
+ * property value is not copied into the property and the
+ * \p prp_create routine returns an error value.
+ *
+ * The \p prp_set routine is called before a new value is copied into
+ * the property. The #H5P_prp_set_func_t callback function is defined
+ * as #H5P_prp_cb2_t.
+ *
+ * The \p prp_set routine may modify the value pointer to be set and
+ * those changes will be used when setting the property's value.
+ * If the \p prp_set routine returns a negative value, the new property
+ * value is not copied into the property and the \p prp_set routine
+ * returns an error value. The \p prp_set routine will not be called
+ * for the initial value; only the \p prp_create routine will be
+ * called.
+ *
+ * \b Note: The \p prp_set callback function may be useful to range
+ * check the value being set for the property or may perform some
+ * transformation or translation of the value set. The \p prp_get
+ * callback would then reverse the transformation or translation.
+ * A single \p prp_get or \p prp_set callback could handle multiple
+ * properties by performing different actions based on the property
+ * name or other properties in the property list.
+ *
+ * The \p prp_get routine is called when a value is retrieved from a
+ * property value. The #H5P_prp_get_func_t callback function is
+ * defined as #H5P_prp_cb2_t.
+ *
+ * The \p prp_get routine may modify the value to be returned from the
+ * query and those changes will be returned to the calling routine.
+ * If the \p prp_set routine returns a negative value, the query
+ * routine returns an error value.
+ *
+ * The \p prp_del routine is called when a property is being
+ * deleted from a property list. The #H5P_prp_delete_func_t
+ * callback function is defined as #H5P_prp_cb2_t.
+ *
+ * The \p prp_del routine may modify the value passed in, but the
+ * value is not used by the library when the \p prp_del routine
+ * returns. If the \p prp_del routine returns a negative value,
+ * the property list deletion routine returns an error value but
+ * the property is still deleted.
+ *
+ * The \p prp_copy routine is called when a new property list with
+ * this property is being created through a \p prp_copy operation.
+ * The #H5P_prp_copy_func_t callback function is defined as
+ * #H5P_prp_cb1_t.
+ *
+ * The \p prp_copy routine may modify the value to be set and those
+ * changes will be stored as the new value of the property. If
+ * the \p prp_copy routine returns a negative value, the new
+ * property value is not copied into the property and the \p prp_copy
+ * routine returns an error value.
+ *
+ * The \p prp_close routine is called when a property list with this
+ * property is being closed. The #H5P_prp_close_func_t callback
+ * function is defined as #H5P_prp_cb1_t.
+ *
+ * The \p prp_close routine may modify the value passed in, but the
+ * value is not used by the library when the \p prp_close routine
+ * returns. If the \p prp_close routine returns a negative value, the
+ * property list close routine returns an error value but the property
+ * list is still closed.
+ *
+ * The #H5P_prp_cb1_t is as follows:
+ * \snippet this H5P_prp_cb1_t_snip
+ *
+ * The #H5P_prp_cb2_t is as follows:
+ * \snippet this H5P_prp_cb2_t_snip
+ *
+ *
+ * \cpp_c_api_note
+ *
+ */
/* Function prototypes */
-H5_DLL herr_t H5Pregister1(hid_t cls_id, const char *name, size_t size, void *def_value,
- H5P_prp_create_func_t prp_create, H5P_prp_set_func_t prp_set,
- H5P_prp_get_func_t prp_get, H5P_prp_delete_func_t prp_del,
- H5P_prp_copy_func_t prp_copy, H5P_prp_close_func_t prp_close);
-H5_DLL herr_t H5Pinsert1(hid_t plist_id, const char *name, size_t size, void *value,
- H5P_prp_set_func_t prp_set, H5P_prp_get_func_t prp_get,
- H5P_prp_delete_func_t prp_delete, H5P_prp_copy_func_t prp_copy,
- H5P_prp_close_func_t prp_close);
-H5_DLL herr_t H5Pencode1(hid_t plist_id, void *buf, size_t *nalloc);
+H5_DLL herr_t H5Pregister1(hid_t cls_id, const char *name, size_t size, void *def_value,
+ H5P_prp_create_func_t prp_create, H5P_prp_set_func_t prp_set,
+ H5P_prp_get_func_t prp_get, H5P_prp_delete_func_t prp_del,
+ H5P_prp_copy_func_t prp_copy, H5P_prp_close_func_t prp_close);
+/**
+ * \ingroup GPLOA
+ *
+ * \brief Registers a temporary property with a property list
+ *
+ * \plist_id
+ * \param[in] name Name of property to create
+ * \param[in] size Size of property in bytes
+ * \param[in] value Initial value for the property
+ * \param[in] prp_set Callback routine called before a new value is copied
+ * into the property's value
+ * \param[in] prp_get Callback routine called when a property value is
+ * retrieved from the property
+ * \param[in] prp_delete Callback routine called when a property is deleted
+ * from a property list
+ * \param[in] prp_copy Callback routine called when a property is copied
+ * from an existing property list
+ * \param[in] prp_close Callback routine called when a property list is
+ * being closed and the property value will be disposed
+ * of
+ *
+ * \return \herr_t
+ *
+ * \deprecated As of HDF5-1.8 this function was deprecated in favor of
+ * H5Pinsert2() or the macro H5Pinsert().
+ *
+ * \details H5Pinsert1() creates a new property in a property
+ * list. The property will exist only in this property list and
+ * copies made from it.
+ *
+ * The initial property value must be provided in \p value and
+ * the property value will be set accordingly.
+ *
+ * The name of the property must not already exist in this list,
+ * or this routine will fail.
+ *
+ * The \p prp_set and \p prp_get callback routines may be set to NULL
+ * if they are not needed.
+ *
+ * Zero-sized properties are allowed and do not store any data
+ * in the property list. The default value of a zero-size
+ * property may be set to NULL. They may be used to indicate the
+ * presence or absence of a particular piece of information.
+ *
+ * The \p prp_set routine is called before a new value is copied
+ * into the property. The #H5P_prp_set_func_t callback function
+ * is defined as #H5P_prp_cb2_t.
+ * The \p prp_set routine may modify the value pointer to be set and
+ * those changes will be used when setting the property's value.
+ * If the \p prp_set routine returns a negative value, the new property
+ * value is not copied into the property and the \p set routine
+ * returns an error value. The \p prp_set routine will be called for
+ * the initial value.
+ *
+ * \b Note: The \p prp_set callback function may be useful to range
+ * check the value being set for the property or may perform some
+ * transformation or translation of the value set. The \p prp_get
+ * callback would then reverse the transformation or translation.
+ * A single \p prp_get or \p prp_set callback could handle multiple
+ * properties by performing different actions based on the
+ * property name or other properties in the property list.
+ *
+ * The \p prp_get routine is called when a value is retrieved from
+ * a property value. The #H5P_prp_get_func_t callback function
+ * is defined as #H5P_prp_cb2_t.
+ *
+ * The \p prp_get routine may modify the value to be returned from
+ * the query and those changes will be preserved. If the \p prp_get
+ * routine returns a negative value, the query routine returns
+ * an error value.
+ *
+ * The \p prp_delete routine is called when a property is being
+ * deleted from a property list. The #H5P_prp_delete_func_t
+ * callback function is defined as #H5P_prp_cb2_t.
+ *
+ * The \p prp_copy routine is called when a new property list with
+ * this property is being created through a \p prp_copy operation.
+ * The #H5P_prp_copy_func_t callback function is defined as
+ * #H5P_prp_cb1_t.
+ *
+ * The \p prp_copy routine may modify the value to be set and those
+ * changes will be stored as the new value of the property. If the
+ * \p prp_copy routine returns a negative value, the new property value
+ * is not copied into the property and the prp_copy routine returns an
+ * error value.
+ *
+ * The \p prp_close routine is called when a property list with this
+ * property is being closed.
+ * The #H5P_prp_close_func_t callback function is defined as
+ * #H5P_prp_cb1_t.
+ *
+ * The \p prp_close routine may modify the value passed in, the
+ * value is not used by the library when the close routine
+ * returns. If the \p prp_close routine returns a negative value,
+ * the property list \p prp_close routine returns an error value
+ * but the property list is still closed.
+ *
+ * \b Note: There is no \p prp_create callback routine for temporary
+ * property list objects; the initial value is assumed to
+ * have any necessary setup already performed on it.
+ *
+ * The #H5P_prp_cb1_t is as follows:
+ * \snippet this H5P_prp_cb1_t_snip
+ *
+ * The #H5P_prp_cb2_t is as follows:
+ * \snippet this H5P_prp_cb2_t_snip
+
+ * \cpp_c_api_note
+ */
+H5_DLL herr_t H5Pinsert1(hid_t plist_id, const char *name, size_t size, void *value,
+ H5P_prp_set_func_t prp_set, H5P_prp_get_func_t prp_get,
+ H5P_prp_delete_func_t prp_delete, H5P_prp_copy_func_t prp_copy,
+ H5P_prp_close_func_t prp_close);
+/**
+ * \ingroup GPLO
+ *
+ * \brief Encodes the property values in a property list into a binary
+ * buffer
+ *
+ * \plist_id
+ * \param[out] buf Buffer into which the property list will be encoded.
+ * If the provided buffer is NULL, the size of the
+ * buffer required is returned through \p nalloc; the
+ * function does nothing more.
+ * \param[out] nalloc The size of the required buffer
+ *
+ * \return \herr_t
+ *
+ * \deprecated As of HDF5-1.12 this function has been deprecated in favor of
+ * H5Pencode2() or the macro H5Pencode().
+ *
+ * \details H5Pencode1() encodes the property list \p plist_id into the
+ * binary buffer \p buf.
+ *
+ * If the required buffer size is unknown, \p buf can be passed
+ * in as NULL and the function will set the required buffer size
+ * in \p nalloc. The buffer can then be created and the property
+ * list encoded with a subsequent H5Pencode1() call.
+ *
+ * If the buffer passed in is not big enough to hold the encoded
+ * properties, the H5Pencode1() call can be expected to fail with
+ * a segmentation fault.
+ *
+ * Properties that do not have encode callbacks will be skipped.
+ * There is currently no mechanism to register an encode callback for
+ * a user-defined property, so user-defined properties cannot currently
+ * be encoded.
+ *
+ * Some properties cannot be encoded, particularly properties that are
+ * reliant on local context.
+ *
+ * \since 1.10.0
+ *
+ */
+H5_DLL herr_t H5Pencode1(hid_t plist_id, void *buf, size_t *nalloc);
+/**
+ * \ingroup DCPL
+ *
+ * \brief Returns information about a filter in a pipeline (DEPRECATED)
+ *
+ *
+ *
+ * \plist_id{plist_id}
+ * \param[in] filter Sequence number within the filter pipeline of
+ * the filter for which information is sought
+ * \param[out] flags Bit vector specifying certain general properties
+ * of the filter
+ * \param[in,out] cd_nelmts Number of elements in \p cd_values
+ * \param[out] cd_values Auxiliary data for the filter
+ * \param[in] namelen Anticipated number of characters in \p name
+ * \param[out] name Name of the filter
+ *
+ * \return Returns the filter identifier if successful; Otherwise returns
+ * a negative value. See: #H5Z_filter_t
+ *
+ * \deprecated When was this function deprecated?
+ *
+ * \details H5Pget_filter1() returns information about a filter, specified
+ * by its filter number, in a filter pipeline, specified by the
+ * property list with which it is associated.
+ *
+ * \p plist_id must be a dataset or group creation property list.
+ *
+ * \p filter is a value between zero and N-1, as described in
+ * H5Pget_nfilters(). The function will return a negative value
+ * if the filter number is out of range.
+ *
+ * The structure of the \p flags argument is discussed in
+ * H5Pset_filter().
+ *
+ * On input, \p cd_nelmts indicates the number of entries in the
+ * \p cd_values array, as allocated by the caller; on return,
+ * \p cd_nelmts contains the number of values defined by the filter.
+ *
+ * If \p name is a pointer to an array of at least \p namelen
+ * bytes, the filter name will be copied into that array. The name
+ * will be null terminated if \p namelen is large enough. The
+ * filter name returned will be the name appearing in the file, the
+ * name registered for the filter, or an empty string.
+ *
+ * \version 1.8.5 Function extended to work with group creation property
+ * lists.
+ * \version 1.8.0 N-bit and scale-offset filters added.
+ * \version 1.8.0 Function H5Pget_filter() renamed to H5Pget_filter1() and
+ * deprecated in this release.
+ * \version 1.6.4 \p filter parameter type changed to unsigned.
+ *
+ */
H5_DLL H5Z_filter_t H5Pget_filter1(hid_t plist_id, unsigned filter, unsigned int *flags /*out*/,
size_t *cd_nelmts /*out*/, unsigned cd_values[] /*out*/, size_t namelen,
char name[]);
-H5_DLL herr_t H5Pget_filter_by_id1(hid_t plist_id, H5Z_filter_t id, unsigned int *flags /*out*/,
- size_t *cd_nelmts /*out*/, unsigned cd_values[] /*out*/, size_t namelen,
- char name[] /*out*/);
-H5_DLL herr_t H5Pget_version(hid_t plist_id, unsigned *boot /*out*/, unsigned *freelist /*out*/,
- unsigned *stab /*out*/, unsigned *shhdr /*out*/);
-H5_DLL herr_t H5Pset_file_space(hid_t plist_id, H5F_file_space_type_t strategy, hsize_t threshold);
-H5_DLL herr_t H5Pget_file_space(hid_t plist_id, H5F_file_space_type_t *strategy, hsize_t *threshold);
+/**
+ * \ingroup DCPL
+ *
+ * \brief Returns information about the specified filter
+ *
+ * \plist_id{plist_id}
+ * \param[in] id Filter identifier
+ * \param[out] flags Bit vector specifying certain general properties
+ * of the filter
+ * \param[in,out] cd_nelmts Number of elements in \p cd_values
+ * \param[out] cd_values Auxiliary data for the filter
+ * \param[in] namelen Anticipated number of characters in \p name
+ * \param[out] name Name of the filter
+ *
+ *
+ * \return Returns a non-negative value if successful; Otherwise returns
+ * a negative value.
+ *
+ * \deprecated As of HDF5-1.8 this function was deprecated in favor of
+ * H5Pget_filter_by_id2() or the macro H5Pget_filter_by_id().
+ *
+ * \details H5Pget_filter_by_id1() returns information about a filter, specified
+ * in \p id, a filter identifier.
+ *
+ * \p plist_id must be a dataset or group creation property list and
+ * \p id must be in the associated filter pipeline.
+ *
+ * The \p id and \p flags parameters are used in the same
+ * manner as described in the discussion of H5Pset_filter().
+ *
+ * Aside from the fact that they are used for output, the parameters
+ * \p cd_nelmts and \p cd_values[] are used in the same manner as
+ * described in the discussion of H5Pset_filter().
+ * On input, the \p cd_nelmts parameter indicates the number of entries
+ * in the \p cd_values[] array allocated by the calling program;
+ * on exit it contains the number of values defined by the filter.
+ *
+ * On input, the \p namelen parameter indicates the number of
+ * characters allocated for the filter name by the calling program
+ * in the array \p name[]. On exit \p name[] contains the name of the
+ * filter with one character of the name in each element of the array.
+ *
+ * If the filter specified in \p id is not set for the property
+ * list, an error will be returned and this function will fail.
+ *
+ *
+ * \version 1.8.5 Function extended to work with group creation property
+ * lists.
+ * \version 1.8.0 Function H5Pget_filter_by_id() renamed to
+ * H5Pget_filter_by_id1() and deprecated in this release.
+ * \version 1.6.0 Function introduced in this release.
+ */
+H5_DLL herr_t H5Pget_filter_by_id1(hid_t plist_id, H5Z_filter_t id, unsigned int *flags /*out*/,
+ size_t *cd_nelmts /*out*/, unsigned cd_values[] /*out*/, size_t namelen,
+ char name[] /*out*/);
+/**
+ * \ingroup FCPL
+ *
+ * \brief Retrieves the version information of various objects
+ * for a file creation property list(deprecated)
+ *
+ * \plist_id
+ * \param[out] boot Pointer to location to return super block version number
+ * \param[out] freelist Pointer to location to return global freelist version number
+ * \param[out] stab Pointer to location to return symbol table version number
+ * \param[out] shhdr Pointer to location to return shared object header version
+ * number
+ *
+ * \return \herr_t
+ *
+ * \deprecated Deprecated in favor of the function H5Fget_info()
+ *
+ * \details H5Pget_version() retrieves the version information of various objects
+ * for a file creation property list. Any pointer parameters which are
+ * passed as NULL are not queried.
+ *
+ * \version 1.6.4 \p boot, \p freelist, \p stab, \p shhdr parameter types
+ * changed to unsigned.
+ *
+ */
+H5_DLL herr_t H5Pget_version(hid_t plist_id, unsigned *boot /*out*/, unsigned *freelist /*out*/,
+ unsigned *stab /*out*/, unsigned *shhdr /*out*/);
+/**
+ * \ingroup FCPL
+ *
+ * \brief Sets the file space handling strategy and the free-space section
+ * size threshold.
+ *
+ * \fcpl_id{plist_id}
+ * \param[in] strategy The file space handling strategy to be used. See:
+ * #H5F_fspace_strategy_t
+ * \param[in] threshold The smallest free-space section size that the free
+ * space manager will track
+ *
+ * \return \herr_t
+ *
+ * \deprecated When was this function deprecated?
+ *
+ * \details Maps to the function H5Pset_file_space_strategy().
+ *
+ */
+H5_DLL herr_t H5Pset_file_space(hid_t plist_id, H5F_file_space_type_t strategy, hsize_t threshold);
+/**
+ * \ingroup FCPL
+ *
+ * \brief Retrieves the file space handling strategy, and threshold value for
+ * a file creation property list
+ *
+ * \fcpl_id{plist_id}
+ * \param[out] strategy Pointer to the file space handling strategy
+ * \param[out] threshold Pointer to the free-space section size threshold value
+ *
+ * \return \herr_t
+ *
+ * \deprecated When was this function deprecated?
+ *
+ * \details Maps to the function H5Pget_file_space_strategy()
+ *
+ *
+ */
+H5_DLL herr_t H5Pget_file_space(hid_t plist_id, H5F_file_space_type_t *strategy, hsize_t *threshold);
#endif /* H5_NO_DEPRECATED_SYMBOLS */
#ifdef __cplusplus
diff --git a/src/H5R.c b/src/H5R.c
index d1120816e6f..f23b9934032 100644
--- a/src/H5R.c
+++ b/src/H5R.c
@@ -27,10 +27,12 @@
#include "H5private.h" /* Generic Functions */
#include "H5CXprivate.h" /* API Contexts */
#include "H5Eprivate.h" /* Error handling */
+#include "H5ESprivate.h" /* Event Sets */
#include "H5Iprivate.h" /* IDs */
#include "H5MMprivate.h" /* Memory management */
#include "H5Rpkg.h" /* References */
#include "H5Sprivate.h" /* Dataspaces */
+#include "H5VLprivate.h" /* Virtual Object Layer */
/****************/
/* Local Macros */
@@ -44,6 +46,14 @@
/* Local Prototypes */
/********************/
+/* Helper routines for sync/async API calls */
+static hid_t H5R__open_object_api_common(H5R_ref_t *ref_ptr, hid_t rapl_id, hid_t oapl_id, void **token_ptr,
+ H5VL_object_t **_vol_obj_ptr);
+static hid_t H5R__open_region_api_common(H5R_ref_t *ref_ptr, hid_t rapl_id, hid_t oapl_id, void **token_ptr,
+ H5VL_object_t **_vol_obj_ptr);
+static hid_t H5R__open_attr_api_common(H5R_ref_t *ref_ptr, hid_t rapl_id, hid_t aapl_id, void **token_ptr,
+ H5VL_object_t **_vol_obj_ptr);
+
/*********************/
/* Package Variables */
/*********************/
@@ -175,7 +185,7 @@ H5Rcreate_region(hid_t loc_id, const char *name, hid_t space_id, hid_t oapl_id,
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid reference pointer")
if (!name || !*name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name given")
- if ((space_id == H5I_BADID) || (space_id == H5S_ALL))
+ if ((space_id == H5I_INVALID_HID) || (space_id == H5S_ALL))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "reference region dataspace id must be valid")
if (NULL == (space = (struct H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace")
@@ -448,28 +458,29 @@ H5Rcopy(const H5R_ref_t *src_ref_ptr, H5R_ref_t *dst_ref_ptr)
} /* end H5Rcopy() */
/*-------------------------------------------------------------------------
- * Function: H5Ropen_object
+ * Function: H5R__open_object_api_common
*
- * Purpose: Given a reference to some object, open that object and
- * return an ID for that object.
+ * Purpose: This is the common function for opening an object via a reference.
*
* Return: Valid ID on success / H5I_INVALID_HID on failure
*
*-------------------------------------------------------------------------
*/
-hid_t
-H5Ropen_object(H5R_ref_t *ref_ptr, hid_t rapl_id, hid_t oapl_id)
+static hid_t
+H5R__open_object_api_common(H5R_ref_t *ref_ptr, hid_t rapl_id, hid_t oapl_id, void **token_ptr,
+ H5VL_object_t **_vol_obj_ptr)
{
- hid_t loc_id; /* Reference location ID */
- H5VL_object_t * vol_obj = NULL; /* Object of loc_id */
- H5VL_loc_params_t loc_params; /* Location parameters */
- H5O_token_t obj_token = {0}; /* Object token */
- H5I_type_t opened_type; /* Opened object type */
- void * opened_obj = NULL; /* Opened object */
- hid_t ret_value = H5I_INVALID_HID; /* Return value */
-
- FUNC_ENTER_API(H5I_INVALID_HID)
- H5TRACE3("i", "*Rrii", ref_ptr, rapl_id, oapl_id);
+ hid_t loc_id; /* Reference location ID */
+ H5VL_object_t * tmp_vol_obj = NULL; /* Object for loc_id */
+ H5VL_object_t **vol_obj_ptr =
+ (_vol_obj_ptr ? _vol_obj_ptr : &tmp_vol_obj); /* Ptr to object ptr for loc_id */
+ H5VL_loc_params_t loc_params; /* Location parameters */
+ H5O_token_t obj_token = {0}; /* Object token */
+ H5I_type_t opened_type; /* Opened object type */
+ void * opened_obj = NULL; /* Opened object */
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
+
+ FUNC_ENTER_STATIC
/* Check args */
if (ref_ptr == NULL)
@@ -489,52 +500,118 @@ H5Ropen_object(H5R_ref_t *ref_ptr, hid_t rapl_id, hid_t oapl_id)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTOPENFILE, H5I_INVALID_HID, "cannot re-open referenced file")
}
- /* Get object token */
- if (H5R__get_obj_token((const H5R_ref_priv_t *)ref_ptr, &obj_token, NULL) < 0)
- HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, H5I_INVALID_HID, "unable to get object token")
-
/* Verify access property list and set up collective metadata if appropriate */
if (H5CX_set_apl(&oapl_id, H5P_CLS_DACC, loc_id, FALSE) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info")
- /* Get the VOL object */
- if (NULL == (vol_obj = H5VL_vol_object(loc_id)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier")
+ /* Get object token */
+ if (H5R__get_obj_token((const H5R_ref_priv_t *)ref_ptr, &obj_token, NULL) < 0)
+ HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, H5I_INVALID_HID, "unable to get object token")
- /* Set location parameters */
- loc_params.type = H5VL_OBJECT_BY_TOKEN;
- loc_params.loc_data.loc_by_token.token = &obj_token;
- loc_params.obj_type = H5I_get_type(loc_id);
+ /* Set up arguments for object access by token */
+ if (H5VL_setup_token_args(loc_id, &obj_token, vol_obj_ptr, &loc_params) < 0)
+ HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, H5I_INVALID_HID, "can't set object access arguments")
/* Open object by token */
- if (NULL == (opened_obj = H5VL_object_open(vol_obj, &loc_params, &opened_type, H5P_DATASET_XFER_DEFAULT,
- H5_REQUEST_NULL)))
+ if (NULL == (opened_obj = H5VL_object_open(*vol_obj_ptr, &loc_params, &opened_type,
+ H5P_DATASET_XFER_DEFAULT, token_ptr)))
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open object by token")
/* Register object */
- if ((ret_value = H5VL_register(opened_type, opened_obj, vol_obj->connector, TRUE)) < 0)
+ if ((ret_value = H5VL_register(opened_type, opened_obj, (*vol_obj_ptr)->connector, TRUE)) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register object handle")
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5R__open_object_api_common() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5Ropen_object
+ *
+ * Purpose: Given a reference to some object, open that object and
+ * return an ID for that object.
+ *
+ * Return: Valid ID on success / H5I_INVALID_HID on failure
+ *
+ *-------------------------------------------------------------------------
+ */
+hid_t
+H5Ropen_object(H5R_ref_t *ref_ptr, hid_t rapl_id, hid_t oapl_id)
+{
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
+
+ FUNC_ENTER_API(H5I_INVALID_HID)
+ H5TRACE3("i", "*Rrii", ref_ptr, rapl_id, oapl_id);
+
+ /* Open the dataset synchronously */
+ if ((ret_value = H5R__open_object_api_common(ref_ptr, rapl_id, oapl_id, NULL, NULL)) < 0)
+ HGOTO_ERROR(H5E_REFERENCE, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open object synchronously")
+
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Ropen_object() */
/*-------------------------------------------------------------------------
- * Function: H5Ropen_region
+ * Function: H5Ropen_object_async
*
- * Purpose: Given a reference to some object, creates a copy of the dataset
- * pointed to's dataspace and defines a selection in the copy
- * which is the region pointed to.
+ * Purpose: Asynchronous version of H5Ropen_object
*
* Return: Valid ID on success / H5I_INVALID_HID on failure
*
*-------------------------------------------------------------------------
*/
hid_t
-H5Ropen_region(H5R_ref_t *ref_ptr, hid_t rapl_id, hid_t oapl_id)
+H5Ropen_object_async(const char *app_file, const char *app_func, unsigned app_line, H5R_ref_t *ref_ptr,
+ hid_t rapl_id, hid_t oapl_id, hid_t es_id)
{
- hid_t loc_id; /* Reference location ID */
- H5VL_object_t * vol_obj = NULL; /* Object of loc_id */
+ H5VL_object_t *vol_obj = NULL; /* Object of loc_id */
+ void * token = NULL; /* Request token for async operation */
+ void ** token_ptr = H5_REQUEST_NULL; /* Pointer to request token for async operation */
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
+
+ FUNC_ENTER_API(H5I_INVALID_HID)
+ H5TRACE7("i", "*s*sIu*Rriii", app_file, app_func, app_line, ref_ptr, rapl_id, oapl_id, es_id);
+
+ /* Set up request token pointer for asynchronous operation */
+ if (H5ES_NONE != es_id)
+ token_ptr = &token; /* Point at token for VOL connector to set up */
+
+ /* Open the object asynchronously */
+ if ((ret_value = H5R__open_object_api_common(ref_ptr, rapl_id, oapl_id, token_ptr, &vol_obj)) < 0)
+ HGOTO_ERROR(H5E_REFERENCE, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open object asynchronously")
+
+ /* If a token was created, add the token to the event set */
+ if (NULL != token)
+ /* clang-format off */
+ if (H5ES_insert(es_id, vol_obj->connector, token,
+ H5ARG_TRACE7(FUNC, "*s*sIu*Rriii", app_file, app_func, app_line, ref_ptr, rapl_id, oapl_id, es_id)) < 0) {
+ /* clang-format on */
+ if (H5I_dec_app_ref_always_close(ret_value) < 0)
+ HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDEC, H5I_INVALID_HID, "can't decrement count on object ID")
+ HGOTO_ERROR(H5E_REFERENCE, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert token into event set")
+ } /* end if */
+
+done:
+ FUNC_LEAVE_API(ret_value)
+} /* end H5Ropen_object_async() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5R__open_region_api_common
+ *
+ * Purpose: This is the common function for opening a region.
+ *
+ * Return: Valid ID on success / H5I_INVALID_HID on failure
+ *
+ *-------------------------------------------------------------------------
+ */
+static hid_t
+H5R__open_region_api_common(H5R_ref_t *ref_ptr, hid_t rapl_id, hid_t oapl_id, void **token_ptr,
+ H5VL_object_t **_vol_obj_ptr)
+{
+ hid_t loc_id; /* Reference location ID */
+ H5VL_object_t * tmp_vol_obj = NULL; /* Object for loc_id */
+ H5VL_object_t **vol_obj_ptr =
+ (_vol_obj_ptr ? _vol_obj_ptr : &tmp_vol_obj); /* Ptr to object ptr for loc_id */
H5VL_loc_params_t loc_params; /* Location parameters */
H5O_token_t obj_token = {0}; /* Object token */
H5I_type_t opened_type; /* Opened object type */
@@ -544,8 +621,7 @@ H5Ropen_region(H5R_ref_t *ref_ptr, hid_t rapl_id, hid_t oapl_id)
hid_t space_id = H5I_INVALID_HID; /* Dataspace ID */
hid_t ret_value = H5I_INVALID_HID; /* Return value */
- FUNC_ENTER_API(H5I_INVALID_HID)
- H5TRACE3("i", "*Rrii", ref_ptr, rapl_id, oapl_id);
+ FUNC_ENTER_STATIC
/* Check args */
if (ref_ptr == NULL)
@@ -569,22 +645,17 @@ H5Ropen_region(H5R_ref_t *ref_ptr, hid_t rapl_id, hid_t oapl_id)
if (H5R__get_obj_token((const H5R_ref_priv_t *)ref_ptr, &obj_token, NULL) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, H5I_INVALID_HID, "unable to get object token")
- /* Get the VOL object */
- if (NULL == (vol_obj = H5VL_vol_object(loc_id)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier")
-
- /* Set location parameters */
- loc_params.type = H5VL_OBJECT_BY_TOKEN;
- loc_params.loc_data.loc_by_token.token = &obj_token;
- loc_params.obj_type = H5I_get_type(loc_id);
+ /* Set up arguments for object access by token */
+ if (H5VL_setup_token_args(loc_id, &obj_token, vol_obj_ptr, &loc_params) < 0)
+ HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, H5I_INVALID_HID, "can't set object access arguments")
/* Open object by token */
- if (NULL == (opened_obj = H5VL_object_open(vol_obj, &loc_params, &opened_type, H5P_DATASET_XFER_DEFAULT,
- H5_REQUEST_NULL)))
+ if (NULL == (opened_obj = H5VL_object_open(*vol_obj_ptr, &loc_params, &opened_type,
+ H5P_DATASET_XFER_DEFAULT, token_ptr)))
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open object by token")
/* Register object */
- if ((opened_obj_id = H5VL_register(opened_type, opened_obj, vol_obj->connector, FALSE)) < 0)
+ if ((opened_obj_id = H5VL_register(opened_type, opened_obj, (*vol_obj_ptr)->connector, FALSE)) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register object handle")
/* Get VOL object object */
@@ -612,24 +683,97 @@ H5Ropen_region(H5R_ref_t *ref_ptr, hid_t rapl_id, hid_t oapl_id)
if ((space_id != H5I_INVALID_HID) && (H5I_dec_ref(space_id) < 0))
HDONE_ERROR(H5E_REFERENCE, H5E_CLOSEERROR, H5I_INVALID_HID, "can't close dataspace")
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5R__open_region_api_common() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5Ropen_region
+ *
+ * Purpose: Given a reference to some object, creates a copy of the dataset
+ * pointed to's dataspace and defines a selection in the copy
+ * which is the region pointed to.
+ *
+ * Return: Valid ID on success / H5I_INVALID_HID on failure
+ *
+ *-------------------------------------------------------------------------
+ */
+hid_t
+H5Ropen_region(H5R_ref_t *ref_ptr, hid_t rapl_id, hid_t oapl_id)
+{
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
+
+ FUNC_ENTER_API(H5I_INVALID_HID)
+ H5TRACE3("i", "*Rrii", ref_ptr, rapl_id, oapl_id);
+
+ /* Open the region synchronously */
+ if ((ret_value = H5R__open_region_api_common(ref_ptr, rapl_id, oapl_id, NULL, NULL)) < 0)
+ HGOTO_ERROR(H5E_REFERENCE, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open region synchronously")
+
+done:
FUNC_LEAVE_API(ret_value)
} /* end H5Ropen_region() */
/*-------------------------------------------------------------------------
- * Function: H5Ropen_attr
+ * Function: H5Ropen_region_async
*
- * Purpose: Given a reference to some attribute, open that attribute and
- * return an ID for that attribute.
+ * Purpose: Asynchronous version of H5Ropen_region
*
* Return: Valid ID on success / H5I_INVALID_HID on failure
*
*-------------------------------------------------------------------------
*/
hid_t
-H5Ropen_attr(H5R_ref_t *ref_ptr, hid_t rapl_id, hid_t aapl_id)
+H5Ropen_region_async(const char *app_file, const char *app_func, unsigned app_line, H5R_ref_t *ref_ptr,
+ hid_t rapl_id, hid_t oapl_id, hid_t es_id)
+{
+ H5VL_object_t *vol_obj = NULL; /* Object of loc_id */
+ void * token = NULL; /* Request token for async operation */
+ void ** token_ptr = H5_REQUEST_NULL; /* Pointer to request token for async operation */
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
+
+ FUNC_ENTER_API(H5I_INVALID_HID)
+ H5TRACE7("i", "*s*sIu*Rriii", app_file, app_func, app_line, ref_ptr, rapl_id, oapl_id, es_id);
+
+ /* Set up request token pointer for asynchronous operation */
+ if (H5ES_NONE != es_id)
+ token_ptr = &token; /* Point at token for VOL connector to set up */
+
+ /* Open the region asynchronously */
+ if ((ret_value = H5R__open_region_api_common(ref_ptr, rapl_id, oapl_id, token_ptr, &vol_obj)) < 0)
+ HGOTO_ERROR(H5E_REFERENCE, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open region asynchronously")
+
+ /* If a token was created, add the token to the event set */
+ if (NULL != token)
+ /* clang-format off */
+ if (H5ES_insert(es_id, vol_obj->connector, token,
+ H5ARG_TRACE7(FUNC, "*s*sIu*Rriii", app_file, app_func, app_line, ref_ptr, rapl_id, oapl_id, es_id)) < 0) {
+ /* clang-format on */
+ if (H5I_dec_app_ref_always_close(ret_value) < 0)
+ HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDEC, H5I_INVALID_HID, "can't decrement count on region ID")
+ HGOTO_ERROR(H5E_REFERENCE, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert token into event set")
+ } /* end if */
+
+done:
+ FUNC_LEAVE_API(ret_value)
+} /* end H5Ropen_region_async() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5R__open_attr_api_common
+ *
+ * Purpose: This is the common function for opening an attribute via a reference.
+ *
+ * Return: Valid ID on success / H5I_INVALID_HID on failure
+ *
+ *-------------------------------------------------------------------------
+ */
+static hid_t
+H5R__open_attr_api_common(H5R_ref_t *ref_ptr, hid_t rapl_id, hid_t aapl_id, void **token_ptr,
+ H5VL_object_t **_vol_obj_ptr)
{
- hid_t loc_id; /* Reference location ID */
- H5VL_object_t * vol_obj = NULL; /* Object of loc_id */
+ hid_t loc_id; /* Reference location ID */
+ H5VL_object_t * tmp_vol_obj = NULL; /* Object for loc_id */
+ H5VL_object_t **vol_obj_ptr =
+ (_vol_obj_ptr ? _vol_obj_ptr : &tmp_vol_obj); /* Ptr to object ptr for loc_id */
H5VL_loc_params_t loc_params; /* Location parameters */
H5O_token_t obj_token = {0}; /* Object token */
H5I_type_t opened_type; /* Opened object type */
@@ -638,8 +782,7 @@ H5Ropen_attr(H5R_ref_t *ref_ptr, hid_t rapl_id, hid_t aapl_id)
void * opened_attr = NULL; /* Opened attribute */
hid_t ret_value = H5I_INVALID_HID; /* Return value */
- FUNC_ENTER_API(H5I_INVALID_HID)
- H5TRACE3("i", "*Rrii", ref_ptr, rapl_id, aapl_id);
+ FUNC_ENTER_STATIC
/* Check args */
if (ref_ptr == NULL)
@@ -663,7 +806,7 @@ H5Ropen_attr(H5R_ref_t *ref_ptr, hid_t rapl_id, hid_t aapl_id)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, H5I_INVALID_HID, "unable to get object token")
/* Get the VOL object */
- if (NULL == (vol_obj = H5VL_vol_object(loc_id)))
+ if (NULL == (*vol_obj_ptr = H5VL_vol_object(loc_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier")
/* Set location parameters */
@@ -672,12 +815,12 @@ H5Ropen_attr(H5R_ref_t *ref_ptr, hid_t rapl_id, hid_t aapl_id)
loc_params.obj_type = H5I_get_type(loc_id);
/* Open object by token */
- if (NULL == (opened_obj = H5VL_object_open(vol_obj, &loc_params, &opened_type, H5P_DATASET_XFER_DEFAULT,
- H5_REQUEST_NULL)))
+ if (NULL == (opened_obj = H5VL_object_open(*vol_obj_ptr, &loc_params, &opened_type,
+ H5P_DATASET_XFER_DEFAULT, token_ptr)))
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open object by token")
/* Register object */
- if ((opened_obj_id = H5VL_register(opened_type, opened_obj, vol_obj->connector, FALSE)) < 0)
+ if ((opened_obj_id = H5VL_register(opened_type, opened_obj, (*vol_obj_ptr)->connector, FALSE)) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register object handle")
/* Verify access property list and set up collective metadata if appropriate */
@@ -700,19 +843,90 @@ H5Ropen_attr(H5R_ref_t *ref_ptr, hid_t rapl_id, hid_t aapl_id)
H5R_REF_ATTRNAME((const H5R_ref_priv_t *)ref_ptr))
/* Register the attribute and get an ID for it */
- if ((ret_value = H5VL_register(H5I_ATTR, opened_attr, vol_obj->connector, TRUE)) < 0)
- HGOTO_ERROR(H5E_REFERENCE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to atomize attribute handle")
+ if ((ret_value = H5VL_register(H5I_ATTR, opened_attr, (*vol_obj_ptr)->connector, TRUE)) < 0)
+ HGOTO_ERROR(H5E_REFERENCE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register attribute handle")
done:
if ((opened_obj_id != H5I_INVALID_HID) && (H5I_dec_ref(opened_obj_id) < 0))
HDONE_ERROR(H5E_REFERENCE, H5E_CLOSEERROR, H5I_INVALID_HID, "can't close object")
if (H5I_INVALID_HID == ret_value) /* Cleanup on failure */
- if (opened_attr && H5VL_attr_close(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0)
+ if (opened_attr && H5VL_attr_close(*vol_obj_ptr, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0)
HDONE_ERROR(H5E_REFERENCE, H5E_CLOSEERROR, H5I_INVALID_HID, "can't close attribute")
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5R__open_attr_api_common() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5Ropen_attr
+ *
+ * Purpose: Given a reference to some attribute, open that attribute and
+ * return an ID for that attribute.
+ *
+ * Return: Valid ID on success / H5I_INVALID_HID on failure
+ *
+ *-------------------------------------------------------------------------
+ */
+hid_t
+H5Ropen_attr(H5R_ref_t *ref_ptr, hid_t rapl_id, hid_t aapl_id)
+{
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
+
+ FUNC_ENTER_API(H5I_INVALID_HID)
+ H5TRACE3("i", "*Rrii", ref_ptr, rapl_id, aapl_id);
+
+ /* Open the attribute synchronously */
+ if ((ret_value = H5R__open_attr_api_common(ref_ptr, rapl_id, aapl_id, NULL, NULL)) < 0)
+ HGOTO_ERROR(H5E_REFERENCE, H5E_OPENERROR, H5I_INVALID_HID, "unable to open attribute synchronously")
+
+done:
FUNC_LEAVE_API(ret_value)
} /* end H5Ropen_attr() */
+/*--------------------------------------------------------------------------
+ * Function: H5Ropen_attr_async
+ *
+ * Purpose: Asynchronous version of H5Ropen_attr
+ *
+ * Return: An attribute ID on success / H5I_INVALID_HID on failure
+ *
+ *-------------------------------------------------------------------------
+ */
+hid_t
+H5Ropen_attr_async(const char *app_file, const char *app_func, unsigned app_line, H5R_ref_t *ref_ptr,
+ hid_t rapl_id, hid_t aapl_id, hid_t es_id)
+{
+ H5VL_object_t *vol_obj = NULL; /* Object for loc_id */
+ void * token = NULL; /* Request token for async operation */
+ void ** token_ptr = H5_REQUEST_NULL; /* Pointer to request token for async operation */
+ hid_t ret_value; /* Return value */
+
+ FUNC_ENTER_API(H5I_INVALID_HID)
+ H5TRACE7("i", "*s*sIu*Rriii", app_file, app_func, app_line, ref_ptr, rapl_id, aapl_id, es_id);
+
+ /* Set up request token pointer for asynchronous operation */
+ if (H5ES_NONE != es_id)
+ token_ptr = &token; /* Point at token for VOL connector to set up */
+
+ /* Open the attribute asynchronously */
+ if ((ret_value = H5R__open_attr_api_common(ref_ptr, rapl_id, aapl_id, token_ptr, &vol_obj)) < 0)
+ HGOTO_ERROR(H5E_REFERENCE, H5E_OPENERROR, H5I_INVALID_HID, "unable to open attribute asynchronously")
+
+ /* If a token was created, add the token to the event set */
+ if (NULL != token)
+ /* clang-format off */
+ if (H5ES_insert(es_id, vol_obj->connector, token,
+ H5ARG_TRACE7(FUNC, "*s*sIu*Rriii", app_file, app_func, app_line, ref_ptr, rapl_id, aapl_id, es_id)) < 0) {
+ /* clang-format on */
+ if (H5I_dec_app_ref_always_close(ret_value) < 0)
+ HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDEC, H5I_INVALID_HID,
+ "can't decrement count on attribute ID")
+ HGOTO_ERROR(H5E_REFERENCE, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert token into event set")
+ } /* end if */
+
+done:
+ FUNC_LEAVE_API(ret_value)
+} /* H5Ropen_attr_async() */
+
/*-------------------------------------------------------------------------
* Function: H5Rget_obj_type3
*
@@ -724,7 +938,7 @@ H5Ropen_attr(H5R_ref_t *ref_ptr, hid_t rapl_id, hid_t aapl_id)
*-------------------------------------------------------------------------
*/
herr_t
-H5Rget_obj_type3(H5R_ref_t *ref_ptr, hid_t rapl_id, H5O_type_t *obj_type)
+H5Rget_obj_type3(H5R_ref_t *ref_ptr, hid_t rapl_id, H5O_type_t *obj_type /*out*/)
{
hid_t loc_id; /* Reference location ID */
H5VL_object_t * vol_obj = NULL; /* Object of loc_id */
@@ -733,7 +947,7 @@ H5Rget_obj_type3(H5R_ref_t *ref_ptr, hid_t rapl_id, H5O_type_t *obj_type)
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
- H5TRACE3("e", "*Rri*Ot", ref_ptr, rapl_id, obj_type);
+ H5TRACE3("e", "*Rrix", ref_ptr, rapl_id, obj_type);
/* Check args */
if (ref_ptr == NULL)
@@ -784,13 +998,13 @@ H5Rget_obj_type3(H5R_ref_t *ref_ptr, hid_t rapl_id, H5O_type_t *obj_type)
*-------------------------------------------------------------------------
*/
ssize_t
-H5Rget_file_name(const H5R_ref_t *ref_ptr, char *buf, size_t size)
+H5Rget_file_name(const H5R_ref_t *ref_ptr, char *buf /*out*/, size_t size)
{
hid_t loc_id; /* Reference location ID */
ssize_t ret_value; /* Return value */
FUNC_ENTER_API((-1))
- H5TRACE3("Zs", "*Rr*sz", ref_ptr, buf, size);
+ H5TRACE3("Zs", "*Rrxz", ref_ptr, buf, size);
/* Check args */
if (ref_ptr == NULL)
@@ -833,7 +1047,7 @@ H5Rget_file_name(const H5R_ref_t *ref_ptr, char *buf, size_t size)
*-------------------------------------------------------------------------
*/
ssize_t
-H5Rget_obj_name(H5R_ref_t *ref_ptr, hid_t rapl_id, char *buf, size_t size)
+H5Rget_obj_name(H5R_ref_t *ref_ptr, hid_t rapl_id, char *buf /*out*/, size_t size)
{
hid_t loc_id; /* Reference location ID */
H5VL_object_t * vol_obj = NULL; /* Object of loc_id */
@@ -842,7 +1056,7 @@ H5Rget_obj_name(H5R_ref_t *ref_ptr, hid_t rapl_id, char *buf, size_t size)
ssize_t ret_value = 0; /* Return value */
FUNC_ENTER_API((-1))
- H5TRACE4("Zs", "*Rri*sz", ref_ptr, rapl_id, buf, size);
+ H5TRACE4("Zs", "*Rrixz", ref_ptr, rapl_id, buf, size);
/* Check args */
if (ref_ptr == NULL)
@@ -892,12 +1106,12 @@ H5Rget_obj_name(H5R_ref_t *ref_ptr, hid_t rapl_id, char *buf, size_t size)
*-------------------------------------------------------------------------
*/
ssize_t
-H5Rget_attr_name(const H5R_ref_t *ref_ptr, char *buf, size_t size)
+H5Rget_attr_name(const H5R_ref_t *ref_ptr, char *buf /*out*/, size_t size)
{
ssize_t ret_value; /* Return value */
FUNC_ENTER_API((-1))
- H5TRACE3("Zs", "*Rr*sz", ref_ptr, buf, size);
+ H5TRACE3("Zs", "*Rrxz", ref_ptr, buf, size);
/* Check args */
if (ref_ptr == NULL)
diff --git a/src/H5Rdeprec.c b/src/H5Rdeprec.c
index c66ae7ca31c..d5f5a7d833d 100644
--- a/src/H5Rdeprec.c
+++ b/src/H5Rdeprec.c
@@ -61,6 +61,10 @@
/********************/
/* Local Prototypes */
/********************/
+static herr_t H5R__encode_token_region_compat(H5F_t *f, const H5O_token_t *obj_token, size_t token_size,
+ H5S_t *space, unsigned char *buf, size_t *nalloc);
+static herr_t H5R__decode_token_compat(H5VL_object_t *vol_obj, H5I_type_t type, H5R_type_t ref_type,
+ const unsigned char *buf, H5O_token_t *obj_token);
/*********************/
/* Package Variables */
@@ -74,8 +78,155 @@
/* Local Variables */
/*******************/
-#ifndef H5_NO_DEPRECATED_SYMBOLS
+/*-------------------------------------------------------------------------
+ * Function: H5R__decode_token_compat
+ *
+ * Purpose: Decode an object token. (native only)
+ *
+ * Return: SUCCEED/FAIL
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5R__decode_token_compat(H5VL_object_t *vol_obj, H5I_type_t type, H5R_type_t ref_type,
+ const unsigned char *buf, H5O_token_t *obj_token)
+{
+ hid_t file_id = H5I_INVALID_HID; /* File ID for region reference */
+ H5VL_object_t * vol_obj_file = NULL;
+ H5VL_file_cont_info_t cont_info = {H5VL_CONTAINER_INFO_VERSION, 0, 0, 0};
+ herr_t ret_value = SUCCEED;
+
+ FUNC_ENTER_STATIC
+
+#ifndef NDEBUG
+ {
+ hbool_t is_native = FALSE; /* Whether the src file is using the native VOL connector */
+
+ /* Check if using native VOL connector */
+ if (H5VL_object_is_native(vol_obj, &is_native) < 0)
+ HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "can't query if file uses native VOL connector")
+
+ /* Must use native VOL connector for this operation */
+ HDassert(is_native);
+ }
+#endif /* NDEBUG */
+
+ /* Get the file for the object */
+ if ((file_id = H5F_get_file_id(vol_obj, type, FALSE)) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object")
+
+ /* Retrieve VOL object */
+ if (NULL == (vol_obj_file = H5VL_vol_object(file_id)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
+
+ /* Get container info */
+ if (H5VL_file_get((const H5VL_object_t *)vol_obj_file, H5VL_FILE_GET_CONT_INFO, H5P_DATASET_XFER_DEFAULT,
+ H5_REQUEST_NULL, &cont_info) < 0)
+ HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "unable to get container info")
+ if (ref_type == H5R_OBJECT1) {
+ size_t buf_size = H5R_OBJ_REF_BUF_SIZE;
+
+ /* Get object address */
+ if (H5R__decode_token_obj_compat(buf, &buf_size, obj_token, cont_info.token_size) < 0)
+ HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, FAIL, "unable to get object token")
+ } /* end if */
+ else {
+ size_t buf_size = H5R_DSET_REG_REF_BUF_SIZE;
+ H5F_t *f = NULL;
+
+ /* Retrieve file from VOL object */
+ if (NULL == (f = (H5F_t *)H5VL_object_data((const H5VL_object_t *)vol_obj_file)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid VOL object")
+
+ /* Get object address */
+ if (H5R__decode_token_region_compat(f, buf, &buf_size, obj_token, cont_info.token_size, NULL) < 0)
+ HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, FAIL, "unable to get object address")
+ } /* end else */
+
+done:
+ if (file_id != H5I_INVALID_HID && H5I_dec_ref(file_id) < 0)
+ HDONE_ERROR(H5E_REFERENCE, H5E_CANTDEC, FAIL, "unable to decrement refcount on file")
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5R__decode_token_compat() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5R__encode_token_region_compat
+ *
+ * Purpose: Encode dataset selection and insert data into heap
+ * (native only).
+ *
+ * Return: SUCCEED/FAIL
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5R__encode_token_region_compat(H5F_t *f, const H5O_token_t *obj_token, size_t token_size, H5S_t *space,
+ unsigned char *buf, size_t *nalloc)
+{
+ size_t buf_size;
+ unsigned char *data = NULL;
+ herr_t ret_value = SUCCEED;
+
+ FUNC_ENTER_STATIC
+
+ HDassert(f);
+ HDassert(obj_token);
+ HDassert(token_size);
+ HDassert(space);
+ HDassert(nalloc);
+
+ /* Get required buffer size */
+ if (H5R__encode_heap(f, NULL, &buf_size, NULL, (size_t)0) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
+
+ if (buf && *nalloc >= buf_size) {
+ ssize_t data_size;
+ uint8_t *p;
+
+ /* Pass the correct encoding version for the selection depending on the
+ * file libver bounds, this is later retrieved in H5S hyper encode */
+ H5CX_set_libver_bounds(f);
+
+ /* Zero the heap ID out, may leak heap space if user is re-using
+ * reference and doesn't have garbage collection turned on
+ */
+ HDmemset(buf, 0, buf_size);
+
+ /* Get the amount of space required to serialize the selection */
+ if ((data_size = H5S_SELECT_SERIAL_SIZE(space)) < 0)
+ HGOTO_ERROR(H5E_REFERENCE, H5E_CANTINIT, FAIL,
+ "Invalid amount of space for serializing selection")
+
+ /* Increase buffer size to allow for the dataset token */
+ data_size += (hssize_t)token_size;
+
+ /* Allocate the space to store the serialized information */
+ H5_CHECK_OVERFLOW(data_size, hssize_t, size_t);
+ if (NULL == (data = (uint8_t *)H5MM_malloc((size_t)data_size)))
+ HGOTO_ERROR(H5E_REFERENCE, H5E_NOSPACE, FAIL, "memory allocation failed")
+
+ /* Serialize information for dataset OID into heap buffer */
+ p = (uint8_t *)data;
+ H5MM_memcpy(p, obj_token, token_size);
+ p += token_size;
+
+ /* Serialize the selection into heap buffer */
+ if (H5S_SELECT_SERIALIZE(space, &p) < 0)
+ HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCOPY, FAIL, "Unable to serialize selection")
+
+ /* Write to heap */
+ if (H5R__encode_heap(f, buf, nalloc, data, (size_t)data_size) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
+ }
+ *nalloc = buf_size;
+
+done:
+ H5MM_free(data);
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* H5R__encode_token_region_compat() */
+
+#ifndef H5_NO_DEPRECATED_SYMBOLS
/*-------------------------------------------------------------------------
* Function: H5Rget_obj_type1
*
@@ -298,7 +449,7 @@ H5Rcreate(void *ref, hid_t loc_id, const char *name, H5R_type_t ref_type, hid_t
size_t buf_size = H5R_DSET_REG_REF_BUF_SIZE;
/* Retrieve space */
- if (space_id == H5I_BADID)
+ if (space_id == H5I_INVALID_HID)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "reference region dataspace id must be valid")
if (NULL == (space = (struct H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace")
@@ -330,7 +481,7 @@ H5Rcreate(void *ref, hid_t loc_id, const char *name, H5R_type_t ref_type, hid_t
*-------------------------------------------------------------------------
*/
herr_t
-H5Rget_obj_type2(hid_t id, H5R_type_t ref_type, const void *ref, H5O_type_t *obj_type)
+H5Rget_obj_type2(hid_t id, H5R_type_t ref_type, const void *ref, H5O_type_t *obj_type /*out*/)
{
H5VL_object_t * vol_obj = NULL; /* Object of loc_id */
H5I_type_t vol_obj_type = H5I_BADID; /* Object type of loc_id */
@@ -340,7 +491,7 @@ H5Rget_obj_type2(hid_t id, H5R_type_t ref_type, const void *ref, H5O_type_t *obj
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
- H5TRACE4("e", "iRt*x*Ot", id, ref_type, ref, obj_type);
+ H5TRACE4("e", "iRt*xx", id, ref_type, ref, obj_type);
/* Check args */
if (buf == NULL)
@@ -520,9 +671,9 @@ H5Rget_region(hid_t id, H5R_type_t ref_type, const void *ref)
if (H5R__decode_token_region_compat(f, buf, &buf_size, NULL, cont_info.token_size, &space) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, H5I_INVALID_HID, "unable to get dataspace")
- /* Atomize */
+ /* Register */
if ((ret_value = H5I_register(H5I_DATASPACE, space, TRUE)) < 0)
- HGOTO_ERROR(H5E_REFERENCE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register dataspace atom")
+ HGOTO_ERROR(H5E_REFERENCE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register dataspace ID")
done:
if (file_id != H5I_INVALID_HID && H5I_dec_ref(file_id) < 0)
@@ -542,7 +693,7 @@ H5Rget_region(hid_t id, H5R_type_t ref_type, const void *ref)
*-------------------------------------------------------------------------
*/
ssize_t
-H5Rget_name(hid_t id, H5R_type_t ref_type, const void *ref, char *name, size_t size)
+H5Rget_name(hid_t id, H5R_type_t ref_type, const void *ref, char *name /*out*/, size_t size)
{
H5VL_object_t * vol_obj = NULL; /* Object of loc_id */
H5I_type_t vol_obj_type = H5I_BADID; /* Object type of loc_id */
@@ -552,7 +703,7 @@ H5Rget_name(hid_t id, H5R_type_t ref_type, const void *ref, char *name, size_t s
ssize_t ret_value = -1; /* Return value */
FUNC_ENTER_API((-1))
- H5TRACE5("Zs", "iRt*x*sz", id, ref_type, ref, name, size);
+ H5TRACE5("Zs", "iRt*xxz", id, ref_type, ref, name, size);
/* Check args */
if (buf == NULL)
diff --git a/src/H5Rint.c b/src/H5Rint.c
index 685c7094c4c..b714f09a359 100644
--- a/src/H5Rint.c
+++ b/src/H5Rint.c
@@ -89,7 +89,6 @@
} while (0)
/* Debug */
-//#define H5R_DEBUG
#ifdef H5R_DEBUG
#define H5R_LOG_DEBUG(...) \
do { \
@@ -192,7 +191,7 @@ H5R__init_package(void)
RETURNS
void
DESCRIPTION
- Release IDs for the atom group, deferring full interface shutdown
+ Release IDs for the ID group, deferring full interface shutdown
until later (in H5R_term_package).
GLOBAL VARIABLES
COMMENTS, BUGS, ASSUMPTIONS
@@ -225,7 +224,7 @@ H5R_top_term_package(void)
RETURNS
void
DESCRIPTION
- Release the atom group and any other resources allocated.
+ Release the ID group and any other resources allocated.
GLOBAL VARIABLES
COMMENTS, BUGS, ASSUMPTIONS
Can't report errors...
@@ -547,7 +546,7 @@ H5R__reopen_file(H5R_ref_priv_t *ref, hid_t fapl_id)
void * new_file = NULL; /* File object opened */
H5VL_connector_prop_t connector_prop; /* Property for VOL connector ID & info */
H5VL_object_t * vol_obj = NULL; /* VOL object for file */
- hbool_t supported; /* Whether 'post open' operation is supported by VOL connector */
+ uint64_t supported; /* Whether 'post open' operation is supported by VOL connector */
hid_t ret_value = H5I_INVALID_HID;
FUNC_ENTER_PACKAGE
@@ -579,17 +578,17 @@ H5R__reopen_file(H5R_ref_priv_t *ref, hid_t fapl_id)
/* Get an ID for the file */
if ((ret_value = H5VL_register_using_vol_id(H5I_FILE, new_file, connector_prop.connector_id, TRUE)) < 0)
- HGOTO_ERROR(H5E_REFERENCE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to atomize file handle")
+ HGOTO_ERROR(H5E_REFERENCE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register file handle")
/* Get the file object */
if (NULL == (vol_obj = H5VL_vol_object(ret_value)))
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, H5I_INVALID_HID, "invalid object identifier")
/* Make the 'post open' callback */
- supported = FALSE;
+ supported = 0;
if (H5VL_introspect_opt_query(vol_obj, H5VL_SUBCLS_FILE, H5VL_NATIVE_FILE_POST_OPEN, &supported) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, H5I_INVALID_HID, "can't check for 'post open' operation")
- if (supported)
+ if (supported & H5VL_OPT_QUERY_SUPPORTED)
if (H5VL_file_optional(vol_obj, H5VL_NATIVE_FILE_POST_OPEN, H5P_DATASET_XFER_DEFAULT,
H5_REQUEST_NULL) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTINIT, H5I_INVALID_HID,
@@ -747,8 +746,10 @@ H5R__copy(const H5R_ref_priv_t *src_ref, H5R_ref_priv_t *dst_ref)
dst_ref->info.obj.filename = NULL;
/* Set location ID and hold reference to it */
- if (H5R__set_loc_id(dst_ref, src_ref->loc_id, TRUE, TRUE) < 0)
- HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, FAIL, "cannot set reference location ID")
+ dst_ref->loc_id = src_ref->loc_id;
+ if (H5I_inc_ref(dst_ref->loc_id, TRUE) < 0)
+ HGOTO_ERROR(H5E_REFERENCE, H5E_CANTINC, FAIL, "incrementing location ID failed")
+ dst_ref->app_ref = TRUE;
}
done:
@@ -807,7 +808,7 @@ H5R__set_obj_token(H5R_ref_priv_t *ref, const H5O_token_t *obj_token, size_t tok
HDassert(token_size);
HDassert(token_size <= H5O_MAX_TOKEN_SIZE);
- H5MM_memcpy(&ref->info.obj.token, obj_token, sizeof(H5O_token_t));
+ H5MM_memcpy(&ref->info.obj.token, obj_token, token_size);
HDassert(token_size <= 255);
ref->token_size = (uint8_t)token_size;
@@ -1040,12 +1041,13 @@ H5R__decode(const unsigned char *buf, size_t *nbytes, H5R_ref_priv_t *ref)
FUNC_ENTER_PACKAGE
+ /* Sanity checks */
HDassert(buf);
HDassert(nbytes);
HDassert(ref);
- buf_size = *nbytes;
/* Don't decode if buffer size isn't big enough */
+ buf_size = *nbytes;
if (buf_size < H5R_ENCODE_HEADER_SIZE)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, FAIL, "Buffer size is too small")
@@ -1106,6 +1108,7 @@ H5R__decode(const unsigned char *buf, size_t *nbytes, H5R_ref_priv_t *ref)
H5R_LOG_DEBUG("Decoded reference, filename=%s, obj_addr=%s, encode size=%u", ref->info.obj.filename,
H5R__print_token(ref->info.obj.token), ref->encode_size);
+ /* Set output info */
*nbytes = decode_size;
done:
@@ -1464,122 +1467,6 @@ H5R__decode_heap(H5F_t *f, const unsigned char *buf, size_t *nbytes, unsigned ch
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5R__decode_heap() */
-/*-------------------------------------------------------------------------
- * Function: H5R__free_heap
- *
- * Purpose: Remove data previously inserted into heap (native only).
- *
- * Return: SUCCEED/FAIL
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5R__free_heap(H5F_t *f, const unsigned char *buf, size_t nbytes)
-{
- H5HG_t hobjid;
- const uint8_t *p = (const uint8_t *)buf;
- size_t buf_size;
- herr_t ret_value = SUCCEED;
-
- FUNC_ENTER_PACKAGE
-
- HDassert(f);
- HDassert(buf);
-
- buf_size = H5HG_HEAP_ID_SIZE(f);
- /* Don't decode if buffer size isn't big enough */
- if (nbytes < buf_size)
- HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, FAIL, "Buffer size is too small")
-
- /* Get the heap information */
- H5F_addr_decode(f, &p, &(hobjid.addr));
- if (!H5F_addr_defined(hobjid.addr) || hobjid.addr == 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Undefined reference pointer")
- UINT32DECODE(p, hobjid.idx);
-
- /* Free heap object */
- if (hobjid.addr > 0) {
- /* Free heap object */
- if (H5HG_remove(f, &hobjid) < 0)
- HGOTO_ERROR(H5E_REFERENCE, H5E_WRITEERROR, FAIL, "Unable to remove heap object")
- } /* end if */
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5R__free_heap() */
-
-/*-------------------------------------------------------------------------
- * Function: H5R__decode_token_compat
- *
- * Purpose: Decode an object token. (native only)
- *
- * Return: SUCCEED/FAIL
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5R__decode_token_compat(H5VL_object_t *vol_obj, H5I_type_t type, H5R_type_t ref_type,
- const unsigned char *buf, H5O_token_t *obj_token)
-{
- hid_t file_id = H5I_INVALID_HID; /* File ID for region reference */
- H5VL_object_t * vol_obj_file = NULL;
- H5VL_file_cont_info_t cont_info = {H5VL_CONTAINER_INFO_VERSION, 0, 0, 0};
- herr_t ret_value = SUCCEED;
-
- FUNC_ENTER_PACKAGE
-
-#ifndef NDEBUG
- {
- hbool_t is_native = FALSE; /* Whether the src file is using the native VOL connector */
-
- /* Check if using native VOL connector */
- if (H5VL_object_is_native(vol_obj, &is_native) < 0)
- HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "can't query if file uses native VOL connector")
-
- /* Must use native VOL connector for this operation */
- HDassert(is_native);
- }
-#endif /* NDEBUG */
-
- /* Get the file for the object */
- if ((file_id = H5F_get_file_id(vol_obj, type, FALSE)) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object")
-
- /* Retrieve VOL object */
- if (NULL == (vol_obj_file = H5VL_vol_object(file_id)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
-
- /* Get container info */
- if (H5VL_file_get((const H5VL_object_t *)vol_obj_file, H5VL_FILE_GET_CONT_INFO, H5P_DATASET_XFER_DEFAULT,
- H5_REQUEST_NULL, &cont_info) < 0)
- HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "unable to get container info")
-
- if (ref_type == H5R_OBJECT1) {
- size_t buf_size = H5R_OBJ_REF_BUF_SIZE;
-
- /* Get object address */
- if (H5R__decode_token_obj_compat(buf, &buf_size, obj_token, cont_info.token_size) < 0)
- HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, FAIL, "unable to get object token")
- } /* end if */
- else {
- size_t buf_size = H5R_DSET_REG_REF_BUF_SIZE;
- H5F_t *f = NULL;
-
- /* Retrieve file from VOL object */
- if (NULL == (f = (H5F_t *)H5VL_object_data((const H5VL_object_t *)vol_obj_file)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid VOL object")
-
- /* Get object address */
- if (H5R__decode_token_region_compat(f, buf, &buf_size, obj_token, cont_info.token_size, NULL) < 0)
- HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, FAIL, "unable to get object address")
- } /* end else */
-
-done:
- if (file_id != H5I_INVALID_HID && H5I_dec_ref(file_id) < 0)
- HDONE_ERROR(H5E_REFERENCE, H5E_CANTDEC, FAIL, "unable to decrement refcount on file")
- FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5R__decode_token_compat() */
-
/*-------------------------------------------------------------------------
* Function: H5R__encode_token_obj_compat
*
@@ -1644,82 +1531,6 @@ H5R__decode_token_obj_compat(const unsigned char *buf, size_t *nbytes, H5O_token
FUNC_LEAVE_NOAPI(ret_value)
} /* H5R__decode_token_obj_compat() */
-/*-------------------------------------------------------------------------
- * Function: H5R__encode_token_region_compat
- *
- * Purpose: Encode dataset selection and insert data into heap
- * (native only).
- *
- * Return: SUCCEED/FAIL
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5R__encode_token_region_compat(H5F_t *f, const H5O_token_t *obj_token, size_t token_size, H5S_t *space,
- unsigned char *buf, size_t *nalloc)
-{
- size_t buf_size;
- unsigned char *data = NULL;
- herr_t ret_value = SUCCEED;
-
- FUNC_ENTER_PACKAGE
-
- HDassert(f);
- HDassert(obj_token);
- HDassert(token_size);
- HDassert(space);
- HDassert(nalloc);
-
- /* Get required buffer size */
- if (H5R__encode_heap(f, NULL, &buf_size, NULL, (size_t)0) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
-
- if (buf && *nalloc >= buf_size) {
- ssize_t data_size;
- uint8_t *p;
-
- /* Pass the correct encoding version for the selection depending on the
- * file libver bounds, this is later retrieved in H5S hyper encode */
- H5CX_set_libver_bounds(f);
-
- /* Zero the heap ID out, may leak heap space if user is re-using
- * reference and doesn't have garbage collection turned on
- */
- HDmemset(buf, 0, buf_size);
-
- /* Get the amount of space required to serialize the selection */
- if ((data_size = H5S_SELECT_SERIAL_SIZE(space)) < 0)
- HGOTO_ERROR(H5E_REFERENCE, H5E_CANTINIT, FAIL,
- "Invalid amount of space for serializing selection")
-
- /* Increase buffer size to allow for the dataset token */
- data_size += (hssize_t)token_size;
-
- /* Allocate the space to store the serialized information */
- H5_CHECK_OVERFLOW(data_size, hssize_t, size_t);
- if (NULL == (data = (uint8_t *)H5MM_malloc((size_t)data_size)))
- HGOTO_ERROR(H5E_REFERENCE, H5E_NOSPACE, FAIL, "memory allocation failed")
-
- /* Serialize information for dataset OID into heap buffer */
- p = (uint8_t *)data;
- H5MM_memcpy(p, obj_token, token_size);
- p += token_size;
-
- /* Serialize the selection into heap buffer */
- if (H5S_SELECT_SERIALIZE(space, &p) < 0)
- HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCOPY, FAIL, "Unable to serialize selection")
-
- /* Write to heap */
- if (H5R__encode_heap(f, buf, nalloc, data, (size_t)data_size) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
- }
- *nalloc = buf_size;
-
-done:
- H5MM_free(data);
- FUNC_LEAVE_NOAPI(ret_value)
-} /* H5R__encode_token_region_compat() */
-
/*-------------------------------------------------------------------------
* Function: H5R__decode_token_region_compat
*
diff --git a/src/H5Rpkg.h b/src/H5Rpkg.h
index 4224805ff93..ee5fb710d37 100644
--- a/src/H5Rpkg.h
+++ b/src/H5Rpkg.h
@@ -119,18 +119,12 @@ H5_DLL herr_t H5R__encode_heap(H5F_t *f, unsigned char *buf, size_t *nalloc, con
size_t data_size);
H5_DLL herr_t H5R__decode_heap(H5F_t *f, const unsigned char *buf, size_t *nbytes, unsigned char **data_ptr,
size_t *data_size);
-H5_DLL herr_t H5R__free_heap(H5F_t *f, const unsigned char *buf, size_t nbytes);
-
-H5_DLL herr_t H5R__decode_token_compat(H5VL_object_t *vol_obj, H5I_type_t type, H5R_type_t ref_type,
- const unsigned char *buf, H5O_token_t *obj_token);
H5_DLL herr_t H5R__encode_token_obj_compat(const H5O_token_t *obj_token, size_t token_size,
unsigned char *buf, size_t *nalloc);
H5_DLL herr_t H5R__decode_token_obj_compat(const unsigned char *buf, size_t *nbytes, H5O_token_t *obj_token,
size_t token_size);
-H5_DLL herr_t H5R__encode_token_region_compat(H5F_t *f, const H5O_token_t *obj_token, size_t token_size,
- H5S_t *space, unsigned char *buf, size_t *nalloc);
H5_DLL herr_t H5R__decode_token_region_compat(H5F_t *f, const unsigned char *buf, size_t *nbytes,
H5O_token_t *obj_token, size_t token_size, H5S_t **space_ptr);
diff --git a/src/H5Rpublic.h b/src/H5Rpublic.h
index 4a821193735..b33960eef16 100644
--- a/src/H5Rpublic.h
+++ b/src/H5Rpublic.h
@@ -40,40 +40,54 @@
/* Public Typedefs */
/*******************/
-/*
+//!
+/**
* Reference types allowed.
- * DO NOT CHANGE THE ORDER or VALUES as reference type values are encoded into
- * the datatype message header.
+ *
+ * \internal DO NOT CHANGE THE ORDER or VALUES as reference type values are
+ * encoded into the datatype message header.
*/
typedef enum {
- H5R_BADTYPE = (-1), /* Invalid reference type */
- H5R_OBJECT1 = 0, /* Backward compatibility (object) */
- H5R_DATASET_REGION1 = 1, /* Backward compatibility (region) */
- H5R_OBJECT2 = 2, /* Object reference */
- H5R_DATASET_REGION2 = 3, /* Region reference */
- H5R_ATTR = 4, /* Attribute Reference */
- H5R_MAXTYPE = 5 /* Highest type (invalid) */
+ H5R_BADTYPE = (-1), /**< Invalid reference type */
+ H5R_OBJECT1 = 0, /**< Backward compatibility (object) */
+ H5R_DATASET_REGION1 = 1, /**< Backward compatibility (region) */
+ H5R_OBJECT2 = 2, /**< Object reference */
+ H5R_DATASET_REGION2 = 3, /**< Region reference */
+ H5R_ATTR = 4, /**< Attribute Reference */
+ H5R_MAXTYPE = 5 /**< Highest type (invalid) */
} H5R_type_t;
+//!
/* Deprecated types are kept for backward compatibility with previous versions */
+//!
/**
- * Deprecated object reference type that is used with deprecated reference APIs.
- * Note! This type can only be used with the "native" HDF5 VOL connector.
+ * \deprecated Deprecated object reference type that is used with deprecated
+ * reference APIs.
+ *
+ * \note This type can only be used with the "native" HDF5 VOL connector.
*/
typedef haddr_t hobj_ref_t;
+//!
+//!
/**
- * Dataset region reference type that is used with deprecated reference APIs.
- * (Buffer to store heap ID and index)
- * This needs to be large enough to store largest haddr_t in a worst case
+ * Buffer to store heap ID and index
+ *
+ * This needs to be large enough to store largest #haddr_t in a worst case
* machine (8 bytes currently) plus an int.
- * Note! This type can only be used with the "native" HDF5 VOL connector.
+ *
+ * \deprecated Dataset region reference type that is used with deprecated
+ * reference APIs.
+ *
+ * \note This type can only be used with the "native" HDF5 VOL connector.
*/
typedef struct {
uint8_t __data[H5R_DSET_REG_REF_BUF_SIZE];
} hdset_reg_ref_t;
+//!
+//!
/**
* Opaque reference type. The same reference type is used for object,
* dataset region and attribute references. This is the type that
@@ -81,10 +95,11 @@ typedef struct {
*/
typedef struct {
union {
- uint8_t __data[H5R_REF_BUF_SIZE]; /* opaque data */
- int64_t align; /* ensures alignment */
+ uint8_t __data[H5R_REF_BUF_SIZE]; /**< opaque data */
+ int64_t align; /**< ensures alignment */
} u;
} H5R_ref_t;
+//!
/********************/
/* Public Variables */
@@ -99,30 +114,466 @@ extern "C" {
#endif
/* Constructors */
+/**
+ * --------------------------------------------------------------------------
+ * \ingroup H5R
+ *
+ * \brief Creates an object reference
+ *
+ * \fgdta_loc_id
+ * \param[in] name Name of object
+ * \oapl_id
+ * \param[out] ref_ptr Pointer to reference
+ *
+ * \return \herr_t
+ *
+ * \details H5Rcreate_object() creates a reference pointing to the
+ * object named \p name located at \p loc_id. The parameters \p
+ * loc_id and \p name are used to locate the object.
+ *
+ * The parameter \p oapl_id is an object access property list
+ * identifier for the referenced object. The access property list
+ * must be of the same type as the object being referenced, that is
+ * a group, dataset or committed datatype property list.
+ *
+ * \ref H5R_ref_t is defined in H5Rpublic.h as:
+ * \snippet this H5R_ref_t_snip
+ *
+ * H5Rdestroy() should be used to release the resource from the
+ * reference.
+ *
+ */
H5_DLL herr_t H5Rcreate_object(hid_t loc_id, const char *name, hid_t oapl_id, H5R_ref_t *ref_ptr);
+
+/**
+ * --------------------------------------------------------------------------
+ * \ingroup H5R
+ *
+ * \brief Creates a region reference
+ *
+ * \fgdta_loc_id
+ * \param[in] name Name of object
+ * \space_id
+ * \oapl_id
+ * \param[out] ref_ptr Pointer to reference
+ *
+ * \return \herr_t
+ *
+ * \details H5Rcreate_region() creates the reference, \p ref_ptr,
+ * pointing to the region represented by \p space_id within the
+ * object named name located at \p loc_id.
+ *
+ * The parameters \p loc_id and \p name are used to locate the
+ * object. The parameter \p space_id identifies the dataset region
+ * that a dataset region reference points to.
+ *
+ * The parameter \p oapl_id is an object access property list
+ * identifier for the referenced object. The access property list
+ * must be of the same type as the object being referenced, that is
+ * a dataset property list in this case.
+ *
+ * \ref H5R_ref_t is defined in H5Rpublic.h as:
+ * \snippet this H5R_ref_t_snip
+ *
+ * H5Rdestroy() should be used to release the resource from the
+ * reference.
+ *
+ */
H5_DLL herr_t H5Rcreate_region(hid_t loc_id, const char *name, hid_t space_id, hid_t oapl_id,
H5R_ref_t *ref_ptr);
+
+/**
+ * --------------------------------------------------------------------------
+ * \ingroup H5R
+ *
+ * \brief Creates an attribute reference
+ *
+ * \fgdta_loc_id
+ * \param[in] name Name of object
+ * \param[in] attr_name Name of attribute
+ * \oapl_id
+ * \param[out] ref_ptr Pointer to reference
+ *
+ * \return \herr_t
+ *
+ * \details H5Rcreate_attr() creates the reference, \p ref_ptr, pointing
+ * to the attribute named \p attr_name and attached to the object
+ * named \p name located at \p loc_id.
+ *
+ * The parameters \p loc_id and \p name locate the object. The
+ * parameter \p attr_name specifies the attribute within the object.
+ *
+ * The parameter \p oapl_id is an object access property list
+ * identifier for the object that the referenced attribute is
+ * attached to. The access property list must be of the same type
+ * as that object, that is a group, dataset or committed datatype
+ * property list.
+ *
+ * \ref H5R_ref_t is defined in H5Rpublic.h as:
+ * \snippet this H5R_ref_t_snip
+ *
+ * H5Rdestroy() should be used to release the resource from the
+ * reference.
+ *
+ */
H5_DLL herr_t H5Rcreate_attr(hid_t loc_id, const char *name, const char *attr_name, hid_t oapl_id,
H5R_ref_t *ref_ptr);
+
+/**
+ * --------------------------------------------------------------------------
+ * \ingroup H5R
+ *
+ * \brief Closes a reference
+ *
+ * \param[in] ref_ptr Pointer to reference
+ *
+ * \return \herr_t
+ *
+ * \details Given a reference, \p ref_ptr, to an object, region or attribute
+ * attached to an object, H5Rdestroy() releases allocated resources
+ * from a previous create call.
+ *
+ * \ref H5R_ref_t is defined in H5Rpublic.h as:
+ * \snippet this H5R_ref_t_snip
+ *
+ */
H5_DLL herr_t H5Rdestroy(H5R_ref_t *ref_ptr);
/* Info */
+
+/**
+ * --------------------------------------------------------------------------
+ * \ingroup H5R
+ *
+ * \brief Retrieves the type of a reference
+ *
+ * \param[in] ref_ptr Pointer to reference
+ *
+ * \return Returns a valid reference type if successful; otherwise returns #H5R_BADTYPE .
+ *
+ * \details Given a reference, \p ref_ptr, H5Rget_type() returns the
+ * type of the reference.
+ *
+ * Valid returned reference types are:
+ * \snippet this H5R_type_t_snip
+ *
+ * Note that #H5R_OBJECT1 and #H5R_DATASET_REGION1 can never be
+ * associated to an \ref H5R_ref_t reference and can therefore never be
+ * returned through that function.
+ *
+ * \ref H5R_ref_t is defined in H5Rpublic.h as:
+ * \snippet this H5R_ref_t_snip
+ *
+ */
H5_DLL H5R_type_t H5Rget_type(const H5R_ref_t *ref_ptr);
-H5_DLL htri_t H5Requal(const H5R_ref_t *ref1_ptr, const H5R_ref_t *ref2_ptr);
-H5_DLL herr_t H5Rcopy(const H5R_ref_t *src_ref_ptr, H5R_ref_t *dst_ref_ptr);
+
+/**
+ * --------------------------------------------------------------------------
+ * \ingroup H5R
+ *
+ * \brief Determines whether two references are equal
+ *
+ * \param[in] ref1_ptr Pointer to reference to compare
+ * \param[in] ref2_ptr Pointer to reference to compare
+ *
+ * \return Returns a positive value if the references are equal. Returns
+ * 0 if the references are not equal. Returns a negative value when the
+ * function fails.
+ *
+ * \details H5Requal() determines whether two references point to the
+ * same object, region or attribute.
+ *
+ * \ref H5R_ref_t is defined in H5Rpublic.h as:
+ * \snippet this H5R_ref_t_snip
+ *
+ */
+H5_DLL htri_t H5Requal(const H5R_ref_t *ref1_ptr, const H5R_ref_t *ref2_ptr);
+
+/**
+ * --------------------------------------------------------------------------
+ * \ingroup H5R
+ *
+ * \brief Copies an existing reference
+ *
+ * \param[in] src_ref_ptr Pointer to reference to copy
+ * \param[out] dst_ref_ptr Pointer to output reference
+ *
+ * \return \herr_t
+ *
+ * \details H5Rcopy() creates a copy of an existing reference.
+ * \p src_ref_ptr points to the reference to copy and \p dst_ref_ptr is the
+ * pointer to the destination reference.
+ *
+ */
+H5_DLL herr_t H5Rcopy(const H5R_ref_t *src_ref_ptr, H5R_ref_t *dst_ref_ptr);
/* Dereference */
+
+/**
+ * --------------------------------------------------------------------------
+ * \ingroup H5R
+ *
+ * \brief Opens the HDF5 object referenced
+ *
+ * \param[in] ref_ptr Pointer to reference to open
+ * \rapl_id
+ * \oapl_id
+ *
+ * \return \hid_t{object}
+ *
+ * \details Given a reference, \p ref_ptr, to an object, a region in
+ * an object, or an attribute attached to an object, H5Ropen_object()
+ * opens that object and returns an identifier.
+ *
+ * The parameter \p oapl_id is an object access property list
+ * identifier for the referenced object. The access property list
+ * must be of the same type as the object being referenced, that is
+ * a group or dataset property list.
+ *
+ * \ref H5R_ref_t is defined in H5Rpublic.h as:
+ * \snippet this H5R_ref_t_snip
+ *
+ * The object opened with this function should be closed when it
+ * is no longer needed so that resource leaks will not develop. Use
+ * the appropriate close function such as H5Oclose() or H5Dclose()
+ * for datasets.
+ *
+ */
H5_DLL hid_t H5Ropen_object(H5R_ref_t *ref_ptr, hid_t rapl_id, hid_t oapl_id);
+
+/**
+ * --------------------------------------------------------------------------
+ * \ingroup ASYNC
+ * \async_variant_of{H5Ropen}
+ */
+H5_DLL hid_t H5Ropen_object_async(const char *app_file, const char *app_func, unsigned app_line,
+ H5R_ref_t *ref_ptr, hid_t rapl_id, hid_t oapl_id, hid_t es_id);
+
+/**
+ * --------------------------------------------------------------------------
+ * \ingroup H5R
+ *
+ * \brief Sets up a dataspace and selection as specified by a region reference.
+ *
+ * \param[in] ref_ptr Pointer to reference to open
+ * \rapl_id
+ * \oapl_id
+ *
+ * \return \hid_t{dataspace}
+ *
+ * \details H5Ropen_region() creates a copy of the dataspace of the
+ * dataset pointed to by a region reference, \p ref_ptr, and defines
+ * a selection matching the selection pointed to by \p ref_ptr within
+ * the dataspace copy.
+ *
+ * The parameter \p rapl id is a reference access property list
+ * identifier for the reference. The access property list can
+ * be used to access external files that the reference points to
+ * (through a file access property list).
+ *
+ * The parameter \p oapl id is an object access property list
+ * identifier for the referenced object. The access property list
+ * must be of the same type as the object being referenced, that is
+ * a dataset property list in that case.
+ *
+ * Use H5Sclose() to release the dataspace identifier returned by
+ * this function when the identifier is no longer needed.
+ *
+ */
H5_DLL hid_t H5Ropen_region(H5R_ref_t *ref_ptr, hid_t rapl_id, hid_t oapl_id);
+
+/**
+ * --------------------------------------------------------------------------
+ * \ingroup ASYNC
+ * \async_variant_of{H5Ropen_region}
+ */
+H5_DLL hid_t H5Ropen_region_async(const char *app_file, const char *app_func, unsigned app_line,
+ H5R_ref_t *ref_ptr, hid_t rapl_id, hid_t oapl_id, hid_t es_id);
+
+/**
+ * --------------------------------------------------------------------------
+ * \ingroup H5R
+ *
+ * \brief Opens the HDF5 attribute referenced
+ *
+ * \param[in] ref_ptr Pointer to reference to open
+ * \rapl_id
+ * \aapl_id
+ *
+ * \return \hid_t{attribute}
+ *
+ * \details Given a reference, \p ref_ptr, to an attribute attached to
+ * an object, H5Ropen_attr() opens the attribute attached to that
+ * object and returns an identifier.
+ *
+ * The parameter \p rapl id is a reference access property list
+ * identifier for the reference. The access property list can
+ * be used to access external files that the reference points to
+ * (through a file access property list).
+ *
+ * The parameter \p aapl_id is an attribute access property list
+ * identifier for the referenced attribute.
+ *
+ * The attribute opened with this function should be closed with
+ * H5Aclose() when it is no longer needed.
+ *
+ */
H5_DLL hid_t H5Ropen_attr(H5R_ref_t *ref_ptr, hid_t rapl_id, hid_t aapl_id);
+/**
+ * --------------------------------------------------------------------------
+ * \ingroup ASYNC
+ * \async_variant_of{H5Ropen_attr}
+ */
+H5_DLL hid_t H5Ropen_attr_async(const char *app_file, const char *app_func, unsigned app_line,
+ H5R_ref_t *ref_ptr, hid_t rapl_id, hid_t aapl_id, hid_t es_id);
+
/* Get type */
+
+/**
+ * --------------------------------------------------------------------------
+ * \ingroup H5R
+ *
+ * \brief Retrieves the type of object that an object reference points to
+ *
+ * \param[in] ref_ptr Pointer to reference to query
+ * \rapl_id
+ * \param[out] obj_type Type of referenced object
+ *
+ * \return \herr_t
+ *
+ * \details Given a reference, \p ref_ptr, H5Rget_obj_type3() retrieves
+ * the type of the referenced object in \p obj_type.
+ *
+ * The parameter \p rapl id is a reference access property list
+ * identifier for the reference. The access property list can
+ * be used to access external files that the reference points to
+ * (through a file access property list).
+ *
+ * Upon success, the function returns in \p obj_type the type of
+ * the object that the reference points to. Valid values for this
+ * referenced object type are as followed (defined in H5Opublic.h):
+ * \snippet H5Opublic.h H5O_type_t_snip
+ *
+ */
H5_DLL herr_t H5Rget_obj_type3(H5R_ref_t *ref_ptr, hid_t rapl_id, H5O_type_t *obj_type);
/* Get name */
-H5_DLL ssize_t H5Rget_file_name(const H5R_ref_t *ref_ptr, char *buf, size_t size);
-H5_DLL ssize_t H5Rget_obj_name(H5R_ref_t *ref_ptr, hid_t rapl_id, char *buf, size_t size);
-H5_DLL ssize_t H5Rget_attr_name(const H5R_ref_t *ref_ptr, char *buf, size_t size);
+
+/**
+ * --------------------------------------------------------------------------
+ * \ingroup H5R
+ *
+ * \brief Retrieves the file name for a referenced object
+ *
+ * \param[in] ref_ptr Pointer to reference to query
+ * \param[in,out] name Buffer to place the file name of the reference
+ * \param[in] size Size of the \p name buffer
+ *
+ * \return Returns the length of the name if successful, otherwise, a negative value.
+ *
+ * \details H5Rget_file_name() retrieves the file name for the object,
+ * region or attribute reference pointed to by \p ref_ptr.
+ *
+ * Up to \p size characters of the name are returned in \p name;
+ * additional characters, if any, are not returned to the user
+ * application. If the length of the name, which determines
+ * the required value of size, is unknown, a preliminary
+ * H5Rget_file_name() call can be made. The return value of this
+ * call will be the size of the file name. That value can then be
+ * passed in for size in the second call to H5Rget_file_name(),
+ * which will retrieve the actual name.
+ *
+ */
+H5_DLL ssize_t H5Rget_file_name(const H5R_ref_t *ref_ptr, char *name, size_t size);
+
+/**
+ * --------------------------------------------------------------------------
+ * \ingroup H5R
+ *
+ * \brief Retrieves the object name for a referenced object
+ *
+ * \param[in] ref_ptr Pointer to reference to query
+ * \rapl_id
+ * \param[in,out] name Buffer to place the file name of the reference
+ * \param[in] size Size of the \p name buffer
+ *
+ * \return Returns the length of the name if successful, returning
+ * 0 (zero) if no name is associated with the identifier. Otherwise
+ * returns a negative value.
+ *
+ * \details H5Rget_obj_name() retrieves the object name for the object,
+ * region or attribute reference pointed to by \p ref_ptr.
+ *
+ * The parameter \p rapl_id is a reference access property list
+ * identifier for the reference. The access property list can
+ * be used to access external files that the reference points to
+ * (through a file access property list).
+ *
+ * Up to size characters of the name are returned in \p name; additional
+ * characters, if any, are not returned to the user application. If
+ * the length of the name, which determines the required value of
+ * \p size, is unknown, a preliminary call to H5Rget_obj_name() call
+ * can be made. The return value of this call will be the size of the
+ * object name. That value can then be passed in for \p size in the
+ * second call to H5Rget_obj_name(), which will retrieve the actual
+ * name. If there is no name associated with the object identifier
+ * or if the name is NULL, H5Rget_obj_name() returns the size of
+ * the name buffer (the size does not include the \c \0 terminator).
+ *
+ * If \p ref_ptr is an object reference, \p name will be returned with
+ * a name for the referenced object. If \p ref_ptr is a dataset region
+ * reference, \p name will contain a name for the object containing
+ * the referenced region. If \p ref_ptr is an attribute reference, \p
+ * name will contain a name for the object the attribute is attached
+ * to. Note that an object in an HDF5 file may have multiple paths
+ * if there are multiple links pointing to it. This function may
+ * return any one of these paths.
+ *
+ */
+H5_DLL ssize_t H5Rget_obj_name(H5R_ref_t *ref_ptr, hid_t rapl_id, char *name, size_t size);
+
+/**
+ * --------------------------------------------------------------------------
+ * \ingroup H5R
+ *
+ * \brief Retrieves the attribute name for a referenced object
+ *
+ * \param[in] ref_ptr Pointer to reference to query
+ * \param[in,out] name Buffer to place the attribute name of the reference
+ * \param[in] size Size of the \p name buffer
+ *
+ * \return Returns the length of the name if successful, otherwise, a negative value.
+ *
+ * \details H5Rget_attr_name() retrieves the attribute name for the
+ * attribute reference pointed to by \p ref_ptr.
+ *
+ * Up to size characters of the name are returned in \p name;
+ * additional characters, if any, are not returned to the user
+ * application. If the length of the name, which determines
+ * the required value of \p size, is unknown, a preliminary
+ * H5Rget_attr_name() call can be made. The return value of this
+ * call will be the size of the attribute name. That value can then
+ * be passed in for size in the second call to H5Rget_attr_name(),
+ * which will retrieve the actual name.
+ *
+ */
+H5_DLL ssize_t H5Rget_attr_name(const H5R_ref_t *ref_ptr, char *name, size_t size);
+
+/* API Wrappers for async routines */
+/* (Must be defined _after_ the function prototype) */
+/* (And must only defined when included in application code, not the library) */
+#ifndef H5R_MODULE
+#define H5Ropen_object_async(...) H5Ropen_object_async(__FILE__, __func__, __LINE__, __VA_ARGS__)
+#define H5Ropen_region_async(...) H5Ropen_region_async(__FILE__, __func__, __LINE__, __VA_ARGS__)
+#define H5Ropen_attr_async(...) H5Ropen_attr_async(__FILE__, __func__, __LINE__, __VA_ARGS__)
+
+/* Define "wrapper" versions of function calls, to allow compile-time values to
+ * be passed in by language wrapper or library layer on top of HDF5. */
+#define H5Ropen_object_async_wrap H5_NO_EXPAND(H5Ropen_object_async)
+#define H5Ropen_region_async_wrap H5_NO_EXPAND(H5Ropen_region_async)
+#define H5Ropen_attr_async_wrap H5_NO_EXPAND(H5Ropen_attr_async)
+#endif /* H5R_MODULE */
/* Symbols defined for compatibility with previous versions of the HDF5 API.
*
@@ -138,15 +589,334 @@ H5_DLL ssize_t H5Rget_attr_name(const H5R_ref_t *ref_ptr, char *buf, size_t size
/* Function prototypes */
#ifndef H5_NO_DEPRECATED_SYMBOLS
+/**
+ * --------------------------------------------------------------------------
+ * \ingroup H5R
+ *
+ * \brief Retrieves the type of object that an object reference points to
+ *
+ * \param[in] id The dataset containing the reference object or the group
+ * containing that dataset
+ * \param[in] ref_type Type of reference to query
+ * \param[in] ref Reference to query
+ *
+ * \return Returns a valid object type if successful; otherwise returns a
+ * negative value (#H5G_UNKNOWN).
+ *
+ * \deprecated This function has been renamed from H5Rget_obj_type() and is
+ * deprecated in favor of the macro H5Rget_obj_type() or the
+ * function H5Rget_obj_type2().
+ *
+ * \details Given an object reference, \p ref, H5Rget_obj_type1() returns the
+ * type of the referenced object.
+ *
+ * A \Emph{reference type} is the type of reference, either an object
+ * reference or a dataset region reference. An \Emph{object reference}
+ * points to an HDF5 object while a \Emph{dataset region reference}
+ * points to a defined region within a dataset.
+ *
+ * The \Emph{referenced object} is the object the reference points
+ * to. The \Emph{referenced object type}, or the type of the referenced
+ * object, is the type of the object that the reference points to.
+ *
+ * The location identifier, \p id, is the identifier for either the
+ * dataset containing the object reference or the group containing that
+ * dataset.
+ *
+ * Valid reference types, to pass in as \p ref_type, include the
+ * following:
+ * \snippet this H5R_type_t_snip
+ *
+ * If the application does not already know the object reference type,
+ * that can be determined with three preliminary calls:
+ *
+ * \li Call H5Dget_type() on the dataset containing the reference to
+ * get a datatype identifier for the dataset’s datatype.
+ * \li Using that datatype identifier, H5Tget_class() returns a datatype
+ * class.\n If the datatype class is #H5T_REFERENCE, H5Tequal() can
+ * then be used to determine whether the reference’s datatype is
+ * #H5T_STD_REF_OBJ or #H5T_STD_REF_DSETREG:
+ * - If the datatype is #H5T_STD_REF_OBJ, the reference object type
+ * is #H5R_OBJECT.
+ * - If the datatype is #H5T_STD_REF_DSETREG, the reference object
+ * type is #H5R_DATASET_REGION.
+ *
+ * When the function completes successfully, it returns one of the
+ * following valid object type values (defined in H5Gpublic.h):
+ * \snippet H5Gpublic.h H5G_obj_t_snip
+ *
+ * \version 1.8.0 Function H5Rget_obj_type() renamed to H5Rget_obj_type1() and
+ * deprecated in this release.
+ * \since 1.6.0
+ *
+ */
H5_DLL H5G_obj_t H5Rget_obj_type1(hid_t id, H5R_type_t ref_type, const void *ref);
-H5_DLL hid_t H5Rdereference1(hid_t obj_id, H5R_type_t ref_type, const void *ref);
+
+/**
+ * --------------------------------------------------------------------------
+ * \ingroup H5R
+ *
+ * \brief Opens the HDF5 object referenced
+ *
+ * \obj_id
+ * \param[in] ref_type The reference type of \p ref
+ * \param[in] ref Reference to open
+ *
+ * \return Returns identifier of referenced object if successful; otherwise
+ * returns a negative value.
+ *
+ * \deprecated This function has been renamed from H5Rdereference() and is
+ * deprecated in favor of the macro H5Rdereference() or the function
+ * H5Rdereference2().
+ *
+ * \details Given a reference, \p ref, to an object or a region in an object,
+ * H5Rdereference1() opens that object and returns an identifier.
+ *
+ * The parameter \p obj_id must be a valid identifier for an object in
+ * the HDF5 file containing the referenced object, including the file
+ * identifier.
+ *
+ * The parameter \p ref_type specifies the reference type of the
+ * reference \p ref. \p ref_type may contain either of the following
+ * values:
+ * - #H5R_OBJECT
+ * - #H5R_DATASET_REGION
+ *
+ * The object opened with this function should be closed when it is no
+ * longer needed so that resource leaks will not develop. Use the
+ * appropriate close function such as H5Oclose() or H5Dclose() for
+ * datasets.
+ *
+ * \version 1.10.0 Function H5Rdereference() renamed to H5Rdereference1() and
+ * deprecated in this release.
+ * \since 1.8.0
+ *
+ */
+H5_DLL hid_t H5Rdereference1(hid_t obj_id, H5R_type_t ref_type, const void *ref);
#endif /* H5_NO_DEPRECATED_SYMBOLS */
-H5_DLL herr_t H5Rcreate(void *ref, hid_t loc_id, const char *name, H5R_type_t ref_type, hid_t space_id);
-H5_DLL herr_t H5Rget_obj_type2(hid_t id, H5R_type_t ref_type, const void *ref, H5O_type_t *obj_type);
-H5_DLL hid_t H5Rdereference2(hid_t obj_id, hid_t oapl_id, H5R_type_t ref_type, const void *ref);
-H5_DLL hid_t H5Rget_region(hid_t dataset, H5R_type_t ref_type, const void *ref);
+/**
+ * --------------------------------------------------------------------------
+ * \ingroup H5R
+ *
+ * \brief Creates a reference
+ *
+ * \param[out] ref Reference created by the function call
+ * \param[in] loc_id Location identifier used to locate the object being pointed to
+ * \param[in] name Name of object at location \p loc_id
+ * \param[in] ref_type Type of reference
+ * \param[in] space_id Dataspace identifier with selection. Used only for
+ * dataset region references; pass as -1 if reference is
+ * an object reference, i.e., of type #H5R_OBJECT
+ *
+ * \return \herr_t
+ *
+ * \details H5Rcreate() creates the reference, \p ref, of the type specified in
+ * \p ref_type, pointing to the object \p name located at \p loc_id.
+ *
+ * The HDF5 library maps the void type specified above for \p ref to
+ * the type specified in \p ref_type, which will be one of the following:
+ * \snippet this H5R_type_t_snip
+ *
+ * The parameters \p loc_id and \p name are used to locate the object.
+ *
+ * The parameter \p space_id identifies the dataset region that a
+ * dataset region reference points to. This parameter is used only with
+ * dataset region references and should be set to -1 if the reference
+ * is an object reference, #H5R_OBJECT.
+ *
+ * \since 1.8.0
+ */
+H5_DLL herr_t H5Rcreate(void *ref, hid_t loc_id, const char *name, H5R_type_t ref_type, hid_t space_id);
+
+/**
+ * --------------------------------------------------------------------------
+ * \ingroup H5R
+ *
+ * \brief Retrieves the type of object that an object reference points to
+ *
+ * \param[in] id The dataset containing the reference object or the group
+ * containing that dataset
+ * \param[in] ref_type Type of reference to query
+ * \param[in] ref Reference to query
+ * \param[out] obj_type Type of referenced object
+ *
+ * \return \herr_t
+ *
+ * \details Given an object reference, \p ref, H5Rget_obj_type2() returns the
+ * type of the referenced object in \p obj_type.
+ *
+ * A \Emph{reference type} is the type of reference, either an object
+ * reference or a dataset region reference. An \Emph{object reference}
+ * points to an HDF5 object while a \Emph{dataset region reference}
+ * points to a defined region within a dataset.
+ *
+ * The \Emph{referenced object} is the object the reference points
+ * to. The \Emph{referenced object type}, or the type of the referenced
+ * object, is the type of the object that the reference points to.
+ *
+ * The location identifier, \p id, is the identifier for either the
+ * dataset containing the object reference or the group containing that
+ * dataset.
+ *
+ * Valid reference types, to pass in as \p ref_type, include the
+ * following:
+ * \snippet this H5R_type_t_snip
+ *
+ * If the application does not already know the object reference type,
+ * that can be determined with three preliminary calls:
+ *
+ * \li Call H5Dget_type() on the dataset containing the reference to
+ * get a datatype identifier for the dataset’s datatype.
+ * \li Using that datatype identifier, H5Tget_class() returns a datatype
+ * class.\n If the datatype class is #H5T_REFERENCE, H5Tequal() can
+ * then be used to determine whether the reference’s datatype is
+ * #H5T_STD_REF_OBJ or #H5T_STD_REF_DSETREG:
+ * - If the datatype is #H5T_STD_REF_OBJ, the reference object type
+ * is #H5R_OBJECT.
+ * - If the datatype is #H5T_STD_REF_DSETREG, the reference object
+ * type is #H5R_DATASET_REGION.
+ *
+ * When the function completes successfully, it returns one of the
+ * following valid object type values (defined in H5Opublic.h):
+ * \snippet H5Opublic.h H5O_type_t_snip
+ *
+ * \since 1.8.0
+ *
+ */
+H5_DLL herr_t H5Rget_obj_type2(hid_t id, H5R_type_t ref_type, const void *ref, H5O_type_t *obj_type);
+
+/**
+ * --------------------------------------------------------------------------
+ * \ingroup H5R
+ *
+ * \brief Opens the HDF5 object referenced
+ *
+ * \obj_id
+ * \oapl_id
+ * \param[in] ref_type The reference type of \p ref
+ * \param[in] ref Reference to open
+ *
+ * \return Returns identifier of referenced object if successful; otherwise
+ * returns a negative value.
+ *
+ * \details Given a reference, \p ref, to an object or a region in an object,
+ * H5Rdereference2() opens that object and returns an identifier.
+ *
+ * The parameter \p obj_id must be a valid identifier for the HDF5 file
+ * containing the referenced object or for any object in that HDF5
+ * file.
+ *
+ * The parameter \p oapl_id is an object access property list
+ * identifier for the referenced object. The access property list must
+ * be of the same type as the object being referenced, that is a group,
+ * dataset, or datatype property list.
+ *
+ * The parameter \p ref_type specifies the reference type of the
+ * reference \p ref. \p ref_type may contain either of the following
+ * values:
+ * - #H5R_OBJECT
+ * - #H5R_DATASET_REGION
+ *
+ * The object opened with this function should be closed when it is no
+ * longer needed so that resource leaks will not develop. Use the
+ * appropriate close function such as H5Oclose() or H5Dclose() for
+ * datasets.
+ *
+ * \since 1.10.0
+ *
+ */
+H5_DLL hid_t H5Rdereference2(hid_t obj_id, hid_t oapl_id, H5R_type_t ref_type, const void *ref);
+
+/**
+ * --------------------------------------------------------------------------
+ * \ingroup H5R
+ *
+ * \brief Sets up a dataspace and selection as specified by a region reference
+ *
+ * \param[in] dataset File identifier or identifier for any object in the file
+ * containing the referenced region
+ * \param[in] ref_type Reference type of \p ref, which must be #H5R_DATASET_REGION
+ * \param[in] ref Region reference to open
+ *
+ * \return Returns a valid dataspace identifier if successful; otherwise returns
+ * a negative value.
+ *
+ * \details H5Rget_region() creates a copy of the dataspace of the dataset
+ * pointed to by a region reference, \p ref, and defines a selection
+ * matching the selection pointed to by ref within the dataspace copy.
+ *
+ * \p dataset is used to identify the file containing the referenced
+ * region; it can be a file identifier or an identifier for any object
+ * in the file.
+ *
+ * The parameter \p ref_type specifies the reference type of \p ref and
+ * must contain the value #H5R_DATASET_REGION.
+ *
+ * Use H5Sclose() to release the dataspace identifier returned by this
+ * function when the identifier is no longer needed.
+ *
+ */
+H5_DLL hid_t H5Rget_region(hid_t dataset, H5R_type_t ref_type, const void *ref);
+
+/**
+ * --------------------------------------------------------------------------
+ * \ingroup H5R
+ *
+ * \brief Retrieves a name for a referenced object
+ *
+ * \param[in] loc_id Identifier for the file containing the reference or for
+ * any object in that file
+ * \param[in] ref_type Type of reference
+ * \param[in] ref An object or dataset region reference
+ * \param[out] name A buffer to place the name of the referenced object or
+ * dataset region. If \c NULL, then this call will return the
+ * size in bytes of the name.
+ * \param[in] size The size of the \p name buffer. When the size is passed in,
+ * the \c NULL terminator needs to be included.
+ *
+ * \return Returns the length of the name if successful, returning 0 (zero) if
+ * no name is associated with the identifier. Otherwise returns a
+ * negative value.
+ *
+ * \details H5Rget_name() retrieves a name for the object identified by \p ref.\n
+ * \p loc_id is used to identify the file containing the reference. It
+ * can be the file identifier for the file containing the reference or
+ * an identifier for any object in that file.
+ *
+ * \ref H5R_type_t is the reference type of \p ref. Valid values
+ * include the following:
+ * \snippet this H5R_type_t_snip
+ *
+ * \p ref is the reference for which the target object’s name is
+ * sought.
+ *
+ * If \p ref is an object reference, \p name will be returned with a
+ * name for the referenced object. If \p ref is a dataset region
+ * reference, \p name will contain a name for the object containing the
+ * referenced region.
+ *
+ * Up to \p size characters of the name are returned in \p name;
+ * additional characters, if any, are not returned to the user
+ * application.
+ *
+ * If the length of the name, which determines the required value of \p
+ * size, is unknown, a preliminary H5Rget_name() call can be made. The
+ * return value of this call will be the size of the object name. That
+ * value can then be assigned to \p size for a second H5Rget_name()
+ * call, which will retrieve the actual name.
+ *
+ * If there is no name associated with the object identifier or if the
+ * \p name is \c NULL, H5Rget_name() returns the size of the \p name
+ * buffer (the size does not include the \p NULL terminator).
+ *
+ * Note that an object in an HDF5 file may have multiple paths if there
+ * are multiple links pointing to it. This function may return any one
+ * of these paths.
+ *
+ * \since 1.8.0
+ */
H5_DLL ssize_t H5Rget_name(hid_t loc_id, H5R_type_t ref_type, const void *ref, char *name, size_t size);
#ifdef __cplusplus
diff --git a/src/H5SM.c b/src/H5SM.c
index fbf497511be..e8ce4b2c9b2 100644
--- a/src/H5SM.c
+++ b/src/H5SM.c
@@ -56,6 +56,7 @@ static herr_t H5SM__find_in_list(const H5SM_list_t *list, const H5SM_mesg_key_t
size_t *list_pos);
static herr_t H5SM__convert_list_to_btree(H5F_t *f, H5SM_index_header_t *header, H5SM_list_t **_list,
H5HF_t *fheap, H5O_t *open_oh);
+static herr_t H5SM__bt2_convert_to_list_op(const void *record, void *op_data);
static herr_t H5SM__convert_btree_to_list(H5F_t *f, H5SM_index_header_t *header);
static herr_t H5SM__incr_ref(void *record, void *_op_data, hbool_t *changed);
static herr_t H5SM__write_mesg(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, hbool_t defer,
@@ -265,7 +266,7 @@ H5SM__type_to_flag(unsigned type_id, unsigned *type_flag)
switch (type_id) {
case H5O_FILL_ID:
type_id = H5O_FILL_NEW_ID;
- /* Fall through... */
+ /* FALLTHROUGH */
H5_ATTR_FALLTHROUGH
case H5O_SDSPACE_ID:
@@ -285,7 +286,7 @@ H5SM__type_to_flag(unsigned type_id, unsigned *type_flag)
} /* end H5SM__type_to_flag() */
/*-------------------------------------------------------------------------
- * Function: H5SM_get_index
+ * Function: H5SM__get_index
*
* Purpose: Get the index number for a given message type.
*
@@ -301,13 +302,13 @@ H5SM__type_to_flag(unsigned type_id, unsigned *type_flag)
*-------------------------------------------------------------------------
*/
ssize_t
-H5SM_get_index(const H5SM_master_table_t *table, unsigned type_id)
+H5SM__get_index(const H5SM_master_table_t *table, unsigned type_id)
{
size_t x;
unsigned type_flag;
ssize_t ret_value = FAIL;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_PACKAGE
/* Translate the H5O type_id into an H5SM type flag */
if (H5SM__type_to_flag(type_id, &type_flag) < 0)
@@ -325,7 +326,7 @@ H5SM_get_index(const H5SM_master_table_t *table, unsigned type_id)
*/
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5SM_get_index() */
+} /* end H5SM__get_index() */
/*-------------------------------------------------------------------------
* Function: H5SM_type_shared
@@ -419,7 +420,7 @@ H5SM_get_fheap_addr(H5F_t *f, unsigned type_id, haddr_t *fheap_addr)
HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table")
/* Look up index for message type */
- if ((index_num = H5SM_get_index(table, type_id)) < 0)
+ if ((index_num = H5SM__get_index(table, type_id)) < 0)
HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to find correct SOHM index")
/* Retrieve heap address for index */
@@ -787,6 +788,47 @@ H5SM__convert_list_to_btree(H5F_t *f, H5SM_index_header_t *header, H5SM_list_t *
FUNC_LEAVE_NOAPI(ret_value)
} /* H5SM__convert_list_to_btree() */
+/*-------------------------------------------------------------------------
+ * Function: H5SM__bt2_convert_to_list_op
+ *
+ * Purpose: An H5B2_remove_t callback function to convert a SOHM
+ * B-tree index to a list.
+ *
+ * Inserts this record into the list passed through op_data.
+ *
+ * Return: Non-negative on success
+ * Negative on failure
+ *
+ * Programmer: James Laird
+ * Monday, November 6, 2006
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5SM__bt2_convert_to_list_op(const void *record, void *op_data)
+{
+ const H5SM_sohm_t *message = (const H5SM_sohm_t *)record;
+ const H5SM_list_t *list = (const H5SM_list_t *)op_data;
+ size_t mesg_idx; /* Index of message to modify */
+
+ FUNC_ENTER_STATIC_NOERR
+
+ /* Sanity checks */
+ HDassert(record);
+ HDassert(op_data);
+
+ /* Get the message index, and increment the # of messages in list */
+ mesg_idx = list->header->num_messages++;
+ HDassert(list->header->num_messages <= list->header->list_max);
+
+ /* Insert this message at the end of the list */
+ HDassert(list->messages[mesg_idx].location == H5SM_NO_LOC);
+ HDassert(message->location != H5SM_NO_LOC);
+ H5MM_memcpy(&(list->messages[mesg_idx]), message, sizeof(H5SM_sohm_t));
+
+ FUNC_LEAVE_NOAPI(SUCCEED)
+} /* end H5SM__bt2_convert_to_list_op() */
+
/*-------------------------------------------------------------------------
* Function: H5SM__convert_btree_to_list
*
@@ -835,7 +877,7 @@ H5SM__convert_btree_to_list(H5F_t *f, H5SM_index_header_t *header)
/* Delete the B-tree and have messages copy themselves to the
* list as they're deleted
*/
- if (H5B2_delete(f, btree_addr, f, H5SM_bt2_convert_to_list_op, list) < 0)
+ if (H5B2_delete(f, btree_addr, f, H5SM__bt2_convert_to_list_op, list) < 0)
HGOTO_ERROR(H5E_SOHM, H5E_CANTDELETE, FAIL, "unable to delete B-tree")
done:
@@ -847,7 +889,7 @@ H5SM__convert_btree_to_list(H5F_t *f, H5SM_index_header_t *header)
} /* end H5SM__convert_btree_to_list() */
/*-------------------------------------------------------------------------
- * Function: H5SM_can_share_common
+ * Function: H5SM__can_share_common
*
* Purpose: "trivial" checks for determining if a message can be shared.
*
@@ -865,11 +907,11 @@ H5SM__convert_btree_to_list(H5F_t *f, H5SM_index_header_t *header)
*-------------------------------------------------------------------------
*/
static htri_t
-H5SM_can_share_common(const H5F_t *f, unsigned type_id, const void *mesg)
+H5SM__can_share_common(const H5F_t *f, unsigned type_id, const void *mesg)
{
htri_t ret_value = FAIL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Check whether this message ought to be shared or not */
/* If sharing is disabled in this file, don't share the message */
@@ -888,7 +930,7 @@ H5SM_can_share_common(const H5F_t *f, unsigned type_id, const void *mesg)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5SM_can_share_common() */
+} /* end H5SM__can_share_common() */
/*-------------------------------------------------------------------------
* Function: H5SM_can_share
@@ -920,7 +962,7 @@ H5SM_can_share(H5F_t *f, H5SM_master_table_t *table, ssize_t *sohm_index_num, un
FUNC_ENTER_NOAPI_TAG(H5AC__SOHM_TAG, FAIL)
/* "trivial" sharing checks */
- if ((tri_ret = H5SM_can_share_common(f, type_id, mesg)) < 0)
+ if ((tri_ret = H5SM__can_share_common(f, type_id, mesg)) < 0)
HGOTO_ERROR(H5E_SOHM, H5E_BADTYPE, FAIL, "'trivial' sharing checks returned error")
if (tri_ret == FALSE)
HGOTO_DONE(FALSE)
@@ -943,7 +985,7 @@ H5SM_can_share(H5F_t *f, H5SM_master_table_t *table, ssize_t *sohm_index_num, un
/* Find the right index for this message type. If there is no such index
* then this type of message isn't shareable
*/
- if ((index_num = H5SM_get_index(my_table, type_id)) < 0) {
+ if ((index_num = H5SM__get_index(my_table, type_id)) < 0) {
H5E_clear_stack(NULL); /*ignore error*/
HGOTO_DONE(FALSE)
} /* end if */
@@ -1059,7 +1101,7 @@ H5SM_try_share(H5F_t *f, H5O_t *open_oh, unsigned defer_flags, unsigned type_id,
/* "trivial" sharing checks */
if (mesg_flags && (*mesg_flags & H5O_MSG_FLAG_DONTSHARE))
HGOTO_DONE(FALSE)
- if ((tri_ret = H5SM_can_share_common(f, type_id, mesg)) < 0)
+ if ((tri_ret = H5SM__can_share_common(f, type_id, mesg)) < 0)
HGOTO_ERROR(H5E_SOHM, H5E_BADTYPE, FAIL, "'trivial' sharing checks returned error")
if (tri_ret == FALSE)
HGOTO_DONE(FALSE)
@@ -1220,16 +1262,16 @@ static herr_t
H5SM__write_mesg(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, hbool_t defer, unsigned type_id,
void *mesg, unsigned *cache_flags_ptr)
{
- H5SM_list_t * list = NULL; /* List index */
- H5SM_mesg_key_t key; /* Key used to search the index */
- H5SM_list_cache_ud_t cache_udata; /* User-data for metadata cache callback */
- H5O_shared_t shared; /* Shared H5O message */
- hbool_t found = FALSE; /* Was the message in the index? */
- H5HF_t * fheap = NULL; /* Fractal heap handle */
- H5B2_t * bt2 = NULL; /* v2 B-tree handle for index */
- size_t buf_size; /* Size of the encoded message */
- void * encoding_buf = NULL; /* Buffer for encoded message */
- size_t empty_pos = UFAIL; /* Empty entry in list */
+ H5SM_list_t * list = NULL; /* List index */
+ H5SM_mesg_key_t key; /* Key used to search the index */
+ H5SM_list_cache_ud_t cache_udata; /* User-data for metadata cache callback */
+ H5O_shared_t shared; /* Shared H5O message */
+ hbool_t found = FALSE; /* Was the message in the index? */
+ H5HF_t * fheap = NULL; /* Fractal heap handle */
+ H5B2_t * bt2 = NULL; /* v2 B-tree handle for index */
+ size_t buf_size; /* Size of the encoded message */
+ void * encoding_buf = NULL; /* Buffer for encoded message */
+ size_t empty_pos = SIZE_MAX; /* Empty entry in list */
herr_t ret_value = SUCCEED;
FUNC_ENTER_STATIC_TAG(H5AC__SOHM_TAG)
@@ -1283,11 +1325,11 @@ H5SM__write_mesg(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, hbool_t
HGOTO_ERROR(H5E_SOHM, H5E_CANTINSERT, FAIL, "unable to search for message in list")
if (defer) {
- if (list_pos != UFAIL)
+ if (list_pos != SIZE_MAX)
found = TRUE;
} /* end if */
else {
- if (list_pos != UFAIL) {
+ if (list_pos != SIZE_MAX) {
/* If the message was previously shared in an object header, share
* it in the heap now.
*/
@@ -1322,16 +1364,13 @@ H5SM__write_mesg(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, hbool_t
HGOTO_ERROR(H5E_SOHM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for SOHM index")
if (defer) {
- htri_t bt2_find; /* Result from searching in the v2 B-tree */
-
/* If this returns 0, it means that the message wasn't found. */
/* If it return 1, set the heap_id in the shared struct. It will
* return a heap ID, since a message with a reference count greater
* than 1 is always shared in the heap.
*/
- if ((bt2_find = H5B2_find(bt2, &key, NULL, NULL)) < 0)
+ if (H5B2_find(bt2, &key, &found, NULL, NULL) < 0)
HGOTO_ERROR(H5E_SOHM, H5E_NOTFOUND, FAIL, "can't search for message in index")
- found = (hbool_t)bt2_find;
} /* end if */
else {
H5SM_incr_ref_opdata op_data;
@@ -1442,13 +1481,13 @@ H5SM__write_mesg(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, hbool_t
/* Insert the new message into the SOHM index */
if (header->index_type == H5SM_LIST) {
/* Index is a list. Find an empty spot if we haven't already */
- if (empty_pos == UFAIL) {
+ if (empty_pos == SIZE_MAX) {
size_t pos;
if (H5SM__find_in_list(list, NULL, &empty_pos, &pos) < 0)
HGOTO_ERROR(H5E_SOHM, H5E_CANTINSERT, FAIL, "unable to search for message in list")
- if (pos == UFAIL || empty_pos == UFAIL)
+ if (pos == SIZE_MAX || empty_pos == SIZE_MAX)
HGOTO_ERROR(H5E_SOHM, H5E_CANTINSERT, FAIL, "unable to find empty entry in list")
}
/* Insert message into list */
@@ -1551,7 +1590,7 @@ H5SM_delete(H5F_t *f, H5O_t *open_oh, H5O_shared_t *sh_mesg)
HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table")
/* Find the correct index and try to delete from it */
- if ((index_num = H5SM_get_index(table, type_id)) < 0)
+ if ((index_num = H5SM__get_index(table, type_id)) < 0)
HGOTO_ERROR(H5E_SOHM, H5E_NOTFOUND, FAIL, "unable to find correct SOHM index")
/* If mesg_buf is not NULL, the message's reference count has reached
@@ -1608,9 +1647,14 @@ H5SM_delete(H5F_t *f, H5O_t *open_oh, H5O_shared_t *sh_mesg)
*
* If EMPTY_POS is NULL, don't store anything in it.
*
- * Return: Message's position in the list on success
- * UFAIL if message couldn't be found
- * empty_pos set to position of empty message or UFAIL.
+ * Return: Success: SUCCEED
+ * pos = position (if found)
+ * pos = SIZE_MAX (if not found)
+ * empty_pos = indeterminate (if found)
+ * empty_pos = 1st empty position (if not found)
+ *
+ * Failure: FAIL
+ * pos & empty_pos indeterminate
*
* Programmer: James Laird
* Tuesday, May 2, 2006
@@ -1631,7 +1675,7 @@ H5SM__find_in_list(const H5SM_list_t *list, const H5SM_mesg_key_t *key, size_t *
/* Initialize empty_pos to an invalid value */
if (empty_pos)
- *empty_pos = UFAIL;
+ *empty_pos = SIZE_MAX;
/* Find the first (only) message equal to the key passed in.
* Also record the first empty position we find.
@@ -1654,43 +1698,16 @@ H5SM__find_in_list(const H5SM_list_t *list, const H5SM_mesg_key_t *key, size_t *
/* Found earlier position possible, don't check any more */
empty_pos = NULL;
- } /* end if */
- } /* end for */
+ }
+ }
/* If we reached this point, we didn't find the message */
- *pos = UFAIL;
+ *pos = SIZE_MAX;
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5SM__find_in_list */
-/*-------------------------------------------------------------------------
- * Function: H5SM_get_hash_fh_cb
- *
- * Purpose: Callback for fractal heap operator, to make copy of link when
- * when lookup up a link by index
- *
- * Return: SUCCEED/FAIL
- *
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Nov 7 2006
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5SM_get_hash_fh_cb(const void *obj, size_t obj_len, void *_udata)
-{
- H5SM_fh_ud_gh_t *udata = (H5SM_fh_ud_gh_t *)_udata; /* User data for fractal heap 'op' callback */
-
- FUNC_ENTER_NOAPI_NOINIT_NOERR
-
- /* Compute hash value on raw message */
- udata->hash = H5_checksum_lookup3(obj, obj_len, udata->type_id);
-
- FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5SM_get_hash_fh_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5SM__decr_ref
*
@@ -1827,7 +1844,7 @@ H5SM__delete_from_index(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, c
/* Find the message in the list */
if (H5SM__find_in_list(list, &key, NULL, &list_pos) < 0)
HGOTO_ERROR(H5E_SOHM, H5E_NOTFOUND, FAIL, "unable to search for message in list")
- if (list_pos == UFAIL)
+ if (list_pos == SIZE_MAX)
HGOTO_ERROR(H5E_SOHM, H5E_NOTFOUND, FAIL, "message not in index")
if (list->messages[list_pos].location == H5SM_IN_HEAP)
@@ -2093,7 +2110,7 @@ H5SM_reconstitute(H5O_shared_t *sh_mesg, H5F_t *f, unsigned msg_type_id, H5O_fhe
} /* end H5SM_reconstitute() */
/*-------------------------------------------------------------------------
- * Function: H5SM_get_refcount_bt2_cb
+ * Function: H5SM__get_refcount_bt2_cb
*
* Purpose: v2 B-tree 'find' callback to retrieve the record for a message
*
@@ -2105,12 +2122,12 @@ H5SM_reconstitute(H5O_shared_t *sh_mesg, H5F_t *f, unsigned msg_type_id, H5O_fhe
*-------------------------------------------------------------------------
*/
static herr_t
-H5SM_get_refcount_bt2_cb(const void *_record, void *_op_data)
+H5SM__get_refcount_bt2_cb(const void *_record, void *_op_data)
{
const H5SM_sohm_t *record = (const H5SM_sohm_t *)_record; /* v2 B-tree record for message */
H5SM_sohm_t * op_data = (H5SM_sohm_t *)_op_data; /* "op data" from v2 B-tree find */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/*
* Check arguments.
@@ -2122,7 +2139,7 @@ H5SM_get_refcount_bt2_cb(const void *_record, void *_op_data)
*op_data = *record;
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5SM_get_refcount_bt2_cb() */
+} /* end H5SM__get_refcount_bt2_cb() */
/*-------------------------------------------------------------------------
* Function: H5SM_get_refcount
@@ -2168,7 +2185,7 @@ H5SM_get_refcount(H5F_t *f, unsigned type_id, const H5O_shared_t *sh_mesg, hsize
HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table")
/* Find the correct index and find the message in it */
- if ((index_num = H5SM_get_index(table, type_id)) < 0)
+ if ((index_num = H5SM__get_index(table, type_id)) < 0)
HGOTO_ERROR(H5E_SOHM, H5E_NOTFOUND, FAIL, "unable to find correct SOHM index")
header = &(table->indexes[index_num]);
@@ -2209,14 +2226,14 @@ H5SM_get_refcount(H5F_t *f, unsigned type_id, const H5O_shared_t *sh_mesg, hsize
/* Find the message in the list */
if (H5SM__find_in_list(list, &key, NULL, &list_pos) < 0)
HGOTO_ERROR(H5E_SOHM, H5E_NOTFOUND, FAIL, "unable to search for message in list")
- if (list_pos == UFAIL)
+ if (list_pos == SIZE_MAX)
HGOTO_ERROR(H5E_SOHM, H5E_NOTFOUND, FAIL, "message not in index")
/* Copy the message */
message = list->messages[list_pos];
} /* end if */
else {
- htri_t msg_exists; /* Whether the message exists in the v2 B-tree */
+ hbool_t msg_exists; /* Whether the message exists in the v2 B-tree */
/* Index is a B-tree */
HDassert(header->index_type == H5SM_BTREE);
@@ -2226,7 +2243,8 @@ H5SM_get_refcount(H5F_t *f, unsigned type_id, const H5O_shared_t *sh_mesg, hsize
HGOTO_ERROR(H5E_SOHM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for SOHM index")
/* Look up the message in the v2 B-tree */
- if ((msg_exists = H5B2_find(bt2, &key, H5SM_get_refcount_bt2_cb, &message)) < 0)
+ msg_exists = FALSE;
+ if (H5B2_find(bt2, &key, &msg_exists, H5SM__get_refcount_bt2_cb, &message) < 0)
HGOTO_ERROR(H5E_SOHM, H5E_CANTGET, FAIL, "error finding message in index")
if (!msg_exists)
HGOTO_ERROR(H5E_SOHM, H5E_NOTFOUND, FAIL, "message not in index")
@@ -2447,7 +2465,7 @@ H5SM__read_mesg(H5F_t *f, const H5SM_sohm_t *mesg, H5HF_t *fheap, H5O_t *open_oh
} /* end H5SM__read_mesg */
/*-------------------------------------------------------------------------
- * Function: H5SM_table_free
+ * Function: H5SM__table_free
*
* Purpose: Frees memory used by the SOHM table.
*
@@ -2459,9 +2477,9 @@ H5SM__read_mesg(H5F_t *f, const H5SM_sohm_t *mesg, H5HF_t *fheap, H5O_t *open_oh
*-------------------------------------------------------------------------
*/
herr_t
-H5SM_table_free(H5SM_master_table_t *table)
+H5SM__table_free(H5SM_master_table_t *table)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(table);
@@ -2472,10 +2490,10 @@ H5SM_table_free(H5SM_master_table_t *table)
table = H5FL_FREE(H5SM_master_table_t, table);
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5SM_table_free() */
+} /* end H5SM__table_free() */
/*-------------------------------------------------------------------------
- * Function: H5SM_list_free
+ * Function: H5SM__list_free
*
* Purpose: Frees all memory used by the list.
*
@@ -2487,9 +2505,9 @@ H5SM_table_free(H5SM_master_table_t *table)
*-------------------------------------------------------------------------
*/
herr_t
-H5SM_list_free(H5SM_list_t *list)
+H5SM__list_free(H5SM_list_t *list)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(list);
HDassert(list->messages);
@@ -2499,14 +2517,14 @@ H5SM_list_free(H5SM_list_t *list)
list = H5FL_FREE(H5SM_list_t, list);
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5SM_list_free() */
+} /* end H5SM__list_free() */
/*-------------------------------------------------------------------------
* Function: H5SM_table_debug
*
* Purpose: Print debugging information for the master table.
*
- * If table_vers and num_indexes are not UFAIL, they are used
+ * If table_vers and num_indexes are not UINT_MAX, they are used
* instead of the values in the superblock.
*
* Return: Non-negative on success/Negative on failure
@@ -2533,14 +2551,14 @@ H5SM_table_debug(H5F_t *f, haddr_t table_addr, FILE *stream, int indent, int fwi
HDassert(indent >= 0);
HDassert(fwidth >= 0);
- /* If table_vers and num_indexes are UFAIL, replace them with values from
+ /* If table_vers and num_indexes are UINT_MAX, replace them with values from
* userblock
*/
- if (table_vers == UFAIL)
+ if (table_vers == UINT_MAX)
table_vers = H5F_SOHM_VERS(f);
else if (table_vers != H5F_SOHM_VERS(f))
HDfprintf(stream, "*** SOHM TABLE VERSION DOESN'T MATCH VERSION IN SUPERBLOCK!\n");
- if (num_indexes == UFAIL)
+ if (num_indexes == UINT_MAX)
num_indexes = H5F_SOHM_NINDEXES(f);
else if (num_indexes != H5F_SOHM_NINDEXES(f))
HDfprintf(stream, "*** NUMBER OF SOHM INDEXES DOESN'T MATCH VALUE IN SUPERBLOCK!\n");
diff --git a/src/H5SMbtree2.c b/src/H5SMbtree2.c
index 6f71966dff8..2dca9fdefc8 100644
--- a/src/H5SMbtree2.c
+++ b/src/H5SMbtree2.c
@@ -199,44 +199,3 @@ H5SM__bt2_debug(FILE *stream, int indent, int fwidth, const void *record, const
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5SM__bt2_debug */
-
-/*-------------------------------------------------------------------------
- * Function: H5SM_bt2_convert_to_list_op
- *
- * Purpose: An H5B2_remove_t callback function to convert a SOHM
- * B-tree index to a list.
- *
- * Inserts this record into the list passed through op_data.
- *
- * Return: Non-negative on success
- * Negative on failure
- *
- * Programmer: James Laird
- * Monday, November 6, 2006
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5SM_bt2_convert_to_list_op(const void *record, void *op_data)
-{
- const H5SM_sohm_t *message = (const H5SM_sohm_t *)record;
- const H5SM_list_t *list = (const H5SM_list_t *)op_data;
- size_t mesg_idx; /* Index of message to modify */
-
- FUNC_ENTER_NOAPI_NOINIT_NOERR
-
- /* Sanity checks */
- HDassert(record);
- HDassert(op_data);
-
- /* Get the message index, and increment the # of messages in list */
- mesg_idx = list->header->num_messages++;
- HDassert(list->header->num_messages <= list->header->list_max);
-
- /* Insert this message at the end of the list */
- HDassert(list->messages[mesg_idx].location == H5SM_NO_LOC);
- HDassert(message->location != H5SM_NO_LOC);
- H5MM_memcpy(&(list->messages[mesg_idx]), message, sizeof(H5SM_sohm_t));
-
- FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5SM_bt2_convert_to_list_op() */
diff --git a/src/H5SMcache.c b/src/H5SMcache.c
index 3364e492af2..6884665c792 100644
--- a/src/H5SMcache.c
+++ b/src/H5SMcache.c
@@ -15,7 +15,7 @@
*
* Created: H5SMcache.c
* Nov 13 2006
- * James Laird
+ * James Laird
*
* Purpose: Implement shared message metadata cache methods.
*
@@ -240,7 +240,7 @@ H5SM__cache_table_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED l
HDassert(table->table_size == len);
/* Check magic number */
- if (HDmemcmp(image, H5SM_TABLE_MAGIC, (size_t)H5_SIZEOF_MAGIC))
+ if (HDmemcmp(image, H5SM_TABLE_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
HGOTO_ERROR(H5E_SOHM, H5E_CANTLOAD, NULL, "bad SOHM table signature")
image += H5_SIZEOF_MAGIC;
@@ -296,7 +296,7 @@ H5SM__cache_table_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED l
done:
if (!ret_value && table)
- if (H5SM_table_free(table) < 0)
+ if (H5SM__table_free(table) < 0)
HDONE_ERROR(H5E_SOHM, H5E_CANTFREE, NULL, "unable to destroy sohm table")
FUNC_LEAVE_NOAPI(ret_value)
@@ -452,7 +452,7 @@ H5SM__cache_table_free_icr(void *_thing)
HDassert(table->cache_info.type == H5AC_SOHM_TABLE);
/* Destroy Shared Object Header Message table */
- if (H5SM_table_free(table) < 0)
+ if (H5SM__table_free(table) < 0)
HGOTO_ERROR(H5E_SOHM, H5E_CANTRELEASE, FAIL, "unable to free shared message table")
done:
@@ -582,7 +582,7 @@ H5SM__cache_list_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED le
list->header = udata->header;
/* Check magic number */
- if (HDmemcmp(image, H5SM_LIST_MAGIC, (size_t)H5_SIZEOF_MAGIC))
+ if (HDmemcmp(image, H5SM_LIST_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
HGOTO_ERROR(H5E_SOHM, H5E_CANTLOAD, NULL, "bad SOHM list signature")
image += H5_SIZEOF_MAGIC;
@@ -756,7 +756,7 @@ H5SM__cache_list_free_icr(void *_thing)
HDassert(list->cache_info.type == H5AC_SOHM_LIST);
/* Destroy Shared Object Header Message list */
- if (H5SM_list_free(list) < 0)
+ if (H5SM__list_free(list) < 0)
HGOTO_ERROR(H5E_SOHM, H5E_CANTRELEASE, FAIL, "unable to free shared message list")
done:
diff --git a/src/H5SMmessage.c b/src/H5SMmessage.c
index 6cdbc807311..4499b0c3069 100644
--- a/src/H5SMmessage.c
+++ b/src/H5SMmessage.c
@@ -35,7 +35,7 @@
/* Local Typedefs */
/******************/
-/* Udata struct for calls to H5SM_compare_cb and H5SM_compare_iter_op*/
+/* Udata struct for calls to H5SM__compare_cb and H5SM__compare_iter_op*/
typedef struct H5SM_compare_udata_t {
const H5SM_mesg_key_t *key; /* Key; compare this against stored message */
H5O_msg_crt_idx_t idx; /* Index of the message in the OH, if applicable */
@@ -45,9 +45,9 @@ typedef struct H5SM_compare_udata_t {
/********************/
/* Local Prototypes */
/********************/
-static herr_t H5SM_compare_cb(const void *obj, size_t obj_len, void *udata);
-static herr_t H5SM_compare_iter_op(H5O_t *oh, H5O_mesg_t *mesg, unsigned sequence, unsigned *oh_modified,
- void *udata);
+static herr_t H5SM__compare_cb(const void *obj, size_t obj_len, void *udata);
+static herr_t H5SM__compare_iter_op(H5O_t *oh, H5O_mesg_t *mesg, unsigned sequence, unsigned *oh_modified,
+ void *udata);
/*********************/
/* Package Variables */
@@ -62,7 +62,7 @@ static herr_t H5SM_compare_iter_op(H5O_t *oh, H5O_mesg_t *mesg, unsigned sequenc
/*******************/
/*-------------------------------------------------------------------------
- * Function: H5SM_compare_cb
+ * Function: H5SM__compare_cb
*
* Purpose: Callback for H5HF_op, used in H5SM__message_compare below.
* Determines whether the search key passed in in _UDATA is
@@ -78,11 +78,11 @@ static herr_t H5SM_compare_iter_op(H5O_t *oh, H5O_mesg_t *mesg, unsigned sequenc
*-------------------------------------------------------------------------
*/
static herr_t
-H5SM_compare_cb(const void *obj, size_t obj_len, void *_udata)
+H5SM__compare_cb(const void *obj, size_t obj_len, void *_udata)
{
H5SM_compare_udata_t *udata = (H5SM_compare_udata_t *)_udata;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* If the encoding sizes are different, it's not the same object */
if (udata->key->encoding_size > obj_len)
@@ -94,10 +94,10 @@ H5SM_compare_cb(const void *obj, size_t obj_len, void *_udata)
udata->ret = HDmemcmp(udata->key->encoding, obj, obj_len);
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5SM_compare_cb() */
+} /* end H5SM__compare_cb() */
/*-------------------------------------------------------------------------
- * Function: H5SM_compare_iter_op
+ * Function: H5SM__compare_iter_op
*
* Purpose: OH iteration callback to compare a key against a message in
* an OH
@@ -113,13 +113,13 @@ H5SM_compare_cb(const void *obj, size_t obj_len, void *_udata)
*-------------------------------------------------------------------------
*/
static herr_t
-H5SM_compare_iter_op(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned sequence,
- unsigned H5_ATTR_UNUSED *oh_modified, void *_udata /*in,out*/)
+H5SM__compare_iter_op(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned sequence,
+ unsigned H5_ATTR_UNUSED *oh_modified, void *_udata /*in,out*/)
{
H5SM_compare_udata_t *udata = (H5SM_compare_udata_t *)_udata;
herr_t ret_value = H5_ITER_CONT;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/*
* Check arguments.
@@ -156,7 +156,7 @@ H5SM_compare_iter_op(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned sequence,
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5SM_compare_iter_op() */
+} /* end H5SM__compare_iter_op() */
/*-------------------------------------------------------------------------
* Function: H5SM__message_compare
@@ -227,7 +227,7 @@ H5SM__message_compare(const void *rec1, const void *rec2, int *result)
*/
if (mesg->location == H5SM_IN_HEAP) {
/* Call heap op routine with comparison callback */
- if (H5HF_op(key->fheap, &(mesg->u.heap_loc.fheap_id), H5SM_compare_cb, &udata) < 0)
+ if (H5HF_op(key->fheap, &(mesg->u.heap_loc.fheap_id), H5SM__compare_cb, &udata) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records")
} /* end if */
else {
@@ -251,7 +251,7 @@ H5SM__message_compare(const void *rec1, const void *rec2, int *result)
/* Locate the right message and compare with it */
op.op_type = H5O_MESG_OP_LIB;
- op.u.lib_op = H5SM_compare_iter_op;
+ op.u.lib_op = H5SM__compare_iter_op;
if (H5O_msg_iterate(&oloc, mesg->msg_type_id, &op, &udata) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "error iterating over links")
} /* end else */
diff --git a/src/H5SMpkg.h b/src/H5SMpkg.h
index abf9a70835b..ae9a5f630a1 100644
--- a/src/H5SMpkg.h
+++ b/src/H5SMpkg.h
@@ -255,22 +255,16 @@ H5_DLLVAR const H5B2_class_t H5SM_INDEX[1];
/****************************/
/* General routines */
-H5_DLL ssize_t H5SM_get_index(const H5SM_master_table_t *table, unsigned type_id);
+H5_DLL ssize_t H5SM__get_index(const H5SM_master_table_t *table, unsigned type_id);
/* Encode and decode routines, used for B-tree and cache encoding/decoding */
H5_DLL herr_t H5SM__message_compare(const void *rec1, const void *rec2, int *result);
H5_DLL herr_t H5SM__message_encode(uint8_t *raw, const void *native, void *ctx);
H5_DLL herr_t H5SM__message_decode(const uint8_t *raw, void *native, void *ctx);
-/* H5B2_remove_t callback to add messages to a list index */
-H5_DLL herr_t H5SM_bt2_convert_to_list_op(const void *record, void *op_data);
-
-/* Fractal heap 'op' callback to compute hash value for message "in place" */
-H5_DLL herr_t H5SM_get_hash_fh_cb(const void *obj, size_t obj_len, void *_udata);
-
/* Routines to release data structures */
-herr_t H5SM_table_free(H5SM_master_table_t *table);
-herr_t H5SM_list_free(H5SM_list_t *list);
+H5_DLL herr_t H5SM__table_free(H5SM_master_table_t *table);
+H5_DLL herr_t H5SM__list_free(H5SM_list_t *list);
/* Testing functions */
#ifdef H5SM_TESTING
diff --git a/src/H5SMtest.c b/src/H5SMtest.c
index 3641ade6fb6..d6f96be1cab 100644
--- a/src/H5SMtest.c
+++ b/src/H5SMtest.c
@@ -91,7 +91,7 @@ H5SM__get_mesg_count_test(H5F_t *f, unsigned type_id, size_t *mesg_count)
HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table")
/* Find the correct index for this message type */
- if ((index_num = H5SM_get_index(table, type_id)) < 0)
+ if ((index_num = H5SM__get_index(table, type_id)) < 0)
HGOTO_ERROR(H5E_SOHM, H5E_NOTFOUND, FAIL, "unable to find correct SOHM index")
header = &(table->indexes[index_num]);
diff --git a/src/H5Smpio.c b/src/H5Smpio.c
index 9a38aaa8b55..7b85209c650 100644
--- a/src/H5Smpio.c
+++ b/src/H5Smpio.c
@@ -1014,8 +1014,7 @@ H5S__mpio_span_hyper_type(const H5S_t *space, size_t elmt_size, MPI_Datatype *ne
elmt_type_is_derived = TRUE;
/* Compute 'down' sizes for each dimension */
- if (H5VM_array_down(space->extent.rank, space->extent.size, down) < 0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGETSIZE, FAIL, "couldn't compute 'down' dimension sizes")
+ H5VM_array_down(space->extent.rank, space->extent.size, down);
/* Acquire an operation generation value for creating MPI datatypes */
op_gen = H5S__hyper_get_op_gen();
diff --git a/src/H5Spublic.h b/src/H5Spublic.h
index fd85dcc40cf..c2c0aefb539 100644
--- a/src/H5Spublic.h
+++ b/src/H5Spublic.h
@@ -22,7 +22,7 @@
#include "H5Ipublic.h"
/* Define atomic datatypes */
-#define H5S_ALL (hid_t)0
+#define H5S_ALL 0 /* (hid_t) */
#define H5S_UNLIMITED HSIZE_UNDEF
/* Define user-level maximum number of dimensions */
diff --git a/src/H5T.c b/src/H5T.c
index 1a3d61fed6f..532feac8914 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -32,6 +32,7 @@
#include "H5CXprivate.h" /* API Contexts */
#include "H5Dprivate.h" /* Datasets */
#include "H5Eprivate.h" /* Error handling */
+#include "H5ESprivate.h" /* Event Sets */
#include "H5Fprivate.h" /* Files */
#include "H5FLprivate.h" /* Free Lists */
#include "H5FOprivate.h" /* File objects */
@@ -346,7 +347,7 @@ static herr_t H5T__register(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t
static herr_t H5T__unregister(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5T_conv_t func);
static htri_t H5T__compiler_conv(H5T_t *src, H5T_t *dst);
static herr_t H5T__set_size(H5T_t *dt, size_t size);
-static herr_t H5T__close_cb(H5T_t *dt);
+static herr_t H5T__close_cb(H5T_t *dt, void **request);
static H5T_path_t *H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name,
H5T_conv_func_t *conv);
static hbool_t H5T__detect_vlen_ref(const H5T_t *dt);
@@ -561,8 +562,8 @@ size_t H5T_NATIVE_UINT_FAST64_ALIGN_g = 0;
/* (+/- Inf for all floating-point types) */
float H5T_NATIVE_FLOAT_POS_INF_g = 0.0f;
float H5T_NATIVE_FLOAT_NEG_INF_g = 0.0f;
-double H5T_NATIVE_DOUBLE_POS_INF_g = (double)0.0f;
-double H5T_NATIVE_DOUBLE_NEG_INF_g = (double)0.0f;
+double H5T_NATIVE_DOUBLE_POS_INF_g = 0.0;
+double H5T_NATIVE_DOUBLE_NEG_INF_g = 0.0;
/* Declare the free list for H5T_t's and H5T_shared_t's */
H5FL_DEFINE(H5T_t);
@@ -1478,6 +1479,8 @@ H5T__init_package(void)
if (copied_dtype)
(void)H5T_close_real(dt);
else {
+ if (dt->shared->owned_vol_obj && H5VL_free_object(dt->shared->owned_vol_obj) < 0)
+ HDONE_ERROR(H5E_DATATYPE, H5E_CANTCLOSEOBJ, FAIL, "unable to close owned VOL object")
dt->shared = H5FL_FREE(H5T_shared_t, dt->shared);
dt = H5FL_FREE(H5T_t, dt);
} /* end else */
@@ -1509,7 +1512,8 @@ H5T__unlock_cb(void *_dt, hid_t H5_ATTR_UNUSED id, void *_udata)
FUNC_ENTER_STATIC_NOERR
- HDassert(dt && dt->shared);
+ HDassert(dt);
+ HDassert(dt->shared);
if (H5T_STATE_IMMUTABLE == dt->shared->state) {
dt->shared->state = H5T_STATE_RDONLY;
@@ -1775,7 +1779,7 @@ H5T_term_package(void)
*-------------------------------------------------------------------------
*/
static herr_t
-H5T__close_cb(H5T_t *dt)
+H5T__close_cb(H5T_t *dt, void **request)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -1790,7 +1794,7 @@ H5T__close_cb(H5T_t *dt)
*/
if (NULL != dt->vol_obj) {
/* Close the connector-managed datatype data */
- if (H5VL_datatype_close(dt->vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0)
+ if (H5VL_datatype_close(dt->vol_obj, H5P_DATASET_XFER_DEFAULT, request) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CLOSEERROR, FAIL, "unable to close datatype")
/* Free the VOL object */
@@ -1986,6 +1990,66 @@ H5Tclose(hid_t type_id)
FUNC_LEAVE_API(ret_value)
} /* end H5Tclose() */
+/*-------------------------------------------------------------------------
+ * Function: H5Tclose_async
+ *
+ * Purpose: Asynchronous version of H5Tclose.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5Tclose_async(const char *app_file, const char *app_func, unsigned app_line, hid_t type_id, hid_t es_id)
+{
+ H5T_t * dt; /* Pointer to datatype to close */
+ void * token = NULL; /* Request token for async operation */
+ void ** token_ptr = H5_REQUEST_NULL; /* Pointer to request token for async operation */
+ H5VL_object_t *vol_obj = NULL; /* VOL object of dset_id */
+ H5VL_t * connector = NULL; /* VOL connector */
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_API(FAIL)
+ H5TRACE5("e", "*s*sIuii", app_file, app_func, app_line, type_id, es_id);
+
+ /* Check args */
+ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
+ if (H5T_STATE_IMMUTABLE == dt->shared->state)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "immutable datatype")
+
+ /* Get dataset object's connector */
+ if (NULL == (vol_obj = H5VL_vol_object(type_id)))
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "can't get VOL object for dataset")
+
+ /* Prepare for possible asynchronous operation */
+ if (H5ES_NONE != es_id) {
+ /* Increase connector's refcount, so it doesn't get closed if closing
+ * the dataset closes the file */
+ connector = vol_obj->connector;
+ H5VL_conn_inc_rc(connector);
+
+ /* Point at token for operation to set up */
+ token_ptr = &token;
+ } /* end if */
+
+ /* When the reference count reaches zero the resources are freed */
+ if (H5I_dec_app_ref_async(type_id, token_ptr) < 0)
+ HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "problem freeing id")
+
+ /* If a token was created, add the token to the event set */
+ if (NULL != token)
+ if (H5ES_insert(es_id, vol_obj->connector, token,
+ H5ARG_TRACE5(FUNC, "*s*sIuii", app_file, app_func, app_line, type_id, es_id)) < 0)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINSERT, FAIL, "can't insert token into event set")
+
+done:
+ if (connector && H5VL_conn_dec_rc(connector) < 0)
+ HDONE_ERROR(H5E_DATATYPE, H5E_CANTDEC, FAIL, "can't decrement ref count on connector")
+
+ FUNC_LEAVE_API(ret_value)
+} /* end H5Tclose_async() */
+
/*-------------------------------------------------------------------------
* Function: H5Tequal
*
@@ -3386,6 +3450,8 @@ H5T__create(H5T_class_t type, size_t size)
done:
if (NULL == ret_value) {
if (dt) {
+ if (dt->shared->owned_vol_obj && H5VL_free_object(dt->shared->owned_vol_obj) < 0)
+ HDONE_ERROR(H5E_DATATYPE, H5E_CANTCLOSEOBJ, NULL, "unable to close owned VOL object")
dt->shared = H5FL_FREE(H5T_shared_t, dt->shared);
dt = H5FL_FREE(H5T_t, dt);
}
@@ -3428,9 +3494,12 @@ H5T__initiate_copy(const H5T_t *old_dt)
/* Copy shared information */
*(new_dt->shared) = *(old_dt->shared);
- /* Reset VOL fields */
- new_dt->vol_obj = NULL;
- new_dt->shared->owned_vol_obj = NULL;
+ /* Increment ref count on owned VOL object */
+ if (new_dt->shared->owned_vol_obj)
+ (void)H5VL_object_inc_rc(new_dt->shared->owned_vol_obj);
+
+ /* Reset vol_obj field */
+ new_dt->vol_obj = NULL;
/* Set return value */
ret_value = new_dt;
@@ -3438,8 +3507,11 @@ H5T__initiate_copy(const H5T_t *old_dt)
done:
if (ret_value == NULL)
if (new_dt) {
- if (new_dt->shared)
+ if (new_dt->shared) {
+ if (new_dt->shared->owned_vol_obj && H5VL_free_object(new_dt->shared->owned_vol_obj) < 0)
+ HDONE_ERROR(H5E_DATATYPE, H5E_CANTCLOSEOBJ, NULL, "unable to close owned VOL object")
new_dt->shared = H5FL_FREE(H5T_shared_t, new_dt->shared);
+ } /* end if */
new_dt = H5FL_FREE(H5T_t, new_dt);
} /* end if */
@@ -3768,6 +3840,8 @@ H5T_copy(const H5T_t *old_dt, H5T_copy_t method)
if (ret_value == NULL)
if (new_dt) {
HDassert(new_dt->shared);
+ if (new_dt->shared->owned_vol_obj && H5VL_free_object(new_dt->shared->owned_vol_obj) < 0)
+ HDONE_ERROR(H5E_DATATYPE, H5E_CANTCLOSEOBJ, NULL, "unable to close owned VOL object")
new_dt->shared = H5FL_FREE(H5T_shared_t, new_dt->shared);
new_dt = H5FL_FREE(H5T_t, new_dt);
} /* end if */
@@ -3835,6 +3909,8 @@ H5T_copy_reopen(H5T_t *old_dt)
/* The object is already open. Free the H5T_shared_t struct
* we had been using and use the one that already exists.
* Not terribly efficient. */
+ if (new_dt->shared->owned_vol_obj && H5VL_free_object(new_dt->shared->owned_vol_obj) < 0)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCLOSEOBJ, NULL, "unable to close owned VOL object")
new_dt->shared = H5FL_FREE(H5T_shared_t, new_dt->shared);
new_dt->shared = reopened_fo;
@@ -3871,6 +3947,8 @@ H5T_copy_reopen(H5T_t *old_dt)
if (ret_value == NULL)
if (new_dt) {
HDassert(new_dt->shared);
+ if (new_dt->shared->owned_vol_obj && H5VL_free_object(new_dt->shared->owned_vol_obj) < 0)
+ HDONE_ERROR(H5E_DATATYPE, H5E_CANTCLOSEOBJ, NULL, "unable to close owned VOL object")
new_dt->shared = H5FL_FREE(H5T_shared_t, new_dt->shared);
new_dt = H5FL_FREE(H5T_t, new_dt);
} /* end if */
@@ -3965,8 +4043,10 @@ H5T__alloc(void)
done:
if (ret_value == NULL)
if (dt) {
- if (dt->shared)
+ if (dt->shared) {
+ HDassert(!dt->shared->owned_vol_obj);
dt->shared = H5FL_FREE(H5T_shared_t, dt->shared);
+ } /* end if */
dt = H5FL_FREE(H5T_t, dt);
} /* end if */
@@ -4087,6 +4167,7 @@ H5T_close_real(H5T_t *dt)
if (H5T__free(dt) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTFREE, FAIL, "unable to free datatype");
+ HDassert(!dt->shared->owned_vol_obj);
dt->shared = H5FL_FREE(H5T_shared_t, dt->shared);
} /* end if */
else
@@ -4221,6 +4302,7 @@ H5T__set_size(H5T_t *dt, size_t size)
/* Check args */
HDassert(dt);
+ HDassert(dt->shared);
HDassert(size != 0);
HDassert(H5T_REFERENCE != dt->shared->type);
HDassert(!(H5T_ENUM == dt->shared->type && 0 == dt->shared->u.enumer.nmembs));
@@ -4408,10 +4490,37 @@ H5T_get_size(const H5T_t *dt)
/* check args */
HDassert(dt);
+ HDassert(dt->shared);
FUNC_LEAVE_NOAPI(dt->shared->size)
} /* end H5T_get_size() */
+/*-------------------------------------------------------------------------
+ * Function: H5T_get_force_conv
+ *
+ * Purpose: Determines if the type has forced conversion. This will be
+ * true if and only if the type keeps a pointer to a file VOL
+ * object internally.
+ *
+ * Return: TRUE/FALSE (never fails)
+ *
+ * Programmer: Neil Fortner
+ * Thursday, January 21, 2021
+ *-------------------------------------------------------------------------
+ */
+hbool_t
+H5T_get_force_conv(const H5T_t *dt)
+{
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
+ /* check args */
+ HDassert(dt);
+ HDassert(dt->shared);
+
+ FUNC_LEAVE_NOAPI(dt->shared->force_conv)
+} /* end H5T_get_force_conv() */
+
/*-------------------------------------------------------------------------
* Function: H5T_cmp
*
@@ -4448,6 +4557,9 @@ H5T_cmp(const H5T_t *dt1, const H5T_t *dt2, hbool_t superset)
if (dt1 == dt2)
HGOTO_DONE(0);
+ HDassert(dt1->shared);
+ HDassert(dt2->shared);
+
/* compare */
if (dt1->shared->type < dt2->shared->type)
HGOTO_DONE(-1);
@@ -4853,6 +4965,10 @@ H5T_cmp(const H5T_t *dt1, const H5T_t *dt2, hbool_t superset)
HGOTO_DONE(-1);
if (dt1->shared->u.atomic.u.r.loc > dt2->shared->u.atomic.u.r.loc)
HGOTO_DONE(1);
+ if (dt1->shared->u.atomic.u.r.file < dt2->shared->u.atomic.u.r.file)
+ HGOTO_DONE(-1);
+ if (dt1->shared->u.atomic.u.r.file > dt2->shared->u.atomic.u.r.file)
+ HGOTO_DONE(1);
break;
case H5T_NO_CLASS:
@@ -5218,7 +5334,10 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co
} /* end else-if */
/* Set the flag to indicate both source and destination types are compound types
- * for the optimization of data reading (in H5Dio.c). */
+ * for the optimization of data reading (in H5Dio.c).
+ * Make sure that path->are_compounds is only TRUE for compound types.
+ */
+ path->are_compounds = FALSE;
if (H5T_COMPOUND == H5T_get_class(src, TRUE) && H5T_COMPOUND == H5T_get_class(dst, TRUE))
path->are_compounds = TRUE;
@@ -5286,11 +5405,6 @@ H5T_path_noop(const H5T_path_t *p)
* Programmer: Raymond Lu
* 8 June 2007
*
- * Modifications: Neil Fortner
- * 19 September 2008
- * Changed return value to H5T_subset_info_t
- * (to allow it to return copy_size)
- *
*-------------------------------------------------------------------------
*/
H5T_subset_info_t *
@@ -5826,10 +5940,12 @@ H5T_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc)
case H5T_VLEN: /* Recurse on the VL information if it's VL, compound or array, then free VL
sequence */
- /* Recurse if it's VL, compound, enum or array */
+ /* Recurse if it's VL, compound, enum or array (ignore references here so that we can encode
+ * them as part of the same blob)*/
/* (If the force_conv flag is _not_ set, the type cannot change in size, so don't recurse) */
if (dt->shared->parent->shared->force_conv &&
- H5T_IS_COMPLEX(dt->shared->parent->shared->type)) {
+ H5T_IS_COMPLEX(dt->shared->parent->shared->type) &&
+ (dt->shared->parent->shared->type != H5T_REFERENCE)) {
if ((changed = H5T_set_loc(dt->shared->parent, file, loc)) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "Unable to set VL location");
if (changed > 0)
@@ -6010,7 +6126,7 @@ H5T_is_vl_storage(const H5T_t *dt)
} /* end H5T_is_vl_storage() */
/*-------------------------------------------------------------------------
- * Function: H5T_upgrade_version_cb
+ * Function: H5T__upgrade_version_cb
*
* Purpose: H5T__visit callback to Upgrade the version of a datatype
* (if there's any benefit to doing so)
@@ -6027,9 +6143,9 @@ H5T_is_vl_storage(const H5T_t *dt)
*-------------------------------------------------------------------------
*/
static herr_t
-H5T_upgrade_version_cb(H5T_t *dt, void *op_value)
+H5T__upgrade_version_cb(H5T_t *dt, void *op_value)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Sanity check */
HDassert(dt);
@@ -6064,7 +6180,7 @@ H5T_upgrade_version_cb(H5T_t *dt, void *op_value)
} /* end switch */
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5T_upgrade_version_cb() */
+} /* end H5T__upgrade_version_cb() */
/*-------------------------------------------------------------------------
* Function: H5T__upgrade_version
@@ -6091,7 +6207,8 @@ H5T__upgrade_version(H5T_t *dt, unsigned new_version)
HDassert(dt);
/* Iterate over entire datatype, upgrading the version of components, if it's useful */
- if (H5T__visit(dt, (H5T_VISIT_SIMPLE | H5T_VISIT_COMPLEX_LAST), H5T_upgrade_version_cb, &new_version) < 0)
+ if (H5T__visit(dt, (H5T_VISIT_SIMPLE | H5T_VISIT_COMPLEX_LAST), H5T__upgrade_version_cb, &new_version) <
+ 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_BADITER, FAIL, "iteration to upgrade datatype encoding version failed")
done:
@@ -6233,6 +6350,7 @@ H5T_own_vol_obj(H5T_t *dt, H5VL_object_t *vol_obj)
/* Take ownership */
dt->shared->owned_vol_obj = vol_obj;
+ (void)H5VL_object_inc_rc(vol_obj);
done:
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5Tbit.c b/src/H5Tbit.c
index c35a530dc03..04e2a979b35 100644
--- a/src/H5Tbit.c
+++ b/src/H5Tbit.c
@@ -228,10 +228,7 @@ H5T__bit_shift(uint8_t *buf, ssize_t shift_dist, size_t offset, size_t size)
* Purpose: Return a small bit sequence as a number. Bit vector starts
* at OFFSET and is SIZE bits long.
*
- * Return: Success: The bit sequence interpretted as an unsigned
- * integer.
- *
- * Failure: 0
+ * Return: The bit sequence interpretted as an unsigned integer
*
*-------------------------------------------------------------------------
*/
@@ -264,14 +261,13 @@ H5T__bit_get_d(uint8_t *buf, size_t offset, size_t size)
case H5T_ORDER_NONE:
case H5T_ORDER_MIXED:
default:
- /* Unknown endianness. Bail out. */
- HGOTO_DONE(UFAIL)
+ /* This function can't return errors */
+ HDassert(0 && "unknown byte order");
}
/* Set return value */
ret_value = val;
-done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__bit_get_d() */
@@ -388,7 +384,7 @@ H5T__bit_set(uint8_t *buf, size_t offset, size_t size, hbool_t value)
*-------------------------------------------------------------------------
*/
ssize_t
-H5T__bit_find(uint8_t *buf, size_t offset, size_t size, H5T_sdir_t direction, hbool_t value)
+H5T__bit_find(const uint8_t *buf, size_t offset, size_t size, H5T_sdir_t direction, hbool_t value)
{
ssize_t base = (ssize_t)offset;
ssize_t idx, i;
diff --git a/src/H5Tcommit.c b/src/H5Tcommit.c
index 0842312e48a..d214ca153f4 100644
--- a/src/H5Tcommit.c
+++ b/src/H5Tcommit.c
@@ -29,6 +29,7 @@
#include "H5ACprivate.h" /* Metadata cache */
#include "H5CXprivate.h" /* API Contexts */
#include "H5Eprivate.h" /* Error handling */
+#include "H5ESprivate.h" /* Event Sets */
#include "H5FLprivate.h" /* Free lists */
#include "H5FOprivate.h" /* File objects */
#include "H5Iprivate.h" /* IDs */
@@ -54,6 +55,11 @@
/********************/
/* Local Prototypes */
/********************/
+static herr_t H5T__commit_api_common(hid_t loc_id, const char *name, hid_t type_id, hid_t lcpl_id,
+ hid_t tcpl_id, hid_t tapl_id, void **token_ptr,
+ H5VL_object_t **_vol_obj_ptr);
+static hid_t H5T__open_api_common(hid_t loc_id, const char *name, hid_t tapl_id, void **token_ptr,
+ H5VL_object_t **_vol_obj_ptr);
static H5T_t *H5T__open_oid(const H5G_loc_t *loc);
/*********************/
@@ -79,27 +85,28 @@ H5FL_EXTERN(H5VL_t);
H5FL_EXTERN(H5VL_object_t);
/*-------------------------------------------------------------------------
- * Function: H5Tcommit2
+ * Function: H5T__commit_api_common
*
- * Purpose: Save a transient datatype to a file and turn the type handle
- * into a "named", immutable type.
+ * Purpose: This is the common function for committing a datytype.
*
- * Return: SUCCEED/FAIL
+ * Return: Non-negative on success/Negative on failure
*
*-------------------------------------------------------------------------
*/
-herr_t
-H5Tcommit2(hid_t loc_id, const char *name, hid_t type_id, hid_t lcpl_id, hid_t tcpl_id, hid_t tapl_id)
+static herr_t
+H5T__commit_api_common(hid_t loc_id, const char *name, hid_t type_id, hid_t lcpl_id, hid_t tcpl_id,
+ hid_t tapl_id, void **token_ptr, H5VL_object_t **_vol_obj_ptr)
{
- void * data = NULL; /* VOL-managed datatype data */
- H5VL_object_t * new_obj = NULL; /* VOL object that holds the datatype object and the VOL info */
- H5T_t * dt = NULL; /* High level datatype object that wraps the VOL object */
- H5VL_object_t * vol_obj = NULL; /* object of loc_id */
- H5VL_loc_params_t loc_params;
- herr_t ret_value = SUCCEED; /* Return value */
+ void * data = NULL; /* VOL-managed datatype data */
+ H5VL_object_t * new_obj = NULL; /* VOL object that holds the datatype object and the VOL info */
+ H5T_t * dt = NULL; /* High level datatype object that wraps the VOL object */
+ H5VL_object_t * tmp_vol_obj = NULL; /* Object for loc_id */
+ H5VL_object_t **vol_obj_ptr =
+ (_vol_obj_ptr ? _vol_obj_ptr : &tmp_vol_obj); /* Ptr to object ptr for loc_id */
+ H5VL_loc_params_t loc_params; /* Location parameters */
+ herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(FAIL)
- H5TRACE6("e", "i*siiii", loc_id, name, type_id, lcpl_id, tcpl_id, tapl_id);
+ FUNC_ENTER_STATIC
/* Check arguments */
if (!name)
@@ -126,37 +133,99 @@ H5Tcommit2(hid_t loc_id, const char *name, hid_t type_id, hid_t lcpl_id, hid_t t
/* Set the LCPL for the API context */
H5CX_set_lcpl(lcpl_id);
- /* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&tapl_id, H5P_CLS_TACC, loc_id, TRUE) < 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't set access property list info")
-
- /* Fill in location struct fields */
- loc_params.type = H5VL_OBJECT_BY_SELF;
- loc_params.obj_type = H5I_get_type(loc_id);
-
- /* Get the object from the loc_id */
- if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(loc_id)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid object identifier")
+ /* Set up object access arguments */
+ if (H5VL_setup_acc_args(loc_id, H5P_CLS_TACC, TRUE, &tapl_id, vol_obj_ptr, &loc_params) < 0)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't set object access arguments")
/* Commit the type */
- if (NULL == (data = H5VL_datatype_commit(vol_obj, &loc_params, name, type_id, lcpl_id, tcpl_id, tapl_id,
- H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)))
+ if (NULL == (data = H5VL_datatype_commit(*vol_obj_ptr, &loc_params, name, type_id, lcpl_id, tcpl_id,
+ tapl_id, H5P_DATASET_XFER_DEFAULT, token_ptr)))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to commit datatype")
/* Set up VOL object */
- if (NULL == (new_obj = H5FL_CALLOC(H5VL_object_t)))
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, FAIL, "can't allocate top object structure")
- new_obj->connector = vol_obj->connector;
- new_obj->connector->nrefs++;
- new_obj->data = data;
+ if (NULL == (new_obj = H5VL_create_object(data, (*vol_obj_ptr)->connector)))
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, FAIL, "can't create VOL object for committed datatype")
/* Set the committed type object to the VOL connector pointer in the H5T_t struct */
dt->vol_obj = new_obj;
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5T__commit_api_common() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5Tcommit2
+ *
+ * Purpose: Save a transient datatype to a file and turn the type handle
+ * into a "named", immutable type.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Quincey Koziol
+ * April 5, 2007
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5Tcommit2(hid_t loc_id, const char *name, hid_t type_id, hid_t lcpl_id, hid_t tcpl_id, hid_t tapl_id)
+{
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_API(FAIL)
+ H5TRACE6("e", "i*siiii", loc_id, name, type_id, lcpl_id, tcpl_id, tapl_id);
+
+ /* Commit the dataset synchronously */
+ if ((ret_value = H5T__commit_api_common(loc_id, name, type_id, lcpl_id, tcpl_id, tapl_id, NULL, NULL)) <
+ 0)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, FAIL, "unable to commit datatype synchronously")
+
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Tcommit2() */
+/*-------------------------------------------------------------------------
+ * Function: H5Tcommit_async
+ *
+ * Purpose: Asynchronous version of H5Tcommit2
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5Tcommit_async(const char *app_file, const char *app_func, unsigned app_line, hid_t loc_id, const char *name,
+ hid_t type_id, hid_t lcpl_id, hid_t tcpl_id, hid_t tapl_id, hid_t es_id)
+{
+ H5VL_object_t *vol_obj = NULL; /* Object for loc_id */
+ void * token = NULL; /* Request token for async operation */
+ void ** token_ptr = H5_REQUEST_NULL; /* Pointer to request token for async operation */
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_API(FAIL)
+ H5TRACE10("e", "*s*sIui*siiiii", app_file, app_func, app_line, loc_id, name, type_id, lcpl_id, tcpl_id,
+ tapl_id, es_id);
+
+ /* Set up request token pointer for asynchronous operation */
+ if (H5ES_NONE != es_id)
+ token_ptr = &token;
+
+ /* Commit the datatype asynchronously */
+ if ((ret_value = H5T__commit_api_common(loc_id, name, type_id, lcpl_id, tcpl_id, tapl_id, token_ptr,
+ &vol_obj)) < 0)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, FAIL, "unable to commit datatype asynchronously")
+
+ /* If a token was created, add the token to the event set */
+ if (NULL != token)
+ /* clang-format off */
+ if (H5ES_insert(es_id, vol_obj->connector, token,
+ H5ARG_TRACE10(FUNC, "*s*sIui*siiiii", app_file, app_func, app_line, loc_id, name, type_id, lcpl_id, tcpl_id, tapl_id, es_id)) < 0)
+ /* clang-format on */
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINSERT, FAIL, "can't insert token into event set")
+
+done:
+ FUNC_LEAVE_API(ret_value)
+} /* end H5Tcommit_async() */
+
/*-------------------------------------------------------------------------
* Function: H5T__commit_named
*
@@ -248,7 +317,10 @@ H5T__commit_named(const H5G_loc_t *loc, const char *name, H5T_t *dt, hid_t lcpl_
* Note: The datatype access property list is unused currently, but
* is checked for sanity anyway.
*
- * Return: SUCCEED/FAIL
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Peter Cao
+ * May 17, 2005
*
*-------------------------------------------------------------------------
*/
@@ -295,11 +367,8 @@ H5Tcommit_anon(hid_t loc_id, hid_t type_id, hid_t tcpl_id, hid_t tapl_id)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to commit datatype")
/* Setup VOL object */
- if (NULL == (new_obj = H5FL_CALLOC(H5VL_object_t)))
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, FAIL, "can't allocate top object structure")
- new_obj->connector = vol_obj->connector;
- new_obj->connector->nrefs++;
- new_obj->data = dt;
+ if (NULL == (new_obj = H5VL_create_object(dt, vol_obj->connector)))
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, FAIL, "can't create VOL object for committed datatype")
/* Set the committed type object to the VOL connector pointer in the H5T_t struct */
type->vol_obj = new_obj;
@@ -479,7 +548,10 @@ H5T__commit(H5F_t *file, H5T_t *type, hid_t tcpl_id)
*
* Purpose: Determines if a datatype is committed or not.
*
- * Return: TRUE/FALSE/FAIL
+ * Return: TRUE/FALSE/Negative
+ *
+ * Programmer: Robb Matzke
+ * Thursday, June 4, 1998
*
*-------------------------------------------------------------------------
*/
@@ -510,7 +582,7 @@ H5Tcommitted(hid_t type_id)
* ADJUST to the link count.
*
* Return: Success: New link count
- * Failure: Negative
+ * Failure: -1
*
* Programmer: Quincey Koziol
* Friday, September 26, 2003
@@ -536,10 +608,9 @@ H5T_link(const H5T_t *type, int adjust)
} /* end H5T_link() */
/*-------------------------------------------------------------------------
- * Function: H5Topen2
+ * Function: H5T__open_api_common
*
- * Purpose: Opens a named datatype using a Datatype Access Property
- * List.
+ * Purpose: This is the common function for opening a datatype.
*
* Return: Success: Object ID of the named datatype
*
@@ -547,16 +618,18 @@ H5T_link(const H5T_t *type, int adjust)
*
*-------------------------------------------------------------------------
*/
-hid_t
-H5Topen2(hid_t loc_id, const char *name, hid_t tapl_id)
+static hid_t
+H5T__open_api_common(hid_t loc_id, const char *name, hid_t tapl_id, void **token_ptr,
+ H5VL_object_t **_vol_obj_ptr)
{
- void * dt = NULL; /* datatype object created by VOL connector */
- H5VL_object_t * vol_obj = NULL; /* object of loc_id */
+ void * dt = NULL; /* datatype object created by VOL connector */
+ H5VL_object_t * tmp_vol_obj = NULL; /* Object for loc_id */
+ H5VL_object_t **vol_obj_ptr =
+ (_vol_obj_ptr ? _vol_obj_ptr : &tmp_vol_obj); /* Ptr to object ptr for loc_id */
H5VL_loc_params_t loc_params;
hid_t ret_value = H5I_INVALID_HID; /* Return value */
- FUNC_ENTER_API(H5I_INVALID_HID)
- H5TRACE3("i", "i*si", loc_id, name, tapl_id);
+ FUNC_ENTER_STATIC
/* Check args */
if (!name)
@@ -564,36 +637,107 @@ H5Topen2(hid_t loc_id, const char *name, hid_t tapl_id)
if (!*name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "name parameter cannot be an empty string")
- /* Verify access property list and set up collective metadata if appropriate */
- if (H5CX_set_apl(&tapl_id, H5P_CLS_TACC, loc_id, FALSE) < 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't set access property list info")
-
- /* Fill in location struct fields */
- loc_params.type = H5VL_OBJECT_BY_SELF;
- loc_params.obj_type = H5I_get_type(loc_id);
-
- /* get the location object */
- if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(loc_id)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid file identifier")
+ /* Set up object access arguments */
+ if (H5VL_setup_acc_args(loc_id, H5P_CLS_TACC, FALSE, &tapl_id, vol_obj_ptr, &loc_params) < 0)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, H5I_INVALID_HID, "can't set object access arguments")
/* Open the datatype */
- if (NULL == (dt = H5VL_datatype_open(vol_obj, &loc_params, name, tapl_id, H5P_DATASET_XFER_DEFAULT,
- H5_REQUEST_NULL)))
+ if (NULL == (dt = H5VL_datatype_open(*vol_obj_ptr, &loc_params, name, tapl_id, H5P_DATASET_XFER_DEFAULT,
+ token_ptr)))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open named datatype")
/* Register the type and return the ID */
- if ((ret_value = H5VL_register(H5I_DATATYPE, dt, vol_obj->connector, TRUE)) < 0)
+ if ((ret_value = H5VL_register(H5I_DATATYPE, dt, (*vol_obj_ptr)->connector, TRUE)) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register named datatype")
done:
/* Cleanup on error */
if (H5I_INVALID_HID == ret_value)
- if (dt && H5VL_datatype_close(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0)
+ if (dt && H5VL_datatype_close(*vol_obj_ptr, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0)
HDONE_ERROR(H5E_DATATYPE, H5E_CLOSEERROR, H5I_INVALID_HID, "unable to release datatype")
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5T__open_api_common() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5Topen2
+ *
+ * Purpose: Opens a named datatype using a Datatype Access Property
+ * List.
+ *
+ * Return: Success: Object ID of the named datatype
+ *
+ * Failure: H5I_INVALID_HID
+ *
+ * Programmer: James Laird
+ * Thursday July 27, 2006
+ *
+ *-------------------------------------------------------------------------
+ */
+hid_t
+H5Topen2(hid_t loc_id, const char *name, hid_t tapl_id)
+{
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
+
+ FUNC_ENTER_API(H5I_INVALID_HID)
+ H5TRACE3("i", "i*si", loc_id, name, tapl_id);
+
+ /* Open the datatype synchronously */
+ if ((ret_value = H5T__open_api_common(loc_id, name, tapl_id, NULL, NULL)) < 0)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, H5I_INVALID_HID,
+ "unable to open named datatype synchronously")
+done:
FUNC_LEAVE_API(ret_value)
} /* end H5Topen2() */
+/*-------------------------------------------------------------------------
+ * Function: H5Topen_async
+ *
+ * Purpose: Asynchronous version of H5Topen2.
+ *
+ * Return: Success: Object ID of the named datatype
+ *
+ * Failure: H5I_INVALID_HID
+ *
+ *-------------------------------------------------------------------------
+ */
+hid_t
+H5Topen_async(const char *app_file, const char *app_func, unsigned app_line, hid_t loc_id, const char *name,
+ hid_t tapl_id, hid_t es_id)
+{
+ H5VL_object_t *vol_obj = NULL; /* Object for loc_id */
+ void * token = NULL; /* Request token for async operation */
+ void ** token_ptr = H5_REQUEST_NULL; /* Pointer to request token for async operation */
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
+
+ FUNC_ENTER_API(H5I_INVALID_HID)
+ H5TRACE7("i", "*s*sIui*sii", app_file, app_func, app_line, loc_id, name, tapl_id, es_id);
+
+ /* Set up request token pointer for asynchronous operation */
+ if (H5ES_NONE != es_id)
+ token_ptr = &token; /* Point at token for VOL connector to set up */
+
+ /* Open the datatype asynchronously */
+ if ((ret_value = H5T__open_api_common(loc_id, name, tapl_id, token_ptr, &vol_obj)) < 0)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, H5I_INVALID_HID,
+ "unable to open named datatype asynchronously")
+
+ /* If a token was created, add the token to the event set */
+ if (NULL != token)
+ /* clang-format off */
+ if (H5ES_insert(es_id, vol_obj->connector, token,
+ H5ARG_TRACE7(FUNC, "*s*sIui*sii", app_file, app_func, app_line, loc_id, name, tapl_id, es_id)) < 0) {
+ /* clang-format on */
+ if (H5I_dec_app_ref_always_close(ret_value) < 0)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDEC, H5I_INVALID_HID,
+ "can't decrement count on datatype ID")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert token into event set")
+ } /* end if */
+
+done:
+ FUNC_LEAVE_API(ret_value)
+} /* end H5Topen_async() */
+
/*-------------------------------------------------------------------------
* Function: H5Tget_create_plist
*
@@ -608,6 +752,9 @@ H5Topen2(hid_t loc_id, const char *name, hid_t tapl_id)
*
* Failure: H5I_INVALID_HID
*
+ * Programmer: Quincey Koziol
+ * Tuesday, November 28, 2006
+ *
*-------------------------------------------------------------------------
*/
hid_t
@@ -961,8 +1108,11 @@ H5T_open(const H5G_loc_t *loc)
done:
if (ret_value == NULL) {
if (dt) {
- if (shared_fo == NULL) /* Need to free shared fo */
+ if (shared_fo == NULL) { /* Need to free shared fo */
+ if (dt->shared->owned_vol_obj && H5VL_free_object(dt->shared->owned_vol_obj) < 0)
+ HDONE_ERROR(H5E_DATATYPE, H5E_CANTCLOSEOBJ, NULL, "unable to close owned VOL object")
dt->shared = H5FL_FREE(H5T_shared_t, dt->shared);
+ } /* end if */
H5O_loc_free(&(dt->oloc));
H5G_name_free(&(dt->path));
@@ -1180,7 +1330,7 @@ H5T_save_refresh_state(hid_t tid, H5O_shared_t *cached_H5O_shared)
if (NULL == (dt = (H5T_t *)H5I_object_verify(tid, H5I_DATATYPE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "tid is not a datatype ID")
- vol_dt = (H5T_t *)(dt->vol_obj->data);
+ vol_dt = H5T_get_actual_type(dt);
if (NULL == vol_dt)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "tid is not not a named datatype ID")
@@ -1220,7 +1370,7 @@ H5T_restore_refresh_state(hid_t tid, H5O_shared_t *cached_H5O_shared)
if (NULL == (dt = (H5T_t *)H5I_object_verify(tid, H5I_DATATYPE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "tid not a datatype ID")
- vol_dt = (H5T_t *)(dt->vol_obj->data);
+ vol_dt = H5T_get_actual_type(dt);
if (NULL == vol_dt)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "tid is not not a named datatype ID")
diff --git a/src/H5Tconv.c b/src/H5Tconv.c
index a33a67c8d3f..0c986331c2c 100644
--- a/src/H5Tconv.c
+++ b/src/H5Tconv.c
@@ -710,17 +710,17 @@
FUNC_ENTER_PACKAGE \
\
{ \
- size_t elmtno; /*element number */ \
+ size_t elmtno; /*element number */ \
H5T_CONV_DECL_PREC(PREC) /*declare precision variables, or not */ \
- void * src_buf; /*'raw' source buffer */ \
- void * dst_buf; /*'raw' destination buffer */ \
- ST * src, *s; /*source buffer */ \
- DT * dst, *d; /*destination buffer */ \
- H5T_t * st, *dt; /*datatype descriptors */ \
- ST src_aligned; /*source aligned type */ \
- DT dst_aligned; /*destination aligned type */ \
- hbool_t s_mv, d_mv; /*move data to align it? */ \
- ssize_t s_stride, d_stride; /*src and dst strides */ \
+ void * src_buf; /*'raw' source buffer */ \
+ void * dst_buf; /*'raw' destination buffer */ \
+ ST * src, *s; /*source buffer */ \
+ DT * dst, *d; /*destination buffer */ \
+ H5T_t * st, *dt; /*datatype descriptors */ \
+ ST src_aligned; /*source aligned type */ \
+ DT dst_aligned; /*destination aligned type */ \
+ hbool_t s_mv, d_mv; /*move data to align it? */ \
+ ssize_t s_stride, d_stride; /*src and dst strides */ \
size_t safe; /*how many elements are safe to process in each pass */ \
H5T_conv_cb_t cb_struct; /*conversion callback structure */ \
\
@@ -859,9 +859,9 @@ done:
#define H5T_CONV_DECL_PREC(PREC) H5_GLUE(H5T_CONV_DECL_PREC_, PREC)
#define H5T_CONV_DECL_PREC_Y \
- size_t sprec; /*source precision */ \
- size_t dprec; /*destination precision */ \
- H5T_class_t tclass; /*datatype's class */
+ size_t sprec; /*source precision */ \
+ size_t dprec; /*destination precision */ \
+ H5T_class_t tclass; /*datatype's class */
#define H5T_CONV_DECL_PREC_N /*no precision variables */
@@ -1067,7 +1067,7 @@ typedef struct H5T_conv_hw_t {
/* Local Prototypes */
/********************/
-static herr_t H5T_reverse_order(uint8_t *rev, uint8_t *s, size_t size, H5T_order_t order);
+static herr_t H5T__reverse_order(uint8_t *rev, uint8_t *s, size_t size, H5T_order_t order);
/*********************/
/* Public Variables */
@@ -1095,15 +1095,15 @@ H5FL_BLK_DEFINE_STATIC(array_seq);
H5FL_BLK_DEFINE_STATIC(ref_seq);
/*-------------------------------------------------------------------------
- * Function: H5T__conv_noop
+ * Function: H5T__conv_noop
*
- * Purpose: The no-op conversion. The library knows about this
- * conversion without it being registered.
+ * Purpose: The no-op conversion. The library knows about this
+ * conversion without it being registered.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Wednesday, January 14, 1998
+ * Programmer: Robb Matzke
+ * Wednesday, January 14, 1998
*
*-------------------------------------------------------------------------
*/
@@ -1137,18 +1137,18 @@ H5T__conv_noop(hid_t H5_ATTR_UNUSED src_id, hid_t H5_ATTR_UNUSED dst_id, H5T_cda
} /* end H5T__conv_noop() */
/*-------------------------------------------------------------------------
- * Function: H5T__conv_order_opt
+ * Function: H5T__conv_order_opt
*
- * Purpose: Convert one type to another when byte order is the only
- * difference. This is the optimized version of H5T__conv_order()
+ * Purpose: Convert one type to another when byte order is the only
+ * difference. This is the optimized version of H5T__conv_order()
* for a handful of different sizes.
*
- * Note: This is a soft conversion function.
+ * Note: This is a soft conversion function.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Friday, January 25, 2002
+ * Programmer: Robb Matzke
+ * Friday, January 25, 2002
*
*-------------------------------------------------------------------------
*/
@@ -1547,17 +1547,17 @@ H5T__conv_order_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmt
} /* end H5T__conv_order_opt() */
/*-------------------------------------------------------------------------
- * Function: H5T__conv_order
+ * Function: H5T__conv_order
*
- * Purpose: Convert one type to another when byte order is the only
- * difference.
+ * Purpose: Convert one type to another when byte order is the only
+ * difference.
*
- * Note: This is a soft conversion function.
+ * Note: This is a soft conversion function.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Tuesday, January 13, 1998
+ * Programmer: Robb Matzke
+ * Tuesday, January 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -1646,14 +1646,14 @@ H5T__conv_order(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, s
} /* end H5T__conv_order() */
/*-------------------------------------------------------------------------
- * Function: H5T__conv_b_b
+ * Function: H5T__conv_b_b
*
- * Purpose: Convert from one bitfield to any other bitfield.
+ * Purpose: Convert from one bitfield to any other bitfield.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Thursday, May 20, 1999
+ * Programmer: Robb Matzke
+ * Thursday, May 20, 1999
*
*-------------------------------------------------------------------------
*/
@@ -1662,14 +1662,14 @@ H5T__conv_b_b(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
size_t H5_ATTR_UNUSED bkg_stride, void *_buf, void H5_ATTR_UNUSED *background)
{
uint8_t * buf = (uint8_t *)_buf;
- H5T_t * src = NULL, *dst = NULL; /*source and dest datatypes */
- ssize_t direction; /*direction of traversal */
- size_t elmtno; /*element number */
- size_t olap; /*num overlapping elements */
+ H5T_t * src = NULL, *dst = NULL; /*source and dest datatypes */
+ ssize_t direction; /*direction of traversal */
+ size_t elmtno; /*element number */
+ size_t olap; /*num overlapping elements */
size_t half_size; /*1/2 of total size for swapping*/
uint8_t * s, *sp, *d, *dp; /*source and dest traversal ptrs*/
- uint8_t dbuf[256]; /*temp destination buffer */
- size_t msb_pad_offset; /*offset for dest MSB padding */
+ uint8_t dbuf[256] = {0}; /*temp destination buffer */
+ size_t msb_pad_offset; /*offset for dest MSB padding */
size_t i;
uint8_t * src_rev = NULL; /*order-reversed source buffer */
H5T_conv_cb_t cb_struct = {NULL, NULL}; /*conversion callback structure */
@@ -1787,8 +1787,8 @@ H5T__conv_b_b(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
if (src->shared->u.atomic.prec > dst->shared->u.atomic.prec) {
/*overflow*/
if (cb_struct.func) { /*If user's exception handler is present, use it*/
- H5T_reverse_order(src_rev, s, src->shared->size,
- src->shared->u.atomic.order); /*reverse order first*/
+ H5T__reverse_order(src_rev, s, src->shared->size,
+ src->shared->u.atomic.order); /*reverse order first*/
except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_HI, src_id, dst_id, src_rev, d,
cb_struct.user_data);
} /* end if */
@@ -1893,26 +1893,26 @@ H5T__conv_b_b(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
} /* end H5T__conv_b_b() */
/*-------------------------------------------------------------------------
- * Function: H5T_conv_struct_free
+ * Function: H5T__conv_struct_free
*
- * Purpose: Free the private data structure used by the compound
+ * Purpose: Free the private data structure used by the compound
* conversion functions.
*
- * Return: The result of H5MM_xfree(priv) (NULL)
+ * Return: The result of H5MM_xfree(priv) (NULL)
*
- * Programmer: Neil Fortner
- * Wednesday, October 1, 2008
+ * Programmer: Neil Fortner
+ * Wednesday, October 1, 2008
*
*-------------------------------------------------------------------------
*/
static H5T_conv_struct_t *
-H5T_conv_struct_free(H5T_conv_struct_t *priv)
+H5T__conv_struct_free(H5T_conv_struct_t *priv)
{
int * src2dst = priv->src2dst;
hid_t * src_memb_id = priv->src_memb_id, *dst_memb_id = priv->dst_memb_id;
unsigned i;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
for (i = 0; i < priv->src_nmembs; i++)
if (src2dst[i] >= 0) {
@@ -1930,25 +1930,25 @@ H5T_conv_struct_free(H5T_conv_struct_t *priv)
H5MM_xfree(priv->memb_path);
FUNC_LEAVE_NOAPI((H5T_conv_struct_t *)H5MM_xfree(priv))
-} /* end H5T_conv_struct_free() */
+} /* end H5T__conv_struct_free() */
/*-------------------------------------------------------------------------
- * Function: H5T_conv_struct_init
+ * Function: H5T__conv_struct_init
*
- * Purpose: Initialize the `priv' field of `cdata' with conversion
- * information that is relatively constant. If `priv' is
- * already initialized then the member conversion functions
- * are recalculated.
+ * Purpose: Initialize the `priv' field of `cdata' with conversion
+ * information that is relatively constant. If `priv' is
+ * already initialized then the member conversion functions
+ * are recalculated.
*
- * Priv fields are indexed by source member number or
- * destination member number depending on whether the field
- * contains information about the source datatype or the
- * destination datatype (fields that contains the same
- * information for both source and destination are indexed by
- * source member number). The src2dst[] priv array maps source
- * member numbers to destination member numbers, but if the
- * source member doesn't have a corresponding destination member
- * then the src2dst[i]=-1.
+ * Priv fields are indexed by source member number or
+ * destination member number depending on whether the field
+ * contains information about the source datatype or the
+ * destination datatype (fields that contains the same
+ * information for both source and destination are indexed by
+ * source member number). The src2dst[] priv array maps source
+ * member numbers to destination member numbers, but if the
+ * source member doesn't have a corresponding destination member
+ * then the src2dst[i]=-1.
*
* Special optimization case when the source and destination
* members are a subset of each other, and the order is the same,
@@ -1971,15 +1971,15 @@ H5T_conv_struct_free(H5T_conv_struct_t *priv)
* The optimization is simply moving data to the appropriate
* places in the buffer.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Monday, January 26, 1998
+ * Programmer: Robb Matzke
+ * Monday, January 26, 1998
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5T_conv_struct_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata)
+H5T__conv_struct_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata)
{
H5T_conv_struct_t *priv = (H5T_conv_struct_t *)(cdata->priv);
int * src2dst = NULL;
@@ -1987,7 +1987,7 @@ H5T_conv_struct_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata)
unsigned i, j;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
src_nmembs = src->shared->u.compnd.nmembs;
dst_nmembs = dst->shared->u.compnd.nmembs;
@@ -2010,7 +2010,7 @@ H5T_conv_struct_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata)
priv->subset_info.copy_size = 0;
/*
- * Insure that members are sorted.
+ * Ensure that members are sorted.
*/
H5T__sort_value(src, NULL);
H5T__sort_value(dst, NULL);
@@ -2069,7 +2069,7 @@ H5T_conv_struct_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata)
dst->shared->u.compnd.memb[src2dst[i]].type);
if (NULL == (priv->memb_path[i] = tpath)) {
- cdata->priv = H5T_conv_struct_free(priv);
+ cdata->priv = H5T__conv_struct_free(priv);
HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unable to convert member datatype")
} /* end if */
} /* end if */
@@ -2130,10 +2130,10 @@ H5T_conv_struct_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5T_conv_struct_init() */
+} /* end H5T__conv_struct_init() */
/*-------------------------------------------------------------------------
- * Function: H5T__conv_struct_subset
+ * Function: H5T__conv_struct_subset
*
* Purpose: A quick way to return a field in a struct private in this
* file. The flag SMEMBS_SUBSET indicates whether the source
@@ -2151,8 +2151,8 @@ H5T_conv_struct_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata)
* Return: A pointer to the subset info struct in p. Points directly
* into the structure.
*
- * Programmer: Raymond Lu
- * 8 June 2007
+ * Programmer: Raymond Lu
+ * 8 June 2007
*
*-------------------------------------------------------------------------
*/
@@ -2172,28 +2172,28 @@ H5T__conv_struct_subset(const H5T_cdata_t *cdata)
} /* end H5T__conv_struct_subset() */
/*-------------------------------------------------------------------------
- * Function: H5T__conv_struct
+ * Function: H5T__conv_struct
*
- * Purpose: Converts between compound datatypes. This is a soft
- * conversion function. The algorithm is basically:
+ * Purpose: Converts between compound datatypes. This is a soft
+ * conversion function. The algorithm is basically:
*
- * For each element do
- * For I=1..NELMTS do
- * If sizeof destination type <= sizeof source type then
- * Convert member to destination type;
- * Move member as far left as possible;
+ * For each element do
+ * For I=1..NELMTS do
+ * If sizeof destination type <= sizeof source type then
+ * Convert member to destination type;
+ * Move member as far left as possible;
*
- * For I=NELMTS..1 do
- * If not destination type then
- * Convert member to destination type;
- * Move member to correct position in BKG
+ * For I=NELMTS..1 do
+ * If not destination type then
+ * Convert member to destination type;
+ * Move member to correct position in BKG
*
- * Copy BKG to BUF
+ * Copy BKG to BUF
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Thursday, January 22, 1998
+ * Programmer: Robb Matzke
+ * Thursday, January 22, 1998
*
*-------------------------------------------------------------------------
*/
@@ -2201,20 +2201,20 @@ herr_t
H5T__conv_struct(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride,
size_t bkg_stride, void *_buf, void *_bkg)
{
- uint8_t * buf = (uint8_t *)_buf; /*cast for pointer arithmetic */
- uint8_t * bkg = (uint8_t *)_bkg; /*background pointer arithmetic */
+ uint8_t * buf = (uint8_t *)_buf; /*cast for pointer arithmetic */
+ uint8_t * bkg = (uint8_t *)_bkg; /*background pointer arithmetic */
uint8_t * xbuf = buf, *xbkg = bkg; /*temp pointers into buf and bkg*/
- H5T_t * src = NULL; /*source datatype */
- H5T_t * dst = NULL; /*destination datatype */
- int * src2dst = NULL; /*maps src member to dst member */
+ H5T_t * src = NULL; /*source datatype */
+ H5T_t * dst = NULL; /*destination datatype */
+ int * src2dst = NULL; /*maps src member to dst member */
H5T_cmemb_t * src_memb = NULL; /*source struct member descript.*/
- H5T_cmemb_t * dst_memb = NULL; /*destination struct memb desc. */
- size_t offset; /*byte offset wrt struct */
- ssize_t src_delta; /*source stride */
- ssize_t bkg_delta; /*background stride */
+ H5T_cmemb_t * dst_memb = NULL; /*destination struct memb desc. */
+ size_t offset; /*byte offset wrt struct */
+ ssize_t src_delta; /*source stride */
+ ssize_t bkg_delta; /*background stride */
size_t elmtno;
- unsigned u; /*counters */
- int i; /*counters */
+ unsigned u; /*counters */
+ int i; /*counters */
H5T_conv_struct_t *priv = (H5T_conv_struct_t *)(cdata->priv);
herr_t ret_value = SUCCEED; /* Return value */
@@ -2235,7 +2235,7 @@ H5T__conv_struct(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
if (H5T_COMPOUND != dst->shared->type)
HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a H5T_COMPOUND datatype")
- if (H5T_conv_struct_init(src, dst, cdata) < 0)
+ if (H5T__conv_struct_init(src, dst, cdata) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to initialize conversion data")
break;
@@ -2243,7 +2243,7 @@ H5T__conv_struct(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
/*
* Free the private conversion data.
*/
- cdata->priv = H5T_conv_struct_free(priv);
+ cdata->priv = H5T__conv_struct_free(priv);
break;
case H5T_CONV_CONV:
@@ -2255,7 +2255,7 @@ H5T__conv_struct(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
HDassert(priv);
HDassert(bkg && cdata->need_bkg);
- if (cdata->recalc && H5T_conv_struct_init(src, dst, cdata) < 0)
+ if (cdata->recalc && H5T__conv_struct_init(src, dst, cdata) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to initialize conversion data")
/*
@@ -2382,27 +2382,27 @@ H5T__conv_struct(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
} /* end H5T__conv_struct() */
/*-------------------------------------------------------------------------
- * Function: H5T__conv_struct_opt
+ * Function: H5T__conv_struct_opt
*
- * Purpose: Converts between compound datatypes in a manner more
- * efficient than the general-purpose H5T__conv_struct()
- * function. This function isn't applicable if the destination
- * is larger than the source type. This is a soft conversion
- * function. The algorithm is basically:
+ * Purpose: Converts between compound datatypes in a manner more
+ * efficient than the general-purpose H5T__conv_struct()
+ * function. This function isn't applicable if the destination
+ * is larger than the source type. This is a soft conversion
+ * function. The algorithm is basically:
*
- * For each member of the struct
- * If sizeof destination type <= sizeof source type then
- * Convert member to destination type for all elements
- * Move memb to BKG buffer for all elements
- * Else
- * Move member as far left as possible for all elements
+ * For each member of the struct
+ * If sizeof destination type <= sizeof source type then
+ * Convert member to destination type for all elements
+ * Move memb to BKG buffer for all elements
+ * Else
+ * Move member as far left as possible for all elements
*
- * For each member of the struct (in reverse order)
- * If not destination type then
- * Convert member to destination type for all elements
- * Move member to correct position in BKG for all elements
+ * For each member of the struct (in reverse order)
+ * If not destination type then
+ * Convert member to destination type for all elements
+ * Move member to correct position in BKG for all elements
*
- * Copy BKG to BUF for all elements
+ * Copy BKG to BUF for all elements
*
* Special case when the source and destination members
* are a subset of each other, and the order is the same, and no
@@ -2417,10 +2417,10 @@ H5T__conv_struct(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
* The optimization is simply moving data to the appropriate
* places in the buffer.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Thursday, January 22, 1998
+ * Programmer: Robb Matzke
+ * Thursday, January 22, 1998
*
*-------------------------------------------------------------------------
*/
@@ -2428,22 +2428,22 @@ herr_t
H5T__conv_struct_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride,
size_t bkg_stride, void *_buf, void *_bkg)
{
- uint8_t * buf = (uint8_t *)_buf; /*cast for pointer arithmetic */
- uint8_t * bkg = (uint8_t *)_bkg; /*background pointer arithmetic */
- uint8_t * xbuf = NULL; /*temporary pointer into `buf' */
- uint8_t * xbkg = NULL; /*temporary pointer into `bkg' */
- H5T_t * src = NULL; /*source datatype */
- H5T_t * dst = NULL; /*destination datatype */
- int * src2dst = NULL; /*maps src member to dst member */
+ uint8_t * buf = (uint8_t *)_buf; /*cast for pointer arithmetic */
+ uint8_t * bkg = (uint8_t *)_bkg; /*background pointer arithmetic */
+ uint8_t * xbuf = NULL; /*temporary pointer into `buf' */
+ uint8_t * xbkg = NULL; /*temporary pointer into `bkg' */
+ H5T_t * src = NULL; /*source datatype */
+ H5T_t * dst = NULL; /*destination datatype */
+ int * src2dst = NULL; /*maps src member to dst member */
H5T_cmemb_t * src_memb = NULL; /*source struct member descript.*/
- H5T_cmemb_t * dst_memb = NULL; /*destination struct memb desc. */
- size_t offset; /*byte offset wrt struct */
- size_t elmtno; /*element counter */
+ H5T_cmemb_t * dst_memb = NULL; /*destination struct memb desc. */
+ size_t offset; /*byte offset wrt struct */
+ size_t elmtno; /*element counter */
size_t copy_size; /*size of element for copying */
- H5T_conv_struct_t *priv = NULL; /*private data */
+ H5T_conv_struct_t *priv = NULL; /*private data */
hbool_t no_stride = FALSE; /*flag to indicate no stride */
- unsigned u; /*counters */
- int i; /*counters */
+ unsigned u; /*counters */
+ int i; /*counters */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -2464,7 +2464,7 @@ H5T__conv_struct_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm
HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a H5T_COMPOUND datatype")
/* Initialize data which is relatively constant */
- if (H5T_conv_struct_init(src, dst, cdata) < 0)
+ if (H5T__conv_struct_init(src, dst, cdata) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to initialize conversion data")
priv = (H5T_conv_struct_t *)(cdata->priv);
src2dst = priv->src2dst;
@@ -2497,7 +2497,7 @@ H5T__conv_struct_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm
if (dst_memb->size > src_memb->size) {
offset -= src_memb->size;
if (dst_memb->size > src->shared->size - offset) {
- cdata->priv = H5T_conv_struct_free(priv);
+ cdata->priv = H5T__conv_struct_free(priv);
HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL,
"conversion is unsupported by this function")
} /* end if */
@@ -2510,7 +2510,7 @@ H5T__conv_struct_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm
/*
* Free the private conversion data.
*/
- cdata->priv = H5T_conv_struct_free((H5T_conv_struct_t *)(cdata->priv));
+ cdata->priv = H5T__conv_struct_free((H5T_conv_struct_t *)(cdata->priv));
break;
case H5T_CONV_CONV:
@@ -2521,7 +2521,7 @@ H5T__conv_struct_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
/* Update cached data if necessary */
- if (cdata->recalc && H5T_conv_struct_init(src, dst, cdata) < 0)
+ if (cdata->recalc && H5T__conv_struct_init(src, dst, cdata) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to initialize conversion data")
priv = (H5T_conv_struct_t *)(cdata->priv);
HDassert(priv);
@@ -2656,31 +2656,31 @@ H5T__conv_struct_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm
} /* end H5T__conv_struct_opt() */
/*-------------------------------------------------------------------------
- * Function: H5T_conv_enum_init
+ * Function: H5T__conv_enum_init
*
- * Purpose: Initialize information for H5T__conv_enum().
+ * Purpose: Initialize information for H5T__conv_enum().
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Monday, January 4, 1999
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5T_conv_enum_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata)
-{
- H5T_enum_struct_t *priv = NULL; /*private conversion data */
- int n; /*src value cast as native int */
- int domain[2] = {0, 0}; /*min and max source values */
- int * map = NULL; /*map from src value to dst idx */
- unsigned length; /*nelmts in map array */
- unsigned i, j; /*counters */
+H5T__conv_enum_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata)
+{
+ H5T_enum_struct_t *priv = NULL; /*private conversion data */
+ int n; /*src value cast as native int */
+ int domain[2] = {0, 0}; /*min and max source values */
+ int * map = NULL; /*map from src value to dst idx */
+ unsigned length; /*nelmts in map array */
+ unsigned i, j; /*counters */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
cdata->need_bkg = H5T_BKG_NO;
if (NULL == (priv = (H5T_enum_struct_t *)(cdata->priv = H5MM_calloc(sizeof(*priv)))))
@@ -2699,7 +2699,7 @@ H5T_conv_enum_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
for (i = 0, j = 0; i < src->shared->u.enumer.nmembs && j < dst->shared->u.enumer.nmembs; i++, j++) {
while (j < dst->shared->u.enumer.nmembs &&
- HDstrcmp(src->shared->u.enumer.name[i], dst->shared->u.enumer.name[j]))
+ HDstrcmp(src->shared->u.enumer.name[i], dst->shared->u.enumer.name[j]) != 0)
j++;
if (j >= dst->shared->u.enumer.nmembs)
HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL,
@@ -2712,12 +2712,12 @@ H5T_conv_enum_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata)
* value converted. However, if all of the following constraints are met
* then we can build a perfect hash table and use an O(1) lookup method.
*
- * A: The source datatype size matches one of our native datatype
- * sizes.
+ * A: The source datatype size matches one of our native datatype
+ * sizes.
*
- * B: After casting the source value bit pattern to a native type
- * the size of the range of values is less than 20% larger than
- * the number of values.
+ * B: After casting the source value bit pattern to a native type
+ * the size of the range of values is less than 20% larger than
+ * the number of values.
*
* If this special case is met then we use the source bit pattern cast as
* a native integer type as an index into the `val2dst'. The values of
@@ -2799,15 +2799,15 @@ H5T_conv_enum_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata)
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_enum
+ * Function: H5T__conv_enum
*
- * Purpose: Converts one type of enumerated data to another.
+ * Purpose: Converts one type of enumerated data to another.
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Monday, January 4, 1999
*-------------------------------------------------------------------------
*/
@@ -2815,15 +2815,15 @@ herr_t
H5T__conv_enum(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride,
size_t H5_ATTR_UNUSED bkg_stride, void *_buf, void H5_ATTR_UNUSED *bkg)
{
- uint8_t * buf = (uint8_t *)_buf; /*cast for pointer arithmetic */
- H5T_t * src = NULL, *dst = NULL; /*src and dst datatypes */
- uint8_t * s = NULL, *d = NULL; /*src and dst BUF pointers */
- ssize_t src_delta, dst_delta; /*conversion strides */
- int n; /*src value cast as native int */
+ uint8_t * buf = (uint8_t *)_buf; /*cast for pointer arithmetic */
+ H5T_t * src = NULL, *dst = NULL; /*src and dst datatypes */
+ uint8_t * s = NULL, *d = NULL; /*src and dst BUF pointers */
+ ssize_t src_delta, dst_delta; /*conversion strides */
+ int n; /*src value cast as native int */
H5T_enum_struct_t *priv = (H5T_enum_struct_t *)(cdata->priv);
H5T_conv_cb_t cb_struct; /*conversion callback structure */
H5T_conv_ret_t except_ret; /*return of callback function */
- size_t i; /*counters */
+ size_t i; /*counters */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -2843,7 +2843,7 @@ H5T__conv_enum(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si
if (H5T_ENUM != dst->shared->type)
HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a H5T_ENUM datatype")
- if (H5T_conv_enum_init(src, dst, cdata) < 0)
+ if (H5T__conv_enum_init(src, dst, cdata) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to initialize private data")
break;
@@ -2871,7 +2871,7 @@ H5T__conv_enum(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si
HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a H5T_ENUM datatype")
/* priv->src2dst map was computed for certain sort keys. Make sure those same
- * sort keys are used here during conversion. See H5T_conv_enum_init(). But
+ * sort keys are used here during conversion. See H5T__conv_enum_init(). But
* we actually don't care about the source type's order when doing the O(1)
* conversion algorithm, which is turned on by non-zero priv->length */
H5T__sort_name(dst, NULL);
@@ -2910,7 +2910,7 @@ H5T__conv_enum(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si
/* (The casting won't work when the byte orders are different. i.g. if the source value
* is big-endian 0x0000000f, the direct casting "n = *((int*)s);" will make it a big
* number 0x0f000000 on little-endian machine. But we won't fix it because it's an
- * optimization code. Please also see the comment in the H5T_conv_enum_init() function.
+ * optimization code. Please also see the comment in the H5T__conv_enum_init() function.
* SLU - 2011/5/24)
*/
if (1 == src->shared->size)
@@ -2993,18 +2993,18 @@ H5T__conv_enum(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si
} /* end H5T__conv_enum() */
/*-------------------------------------------------------------------------
- * Function: H5T__conv_enum_numeric
+ * Function: H5T__conv_enum_numeric
*
- * Purpose: Converts enumerated data to a numeric type (integer or
+ * Purpose: Converts enumerated data to a numeric type (integer or
* floating-point number). This function is registered into
* the conversion table twice in H5T_init_interface in H5T.c.
* Once for enum-integer conversion. Once for enum-float conversion.
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* 12 October 2012
*-------------------------------------------------------------------------
*/
@@ -3013,7 +3013,7 @@ H5T__conv_enum_numeric(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne
size_t H5_ATTR_UNUSED buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *_buf,
void H5_ATTR_UNUSED *bkg)
{
- H5T_t * src, *dst; /*src and dst datatypes */
+ H5T_t * src, *dst; /*src and dst datatypes */
H5T_t * src_parent; /*parent type for src */
hid_t src_parent_id = -1; /*ID for parent of the source */
H5T_path_t *tpath; /* Conversion information */
@@ -3076,26 +3076,26 @@ H5T__conv_enum_numeric(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne
} /* end H5T__conv_enum_numeric() */
/*-------------------------------------------------------------------------
- * Function: H5T__conv_vlen
+ * Function: H5T__conv_vlen
*
- * Purpose: Converts between VL datatypes in memory and on disk.
- * This is a soft conversion function. The algorithm is
- * basically:
+ * Purpose: Converts between VL datatypes in memory and on disk.
+ * This is a soft conversion function. The algorithm is
+ * basically:
*
- * For every VL struct in the main buffer:
- * 1. Allocate space for temporary dst VL data (reuse buffer
- * if possible)
+ * For every VL struct in the main buffer:
+ * 1. Allocate space for temporary dst VL data (reuse buffer
+ * if possible)
* 2. Copy VL data from src buffer into dst buffer
* 3. Convert VL data into dst representation
* 4. Allocate buffer in dst heap
- * 5. Free heap objects storing old data
+ * 5. Free heap objects storing old data
* 6. Write dst VL data into dst heap
* 7. Store (heap ID or pointer) and length in main dst buffer
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * Wednesday, May 26, 1999
+ * Programmer: Quincey Koziol
+ * Wednesday, May 26, 1999
*
*-------------------------------------------------------------------------
*/
@@ -3104,27 +3104,27 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si
size_t bkg_stride, void *buf, void *bkg)
{
H5T_vlen_alloc_info_t vl_alloc_info; /* VL allocation info */
- H5T_path_t * tpath = NULL; /* Type conversion path */
+ H5T_path_t * tpath = NULL; /* Type conversion path */
hbool_t noop_conv = FALSE; /* Flag to indicate a noop conversion */
hbool_t write_to_file = FALSE; /* Flag to indicate writing to file */
htri_t parent_is_vlen; /* Flag to indicate parent is vlen datatyp */
size_t bg_seq_len = 0; /* The number of elements in the background sequence */
- hid_t tsrc_id = -1, tdst_id = -1; /*temporary type atoms */
- H5T_t * src = NULL; /*source datatype */
- H5T_t * dst = NULL; /*destination datatype */
- uint8_t * s = NULL; /*source buffer */
- uint8_t * d = NULL; /*destination buffer */
- uint8_t * b = NULL; /*background buffer */
- ssize_t s_stride, d_stride; /*src and dst strides */
- ssize_t b_stride; /*bkg stride */
+ hid_t tsrc_id = -1, tdst_id = -1; /*temporary type atoms */
+ H5T_t * src = NULL; /*source datatype */
+ H5T_t * dst = NULL; /*destination datatype */
+ uint8_t * s = NULL; /*source buffer */
+ uint8_t * d = NULL; /*destination buffer */
+ uint8_t * b = NULL; /*background buffer */
+ ssize_t s_stride, d_stride; /*src and dst strides */
+ ssize_t b_stride; /*bkg stride */
size_t safe; /*how many elements are safe to process in each pass */
size_t src_base_size, dst_base_size; /*source & destination base size*/
- void * conv_buf = NULL; /*temporary conversion buffer */
+ void * conv_buf = NULL; /*temporary conversion buffer */
size_t conv_buf_size = 0; /*size of conversion buffer in bytes */
- void * tmp_buf = NULL; /*temporary background buffer */
- size_t tmp_buf_size = 0; /*size of temporary bkg buffer */
+ void * tmp_buf = NULL; /*temporary background buffer */
+ size_t tmp_buf_size = 0; /*size of temporary bkg buffer */
hbool_t nested = FALSE; /*flag of nested VL case */
- size_t elmtno; /*element number counter */
+ size_t elmtno; /*element number counter */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -3459,15 +3459,15 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si
} /* end H5T__conv_vlen() */
/*-------------------------------------------------------------------------
- * Function: H5T__conv_array
+ * Function: H5T__conv_array
*
- * Purpose: Converts between array datatypes in memory and on disk.
- * This is a soft conversion function.
+ * Purpose: Converts between array datatypes in memory and on disk.
+ * This is a soft conversion function.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * Monday, November 6, 2000
+ * Programmer: Quincey Koziol
+ * Monday, November 6, 2000
*
*-------------------------------------------------------------------------
*/
@@ -3475,16 +3475,16 @@ herr_t
H5T__conv_array(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride,
size_t bkg_stride, void *_buf, void H5_ATTR_UNUSED *_bkg)
{
- H5T_path_t *tpath; /* Type conversion path */
- hid_t tsrc_id = -1, tdst_id = -1; /*temporary type atoms */
- H5T_t * src = NULL; /*source datatype */
- H5T_t * dst = NULL; /*destination datatype */
+ H5T_path_t *tpath; /* Type conversion path */
+ hid_t tsrc_id = -1, tdst_id = -1; /*temporary type atoms */
+ H5T_t * src = NULL; /*source datatype */
+ H5T_t * dst = NULL; /*destination datatype */
uint8_t * sp, *dp; /*source and dest traversal ptrs */
- ssize_t src_delta, dst_delta; /*source & destination stride */
- int direction; /*direction of traversal */
- size_t elmtno; /*element number counter */
+ ssize_t src_delta, dst_delta; /*source & destination stride */
+ int direction; /*direction of traversal */
+ size_t elmtno; /*element number counter */
unsigned u; /* local index variable */
- void * bkg_buf = NULL; /*temporary background buffer */
+ void * bkg_buf = NULL; /*temporary background buffer */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -3760,7 +3760,7 @@ H5T__conv_ref(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
if (0 == (buf_size = src->shared->u.atomic.u.r.cls->getsize(
src->shared->u.atomic.u.r.file, s, src->shared->size,
dst->shared->u.atomic.u.r.file, &dst_copy)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "incorrect size")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "unable to obtain size of reference")
/* Check if conversion buffer is large enough, resize if necessary. */
if (conv_buf_size < buf_size) {
@@ -3818,16 +3818,16 @@ H5T__conv_ref(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
} /* end H5T__conv_ref() */
/*-------------------------------------------------------------------------
- * Function: H5T__conv_i_i
+ * Function: H5T__conv_i_i
*
- * Purpose: Convert one integer type to another. This is the catch-all
- * function for integer conversions and is probably not
- * particularly fast.
+ * Purpose: Convert one integer type to another. This is the catch-all
+ * function for integer conversions and is probably not
+ * particularly fast.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Wednesday, June 10, 1998
+ * Programmer: Robb Matzke
+ * Wednesday, June 10, 1998
*
*-------------------------------------------------------------------------
*/
@@ -3835,18 +3835,18 @@ herr_t
H5T__conv_i_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride,
size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg)
{
- H5T_t * src = NULL; /*source datatype */
- H5T_t * dst = NULL; /*destination datatype */
- ssize_t src_delta, dst_delta; /*source & destination stride */
- int direction; /*direction of traversal */
- size_t elmtno; /*element number */
- size_t half_size; /*half the type size */
- size_t olap; /*num overlapping elements */
+ H5T_t * src = NULL; /*source datatype */
+ H5T_t * dst = NULL; /*destination datatype */
+ ssize_t src_delta, dst_delta; /*source & destination stride */
+ int direction; /*direction of traversal */
+ size_t elmtno; /*element number */
+ size_t half_size; /*half the type size */
+ size_t olap; /*num overlapping elements */
uint8_t * s, *sp, *d, *dp; /*source and dest traversal ptrs*/
- uint8_t * src_rev = NULL; /*order-reversed source buffer */
- uint8_t dbuf[64]; /*temp destination buffer */
+ uint8_t * src_rev = NULL; /*order-reversed source buffer */
+ uint8_t dbuf[64] = {0}; /*temp destination buffer */
size_t first;
- ssize_t sfirst; /*a signed version of `first' */
+ ssize_t sfirst; /*a signed version of `first' */
size_t i; /*Local index variables */
H5T_conv_cb_t cb_struct = {NULL, NULL}; /*conversion callback structure */
H5T_conv_ret_t except_ret; /*return of callback function */
@@ -3996,8 +3996,8 @@ H5T__conv_i_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
else if (first >= dst->shared->u.atomic.prec) {
/*overflow*/
if (cb_struct.func) { /*If user's exception handler is present, use it*/
- H5T_reverse_order(src_rev, s, src->shared->size,
- src->shared->u.atomic.order); /*reverse order first*/
+ H5T__reverse_order(src_rev, s, src->shared->size,
+ src->shared->u.atomic.order); /*reverse order first*/
except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_HI, src_id, dst_id, src_rev,
d, cb_struct.user_data);
}
@@ -4029,8 +4029,8 @@ H5T__conv_i_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
if (first + 1 == src->shared->u.atomic.prec) {
/*overflow - source is negative*/
if (cb_struct.func) { /*If user's exception handler is present, use it*/
- H5T_reverse_order(src_rev, s, src->shared->size,
- src->shared->u.atomic.order); /*reverse order first*/
+ H5T__reverse_order(src_rev, s, src->shared->size,
+ src->shared->u.atomic.order); /*reverse order first*/
except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_LOW, src_id, dst_id, src_rev,
d, cb_struct.user_data);
}
@@ -4054,8 +4054,8 @@ H5T__conv_i_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
else if (first >= dst->shared->u.atomic.prec) {
/*overflow - source is positive*/
if (cb_struct.func) { /*If user's exception handler is present, use it*/
- H5T_reverse_order(src_rev, s, src->shared->size,
- src->shared->u.atomic.order); /*reverse order first*/
+ H5T__reverse_order(src_rev, s, src->shared->size,
+ src->shared->u.atomic.order); /*reverse order first*/
except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_HI, src_id, dst_id, src_rev,
d, cb_struct.user_data);
}
@@ -4084,8 +4084,8 @@ H5T__conv_i_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
if (first + 1 >= dst->shared->u.atomic.prec) {
/*overflow*/
if (cb_struct.func) { /*If user's exception handler is present, use it*/
- H5T_reverse_order(src_rev, s, src->shared->size,
- src->shared->u.atomic.order); /*reverse order first*/
+ H5T__reverse_order(src_rev, s, src->shared->size,
+ src->shared->u.atomic.order); /*reverse order first*/
except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_HI, src_id, dst_id, src_rev,
d, cb_struct.user_data);
}
@@ -4129,8 +4129,8 @@ H5T__conv_i_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
if (sfz >= 0 && fz + 1 >= dst->shared->u.atomic.prec) {
/*overflow*/
if (cb_struct.func) { /*If user's exception handler is present, use it*/
- H5T_reverse_order(src_rev, s, src->shared->size,
- src->shared->u.atomic.order); /*reverse order first*/
+ H5T__reverse_order(src_rev, s, src->shared->size,
+ src->shared->u.atomic.order); /*reverse order first*/
except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_LOW, src_id, dst_id, src_rev,
d, cb_struct.user_data);
}
@@ -4169,8 +4169,8 @@ H5T__conv_i_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
if (first + 1 >= dst->shared->u.atomic.prec) {
/*overflow*/
if (cb_struct.func) { /*If user's exception handler is present, use it*/
- H5T_reverse_order(src_rev, s, src->shared->size,
- src->shared->u.atomic.order); /*reverse order first*/
+ H5T__reverse_order(src_rev, s, src->shared->size,
+ src->shared->u.atomic.order); /*reverse order first*/
except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_HI, src_id, dst_id, src_rev,
d, cb_struct.user_data);
}
@@ -4256,16 +4256,16 @@ H5T__conv_i_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
} /* end H5T__conv_i_i() */
/*-------------------------------------------------------------------------
- * Function: H5T__conv_f_f
+ * Function: H5T__conv_f_f
*
- * Purpose: Convert one floating point type to another. This is a catch
- * all for floating point conversions and is probably not
- * particularly fast!
+ * Purpose: Convert one floating point type to another. This is a catch
+ * all for floating point conversions and is probably not
+ * particularly fast!
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Tuesday, June 23, 1998
+ * Programmer: Robb Matzke
+ * Tuesday, June 23, 1998
*
*-------------------------------------------------------------------------
*/
@@ -4274,32 +4274,32 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg)
{
/* Traversal-related variables */
- H5T_t * src_p; /*source datatype */
- H5T_t * dst_p; /*destination datatype */
- H5T_atomic_t src; /*atomic source info */
- H5T_atomic_t dst; /*atomic destination info */
- ssize_t src_delta, dst_delta; /*source & destination stride */
- int direction; /*forward or backward traversal */
- size_t elmtno; /*element number */
- size_t half_size; /*half the type size */
+ H5T_t * src_p; /*source datatype */
+ H5T_t * dst_p; /*destination datatype */
+ H5T_atomic_t src; /*atomic source info */
+ H5T_atomic_t dst; /*atomic destination info */
+ ssize_t src_delta, dst_delta; /*source & destination stride */
+ int direction; /*forward or backward traversal */
+ size_t elmtno; /*element number */
+ size_t half_size; /*half the type size */
size_t tsize; /*type size for swapping bytes */
- size_t olap; /*num overlapping elements */
- ssize_t bitno = 0; /*bit number */
+ size_t olap; /*num overlapping elements */
+ ssize_t bitno = 0; /*bit number */
uint8_t * s, *sp, *d, *dp; /*source and dest traversal ptrs*/
- uint8_t * src_rev = NULL; /*order-reversed source buffer */
- uint8_t dbuf[64]; /*temp destination buffer */
+ uint8_t * src_rev = NULL; /*order-reversed source buffer */
+ uint8_t dbuf[64] = {0}; /*temp destination buffer */
uint8_t tmp1, tmp2; /*temp variables for swapping bytes*/
/* Conversion-related variables */
- int64_t expo; /*exponent */
- hssize_t expo_max; /*maximum possible dst exponent */
+ int64_t expo; /*exponent */
+ hssize_t expo_max; /*maximum possible dst exponent */
size_t msize = 0; /*useful size of mantissa in src*/
- size_t mpos; /*offset to useful mant is src */
+ size_t mpos; /*offset to useful mant is src */
uint64_t sign; /*source sign bit value */
size_t mrsh; /*amount to right shift mantissa*/
- hbool_t carry = FALSE; /*carry after rounding mantissa */
- size_t i; /*miscellaneous counters */
- size_t implied; /*destination implied bits */
+ hbool_t carry = FALSE; /*carry after rounding mantissa */
+ size_t i; /*miscellaneous counters */
+ size_t implied; /*destination implied bits */
hbool_t denormalized = FALSE; /*is either source or destination denormalized?*/
H5T_conv_cb_t cb_struct = {NULL, NULL}; /*conversion callback structure */
H5T_conv_ret_t except_ret; /*return of callback function */
@@ -4459,7 +4459,8 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
/* +Inf or -Inf */
if (cb_struct.func) { /*If user's exception handler is present, use it*/
/*reverse order first*/
- H5T_reverse_order(src_rev, s, src_p->shared->size, src_p->shared->u.atomic.order);
+ H5T__reverse_order(src_rev, s, src_p->shared->size,
+ src_p->shared->u.atomic.order);
if (sign)
except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_NINF, src_id, dst_id, src_rev,
d, cb_struct.user_data);
@@ -4499,7 +4500,7 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
/* +Inf or -Inf */
if (cb_struct.func) { /*If user's exception handler is present, use it*/
/*reverse order first*/
- H5T_reverse_order(src_rev, s, src_p->shared->size, src_p->shared->u.atomic.order);
+ H5T__reverse_order(src_rev, s, src_p->shared->size, src_p->shared->u.atomic.order);
if (sign)
except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_NINF, src_id, dst_id, src_rev, d,
cb_struct.user_data);
@@ -4537,7 +4538,7 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
/* NaN */
if (cb_struct.func) { /*If user's exception handler is present, use it*/
/*reverse order first*/
- H5T_reverse_order(src_rev, s, src_p->shared->size, src_p->shared->u.atomic.order);
+ H5T__reverse_order(src_rev, s, src_p->shared->size, src_p->shared->u.atomic.order);
except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_NAN, src_id, dst_id, src_rev, d,
cb_struct.user_data);
}
@@ -4562,7 +4563,7 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
/*
* Get the exponent as an unsigned quantity from the section of
- * the source bit field where it's located. Don't worry about
+ * the source bit field where it's located. Don't worry about
* the exponent bias yet.
*/
expo = (int64_t)H5T__bit_get_d(s, src.u.f.epos, src.u.f.esize);
@@ -4650,7 +4651,7 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
else if (expo >= expo_max) {
/*
* The exponent is too large to fit in the available region
- * or it results in the maximum possible value. Use positive
+ * or it results in the maximum possible value. Use positive
* or negative infinity instead unless the application
* specifies something else. Before calling the overflow
* handler make sure the source buffer we hand it is in the
@@ -4658,7 +4659,7 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
*/
if (cb_struct.func) { /*If user's exception handler is present, use it*/
/*reverse order first*/
- H5T_reverse_order(src_rev, s, src_p->shared->size, src_p->shared->u.atomic.order);
+ H5T__reverse_order(src_rev, s, src_p->shared->size, src_p->shared->u.atomic.order);
except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_HI, src_id, dst_id, src_rev, d,
cb_struct.user_data);
}
@@ -4748,7 +4749,8 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
*/
if (cb_struct.func) { /*If user's exception handler is present, use it*/
/*reverse order first*/
- H5T_reverse_order(src_rev, s, src_p->shared->size, src_p->shared->u.atomic.order);
+ H5T__reverse_order(src_rev, s, src_p->shared->size,
+ src_p->shared->u.atomic.order);
except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_HI, src_id, dst_id, src_rev,
d, cb_struct.user_data);
}
@@ -4842,14 +4844,14 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
} /* end H5T__conv_f_f() */
/*-------------------------------------------------------------------------
- * Function: H5T__conv_s_s
+ * Function: H5T__conv_s_s
*
- * Purpose: Convert one fixed-length string type to another.
+ * Purpose: Convert one fixed-length string type to another.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Friday, August 7, 1998
+ * Programmer: Robb Matzke
+ * Friday, August 7, 1998
*
*-------------------------------------------------------------------------
*/
@@ -4857,15 +4859,15 @@ herr_t
H5T__conv_s_s(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride,
size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg)
{
- H5T_t * src = NULL; /*source datatype */
- H5T_t * dst = NULL; /*destination datatype */
- ssize_t src_delta, dst_delta; /*source & destination stride */
- int direction; /*direction of traversal */
- size_t elmtno; /*element number */
- size_t olap; /*num overlapping elements */
- size_t nchars = 0; /*number of characters copied */
+ H5T_t * src = NULL; /*source datatype */
+ H5T_t * dst = NULL; /*destination datatype */
+ ssize_t src_delta, dst_delta; /*source & destination stride */
+ int direction; /*direction of traversal */
+ size_t elmtno; /*element number */
+ size_t olap; /*num overlapping elements */
+ size_t nchars = 0; /*number of characters copied */
uint8_t *s, *sp, *d, *dp; /*src and dst traversal pointers*/
- uint8_t *dbuf = NULL; /*temp buf for overlap convers. */
+ uint8_t *dbuf = NULL; /*temp buf for overlap convers. */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -4945,7 +4947,7 @@ H5T__conv_s_s(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
dst_delta = (ssize_t)direction * (ssize_t)(buf_stride ? buf_stride : dst->shared->size);
/* Allocate the overlap buffer */
- if (NULL == (dbuf = (uint8_t *)H5MM_malloc(dst->shared->size)))
+ if (NULL == (dbuf = (uint8_t *)H5MM_calloc(dst->shared->size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for string conversion")
/* The conversion loop. */
@@ -5085,16 +5087,16 @@ H5T__conv_s_s(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
} /* end H5T__conv_s_s() */
/*-------------------------------------------------------------------------
- * Function: H5T__conv_schar_uchar
+ * Function: H5T__conv_schar_uchar
*
- * Purpose: Converts `signed char' to `unsigned char'
+ * Purpose: Converts `signed char' to `unsigned char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Monday, November 16, 1998
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5106,16 +5108,16 @@ H5T__conv_schar_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uchar_schar
+ * Function: H5T__conv_uchar_schar
*
- * Purpose: Converts `unsigned char' to `signed char'
+ * Purpose: Converts `unsigned char' to `signed char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Monday, November 16, 1998
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5127,16 +5129,16 @@ H5T__conv_uchar_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_schar_short
+ * Function: H5T__conv_schar_short
*
- * Purpose: Converts `signed char' to `short'
+ * Purpose: Converts `signed char' to `short'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5148,16 +5150,16 @@ H5T__conv_schar_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_schar_ushort
+ * Function: H5T__conv_schar_ushort
*
- * Purpose: Converts `signed char' to `unsigned short'
+ * Purpose: Converts `signed char' to `unsigned short'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5169,16 +5171,16 @@ H5T__conv_schar_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uchar_short
+ * Function: H5T__conv_uchar_short
*
- * Purpose: Converts `unsigned char' to `short'
+ * Purpose: Converts `unsigned char' to `short'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5190,16 +5192,16 @@ H5T__conv_uchar_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uchar_ushort
+ * Function: H5T__conv_uchar_ushort
*
- * Purpose: Converts `unsigned char' to `unsigned short'
+ * Purpose: Converts `unsigned char' to `unsigned short'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5211,16 +5213,16 @@ H5T__conv_uchar_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_schar_int
+ * Function: H5T__conv_schar_int
*
- * Purpose: Converts `signed char' to `int'
+ * Purpose: Converts `signed char' to `int'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5232,16 +5234,16 @@ H5T__conv_schar_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmt
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_schar_uint
+ * Function: H5T__conv_schar_uint
*
- * Purpose: Converts `signed char' to `unsigned int'
+ * Purpose: Converts `signed char' to `unsigned int'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5253,16 +5255,16 @@ H5T__conv_schar_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uchar_int
+ * Function: H5T__conv_uchar_int
*
- * Purpose: Converts `unsigned char' to `int'
+ * Purpose: Converts `unsigned char' to `int'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5274,16 +5276,16 @@ H5T__conv_uchar_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmt
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uchar_uint
+ * Function: H5T__conv_uchar_uint
*
- * Purpose: Converts `unsigned char' to `unsigned int'
+ * Purpose: Converts `unsigned char' to `unsigned int'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5295,16 +5297,16 @@ H5T__conv_uchar_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_schar_long
+ * Function: H5T__conv_schar_long
*
- * Purpose: Converts `signed char' to `long'
+ * Purpose: Converts `signed char' to `long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5316,16 +5318,16 @@ H5T__conv_schar_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_schar_ulong
+ * Function: H5T__conv_schar_ulong
*
- * Purpose: Converts `signed char' to `unsigned long'
+ * Purpose: Converts `signed char' to `unsigned long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5337,16 +5339,16 @@ H5T__conv_schar_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uchar_long
+ * Function: H5T__conv_uchar_long
*
- * Purpose: Converts `unsigned char' to `long'
+ * Purpose: Converts `unsigned char' to `long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5358,16 +5360,16 @@ H5T__conv_uchar_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uchar_ulong
+ * Function: H5T__conv_uchar_ulong
*
- * Purpose: Converts `unsigned char' to `unsigned long'
+ * Purpose: Converts `unsigned char' to `unsigned long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5379,16 +5381,16 @@ H5T__conv_uchar_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_schar_llong
+ * Function: H5T__conv_schar_llong
*
- * Purpose: Converts `signed char' to `long long'
+ * Purpose: Converts `signed char' to `long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5400,16 +5402,16 @@ H5T__conv_schar_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_schar_ullong
+ * Function: H5T__conv_schar_ullong
*
- * Purpose: Converts `signed char' to `unsigned long long'
+ * Purpose: Converts `signed char' to `unsigned long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5421,16 +5423,16 @@ H5T__conv_schar_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uchar_llong
+ * Function: H5T__conv_uchar_llong
*
- * Purpose: Converts `unsigned char' to `long long'
+ * Purpose: Converts `unsigned char' to `long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5442,16 +5444,16 @@ H5T__conv_uchar_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uchar_ullong
+ * Function: H5T__conv_uchar_ullong
*
- * Purpose: Converts `unsigned char' to `unsigned long long'
+ * Purpose: Converts `unsigned char' to `unsigned long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5463,16 +5465,16 @@ H5T__conv_uchar_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_short_schar
+ * Function: H5T__conv_short_schar
*
- * Purpose: Converts `short' to `signed char'
+ * Purpose: Converts `short' to `signed char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5484,16 +5486,16 @@ H5T__conv_short_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_short_uchar
+ * Function: H5T__conv_short_uchar
*
- * Purpose: Converts `short' to `unsigned char'
+ * Purpose: Converts `short' to `unsigned char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5505,16 +5507,16 @@ H5T__conv_short_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ushort_schar
+ * Function: H5T__conv_ushort_schar
*
- * Purpose: Converts `unsigned short' to `signed char'
+ * Purpose: Converts `unsigned short' to `signed char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5526,16 +5528,16 @@ H5T__conv_ushort_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ushort_uchar
+ * Function: H5T__conv_ushort_uchar
*
- * Purpose: Converts `unsigned short' to `unsigned char'
+ * Purpose: Converts `unsigned short' to `unsigned char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5547,16 +5549,16 @@ H5T__conv_ushort_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_short_ushort
+ * Function: H5T__conv_short_ushort
*
- * Purpose: Converts `short' to `unsigned short'
+ * Purpose: Converts `short' to `unsigned short'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Monday, November 16, 1998
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5568,16 +5570,16 @@ H5T__conv_short_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ushort_short
+ * Function: H5T__conv_ushort_short
*
- * Purpose: Converts `unsigned short' to `short'
+ * Purpose: Converts `unsigned short' to `short'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Monday, November 16, 1998
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5589,16 +5591,16 @@ H5T__conv_ushort_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_short_int
+ * Function: H5T__conv_short_int
*
- * Purpose: Converts `short' to `int'
+ * Purpose: Converts `short' to `int'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5610,16 +5612,16 @@ H5T__conv_short_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmt
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_short_uint
+ * Function: H5T__conv_short_uint
*
- * Purpose: Converts `short' to `unsigned int'
+ * Purpose: Converts `short' to `unsigned int'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5631,16 +5633,16 @@ H5T__conv_short_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ushort_int
+ * Function: H5T__conv_ushort_int
*
- * Purpose: Converts `unsigned short' to `int'
+ * Purpose: Converts `unsigned short' to `int'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5652,16 +5654,16 @@ H5T__conv_ushort_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ushort_uint
+ * Function: H5T__conv_ushort_uint
*
- * Purpose: Converts `unsigned short' to `unsigned int'
+ * Purpose: Converts `unsigned short' to `unsigned int'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5673,16 +5675,16 @@ H5T__conv_ushort_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_short_long
+ * Function: H5T__conv_short_long
*
- * Purpose: Converts `short' to `long'
+ * Purpose: Converts `short' to `long'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5694,16 +5696,16 @@ H5T__conv_short_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_short_ulong
+ * Function: H5T__conv_short_ulong
*
- * Purpose: Converts `short' to `unsigned long'
+ * Purpose: Converts `short' to `unsigned long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5715,16 +5717,16 @@ H5T__conv_short_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ushort_long
+ * Function: H5T__conv_ushort_long
*
- * Purpose: Converts `unsigned short' to `long'
+ * Purpose: Converts `unsigned short' to `long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5736,16 +5738,16 @@ H5T__conv_ushort_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ushort_ulong
+ * Function: H5T__conv_ushort_ulong
*
- * Purpose: Converts `unsigned short' to `unsigned long'
+ * Purpose: Converts `unsigned short' to `unsigned long'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5757,16 +5759,16 @@ H5T__conv_ushort_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_short_llong
+ * Function: H5T__conv_short_llong
*
- * Purpose: Converts `short' to `long long'
+ * Purpose: Converts `short' to `long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5778,16 +5780,16 @@ H5T__conv_short_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_short_ullong
+ * Function: H5T__conv_short_ullong
*
- * Purpose: Converts `short' to `unsigned long long'
+ * Purpose: Converts `short' to `unsigned long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5799,16 +5801,16 @@ H5T__conv_short_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ushort_llong
+ * Function: H5T__conv_ushort_llong
*
- * Purpose: Converts `unsigned short' to `long long'
+ * Purpose: Converts `unsigned short' to `long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5820,16 +5822,16 @@ H5T__conv_ushort_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ushort_ullong
+ * Function: H5T__conv_ushort_ullong
*
- * Purpose: Converts `unsigned short' to `unsigned long long'
+ * Purpose: Converts `unsigned short' to `unsigned long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5841,16 +5843,16 @@ H5T__conv_ushort_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t n
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_int_schar
+ * Function: H5T__conv_int_schar
*
- * Purpose: Converts `int' to `signed char'
+ * Purpose: Converts `int' to `signed char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5862,16 +5864,16 @@ H5T__conv_int_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmt
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_int_uchar
+ * Function: H5T__conv_int_uchar
*
- * Purpose: Converts `int' to `unsigned char'
+ * Purpose: Converts `int' to `unsigned char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5883,16 +5885,16 @@ H5T__conv_int_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmt
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uint_schar
+ * Function: H5T__conv_uint_schar
*
- * Purpose: Converts `unsigned int' to `signed char'
+ * Purpose: Converts `unsigned int' to `signed char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5904,16 +5906,16 @@ H5T__conv_uint_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uint_uchar
+ * Function: H5T__conv_uint_uchar
*
- * Purpose: Converts `unsigned int' to `unsigned char'
+ * Purpose: Converts `unsigned int' to `unsigned char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5925,16 +5927,16 @@ H5T__conv_uint_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_int_short
+ * Function: H5T__conv_int_short
*
- * Purpose: Converts `int' to `short'
+ * Purpose: Converts `int' to `short'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5946,16 +5948,16 @@ H5T__conv_int_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmt
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_int_ushort
+ * Function: H5T__conv_int_ushort
*
- * Purpose: Converts `int' to `unsigned short'
+ * Purpose: Converts `int' to `unsigned short'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5967,16 +5969,16 @@ H5T__conv_int_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uint_short
+ * Function: H5T__conv_uint_short
*
- * Purpose: Converts `unsigned int' to `short'
+ * Purpose: Converts `unsigned int' to `short'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5988,16 +5990,16 @@ H5T__conv_uint_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uint_ushort
+ * Function: H5T__conv_uint_ushort
*
- * Purpose: Converts `unsigned int' to `unsigned short'
+ * Purpose: Converts `unsigned int' to `unsigned short'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6009,16 +6011,16 @@ H5T__conv_uint_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_int_uint
+ * Function: H5T__conv_int_uint
*
- * Purpose: Converts `int' to `unsigned int'
+ * Purpose: Converts `int' to `unsigned int'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Monday, November 16, 1998
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6030,16 +6032,16 @@ H5T__conv_int_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uint_int
+ * Function: H5T__conv_uint_int
*
- * Purpose: Converts `unsigned int' to `int'
+ * Purpose: Converts `unsigned int' to `int'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Monday, November 16, 1998
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6051,16 +6053,16 @@ H5T__conv_uint_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_int_long
+ * Function: H5T__conv_int_long
*
- * Purpose: Converts `int' to `long'
+ * Purpose: Converts `int' to `long'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6072,16 +6074,16 @@ H5T__conv_int_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_int_ulong
+ * Function: H5T__conv_int_ulong
*
- * Purpose: Converts `int' to `unsigned long'
+ * Purpose: Converts `int' to `unsigned long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6093,16 +6095,16 @@ H5T__conv_int_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmt
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uint_long
+ * Function: H5T__conv_uint_long
*
- * Purpose: Converts `unsigned int' to `long'
+ * Purpose: Converts `unsigned int' to `long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6114,16 +6116,16 @@ H5T__conv_uint_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmt
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uint_ulong
+ * Function: H5T__conv_uint_ulong
*
- * Purpose: Converts `unsigned int' to `unsigned long'
+ * Purpose: Converts `unsigned int' to `unsigned long'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6135,16 +6137,16 @@ H5T__conv_uint_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_int_llong
+ * Function: H5T__conv_int_llong
*
- * Purpose: Converts `int' to `long long'
+ * Purpose: Converts `int' to `long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6156,16 +6158,16 @@ H5T__conv_int_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmt
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_int_ullong
+ * Function: H5T__conv_int_ullong
*
- * Purpose: Converts `int' to `unsigned long long'
+ * Purpose: Converts `int' to `unsigned long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6177,16 +6179,16 @@ H5T__conv_int_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uint_llong
+ * Function: H5T__conv_uint_llong
*
- * Purpose: Converts `unsigned int' to `long long'
+ * Purpose: Converts `unsigned int' to `long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6198,16 +6200,16 @@ H5T__conv_uint_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uint_ullong
+ * Function: H5T__conv_uint_ullong
*
- * Purpose: Converts `unsigned int' to `unsigned long long'
+ * Purpose: Converts `unsigned int' to `unsigned long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6219,16 +6221,16 @@ H5T__conv_uint_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_long_schar
+ * Function: H5T__conv_long_schar
*
- * Purpose: Converts `long' to `signed char'
+ * Purpose: Converts `long' to `signed char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6240,16 +6242,16 @@ H5T__conv_long_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_long_uchar
+ * Function: H5T__conv_long_uchar
*
- * Purpose: Converts `long' to `unsigned char'
+ * Purpose: Converts `long' to `unsigned char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6261,16 +6263,16 @@ H5T__conv_long_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ulong_schar
+ * Function: H5T__conv_ulong_schar
*
- * Purpose: Converts `unsigned long' to `signed char'
+ * Purpose: Converts `unsigned long' to `signed char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6282,16 +6284,16 @@ H5T__conv_ulong_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ulong_uchar
+ * Function: H5T__conv_ulong_uchar
*
- * Purpose: Converts `unsigned long' to `unsigned char'
+ * Purpose: Converts `unsigned long' to `unsigned char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6303,16 +6305,16 @@ H5T__conv_ulong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_long_short
+ * Function: H5T__conv_long_short
*
- * Purpose: Converts `long' to `short'
+ * Purpose: Converts `long' to `short'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6324,16 +6326,16 @@ H5T__conv_long_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_long_ushort
+ * Function: H5T__conv_long_ushort
*
- * Purpose: Converts `long' to `unsigned short'
+ * Purpose: Converts `long' to `unsigned short'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6345,16 +6347,16 @@ H5T__conv_long_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ulong_short
+ * Function: H5T__conv_ulong_short
*
- * Purpose: Converts `unsigned long' to `short'
+ * Purpose: Converts `unsigned long' to `short'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6366,16 +6368,16 @@ H5T__conv_ulong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ulong_ushort
+ * Function: H5T__conv_ulong_ushort
*
- * Purpose: Converts `unsigned long' to `unsigned short'
+ * Purpose: Converts `unsigned long' to `unsigned short'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6387,16 +6389,16 @@ H5T__conv_ulong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_long_int
+ * Function: H5T__conv_long_int
*
- * Purpose: Converts `long' to `int'
+ * Purpose: Converts `long' to `int'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6408,16 +6410,16 @@ H5T__conv_long_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_long_uint
+ * Function: H5T__conv_long_uint
*
- * Purpose: Converts `long' to `unsigned int'
+ * Purpose: Converts `long' to `unsigned int'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6429,16 +6431,16 @@ H5T__conv_long_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmt
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ulong_int
+ * Function: H5T__conv_ulong_int
*
- * Purpose: Converts `unsigned long' to `int'
+ * Purpose: Converts `unsigned long' to `int'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6450,16 +6452,16 @@ H5T__conv_ulong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmt
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ulong_uint
+ * Function: H5T__conv_ulong_uint
*
- * Purpose: Converts `unsigned long' to `unsigned int'
+ * Purpose: Converts `unsigned long' to `unsigned int'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6471,16 +6473,16 @@ H5T__conv_ulong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_long_ulong
+ * Function: H5T__conv_long_ulong
*
- * Purpose: Converts `long' to `unsigned long'
+ * Purpose: Converts `long' to `unsigned long'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Monday, November 16, 1998
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6492,16 +6494,16 @@ H5T__conv_long_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ulong_long
+ * Function: H5T__conv_ulong_long
*
- * Purpose: Converts `unsigned long' to `long'
+ * Purpose: Converts `unsigned long' to `long'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Monday, November 16, 1998
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6513,16 +6515,16 @@ H5T__conv_ulong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_long_llong
+ * Function: H5T__conv_long_llong
*
- * Purpose: Converts `long' to `long long'
+ * Purpose: Converts `long' to `long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6534,16 +6536,16 @@ H5T__conv_long_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_long_ullong
+ * Function: H5T__conv_long_ullong
*
- * Purpose: Converts `long' to `unsigned long long'
+ * Purpose: Converts `long' to `unsigned long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6555,16 +6557,16 @@ H5T__conv_long_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ulong_llong
+ * Function: H5T__conv_ulong_llong
*
- * Purpose: Converts `unsigned long' to `long long'
+ * Purpose: Converts `unsigned long' to `long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6576,16 +6578,16 @@ H5T__conv_ulong_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ulong_ullong
+ * Function: H5T__conv_ulong_ullong
*
- * Purpose: Converts `unsigned long' to `unsigned long long'
+ * Purpose: Converts `unsigned long' to `unsigned long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6597,16 +6599,16 @@ H5T__conv_ulong_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_llong_schar
+ * Function: H5T__conv_llong_schar
*
- * Purpose: Converts `long long' to `signed char'
+ * Purpose: Converts `long long' to `signed char'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6618,16 +6620,16 @@ H5T__conv_llong_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_llong_uchar
+ * Function: H5T__conv_llong_uchar
*
- * Purpose: Converts `long long' to `unsigned char'
+ * Purpose: Converts `long long' to `unsigned char'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6639,16 +6641,16 @@ H5T__conv_llong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ullong_schar
+ * Function: H5T__conv_ullong_schar
*
- * Purpose: Converts `unsigned long long' to `signed char'
+ * Purpose: Converts `unsigned long long' to `signed char'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6660,16 +6662,16 @@ H5T__conv_ullong_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ullong_uchar
+ * Function: H5T__conv_ullong_uchar
*
- * Purpose: Converts `unsigned long long' to `unsigned char'
+ * Purpose: Converts `unsigned long long' to `unsigned char'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6681,16 +6683,16 @@ H5T__conv_ullong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_llong_short
+ * Function: H5T__conv_llong_short
*
- * Purpose: Converts `long long' to `short'
+ * Purpose: Converts `long long' to `short'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6702,16 +6704,16 @@ H5T__conv_llong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_llong_ushort
+ * Function: H5T__conv_llong_ushort
*
- * Purpose: Converts `long long' to `unsigned short'
+ * Purpose: Converts `long long' to `unsigned short'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6723,16 +6725,16 @@ H5T__conv_llong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ullong_short
+ * Function: H5T__conv_ullong_short
*
- * Purpose: Converts `unsigned long long' to `short'
+ * Purpose: Converts `unsigned long long' to `short'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6744,16 +6746,16 @@ H5T__conv_ullong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ullong_ushort
+ * Function: H5T__conv_ullong_ushort
*
- * Purpose: Converts `unsigned long long' to `unsigned short'
+ * Purpose: Converts `unsigned long long' to `unsigned short'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6765,16 +6767,16 @@ H5T__conv_ullong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t n
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_llong_int
+ * Function: H5T__conv_llong_int
*
- * Purpose: Converts `long long' to `int'
+ * Purpose: Converts `long long' to `int'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6786,16 +6788,16 @@ H5T__conv_llong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmt
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_llong_uint
+ * Function: H5T__conv_llong_uint
*
- * Purpose: Converts `long long' to `unsigned int'
+ * Purpose: Converts `long long' to `unsigned int'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6807,16 +6809,16 @@ H5T__conv_llong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ullong_int
+ * Function: H5T__conv_ullong_int
*
- * Purpose: Converts `unsigned long long' to `int'
+ * Purpose: Converts `unsigned long long' to `int'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6828,16 +6830,16 @@ H5T__conv_ullong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ullong_uint
+ * Function: H5T__conv_ullong_uint
*
- * Purpose: Converts `unsigned long long' to `unsigned int'
+ * Purpose: Converts `unsigned long long' to `unsigned int'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6849,16 +6851,16 @@ H5T__conv_ullong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_llong_long
+ * Function: H5T__conv_llong_long
*
- * Purpose: Converts `long long' to `long'
+ * Purpose: Converts `long long' to `long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6870,16 +6872,16 @@ H5T__conv_llong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_llong_ulong
+ * Function: H5T__conv_llong_ulong
*
- * Purpose: Converts `long long' to `unsigned long'
+ * Purpose: Converts `long long' to `unsigned long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6891,16 +6893,16 @@ H5T__conv_llong_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ullong_long
+ * Function: H5T__conv_ullong_long
*
- * Purpose: Converts `unsigned long long' to `long'
+ * Purpose: Converts `unsigned long long' to `long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6912,16 +6914,16 @@ H5T__conv_ullong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ullong_ulong
+ * Function: H5T__conv_ullong_ulong
*
- * Purpose: Converts `unsigned long long' to `unsigned long'
+ * Purpose: Converts `unsigned long long' to `unsigned long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6933,16 +6935,16 @@ H5T__conv_ullong_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_llong_ullong
+ * Function: H5T__conv_llong_ullong
*
- * Purpose: Converts `long long' to `unsigned long long'
+ * Purpose: Converts `long long' to `unsigned long long'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Monday, November 16, 1998
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6954,16 +6956,16 @@ H5T__conv_llong_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ullong_llong
+ * Function: H5T__conv_ullong_llong
*
- * Purpose: Converts `unsigned long long' to `long long'
+ * Purpose: Converts `unsigned long long' to `long long'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Monday, November 16, 1998
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6975,15 +6977,15 @@ H5T__conv_ullong_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_float_double
+ * Function: H5T__conv_float_double
*
- * Purpose: Convert native `float' to native `double' using hardware.
- * This is a fast special case.
+ * Purpose: Convert native `float' to native `double' using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Tuesday, June 23, 1998
+ * Programmer: Robb Matzke
+ * Tuesday, June 23, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6995,15 +6997,15 @@ H5T__conv_float_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_float_ldouble
+ * Function: H5T__conv_float_ldouble
*
- * Purpose: Convert native `float' to native `long double' using hardware.
- * This is a fast special case.
+ * Purpose: Convert native `float' to native `long double' using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, Feb 25, 2005
+ * Programmer: Raymond Lu
+ * Friday, Feb 25, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7017,15 +7019,15 @@ H5T__conv_float_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t n
#endif /* H5_SIZEOF_LONG_DOUBLE != 0 */
/*-------------------------------------------------------------------------
- * Function: H5T__conv_double_float
+ * Function: H5T__conv_double_float
*
- * Purpose: Convert native `double' to native `float' using hardware.
- * This is a fast special case.
+ * Purpose: Convert native `double' to native `float' using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Tuesday, June 23, 1998
+ * Programmer: Robb Matzke
+ * Tuesday, June 23, 1998
*
*-------------------------------------------------------------------------
*/
@@ -7037,15 +7039,15 @@ H5T__conv_double_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_double_ldouble
+ * Function: H5T__conv_double_ldouble
*
- * Purpose: Convert native `double' to native `long double' using hardware.
- * This is a fast special case.
+ * Purpose: Convert native `double' to native `long double' using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, Feb 25, 2005
+ * Programmer: Raymond Lu
+ * Friday, Feb 25, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7059,15 +7061,15 @@ H5T__conv_double_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t
#endif /* H5_SIZEOF_LONG_DOUBLE != 0 */
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ldouble_float
+ * Function: H5T__conv_ldouble_float
*
- * Purpose: Convert native `long double' to native `float' using hardware.
- * This is a fast special case.
+ * Purpose: Convert native `long double' to native `float' using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, Feb 25, 2005
+ * Programmer: Raymond Lu
+ * Friday, Feb 25, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7081,15 +7083,15 @@ H5T__conv_ldouble_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t n
#endif /* H5_SIZEOF_LONG_DOUBLE != 0 */
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ldouble_double
+ * Function: H5T__conv_ldouble_double
*
- * Purpose: Convert native `long double' to native `double' using hardware.
- * This is a fast special case.
+ * Purpose: Convert native `long double' to native `double' using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, Feb 25, 2005
+ * Programmer: Raymond Lu
+ * Friday, Feb 25, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7103,15 +7105,15 @@ H5T__conv_ldouble_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t
#endif /* H5_SIZEOF_LONG_DOUBLE != 0 */
/*-------------------------------------------------------------------------
- * Function: H5T__conv_schar_float
+ * Function: H5T__conv_schar_float
*
- * Purpose: Convert native signed char to native float using hardware.
- * This is a fast special case.
+ * Purpose: Convert native signed char to native float using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7123,15 +7125,15 @@ H5T__conv_schar_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_schar_double
+ * Function: H5T__conv_schar_double
*
- * Purpose: Convert native signed char to native double using hardware.
- * This is a fast special case.
+ * Purpose: Convert native signed char to native double using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7143,15 +7145,15 @@ H5T__conv_schar_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_schar_ldouble
+ * Function: H5T__conv_schar_ldouble
*
- * Purpose: Convert native signed char to native long double using
+ * Purpose: Convert native signed char to native long double using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7163,15 +7165,15 @@ H5T__conv_schar_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t n
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uchar_float
+ * Function: H5T__conv_uchar_float
*
- * Purpose: Convert native unsigned char to native float using hardware.
- * This is a fast special case.
+ * Purpose: Convert native unsigned char to native float using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7183,15 +7185,15 @@ H5T__conv_uchar_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uchar_double
+ * Function: H5T__conv_uchar_double
*
- * Purpose: Convert native unsigned char to native double using hardware.
- * This is a fast special case.
+ * Purpose: Convert native unsigned char to native double using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7203,15 +7205,15 @@ H5T__conv_uchar_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uchar_ldouble
+ * Function: H5T__conv_uchar_ldouble
*
- * Purpose: Convert native unsigned char to native long double using
+ * Purpose: Convert native unsigned char to native long double using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7223,15 +7225,15 @@ H5T__conv_uchar_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t n
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_short_float
+ * Function: H5T__conv_short_float
*
- * Purpose: Convert native short to native float using hardware.
- * This is a fast special case.
+ * Purpose: Convert native short to native float using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7243,15 +7245,15 @@ H5T__conv_short_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_short_double
+ * Function: H5T__conv_short_double
*
- * Purpose: Convert native short to native double using hardware.
- * This is a fast special case.
+ * Purpose: Convert native short to native double using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7263,15 +7265,15 @@ H5T__conv_short_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_short_ldouble
+ * Function: H5T__conv_short_ldouble
*
- * Purpose: Convert native short to native long double using hardware.
- * This is a fast special case.
+ * Purpose: Convert native short to native long double using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7283,15 +7285,15 @@ H5T__conv_short_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t n
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ushort_float
+ * Function: H5T__conv_ushort_float
*
- * Purpose: Convert native unsigned short to native float using hardware.
- * This is a fast special case.
+ * Purpose: Convert native unsigned short to native float using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7303,15 +7305,15 @@ H5T__conv_ushort_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ushort_double
+ * Function: H5T__conv_ushort_double
*
- * Purpose: Convert native unsigned short to native double using hardware.
- * This is a fast special case.
+ * Purpose: Convert native unsigned short to native double using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7323,15 +7325,15 @@ H5T__conv_ushort_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t n
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ushort_ldouble
+ * Function: H5T__conv_ushort_ldouble
*
- * Purpose: Convert native unsigned short to native long double using
+ * Purpose: Convert native unsigned short to native long double using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7343,15 +7345,15 @@ H5T__conv_ushort_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_int_float
+ * Function: H5T__conv_int_float
*
- * Purpose: Convert native integer to native float using hardware.
- * This is a fast special case.
+ * Purpose: Convert native integer to native float using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7363,15 +7365,15 @@ H5T__conv_int_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmt
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_int_double
+ * Function: H5T__conv_int_double
*
- * Purpose: Convert native integer to native double using hardware.
- * This is a fast special case.
+ * Purpose: Convert native integer to native double using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7383,15 +7385,15 @@ H5T__conv_int_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_int_ldouble
+ * Function: H5T__conv_int_ldouble
*
- * Purpose: Convert native integer to native long double using hardware.
- * This is a fast special case.
+ * Purpose: Convert native integer to native long double using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7403,15 +7405,15 @@ H5T__conv_int_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uint_float
+ * Function: H5T__conv_uint_float
*
- * Purpose: Convert native unsigned integer to native float using
+ * Purpose: Convert native unsigned integer to native float using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7423,15 +7425,15 @@ H5T__conv_uint_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uint_double
+ * Function: H5T__conv_uint_double
*
- * Purpose: Convert native unsigned integer to native double using
+ * Purpose: Convert native unsigned integer to native double using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7443,15 +7445,15 @@ H5T__conv_uint_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uint_ldouble
+ * Function: H5T__conv_uint_ldouble
*
- * Purpose: Convert native unsigned integer to native long double using
+ * Purpose: Convert native unsigned integer to native long double using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7463,15 +7465,15 @@ H5T__conv_uint_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_long_float
+ * Function: H5T__conv_long_float
*
- * Purpose: Convert native long to native float using hardware.
- * This is a fast special case.
+ * Purpose: Convert native long to native float using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7483,15 +7485,15 @@ H5T__conv_long_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_long_double
+ * Function: H5T__conv_long_double
*
- * Purpose: Convert native long to native double using hardware.
- * This is a fast special case.
+ * Purpose: Convert native long to native double using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7503,15 +7505,15 @@ H5T__conv_long_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_long_ldouble
+ * Function: H5T__conv_long_ldouble
*
- * Purpose: Convert native long to native long double using hardware.
- * This is a fast special case.
+ * Purpose: Convert native long to native long double using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7523,15 +7525,15 @@ H5T__conv_long_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ulong_float
+ * Function: H5T__conv_ulong_float
*
- * Purpose: Convert native unsigned long to native float using hardware.
- * This is a fast special case.
+ * Purpose: Convert native unsigned long to native float using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7543,15 +7545,15 @@ H5T__conv_ulong_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ulong_double
+ * Function: H5T__conv_ulong_double
*
- * Purpose: Convert native unsigned long to native double using hardware.
- * This is a fast special case.
+ * Purpose: Convert native unsigned long to native double using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7563,15 +7565,15 @@ H5T__conv_ulong_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ulong_ldouble
+ * Function: H5T__conv_ulong_ldouble
*
- * Purpose: Convert native unsigned long to native long double using
+ * Purpose: Convert native unsigned long to native long double using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7583,15 +7585,15 @@ H5T__conv_ulong_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t n
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_llong_float
+ * Function: H5T__conv_llong_float
*
- * Purpose: Convert native long long to native float using hardware.
- * This is a fast special case.
+ * Purpose: Convert native long long to native float using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7603,15 +7605,15 @@ H5T__conv_llong_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_llong_double
+ * Function: H5T__conv_llong_double
*
- * Purpose: Convert native long long to native double using hardware.
- * This is a fast special case.
+ * Purpose: Convert native long long to native double using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7623,15 +7625,15 @@ H5T__conv_llong_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_llong_ldouble
+ * Function: H5T__conv_llong_ldouble
*
- * Purpose: Convert native long long to native long double using
+ * Purpose: Convert native long long to native long double using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7645,15 +7647,15 @@ H5T__conv_llong_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t n
#endif /* H5T_CONV_INTERNAL_LLONG_LDOUBLE */
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ullong_float
+ * Function: H5T__conv_ullong_float
*
- * Purpose: Convert native unsigned long long to native float using
+ * Purpose: Convert native unsigned long long to native float using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7665,15 +7667,15 @@ H5T__conv_ullong_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ullong_double
+ * Function: H5T__conv_ullong_double
*
- * Purpose: Convert native unsigned long long to native double using
+ * Purpose: Convert native unsigned long long to native double using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7685,15 +7687,15 @@ H5T__conv_ullong_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t n
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ullong_ldouble
+ * Function: H5T__conv_ullong_ldouble
*
- * Purpose: Convert native unsigned long long to native long double using
+ * Purpose: Convert native unsigned long long to native long double using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7707,15 +7709,15 @@ H5T__conv_ullong_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t
#endif /*H5T_CONV_INTERNAL_ULLONG_LDOUBLE*/
/*-------------------------------------------------------------------------
- * Function: H5T__conv_float_schar
+ * Function: H5T__conv_float_schar
*
- * Purpose: Convert native float to native signed char using
+ * Purpose: Convert native float to native signed char using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7729,15 +7731,15 @@ H5T__conv_float_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_float_uchar
+ * Function: H5T__conv_float_uchar
*
- * Purpose: Convert native float to native unsigned char using
+ * Purpose: Convert native float to native unsigned char using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7751,15 +7753,15 @@ H5T__conv_float_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_double_schar
+ * Function: H5T__conv_double_schar
*
- * Purpose: Convert native double to native signed char using
+ * Purpose: Convert native double to native signed char using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7773,15 +7775,15 @@ H5T__conv_double_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_double_uchar
+ * Function: H5T__conv_double_uchar
*
- * Purpose: Convert native double to native unsigned char using
+ * Purpose: Convert native double to native unsigned char using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7795,15 +7797,15 @@ H5T__conv_double_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ldouble_schar
+ * Function: H5T__conv_ldouble_schar
*
- * Purpose: Convert native long double to native signed char using
+ * Purpose: Convert native long double to native signed char using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7817,15 +7819,15 @@ H5T__conv_ldouble_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t n
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ldouble_uchar
+ * Function: H5T__conv_ldouble_uchar
*
- * Purpose: Convert native long double to native unsigned char using
+ * Purpose: Convert native long double to native unsigned char using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7839,15 +7841,15 @@ H5T__conv_ldouble_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t n
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_float_short
+ * Function: H5T__conv_float_short
*
- * Purpose: Convert native float to native short using
+ * Purpose: Convert native float to native short using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7861,15 +7863,15 @@ H5T__conv_float_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_float_ushort
+ * Function: H5T__conv_float_ushort
*
- * Purpose: Convert native float to native unsigned short using
+ * Purpose: Convert native float to native unsigned short using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7883,15 +7885,15 @@ H5T__conv_float_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_double_short
+ * Function: H5T__conv_double_short
*
- * Purpose: Convert native double to native short using
+ * Purpose: Convert native double to native short using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7905,15 +7907,15 @@ H5T__conv_double_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_double_ushort
+ * Function: H5T__conv_double_ushort
*
- * Purpose: Convert native double to native unsigned short using
+ * Purpose: Convert native double to native unsigned short using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7927,15 +7929,15 @@ H5T__conv_double_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t n
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ldouble_short
+ * Function: H5T__conv_ldouble_short
*
- * Purpose: Convert native long double to native short using
+ * Purpose: Convert native long double to native short using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7949,15 +7951,15 @@ H5T__conv_ldouble_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t n
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ldouble_ushort
+ * Function: H5T__conv_ldouble_ushort
*
- * Purpose: Convert native long double to native unsigned short using
+ * Purpose: Convert native long double to native unsigned short using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7971,15 +7973,15 @@ H5T__conv_ldouble_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_float_int
+ * Function: H5T__conv_float_int
*
- * Purpose: Convert native float to native int using
+ * Purpose: Convert native float to native int using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7993,15 +7995,15 @@ H5T__conv_float_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmt
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_float_uint
+ * Function: H5T__conv_float_uint
*
- * Purpose: Convert native float to native unsigned int using
+ * Purpose: Convert native float to native unsigned int using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -8015,15 +8017,15 @@ H5T__conv_float_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_double_int
+ * Function: H5T__conv_double_int
*
- * Purpose: Convert native double to native int using
+ * Purpose: Convert native double to native int using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -8037,15 +8039,15 @@ H5T__conv_double_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_double_uint
+ * Function: H5T__conv_double_uint
*
- * Purpose: Convert native double to native unsigned int using
+ * Purpose: Convert native double to native unsigned int using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -8059,15 +8061,15 @@ H5T__conv_double_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ldouble_int
+ * Function: H5T__conv_ldouble_int
*
- * Purpose: Convert native long double to native int using
+ * Purpose: Convert native long double to native int using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -8081,15 +8083,15 @@ H5T__conv_ldouble_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ldouble_uint
+ * Function: H5T__conv_ldouble_uint
*
- * Purpose: Convert native long double to native unsigned int using
+ * Purpose: Convert native long double to native unsigned int using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -8103,15 +8105,15 @@ H5T__conv_ldouble_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_float_long
+ * Function: H5T__conv_float_long
*
- * Purpose: Convert native float to native long using
+ * Purpose: Convert native float to native long using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -8125,15 +8127,15 @@ H5T__conv_float_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_float_ulong
+ * Function: H5T__conv_float_ulong
*
- * Purpose: Convert native float to native unsigned long using
+ * Purpose: Convert native float to native unsigned long using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -8147,15 +8149,15 @@ H5T__conv_float_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_double_long
+ * Function: H5T__conv_double_long
*
- * Purpose: Convert native double to native long using
+ * Purpose: Convert native double to native long using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -8169,15 +8171,15 @@ H5T__conv_double_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_double_ulong
+ * Function: H5T__conv_double_ulong
*
- * Purpose: Convert native double to native unsigned long using
+ * Purpose: Convert native double to native unsigned long using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -8191,15 +8193,15 @@ H5T__conv_double_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ldouble_long
+ * Function: H5T__conv_ldouble_long
*
- * Purpose: Convert native long double to native long using
+ * Purpose: Convert native long double to native long using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -8213,15 +8215,15 @@ H5T__conv_ldouble_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ldouble_ulong
+ * Function: H5T__conv_ldouble_ulong
*
- * Purpose: Convert native long double to native unsigned long using
+ * Purpose: Convert native long double to native unsigned long using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -8235,15 +8237,15 @@ H5T__conv_ldouble_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t n
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_float_llong
+ * Function: H5T__conv_float_llong
*
- * Purpose: Convert native float to native long long using
+ * Purpose: Convert native float to native long long using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -8257,15 +8259,15 @@ H5T__conv_float_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_float_ullong
+ * Function: H5T__conv_float_ullong
*
- * Purpose: Convert native float to native unsigned long long using
+ * Purpose: Convert native float to native unsigned long long using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -8279,15 +8281,15 @@ H5T__conv_float_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_double_llong
+ * Function: H5T__conv_double_llong
*
- * Purpose: Convert native double to native long long using
+ * Purpose: Convert native double to native long long using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -8301,15 +8303,15 @@ H5T__conv_double_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_double_ullong
+ * Function: H5T__conv_double_ullong
*
- * Purpose: Convert native double to native unsigned long long using
+ * Purpose: Convert native double to native unsigned long long using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -8323,15 +8325,15 @@ H5T__conv_double_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t n
}
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ldouble_llong
+ * Function: H5T__conv_ldouble_llong
*
- * Purpose: Convert native long double to native long long using
+ * Purpose: Convert native long double to native long long using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -8347,15 +8349,15 @@ H5T__conv_ldouble_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t n
#endif /*H5T_CONV_INTERNAL_LDOUBLE_LLONG*/
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ldouble_ullong
+ * Function: H5T__conv_ldouble_ullong
*
- * Purpose: Convert native long double to native unsigned long long using
+ * Purpose: Convert native long double to native unsigned long long using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -8371,16 +8373,16 @@ H5T__conv_ldouble_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t
#endif /*H5T_CONV_INTERNAL_LDOUBLE_ULLONG*/
/*-------------------------------------------------------------------------
- * Function: H5T__conv_f_i
+ * Function: H5T__conv_f_i
*
- * Purpose: Convert one floating-point type to an integer. This is
+ * Purpose: Convert one floating-point type to an integer. This is
* the catch-all function for float-integer conversions and
* is probably not particularly fast.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Wednesday, Jan 21, 2004
+ * Programmer: Raymond Lu
+ * Wednesday, Jan 21, 2004
*
*-------------------------------------------------------------------------
*/
@@ -8389,28 +8391,28 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg)
{
/* Traversal-related variables */
- H5T_t * src_p; /*source datatype */
- H5T_t * dst_p; /*destination datatype */
- H5T_atomic_t src; /*atomic source info */
- H5T_atomic_t dst; /*atomic destination info */
- int direction; /*forward or backward traversal */
- size_t elmtno; /*element number */
- size_t half_size; /*half the type size */
+ H5T_t * src_p; /*source datatype */
+ H5T_t * dst_p; /*destination datatype */
+ H5T_atomic_t src; /*atomic source info */
+ H5T_atomic_t dst; /*atomic destination info */
+ int direction; /*forward or backward traversal */
+ size_t elmtno; /*element number */
+ size_t half_size; /*half the type size */
size_t tsize; /*type size for swapping bytes */
- size_t olap; /*num overlapping elements */
+ size_t olap; /*num overlapping elements */
uint8_t * s, *sp, *d, *dp; /*source and dest traversal ptrs*/
- uint8_t * src_rev = NULL; /*order-reversed source buffer */
- uint8_t dbuf[64]; /*temp destination buffer */
+ uint8_t * src_rev = NULL; /*order-reversed source buffer */
+ uint8_t dbuf[64] = {0}; /*temp destination buffer */
uint8_t tmp1, tmp2; /*temp variables for swapping bytes*/
/* Conversion-related variables */
- hssize_t expo; /*source exponent */
+ hssize_t expo; /*source exponent */
hssize_t sign; /*source sign bit value */
uint8_t * int_buf = NULL; /*buffer for temporary value */
size_t buf_size; /*buffer size for temporary value */
- size_t i; /*miscellaneous counters */
+ size_t i; /*miscellaneous counters */
size_t first; /*first bit(MSB) in an integer */
- ssize_t sfirst; /*a signed version of `first' */
+ ssize_t sfirst; /*a signed version of `first' */
H5T_conv_cb_t cb_struct = {NULL, NULL}; /*conversion callback structure */
hbool_t truncated; /*if fraction value is dropped */
hbool_t reverse; /*if reverse order of destination at the end */
@@ -8475,7 +8477,7 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
/* Allocate enough space for the buffer holding temporary
* converted value
*/
- buf_size = (size_t)(HDpow((double)2.0f, (double)src.u.f.esize) / 8 + 1);
+ buf_size = (size_t)(HDpow(2.0, (double)src.u.f.esize) / 8 + 1);
int_buf = (uint8_t *)H5MM_calloc(buf_size);
/* Get conversion exception callback property */
@@ -8566,8 +8568,8 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
if (sign) { /* -Infinity */
if (cb_struct.func) { /*If user's exception handler is present, use it*/
/*reverse order first*/
- H5T_reverse_order(src_rev, s, src_p->shared->size,
- src_p->shared->u.atomic.order);
+ H5T__reverse_order(src_rev, s, src_p->shared->size,
+ src_p->shared->u.atomic.order);
except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_NINF, src_id, dst_id, src_rev,
d, cb_struct.user_data);
}
@@ -8588,8 +8590,8 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
else { /* +Infinity */
if (cb_struct.func) { /*If user's exception handler is present, use it*/
/*reverse order first*/
- H5T_reverse_order(src_rev, s, src_p->shared->size,
- src_p->shared->u.atomic.order);
+ H5T__reverse_order(src_rev, s, src_p->shared->size,
+ src_p->shared->u.atomic.order);
except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_PINF, src_id, dst_id, src_rev,
d, cb_struct.user_data);
}
@@ -8622,7 +8624,8 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
if (sign) { /* -Infinity */
if (cb_struct.func) { /*If user's exception handler is present, use it*/
/*reverse order first*/
- H5T_reverse_order(src_rev, s, src_p->shared->size, src_p->shared->u.atomic.order);
+ H5T__reverse_order(src_rev, s, src_p->shared->size,
+ src_p->shared->u.atomic.order);
except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_NINF, src_id, dst_id, src_rev, d,
cb_struct.user_data);
}
@@ -8643,7 +8646,8 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
else { /* +Infinity */
if (cb_struct.func) { /*If user's exception handler is present, use it*/
/*reverse order first*/
- H5T_reverse_order(src_rev, s, src_p->shared->size, src_p->shared->u.atomic.order);
+ H5T__reverse_order(src_rev, s, src_p->shared->size,
+ src_p->shared->u.atomic.order);
except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_PINF, src_id, dst_id, src_rev, d,
cb_struct.user_data);
}
@@ -8669,7 +8673,7 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
/* NaN */
if (cb_struct.func) { /*If user's exception handler is present, use it*/
/*reverse order first*/
- H5T_reverse_order(src_rev, s, src_p->shared->size, src_p->shared->u.atomic.order);
+ H5T__reverse_order(src_rev, s, src_p->shared->size, src_p->shared->u.atomic.order);
except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_NAN, src_id, dst_id, src_rev, d,
cb_struct.user_data);
}
@@ -8771,7 +8775,8 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
if (sign) { /*source is negative*/
if (cb_struct.func) { /*If user's exception handler is present, use it*/
/*reverse order first*/
- H5T_reverse_order(src_rev, s, src_p->shared->size, src_p->shared->u.atomic.order);
+ H5T__reverse_order(src_rev, s, src_p->shared->size,
+ src_p->shared->u.atomic.order);
except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_LOW, src_id, dst_id, src_rev,
d, cb_struct.user_data);
if (except_ret == H5T_CONV_ABORT)
@@ -8789,8 +8794,8 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
/*overflow*/
if (cb_struct.func) { /*If user's exception handler is present, use it*/
/*reverse order first*/
- H5T_reverse_order(src_rev, s, src_p->shared->size,
- src_p->shared->u.atomic.order);
+ H5T__reverse_order(src_rev, s, src_p->shared->size,
+ src_p->shared->u.atomic.order);
except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_HI, src_id, dst_id,
src_rev, d, cb_struct.user_data);
}
@@ -8810,8 +8815,8 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
if (truncated &&
cb_struct.func) { /*If user's exception handler is present, use it*/
/*reverse order first*/
- H5T_reverse_order(src_rev, s, src_p->shared->size,
- src_p->shared->u.atomic.order);
+ H5T__reverse_order(src_rev, s, src_p->shared->size,
+ src_p->shared->u.atomic.order);
except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_TRUNCATE, src_id, dst_id,
src_rev, d, cb_struct.user_data);
}
@@ -8836,8 +8841,8 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
if (truncated &&
cb_struct.func) { /*If user's exception handler is present, use it*/
/*reverse order first*/
- H5T_reverse_order(src_rev, s, src_p->shared->size,
- src_p->shared->u.atomic.order);
+ H5T__reverse_order(src_rev, s, src_p->shared->size,
+ src_p->shared->u.atomic.order);
except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_TRUNCATE, src_id, dst_id,
src_rev, d, cb_struct.user_data);
}
@@ -8866,8 +8871,8 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
*/
if (cb_struct.func) { /*If user's exception handler is present, use it*/
/*reverse order first*/
- H5T_reverse_order(src_rev, s, src_p->shared->size,
- src_p->shared->u.atomic.order);
+ H5T__reverse_order(src_rev, s, src_p->shared->size,
+ src_p->shared->u.atomic.order);
except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_LOW, src_id, dst_id,
src_rev, d, cb_struct.user_data);
}
@@ -8889,8 +8894,8 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
/*overflow*/
if (cb_struct.func) { /*If user's exception handler is present, use it*/
/*reverse order first*/
- H5T_reverse_order(src_rev, s, src_p->shared->size,
- src_p->shared->u.atomic.order);
+ H5T__reverse_order(src_rev, s, src_p->shared->size,
+ src_p->shared->u.atomic.order);
except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_HI, src_id, dst_id,
src_rev, d, cb_struct.user_data);
}
@@ -8910,8 +8915,8 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
if (truncated &&
cb_struct.func) { /*If user's exception handler is present, use it*/
/*reverse order first*/
- H5T_reverse_order(src_rev, s, src_p->shared->size,
- src_p->shared->u.atomic.order);
+ H5T__reverse_order(src_rev, s, src_p->shared->size,
+ src_p->shared->u.atomic.order);
except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_TRUNCATE, src_id, dst_id,
src_rev, d, cb_struct.user_data);
}
@@ -8994,16 +8999,16 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
} /* end H5T__conv_f_i() */
/*-------------------------------------------------------------------------
- * Function: H5T__conv_i_f
+ * Function: H5T__conv_i_f
*
- * Purpose: Convert one integer type to a floating-point type. This is
+ * Purpose: Convert one integer type to a floating-point type. This is
* the catch-all function for integer-float conversions and
* is probably not particularly fast.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, Feb 6, 2004
+ * Programmer: Raymond Lu
+ * Friday, Feb 6, 2004
*
*-------------------------------------------------------------------------
*/
@@ -9012,31 +9017,31 @@ H5T__conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg)
{
/* Traversal-related variables */
- H5T_t * src_p; /*source datatype */
- H5T_t * dst_p; /*destination datatype */
- H5T_atomic_t src; /*atomic source info */
- H5T_atomic_t dst; /*atomic destination info */
- int direction; /*forward or backward traversal */
- size_t elmtno; /*element number */
- size_t half_size; /*half the type size */
+ H5T_t * src_p; /*source datatype */
+ H5T_t * dst_p; /*destination datatype */
+ H5T_atomic_t src; /*atomic source info */
+ H5T_atomic_t dst; /*atomic destination info */
+ int direction; /*forward or backward traversal */
+ size_t elmtno; /*element number */
+ size_t half_size; /*half the type size */
size_t tsize; /*type size for swapping bytes */
- size_t olap; /*num overlapping elements */
+ size_t olap; /*num overlapping elements */
uint8_t * s, *sp, *d, *dp; /*source and dest traversal ptrs*/
- uint8_t * src_rev = NULL; /*order-reversed source buffer */
- uint8_t dbuf[64]; /*temp destination buffer */
+ uint8_t * src_rev = NULL; /*order-reversed source buffer */
+ uint8_t dbuf[64] = {0}; /*temp destination buffer */
uint8_t tmp1, tmp2; /*temp variables for swapping bytes*/
/* Conversion-related variables */
- hsize_t expo; /*destination exponent */
+ hsize_t expo; /*destination exponent */
hsize_t expo_max; /*maximal possible exponent value */
size_t sign; /*source sign bit value */
hbool_t is_max_neg; /*source is maximal negative value*/
hbool_t do_round; /*whether there is roundup */
uint8_t * int_buf = NULL; /*buffer for temporary value */
size_t buf_size; /*buffer size for temporary value */
- size_t i; /*miscellaneous counters */
+ size_t i; /*miscellaneous counters */
size_t first; /*first bit(MSB) in an integer */
- ssize_t sfirst; /*a signed version of `first' */
+ ssize_t sfirst; /*a signed version of `first' */
H5T_conv_cb_t cb_struct = {NULL, NULL}; /*conversion callback structure */
H5T_conv_ret_t except_ret; /*return of callback function */
hbool_t reverse; /*if reverse the order of destination */
@@ -9243,8 +9248,8 @@ H5T__conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
* precision loss. Let user's handler deal with the case if it's present
*/
if (cb_struct.func) {
- H5T_reverse_order(src_rev, s, src_p->shared->size,
- src_p->shared->u.atomic.order); /*reverse order first*/
+ H5T__reverse_order(src_rev, s, src_p->shared->size,
+ src_p->shared->u.atomic.order); /*reverse order first*/
except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_PRECISION, src_id, dst_id, src_rev, d,
cb_struct.user_data);
}
@@ -9314,8 +9319,8 @@ H5T__conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
if (expo > expo_max) { /*overflows*/
if (cb_struct.func) { /*user's exception handler. Reverse back source order*/
- H5T_reverse_order(src_rev, s, src_p->shared->size,
- src_p->shared->u.atomic.order); /*reverse order first*/
+ H5T__reverse_order(src_rev, s, src_p->shared->size,
+ src_p->shared->u.atomic.order); /*reverse order first*/
except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_HI, src_id, dst_id, src_rev, d,
cb_struct.user_data);
@@ -9420,9 +9425,9 @@ H5T__conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
} /* end H5T__conv_i_f() */
/*-------------------------------------------------------------------------
- * Function: H5T_reverse_order
+ * Function: H5T__reverse_order
*
- * Purpose: Internal assisting function to reverse the order of
+ * Purpose: Internal assisting function to reverse the order of
* a sequence of byte when it's big endian or VAX order.
* The byte sequence simulates the endian order.
*
@@ -9430,17 +9435,17 @@ H5T__conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
*
* Failure: Null
*
- * Programmer: Raymond Lu
- * April 26, 2004
+ * Programmer: Raymond Lu
+ * April 26, 2004
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5T_reverse_order(uint8_t *rev, uint8_t *s, size_t size, H5T_order_t order)
+H5T__reverse_order(uint8_t *rev, uint8_t *s, size_t size, H5T_order_t order)
{
size_t i;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
HDassert(s);
HDassert(size);
diff --git a/src/H5Tdeprec.c b/src/H5Tdeprec.c
index 277c9a2d65e..116d34cfce6 100644
--- a/src/H5Tdeprec.c
+++ b/src/H5Tdeprec.c
@@ -134,11 +134,8 @@ H5Tcommit1(hid_t loc_id, const char *name, hid_t type_id)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to commit datatype")
/* Set up VOL object */
- if (NULL == (new_obj = H5FL_CALLOC(H5VL_object_t)))
- HGOTO_ERROR(H5E_VOL, H5E_NOSPACE, FAIL, "can't allocate top object structure")
- new_obj->connector = vol_obj->connector;
- new_obj->connector->nrefs++;
- new_obj->data = data;
+ if (NULL == (new_obj = H5VL_create_object(data, vol_obj->connector)))
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, FAIL, "can't create VOL object for committed datatype")
/* Set the committed type object to the VOL connector pointer in the H5T_t struct */
dt->vol_obj = new_obj;
diff --git a/src/H5Tpkg.h b/src/H5Tpkg.h
index 220adb3b2ee..51ecacae481 100644
--- a/src/H5Tpkg.h
+++ b/src/H5Tpkg.h
@@ -49,7 +49,8 @@
#define H5T_NAMELEN 32
/* Macro to ease detecting "complex" datatypes (i.e. those with base types or fields) */
-#define H5T_IS_COMPLEX(t) ((t) == H5T_COMPOUND || (t) == H5T_ENUM || (t) == H5T_VLEN || (t) == H5T_ARRAY)
+#define H5T_IS_COMPLEX(t) \
+ ((t) == H5T_COMPOUND || (t) == H5T_ENUM || (t) == H5T_VLEN || (t) == H5T_ARRAY || (t) == H5T_REFERENCE)
/* Macro to ease detecting fixed "string" datatypes */
#define H5T_IS_FIXED_STRING(dt) (H5T_STRING == (dt)->type)
@@ -851,7 +852,8 @@ H5_DLL herr_t H5T__bit_shift(uint8_t *buf, ssize_t shift_dist, size_t offset,
H5_DLL void H5T__bit_set(uint8_t *buf, size_t offset, size_t size, hbool_t value);
H5_DLL uint64_t H5T__bit_get_d(uint8_t *buf, size_t offset, size_t size);
H5_DLL void H5T__bit_set_d(uint8_t *buf, size_t offset, size_t size, uint64_t val);
-H5_DLL ssize_t H5T__bit_find(uint8_t *buf, size_t offset, size_t size, H5T_sdir_t direction, hbool_t value);
+H5_DLL ssize_t H5T__bit_find(const uint8_t *buf, size_t offset, size_t size, H5T_sdir_t direction,
+ hbool_t value);
H5_DLL hbool_t H5T__bit_inc(uint8_t *buf, size_t start, size_t size);
H5_DLL hbool_t H5T__bit_dec(uint8_t *buf, size_t start, size_t size);
H5_DLL void H5T__bit_neg(uint8_t *buf, size_t start, size_t size);
@@ -859,7 +861,7 @@ H5_DLL void H5T__bit_neg(uint8_t *buf, size_t start, size_t size);
/* VL functions */
H5_DLL H5T_t *H5T__vlen_create(const H5T_t *base);
H5_DLL herr_t H5T__vlen_reclaim(void *elem, const H5T_t *dt, H5T_vlen_alloc_info_t *alloc_info);
-H5_DLL htri_t H5T__vlen_set_loc(const H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc);
+H5_DLL htri_t H5T__vlen_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc);
/* Array functions */
H5_DLL H5T_t *H5T__array_create(H5T_t *base, unsigned ndims, const hsize_t dim[/* ndims */]);
@@ -868,7 +870,7 @@ H5_DLL int H5T__get_array_dims(const H5T_t *dt, hsize_t dims[]);
/* Reference functions */
H5_DLL herr_t H5T__ref_reclaim(void *elem, const H5T_t *dt);
-H5_DLL htri_t H5T__ref_set_loc(const H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc);
+H5_DLL htri_t H5T__ref_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc);
/* Compound functions */
H5_DLL herr_t H5T__insert(H5T_t *parent, const char *name, size_t offset, const H5T_t *member);
diff --git a/src/H5Tprecis.c b/src/H5Tprecis.c
index f992141d1bc..1dc0073fcc4 100644
--- a/src/H5Tprecis.c
+++ b/src/H5Tprecis.c
@@ -24,7 +24,7 @@
#include "H5Tpkg.h" /* Datatypes */
/* Static local functions */
-static herr_t H5T_set_precision(const H5T_t *dt, size_t prec);
+static herr_t H5T__set_precision(const H5T_t *dt, size_t prec);
/*-------------------------------------------------------------------------
* Function: H5Tget_precision
@@ -153,7 +153,7 @@ H5Tset_precision(hid_t type_id, size_t prec)
HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "operation not defined for specified datatype")
/* Do the work */
- if (H5T_set_precision(dt, prec) < 0)
+ if (H5T__set_precision(dt, prec) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "unable to set precision")
done:
@@ -161,7 +161,7 @@ H5Tset_precision(hid_t type_id, size_t prec)
}
/*-------------------------------------------------------------------------
- * Function: H5T_set_precision
+ * Function: H5T__set_precision
*
* Purpose: Sets the precision of a datatype. The precision is
* the number of significant bits which, unless padding is
@@ -186,12 +186,12 @@ H5Tset_precision(hid_t type_id, size_t prec)
*-------------------------------------------------------------------------
*/
static herr_t
-H5T_set_precision(const H5T_t *dt, size_t prec)
+H5T__set_precision(const H5T_t *dt, size_t prec)
{
size_t offset, size;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_STATIC
/* Check args */
HDassert(dt);
@@ -202,7 +202,7 @@ H5T_set_precision(const H5T_t *dt, size_t prec)
HDassert(!(H5T_ENUM == dt->shared->type && 0 == dt->shared->u.enumer.nmembs));
if (dt->shared->parent) {
- if (H5T_set_precision(dt->shared->parent, prec) < 0)
+ if (H5T__set_precision(dt->shared->parent, prec) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "unable to set precision for base type")
/* Adjust size of datatype appropriately */
diff --git a/src/H5Tprivate.h b/src/H5Tprivate.h
index e1d0f88d926..2507afc1454 100644
--- a/src/H5Tprivate.h
+++ b/src/H5Tprivate.h
@@ -41,11 +41,13 @@ typedef struct H5T_t H5T_t;
#define H5T_GET_SHARED(T) ((T)->shared)
#define H5T_GET_MEMBER_OFFSET(T, I) ((T)->u.compnd.memb[I].offset)
#define H5T_GET_MEMBER_SIZE(T, I) ((T)->u.compnd.memb[I].shared->size)
+#define H5T_GET_FORCE_CONV(T) ((T)->shared->force_conv)
#else /* H5T_MODULE */
#define H5T_GET_SIZE(T) (H5T_get_size(T))
#define H5T_GET_SHARED(T) (H5T_get_shared(T))
#define H5T_GET_MEMBER_OFFSET(T, I) (H5T_get_member_offset((T), (I)))
#define H5T_GET_MEMBER_SIZE(T, I) (H5T_get_member_size((T), (I)))
+#define H5T_GET_FORCE_CONV(T) (H5T_get_force_conv(T))
#endif /* H5T_MODULE */
/* Forward references of package typedefs (declared in H5Tpkg.h) */
@@ -117,6 +119,7 @@ H5_DLL H5T_t * H5T_get_super(const H5T_t *dt);
H5_DLL H5T_class_t H5T_get_class(const H5T_t *dt, htri_t internal);
H5_DLL htri_t H5T_detect_class(const H5T_t *dt, H5T_class_t cls, hbool_t from_api);
H5_DLL size_t H5T_get_size(const H5T_t *dt);
+H5_DLL hbool_t H5T_get_force_conv(const H5T_t *dt);
H5_DLL int H5T_cmp(const H5T_t *dt1, const H5T_t *dt2, hbool_t superset);
H5_DLL herr_t H5T_encode(H5T_t *obj, unsigned char *buf, size_t *nalloc);
H5_DLL H5T_t * H5T_decode(size_t buf_size, const unsigned char *buf);
diff --git a/src/H5Tpublic.h b/src/H5Tpublic.h
index 985534826d9..70a119d127a 100644
--- a/src/H5Tpublic.h
+++ b/src/H5Tpublic.h
@@ -23,197 +23,269 @@
#define HOFFSET(S, M) (offsetof(S, M))
-/* These are the various classes of datatypes */
-/* If this goes over 16 types (0-15), the file format will need to change) */
+/**
+ * These are the various classes of datatypes
+ * internal If this goes over 16 types (0-15), the file format will need to
+ * change.
+ */
+//!
typedef enum H5T_class_t {
- H5T_NO_CLASS = -1, /*error */
- H5T_INTEGER = 0, /*integer types */
- H5T_FLOAT = 1, /*floating-point types */
- H5T_TIME = 2, /*date and time types */
- H5T_STRING = 3, /*character string types */
- H5T_BITFIELD = 4, /*bit field types */
- H5T_OPAQUE = 5, /*opaque types */
- H5T_COMPOUND = 6, /*compound types */
- H5T_REFERENCE = 7, /*reference types */
- H5T_ENUM = 8, /*enumeration types */
- H5T_VLEN = 9, /*Variable-Length types */
- H5T_ARRAY = 10, /*Array types */
-
- H5T_NCLASSES /*this must be last */
+ H5T_NO_CLASS = -1, /**< error */
+ H5T_INTEGER = 0, /**< integer types */
+ H5T_FLOAT = 1, /**< floating-point types */
+ H5T_TIME = 2, /**< date and time types */
+ H5T_STRING = 3, /**< character string types */
+ H5T_BITFIELD = 4, /**< bit field types */
+ H5T_OPAQUE = 5, /**< opaque types */
+ H5T_COMPOUND = 6, /**< compound types */
+ H5T_REFERENCE = 7, /**< reference types */
+ H5T_ENUM = 8, /**< enumeration types */
+ H5T_VLEN = 9, /**< variable-Length types */
+ H5T_ARRAY = 10, /**< array types */
+
+ H5T_NCLASSES /**< sentinel: this must be last */
} H5T_class_t;
+//!
-/* Byte orders */
+/**
+ * Byte orders
+ */
+//!
typedef enum H5T_order_t {
- H5T_ORDER_ERROR = -1, /*error */
- H5T_ORDER_LE = 0, /*little endian */
- H5T_ORDER_BE = 1, /*bit endian */
- H5T_ORDER_VAX = 2, /*VAX mixed endian */
- H5T_ORDER_MIXED = 3, /*Compound type with mixed member orders */
- H5T_ORDER_NONE = 4 /*no particular order (strings, bits,..) */
+ H5T_ORDER_ERROR = -1, /**< error */
+ H5T_ORDER_LE = 0, /**< little endian */
+ H5T_ORDER_BE = 1, /**< bit endian */
+ H5T_ORDER_VAX = 2, /**< VAX mixed endian */
+ H5T_ORDER_MIXED = 3, /**< Compound type with mixed member orders */
+ H5T_ORDER_NONE = 4 /**< no particular order (strings, bits,..) */
/*H5T_ORDER_NONE must be last */
} H5T_order_t;
+//!
-/* Types of integer sign schemes */
+/**
+ * Types of integer sign schemes
+ */
+//!
typedef enum H5T_sign_t {
- H5T_SGN_ERROR = -1, /*error */
- H5T_SGN_NONE = 0, /*this is an unsigned type */
- H5T_SGN_2 = 1, /*two's complement */
+ H5T_SGN_ERROR = -1, /**< error */
+ H5T_SGN_NONE = 0, /**< this is an unsigned type */
+ H5T_SGN_2 = 1, /**< two's complement */
- H5T_NSGN = 2 /*this must be last! */
+ H5T_NSGN = 2 /** sentinel: this must be last! */
} H5T_sign_t;
+//!
-/* Floating-point normalization schemes */
+/**
+ * Floating-point normalization schemes
+ */
+//!
typedef enum H5T_norm_t {
- H5T_NORM_ERROR = -1, /*error */
- H5T_NORM_IMPLIED = 0, /*msb of mantissa isn't stored, always 1 */
- H5T_NORM_MSBSET = 1, /*msb of mantissa is always 1 */
- H5T_NORM_NONE = 2 /*not normalized */
+ H5T_NORM_ERROR = -1, /**< error */
+ H5T_NORM_IMPLIED = 0, /**< msb of mantissa isn't stored, always 1 */
+ H5T_NORM_MSBSET = 1, /**< msb of mantissa is always 1 */
+ H5T_NORM_NONE = 2 /**< not normalized */
/*H5T_NORM_NONE must be last */
} H5T_norm_t;
+//!
-/*
- * Character set to use for text strings. Do not change these values since
- * they appear in HDF5 files!
+/**
+ * Character set to use for text strings.
+ * \internal Do not change these values since they appear in HDF5 files!
*/
typedef enum H5T_cset_t {
- H5T_CSET_ERROR = -1, /*error */
- H5T_CSET_ASCII = 0, /*US ASCII */
- H5T_CSET_UTF8 = 1, /*UTF-8 Unicode encoding */
- H5T_CSET_RESERVED_2 = 2, /*reserved for later use */
- H5T_CSET_RESERVED_3 = 3, /*reserved for later use */
- H5T_CSET_RESERVED_4 = 4, /*reserved for later use */
- H5T_CSET_RESERVED_5 = 5, /*reserved for later use */
- H5T_CSET_RESERVED_6 = 6, /*reserved for later use */
- H5T_CSET_RESERVED_7 = 7, /*reserved for later use */
- H5T_CSET_RESERVED_8 = 8, /*reserved for later use */
- H5T_CSET_RESERVED_9 = 9, /*reserved for later use */
- H5T_CSET_RESERVED_10 = 10, /*reserved for later use */
- H5T_CSET_RESERVED_11 = 11, /*reserved for later use */
- H5T_CSET_RESERVED_12 = 12, /*reserved for later use */
- H5T_CSET_RESERVED_13 = 13, /*reserved for later use */
- H5T_CSET_RESERVED_14 = 14, /*reserved for later use */
- H5T_CSET_RESERVED_15 = 15 /*reserved for later use */
+ H5T_CSET_ERROR = -1, /**< error */
+ H5T_CSET_ASCII = 0, /**< US ASCII */
+ H5T_CSET_UTF8 = 1, /**< UTF-8 Unicode encoding */
+ H5T_CSET_RESERVED_2 = 2, /**< reserved for later use */
+ H5T_CSET_RESERVED_3 = 3, /**< reserved for later use */
+ H5T_CSET_RESERVED_4 = 4, /**< reserved for later use */
+ H5T_CSET_RESERVED_5 = 5, /**< reserved for later use */
+ H5T_CSET_RESERVED_6 = 6, /**< reserved for later use */
+ H5T_CSET_RESERVED_7 = 7, /**< reserved for later use */
+ H5T_CSET_RESERVED_8 = 8, /**< reserved for later use */
+ H5T_CSET_RESERVED_9 = 9, /**< reserved for later use */
+ H5T_CSET_RESERVED_10 = 10, /**< reserved for later use */
+ H5T_CSET_RESERVED_11 = 11, /**< reserved for later use */
+ H5T_CSET_RESERVED_12 = 12, /**< reserved for later use */
+ H5T_CSET_RESERVED_13 = 13, /**< reserved for later use */
+ H5T_CSET_RESERVED_14 = 14, /**< reserved for later use */
+ H5T_CSET_RESERVED_15 = 15 /**< reserved for later use */
} H5T_cset_t;
#define H5T_NCSET H5T_CSET_RESERVED_2 /*Number of character sets actually defined */
-/*
- * Type of padding to use in character strings. Do not change these values
- * since they appear in HDF5 files!
+/**
+ * Type of padding to use in character strings.
+ * \internal Do not change these values since they appear in HDF5 files!
*/
typedef enum H5T_str_t {
- H5T_STR_ERROR = -1, /*error */
- H5T_STR_NULLTERM = 0, /*null terminate like in C */
- H5T_STR_NULLPAD = 1, /*pad with nulls */
- H5T_STR_SPACEPAD = 2, /*pad with spaces like in Fortran */
- H5T_STR_RESERVED_3 = 3, /*reserved for later use */
- H5T_STR_RESERVED_4 = 4, /*reserved for later use */
- H5T_STR_RESERVED_5 = 5, /*reserved for later use */
- H5T_STR_RESERVED_6 = 6, /*reserved for later use */
- H5T_STR_RESERVED_7 = 7, /*reserved for later use */
- H5T_STR_RESERVED_8 = 8, /*reserved for later use */
- H5T_STR_RESERVED_9 = 9, /*reserved for later use */
- H5T_STR_RESERVED_10 = 10, /*reserved for later use */
- H5T_STR_RESERVED_11 = 11, /*reserved for later use */
- H5T_STR_RESERVED_12 = 12, /*reserved for later use */
- H5T_STR_RESERVED_13 = 13, /*reserved for later use */
- H5T_STR_RESERVED_14 = 14, /*reserved for later use */
- H5T_STR_RESERVED_15 = 15 /*reserved for later use */
+ H5T_STR_ERROR = -1, /**< error */
+ H5T_STR_NULLTERM = 0, /**< null terminate like in C */
+ H5T_STR_NULLPAD = 1, /**< pad with nulls */
+ H5T_STR_SPACEPAD = 2, /**< pad with spaces like in Fortran */
+ H5T_STR_RESERVED_3 = 3, /**< reserved for later use */
+ H5T_STR_RESERVED_4 = 4, /**< reserved for later use */
+ H5T_STR_RESERVED_5 = 5, /**< reserved for later use */
+ H5T_STR_RESERVED_6 = 6, /**< reserved for later use */
+ H5T_STR_RESERVED_7 = 7, /**< reserved for later use */
+ H5T_STR_RESERVED_8 = 8, /**< reserved for later use */
+ H5T_STR_RESERVED_9 = 9, /**< reserved for later use */
+ H5T_STR_RESERVED_10 = 10, /**< reserved for later use */
+ H5T_STR_RESERVED_11 = 11, /**< reserved for later use */
+ H5T_STR_RESERVED_12 = 12, /**< reserved for later use */
+ H5T_STR_RESERVED_13 = 13, /**< reserved for later use */
+ H5T_STR_RESERVED_14 = 14, /**< reserved for later use */
+ H5T_STR_RESERVED_15 = 15 /**< reserved for later use */
} H5T_str_t;
#define H5T_NSTR H5T_STR_RESERVED_3 /*num H5T_str_t types actually defined */
-/* Type of padding to use in other atomic types */
+/**
+ * Type of padding to use in other atomic types
+ */
+//!
typedef enum H5T_pad_t {
- H5T_PAD_ERROR = -1, /*error */
- H5T_PAD_ZERO = 0, /*always set to zero */
- H5T_PAD_ONE = 1, /*always set to one */
- H5T_PAD_BACKGROUND = 2, /*set to background value */
+ H5T_PAD_ERROR = -1, /**< error */
+ H5T_PAD_ZERO = 0, /**< always set to zero */
+ H5T_PAD_ONE = 1, /**< always set to one */
+ H5T_PAD_BACKGROUND = 2, /**< set to background value */
- H5T_NPAD = 3 /*THIS MUST BE LAST */
+ H5T_NPAD = 3 /**< sentinal: THIS MUST BE LAST */
} H5T_pad_t;
+//!
-/* Commands sent to conversion functions */
+/**
+ * Commands sent to conversion functions
+ */
typedef enum H5T_cmd_t {
- H5T_CONV_INIT = 0, /*query and/or initialize private data */
- H5T_CONV_CONV = 1, /*convert data from source to dest datatype */
- H5T_CONV_FREE = 2 /*function is being removed from path */
+ H5T_CONV_INIT = 0, /**< query and/or initialize private data */
+ H5T_CONV_CONV = 1, /**< convert data from source to dest datatype */
+ H5T_CONV_FREE = 2 /**< function is being removed from path */
} H5T_cmd_t;
-/* How is the `bkg' buffer used by the conversion function? */
+/**
+ * How is the `bkg' buffer used by the conversion function?
+ */
typedef enum H5T_bkg_t {
- H5T_BKG_NO = 0, /*background buffer is not needed, send NULL */
- H5T_BKG_TEMP = 1, /*bkg buffer used as temp storage only */
- H5T_BKG_YES = 2 /*init bkg buf with data before conversion */
+ H5T_BKG_NO = 0, /**< background buffer is not needed, send NULL */
+ H5T_BKG_TEMP = 1, /**< bkg buffer used as temp storage only */
+ H5T_BKG_YES = 2 /**< init bkg buf with data before conversion */
} H5T_bkg_t;
-/* Type conversion client data */
+/**
+ * Type conversion client data
+ */
+//!
typedef struct H5T_cdata_t {
- H5T_cmd_t command; /*what should the conversion function do? */
- H5T_bkg_t need_bkg; /*is the background buffer needed? */
- hbool_t recalc; /*recalculate private data */
- void * priv; /*private data */
+ H5T_cmd_t command; /**< what should the conversion function do? */
+ H5T_bkg_t need_bkg; /**< is the background buffer needed? */
+ hbool_t recalc; /**< recalculate private data */
+ void * priv; /**< private data */
} H5T_cdata_t;
+//!
-/* Conversion function persistence */
+/**
+ * Conversion function persistence
+ */
typedef enum H5T_pers_t {
- H5T_PERS_DONTCARE = -1, /*wild card */
- H5T_PERS_HARD = 0, /*hard conversion function */
- H5T_PERS_SOFT = 1 /*soft conversion function */
+ H5T_PERS_DONTCARE = -1, /**< wild card */
+ H5T_PERS_HARD = 0, /**< hard conversion function */
+ H5T_PERS_SOFT = 1 /**< soft conversion function */
} H5T_pers_t;
-/* The order to retrieve atomic native datatype */
+/**
+ * The order to retrieve atomic native datatype
+ */
+//!
typedef enum H5T_direction_t {
- H5T_DIR_DEFAULT = 0, /*default direction is inscendent */
- H5T_DIR_ASCEND = 1, /*in inscendent order */
- H5T_DIR_DESCEND = 2 /*in descendent order */
+ H5T_DIR_DEFAULT = 0, /**< default direction is inscendent */
+ H5T_DIR_ASCEND = 1, /**< in inscendent order */
+ H5T_DIR_DESCEND = 2 /**< in descendent order */
} H5T_direction_t;
+//!
-/* The exception type passed into the conversion callback function */
+/**
+ * The exception type passed into the conversion callback function
+ */
typedef enum H5T_conv_except_t {
- H5T_CONV_EXCEPT_RANGE_HI = 0, /*source value is greater than destination's range */
- H5T_CONV_EXCEPT_RANGE_LOW = 1, /*source value is less than destination's range */
- H5T_CONV_EXCEPT_PRECISION = 2, /*source value loses precision in destination */
- H5T_CONV_EXCEPT_TRUNCATE = 3, /*source value is truncated in destination */
- H5T_CONV_EXCEPT_PINF = 4, /*source value is positive infinity(floating number) */
- H5T_CONV_EXCEPT_NINF = 5, /*source value is negative infinity(floating number) */
- H5T_CONV_EXCEPT_NAN = 6 /*source value is NaN(floating number) */
+ H5T_CONV_EXCEPT_RANGE_HI = 0,
+ /**< Source value is greater than destination's range */
+ H5T_CONV_EXCEPT_RANGE_LOW = 1,
+ /**< Source value is less than destination's range */
+ H5T_CONV_EXCEPT_PRECISION = 2,
+ /**< Source value loses precision in destination */
+ H5T_CONV_EXCEPT_TRUNCATE = 3,
+ /**< Source value is truncated in destination */
+ H5T_CONV_EXCEPT_PINF = 4,
+ /**< Source value is positive infinity */
+ H5T_CONV_EXCEPT_NINF = 5,
+ /**< Source value is negative infinity */
+ H5T_CONV_EXCEPT_NAN = 6
+ /**< Source value is \c NaN (not a number, including \c QNaN and \c SNaN) */
} H5T_conv_except_t;
-/* The return value from conversion callback function H5T_conv_except_func_t */
+/**
+ * The return value from conversion callback function H5T_conv_except_func_t()
+ */
typedef enum H5T_conv_ret_t {
- H5T_CONV_ABORT = -1, /*abort conversion */
- H5T_CONV_UNHANDLED = 0, /*callback function failed to handle the exception */
- H5T_CONV_HANDLED = 1 /*callback function handled the exception successfully */
+ H5T_CONV_ABORT = -1, /**< abort conversion */
+ H5T_CONV_UNHANDLED = 0, /**< callback function failed to handle the exception */
+ H5T_CONV_HANDLED = 1 /**< callback function handled the exception successfully */
} H5T_conv_ret_t;
-/* Variable Length Datatype struct in memory */
-/* (This is only used for VL sequences, not VL strings, which are stored in char *'s) */
+/**
+ * Variable Length Datatype struct in memory (This is only used for VL
+ * sequences, not VL strings, which are stored in char *'s)
+ */
typedef struct {
- size_t len; /* Length of VL data (in base type units) */
- void * p; /* Pointer to VL data */
+ size_t len; /**< Length of VL data (in base type units) */
+ void * p; /**< Pointer to VL data */
} hvl_t;
/* Variable Length String information */
-#define H5T_VARIABLE \
- ((size_t)( \
- -1)) /* Indicate that a string is variable length (null-terminated in C, instead of fixed length) */
+/**
+ * Indicate that a string is variable length (null-terminated in C, instead of
+ * fixed length)
+ */
+#define H5T_VARIABLE SIZE_MAX
/* Opaque information */
-#define H5T_OPAQUE_TAG_MAX 256 /* Maximum length of an opaque tag */
- /* This could be raised without too much difficulty */
+/**
+ * Maximum length of an opaque tag
+ * \internal This could be raised without too much difficulty
+ */
+#define H5T_OPAQUE_TAG_MAX 256
#ifdef __cplusplus
extern "C" {
#endif
-/* All datatype conversion functions are... */
+/**
+ * All datatype conversion functions are...
+ */
+//!
typedef herr_t (*H5T_conv_t)(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride,
size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist);
+//!
-/* Exception handler. If an exception like overflow happenes during conversion,
- * this function is called if it's registered through H5Pset_type_conv_cb.
+//!
+/**
+ * \brief Exception handler.
+ *
+ * \param[in] except_type The kind of exception that occurred
+ * \param[in] src_id Source datatype identifier
+ * \param[in] dst_id Destination datatype identifier
+ * \param[in] src_buf Source data buffer
+ * \param[in,out] dst_buf Destination data buffer
+ * \param[in,out] user_data Callback context
+ * \returns Valid callback function return values are #H5T_CONV_ABORT,
+ * #H5T_CONV_UNHANDLED and #H5T_CONV_HANDLED.
+ *
+ * \details If an exception like overflow happenes during conversion, this
+ * function is called if it's registered through H5Pset_type_conv_cb().
+ *
*/
typedef H5T_conv_ret_t (*H5T_conv_except_func_t)(H5T_conv_except_t except_type, hid_t src_id, hid_t dst_id,
void *src_buf, void *dst_buf, void *user_data);
+//!
/* When this header is included from a private header, don't make calls to H5open() */
#undef H5OPEN
@@ -226,9 +298,25 @@ typedef H5T_conv_ret_t (*H5T_conv_except_func_t)(H5T_conv_except_t except_type,
/*
* The IEEE floating point types in various byte orders.
*/
+/**
+ * \ingroup PDTIEEE
+ * 32-bit big-endian IEEE floating-point numbers
+ */
#define H5T_IEEE_F32BE (H5OPEN H5T_IEEE_F32BE_g)
+/**
+ * \ingroup PDTIEEE
+ * 32-bit little-endian IEEE floating-point numbers
+ */
#define H5T_IEEE_F32LE (H5OPEN H5T_IEEE_F32LE_g)
+/**
+ * \ingroup PDTIEEE
+ * 64-bit big-endian IEEE floating-point numbers
+ */
#define H5T_IEEE_F64BE (H5OPEN H5T_IEEE_F64BE_g)
+/**
+ * \ingroup PDTIEEE
+ * 64-bit little-endian IEEE floating-point numbers
+ */
#define H5T_IEEE_F64LE (H5OPEN H5T_IEEE_F64LE_g)
H5_DLLVAR hid_t H5T_IEEE_F32BE_g;
H5_DLLVAR hid_t H5T_IEEE_F32LE_g;
@@ -239,33 +327,141 @@ H5_DLLVAR hid_t H5T_IEEE_F64LE_g;
* These are "standard" types. For instance, signed (2's complement) and
* unsigned integers of various sizes and byte orders.
*/
-#define H5T_STD_I8BE (H5OPEN H5T_STD_I8BE_g)
-#define H5T_STD_I8LE (H5OPEN H5T_STD_I8LE_g)
-#define H5T_STD_I16BE (H5OPEN H5T_STD_I16BE_g)
-#define H5T_STD_I16LE (H5OPEN H5T_STD_I16LE_g)
-#define H5T_STD_I32BE (H5OPEN H5T_STD_I32BE_g)
-#define H5T_STD_I32LE (H5OPEN H5T_STD_I32LE_g)
-#define H5T_STD_I64BE (H5OPEN H5T_STD_I64BE_g)
-#define H5T_STD_I64LE (H5OPEN H5T_STD_I64LE_g)
-#define H5T_STD_U8BE (H5OPEN H5T_STD_U8BE_g)
-#define H5T_STD_U8LE (H5OPEN H5T_STD_U8LE_g)
-#define H5T_STD_U16BE (H5OPEN H5T_STD_U16BE_g)
-#define H5T_STD_U16LE (H5OPEN H5T_STD_U16LE_g)
-#define H5T_STD_U32BE (H5OPEN H5T_STD_U32BE_g)
-#define H5T_STD_U32LE (H5OPEN H5T_STD_U32LE_g)
-#define H5T_STD_U64BE (H5OPEN H5T_STD_U64BE_g)
-#define H5T_STD_U64LE (H5OPEN H5T_STD_U64LE_g)
-#define H5T_STD_B8BE (H5OPEN H5T_STD_B8BE_g)
-#define H5T_STD_B8LE (H5OPEN H5T_STD_B8LE_g)
-#define H5T_STD_B16BE (H5OPEN H5T_STD_B16BE_g)
-#define H5T_STD_B16LE (H5OPEN H5T_STD_B16LE_g)
-#define H5T_STD_B32BE (H5OPEN H5T_STD_B32BE_g)
-#define H5T_STD_B32LE (H5OPEN H5T_STD_B32LE_g)
-#define H5T_STD_B64BE (H5OPEN H5T_STD_B64BE_g)
-#define H5T_STD_B64LE (H5OPEN H5T_STD_B64LE_g)
-#define H5T_STD_REF_OBJ (H5OPEN H5T_STD_REF_OBJ_g)
+/**
+ * \ingroup PDTSTD
+ * 8-bit big-endian signed integers
+ */
+#define H5T_STD_I8BE (H5OPEN H5T_STD_I8BE_g)
+/**
+ * \ingroup PDTSTD
+ * 8-bit little-endian signed integers
+ */
+#define H5T_STD_I8LE (H5OPEN H5T_STD_I8LE_g)
+/**
+ * \ingroup PDTSTD
+ * 16-bit big-endian signed integers
+ */
+#define H5T_STD_I16BE (H5OPEN H5T_STD_I16BE_g)
+/**
+ * \ingroup PDTSTD
+ * 16-bit little-endian signed integers
+ */
+#define H5T_STD_I16LE (H5OPEN H5T_STD_I16LE_g)
+/**
+ * \ingroup PDTSTD
+ * 32-bit big-endian signed integers
+ */
+#define H5T_STD_I32BE (H5OPEN H5T_STD_I32BE_g)
+/**
+ * \ingroup PDTSTD
+ * 32-bit little-endian signed integers
+ */
+#define H5T_STD_I32LE (H5OPEN H5T_STD_I32LE_g)
+/**
+ * \ingroup PDTSTD
+ * 64-bit big-endian signed integers
+ */
+#define H5T_STD_I64BE (H5OPEN H5T_STD_I64BE_g)
+/**
+ * \ingroup PDTSTD
+ * 64-bit little-endian signed integers
+ */
+#define H5T_STD_I64LE (H5OPEN H5T_STD_I64LE_g)
+/**
+ * \ingroup PDTSTD
+ * 8-bit big-endian unsigned integers
+ */
+#define H5T_STD_U8BE (H5OPEN H5T_STD_U8BE_g)
+/**
+ * \ingroup PDTSTD
+ * 8-bit little-endian unsigned integers
+ */
+#define H5T_STD_U8LE (H5OPEN H5T_STD_U8LE_g)
+/**
+ * \ingroup PDTSTD
+ * 16-bit big-endian unsigned integers
+ */
+#define H5T_STD_U16BE (H5OPEN H5T_STD_U16BE_g)
+/**
+ * \ingroup PDTSTD
+ * 16-bit little-endian unsigned integers
+ */
+#define H5T_STD_U16LE (H5OPEN H5T_STD_U16LE_g)
+/**
+ * \ingroup PDTSTD
+ * 32-bit big-endian unsigned integers
+ */
+#define H5T_STD_U32BE (H5OPEN H5T_STD_U32BE_g)
+/**
+ * \ingroup PDTSTD
+ * 32-bit little-endian unsigned integers
+ */
+#define H5T_STD_U32LE (H5OPEN H5T_STD_U32LE_g)
+/**
+ * \ingroup PDTSTD
+ * 64-bit big-endian unsigned integers
+ */
+#define H5T_STD_U64BE (H5OPEN H5T_STD_U64BE_g)
+/**
+ * \ingroup PDTSTD
+ * 64-bit little-endian unsigned integers
+ */
+#define H5T_STD_U64LE (H5OPEN H5T_STD_U64LE_g)
+/**
+ * \ingroup PDTSTD
+ * 8-bit big-endian bitfield
+ */
+#define H5T_STD_B8BE (H5OPEN H5T_STD_B8BE_g)
+/**
+ * \ingroup PDTSTD
+ * 8-bit little-endian bitfield
+ */
+#define H5T_STD_B8LE (H5OPEN H5T_STD_B8LE_g)
+/**
+ * \ingroup PDTSTD
+ * 16-bit big-endian bitfield
+ */
+#define H5T_STD_B16BE (H5OPEN H5T_STD_B16BE_g)
+/**
+ * \ingroup PDTSTD
+ * 16-bit little-endian bitfield
+ */
+#define H5T_STD_B16LE (H5OPEN H5T_STD_B16LE_g)
+/**
+ * \ingroup PDTSTD
+ * 32-bit big-endian bitfield
+ */
+#define H5T_STD_B32BE (H5OPEN H5T_STD_B32BE_g)
+/**
+ * \ingroup PDTSTD
+ * 32-bit little-endian bitfield
+ */
+#define H5T_STD_B32LE (H5OPEN H5T_STD_B32LE_g)
+/**
+ * \ingroup PDTSTD
+ * 64-bit big-endian bitfield
+ */
+#define H5T_STD_B64BE (H5OPEN H5T_STD_B64BE_g)
+/**
+ * \ingroup PDTSTD
+ * 64-bit little-endian bitfield
+ */
+#define H5T_STD_B64LE (H5OPEN H5T_STD_B64LE_g)
+/**
+ * \ingroup PDTSTD
+ * Object reference
+ */
+#define H5T_STD_REF_OBJ (H5OPEN H5T_STD_REF_OBJ_g)
+/**
+ * \ingroup PDTSTD
+ * Dataset region reference
+ */
#define H5T_STD_REF_DSETREG (H5OPEN H5T_STD_REF_DSETREG_g)
-#define H5T_STD_REF (H5OPEN H5T_STD_REF_g)
+/**
+ * \ingroup PDTSTD
+ * Generic reference
+ */
+#define H5T_STD_REF (H5OPEN H5T_STD_REF_g)
H5_DLLVAR hid_t H5T_STD_I8BE_g;
H5_DLLVAR hid_t H5T_STD_I8LE_g;
H5_DLLVAR hid_t H5T_STD_I16BE_g;
@@ -297,9 +493,21 @@ H5_DLLVAR hid_t H5T_STD_REF_g;
/*
* Types which are particular to Unix.
*/
+/**
+ * \ingroup PDTUNIX
+ */
#define H5T_UNIX_D32BE (H5OPEN H5T_UNIX_D32BE_g)
+/**
+ * \ingroup PDTUNIX
+ */
#define H5T_UNIX_D32LE (H5OPEN H5T_UNIX_D32LE_g)
+/**
+ * \ingroup PDTUNIX
+ */
#define H5T_UNIX_D64BE (H5OPEN H5T_UNIX_D64BE_g)
+/**
+ * \ingroup PDTUNIX
+ */
#define H5T_UNIX_D64LE (H5OPEN H5T_UNIX_D64LE_g)
H5_DLLVAR hid_t H5T_UNIX_D32BE_g;
H5_DLLVAR hid_t H5T_UNIX_D32LE_g;
@@ -310,12 +518,20 @@ H5_DLLVAR hid_t H5T_UNIX_D64LE_g;
* Types particular to the C language. String types use `bytes' instead
* of `bits' as their size.
*/
+/**
+ * \ingroup PDTS
+ * String datatype in C (size defined in bytes rather than in bits)
+ */
#define H5T_C_S1 (H5OPEN H5T_C_S1_g)
H5_DLLVAR hid_t H5T_C_S1_g;
/*
* Types particular to Fortran.
*/
+/**
+ * \ingroup PDTS
+ * String datatype in Fortran (as defined for the HDF5 C library)
+ */
#define H5T_FORTRAN_S1 (H5OPEN H5T_FORTRAN_S1_g)
H5_DLLVAR hid_t H5T_FORTRAN_S1_g;
@@ -323,63 +539,239 @@ H5_DLLVAR hid_t H5T_FORTRAN_S1_g;
* These types are for Intel CPU's. They are little endian with IEEE
* floating point.
*/
-#define H5T_INTEL_I8 H5T_STD_I8LE
+/**
+ * \ingroup PDTX86
+ * 8-bit little-endian signed (2's complement) integers for Intel CPUs
+ */
+#define H5T_INTEL_I8 H5T_STD_I8LE
+/**
+ * \ingroup PDTX86
+ * 16-bit little-endian signed (2's complement) integers for Intel CPUs
+ */
#define H5T_INTEL_I16 H5T_STD_I16LE
+/**
+ * \ingroup PDTX86
+ * 32-bit little-endian signed (2's complement) integers for Intel CPUs
+ */
#define H5T_INTEL_I32 H5T_STD_I32LE
+/**
+ * \ingroup PDTX86
+ * 64-bit little-endian signed (2's complement) integers for Intel CPUs
+ */
#define H5T_INTEL_I64 H5T_STD_I64LE
-#define H5T_INTEL_U8 H5T_STD_U8LE
+/**
+ * \ingroup PDTX86
+ * 8-bit little-endian unsigned integers for Intel CPUs
+ */
+#define H5T_INTEL_U8 H5T_STD_U8LE
+/**
+ * \ingroup PDTX86
+ * 16-bit little-endian unsigned integers for Intel CPUs
+ */
#define H5T_INTEL_U16 H5T_STD_U16LE
+/**
+ * \ingroup PDTX86
+ * 32-bit little-endian unsigned integers for Intel CPUs
+ */
#define H5T_INTEL_U32 H5T_STD_U32LE
+/**
+ * \ingroup PDTX86
+ * 64-bit little-endian unsigned integers for Intel CPUs
+ */
#define H5T_INTEL_U64 H5T_STD_U64LE
-#define H5T_INTEL_B8 H5T_STD_B8LE
+/**
+ * \ingroup PDTX86
+ * 8-bit little-endian bitfield for Intel CPUs
+ */
+#define H5T_INTEL_B8 H5T_STD_B8LE
+/**
+ * \ingroup PDTX86
+ * 16-bit little-endian bitfield for Intel CPUs
+ */
#define H5T_INTEL_B16 H5T_STD_B16LE
+/**
+ * \ingroup PDTX86
+ * 32-bit little-endian bitfield for Intel CPUs
+ */
#define H5T_INTEL_B32 H5T_STD_B32LE
+/**
+ * \ingroup PDTX86
+ * 64-bit little-endian bitfield for Intel CPUs
+ */
#define H5T_INTEL_B64 H5T_STD_B64LE
+/**
+ * \ingroup PDTX86
+ * 32-bit little-endian IEEE floating-point numbers for Intel CPUs
+ */
#define H5T_INTEL_F32 H5T_IEEE_F32LE
+/**
+ * \ingroup PDTX86
+ * 64-bit little-endian IEEE floating-point numbers for Intel CPUs
+ */
#define H5T_INTEL_F64 H5T_IEEE_F64LE
/*
* These types are for DEC Alpha CPU's. They are little endian with IEEE
* floating point.
*/
-#define H5T_ALPHA_I8 H5T_STD_I8LE
+/**
+ * \ingroup PDTALPHA
+ * 8-bit little-endian signed (2's complement) integers for DEC Alpha CPUs
+ */
+#define H5T_ALPHA_I8 H5T_STD_I8LE
+/**
+ * \ingroup PDTALPHA
+ * 16-bit little-endian signed (2's complement) integers for DEC Alpha CPUs
+ */
#define H5T_ALPHA_I16 H5T_STD_I16LE
+/**
+ * \ingroup PDTALPHA
+ * 32-bit little-endian signed (2's complement) integers for DEC Alpha CPUs
+ */
#define H5T_ALPHA_I32 H5T_STD_I32LE
+/**
+ * \ingroup PDTALPHA
+ * 64-bit little-endian signed (2's complement) integers for DEC Alpha CPUs
+ */
#define H5T_ALPHA_I64 H5T_STD_I64LE
-#define H5T_ALPHA_U8 H5T_STD_U8LE
+/**
+ * \ingroup PDTALPHA
+ * 8-bit little-endian unsigned integers for DEC Alpha CPUs
+ */
+#define H5T_ALPHA_U8 H5T_STD_U8LE
+/**
+ * \ingroup PDTALPHA
+ * 16-bit little-endian unsigned integers for DEC Alpha CPUs
+ */
#define H5T_ALPHA_U16 H5T_STD_U16LE
+/**
+ * \ingroup PDTALPHA
+ * 32-bit little-endian unsigned integers for DEC Alpha CPUs
+ */
#define H5T_ALPHA_U32 H5T_STD_U32LE
+/**
+ * \ingroup PDTALPHA
+ * 64-bit little-endian unsigned integers for DEC Alpha CPUs
+ */
#define H5T_ALPHA_U64 H5T_STD_U64LE
-#define H5T_ALPHA_B8 H5T_STD_B8LE
+/**
+ * \ingroup PDTALPHA
+ * 8-bit little-endian bitfield for DEC Alpha CPUs
+ */
+#define H5T_ALPHA_B8 H5T_STD_B8LE
+/**
+ * \ingroup PDTALPHA
+ * 16-bit little-endian bitfield for DEC Alpha CPUs
+ */
#define H5T_ALPHA_B16 H5T_STD_B16LE
+/**
+ * \ingroup PDTALPHA
+ * 32-bit little-endian bitfield for DEC Alpha CPUs
+ */
#define H5T_ALPHA_B32 H5T_STD_B32LE
+/**
+ * \ingroup PDTALPHA
+ * 64-bit little-endian bitfield for DEC Alpha CPUs
+ */
#define H5T_ALPHA_B64 H5T_STD_B64LE
+/**
+ * \ingroup PDTALPHA
+ * 32-bit little-endian IEEE floating-point numbers for DEC Alpha CPUs
+ */
#define H5T_ALPHA_F32 H5T_IEEE_F32LE
+/**
+ * \ingroup PDTALPHA
+ * 64-bit little-endian IEEE floating-point numbers for DEC Alpha CPUs
+ */
#define H5T_ALPHA_F64 H5T_IEEE_F64LE
/*
* These types are for MIPS cpu's commonly used in SGI systems. They are big
* endian with IEEE floating point.
*/
-#define H5T_MIPS_I8 H5T_STD_I8BE
+/**
+ * \ingroup PDTMIPS
+ * 8-bit big-endian signed (2's complement) integers for SGI MIPS CPUs
+ */
+#define H5T_MIPS_I8 H5T_STD_I8BE
+/**
+ * \ingroup PDTMIPS
+ * 16-bit big-endian signed (2's complement) integers for SGI MIPS CPUs
+ */
#define H5T_MIPS_I16 H5T_STD_I16BE
+/**
+ * \ingroup PDTMIPS
+ * 32-bit big-endian signed (2's complement) integers for SGI MIPS CPUs
+ */
#define H5T_MIPS_I32 H5T_STD_I32BE
+/**
+ * \ingroup PDTMIPS
+ * 64-bit big-endian signed (2's complement) integers for SGI MIPS CPUs
+ */
#define H5T_MIPS_I64 H5T_STD_I64BE
-#define H5T_MIPS_U8 H5T_STD_U8BE
+/**
+ * \ingroup PDTMIPS
+ * 8-bit big-endian unsigned integers for SGI MIPS CPUs
+ */
+#define H5T_MIPS_U8 H5T_STD_U8BE
+/**
+ * \ingroup PDTMIPS
+ * 16-bit big-endian unsigned integers for SGI MIPS CPUs
+ */
#define H5T_MIPS_U16 H5T_STD_U16BE
+/**
+ * \ingroup PDTMIPS
+ * 32-bit big-endian unsigned integers for SGI MIPS CPUs
+ */
#define H5T_MIPS_U32 H5T_STD_U32BE
+/**
+ * \ingroup PDTMIPS
+ * 64-bit big-endian unsigned integers for SGI MIPS CPUs
+ */
#define H5T_MIPS_U64 H5T_STD_U64BE
-#define H5T_MIPS_B8 H5T_STD_B8BE
+/**
+ * \ingroup PDTMIPS
+ * 8-bit big-endian bitfield for SGI MIPS CPUs
+ */
+#define H5T_MIPS_B8 H5T_STD_B8BE
+/**
+ * \ingroup PDTMIPS
+ * 16-bit big-endian bitfield for SGI MIPS CPUs
+ */
#define H5T_MIPS_B16 H5T_STD_B16BE
+/**
+ * \ingroup PDTMIPS
+ * 32-bit big-endian bitfield for SGI MIPS CPUs
+ */
#define H5T_MIPS_B32 H5T_STD_B32BE
+/**
+ * \ingroup PDTMIPS
+ * 64-bit big-endian bitfield for SGI MIPS CPUs
+ */
#define H5T_MIPS_B64 H5T_STD_B64BE
+/**
+ * \ingroup PDTMIPS
+ * 32-bit big-endian IEEE floating-point numbers for MIPS CPUs
+ */
#define H5T_MIPS_F32 H5T_IEEE_F32BE
+/**
+ * \ingroup PDTMIPS
+ * 64-bit big-endian IEEE floating-point numbers for MIPS CPUs
+ */
#define H5T_MIPS_F64 H5T_IEEE_F64BE
/*
* The VAX floating point types (i.e. in VAX byte order)
*/
+/**
+ * \ingroup PDTALPHA
+ * 32-bit VAX byte order floating-point numbers for OpenVMS on DEC Alpha CPUs
+ */
#define H5T_VAX_F32 (H5OPEN H5T_VAX_F32_g)
+/**
+ * \ingroup PDTALPHA
+ * 64-bit VAX byte order floating-point numbers for OpenVMS on DEC Alpha CPUs
+ */
#define H5T_VAX_F64 (H5OPEN H5T_VAX_F64_g)
H5_DLLVAR hid_t H5T_VAX_F32_g;
H5_DLLVAR hid_t H5T_VAX_F64_g;
@@ -393,32 +785,128 @@ H5_DLLVAR hid_t H5T_VAX_F64_g;
* to C's `long long' and LDOUBLE is `long double' (these types might be the
* same as `LONG' and `DOUBLE' respectively).
*/
-#define H5T_NATIVE_CHAR (CHAR_MIN ? H5T_NATIVE_SCHAR : H5T_NATIVE_UCHAR)
-#define H5T_NATIVE_SCHAR (H5OPEN H5T_NATIVE_SCHAR_g)
-#define H5T_NATIVE_UCHAR (H5OPEN H5T_NATIVE_UCHAR_g)
-#define H5T_NATIVE_SHORT (H5OPEN H5T_NATIVE_SHORT_g)
+/**
+ * \ingroup PDTNAT
+ * C-style \c char
+ */
+#define H5T_NATIVE_CHAR (CHAR_MIN ? H5T_NATIVE_SCHAR : H5T_NATIVE_UCHAR)
+/**
+ * \ingroup PDTNAT
+ * C-style \Code{signed char}
+ */
+#define H5T_NATIVE_SCHAR (H5OPEN H5T_NATIVE_SCHAR_g)
+/**
+ * \ingroup PDTNAT
+ * C-style \Code{unsigned char}
+ */
+#define H5T_NATIVE_UCHAR (H5OPEN H5T_NATIVE_UCHAR_g)
+/**
+ * \ingroup PDTNAT
+ * C-style \Code{short}
+ */
+#define H5T_NATIVE_SHORT (H5OPEN H5T_NATIVE_SHORT_g)
+/**
+ * \ingroup PDTNAT
+ * C-style \Code{unsigned short}
+ */
#define H5T_NATIVE_USHORT (H5OPEN H5T_NATIVE_USHORT_g)
-#define H5T_NATIVE_INT (H5OPEN H5T_NATIVE_INT_g)
-#define H5T_NATIVE_UINT (H5OPEN H5T_NATIVE_UINT_g)
-#define H5T_NATIVE_LONG (H5OPEN H5T_NATIVE_LONG_g)
-#define H5T_NATIVE_ULONG (H5OPEN H5T_NATIVE_ULONG_g)
-#define H5T_NATIVE_LLONG (H5OPEN H5T_NATIVE_LLONG_g)
+/**
+ * \ingroup PDTNAT
+ * C-style \Code{int}
+ */
+#define H5T_NATIVE_INT (H5OPEN H5T_NATIVE_INT_g)
+/**
+ * \ingroup PDTNAT
+ * C-style \Code{unsigned int}
+ */
+#define H5T_NATIVE_UINT (H5OPEN H5T_NATIVE_UINT_g)
+/**
+ * \ingroup PDTNAT
+ * C-style \Code{long}
+ */
+#define H5T_NATIVE_LONG (H5OPEN H5T_NATIVE_LONG_g)
+/**
+ * \ingroup PDTNAT
+ * C-style \Code{unsigned long}
+ */
+#define H5T_NATIVE_ULONG (H5OPEN H5T_NATIVE_ULONG_g)
+/**
+ * \ingroup PDTNAT
+ * C-style \Code{long long}
+ */
+#define H5T_NATIVE_LLONG (H5OPEN H5T_NATIVE_LLONG_g)
+/**
+ * \ingroup PDTNAT
+ * C-style \Code{unsigned long long}
+ */
#define H5T_NATIVE_ULLONG (H5OPEN H5T_NATIVE_ULLONG_g)
-#define H5T_NATIVE_FLOAT (H5OPEN H5T_NATIVE_FLOAT_g)
+/**
+ * \ingroup PDTNAT
+ * C-style \Code{float}
+ */
+#define H5T_NATIVE_FLOAT (H5OPEN H5T_NATIVE_FLOAT_g)
+/**
+ * \ingroup PDTNAT
+ * C-style \Code{double}
+ */
#define H5T_NATIVE_DOUBLE (H5OPEN H5T_NATIVE_DOUBLE_g)
#if H5_SIZEOF_LONG_DOUBLE != 0
+/**
+ * \ingroup PDTNAT
+ * C-style \Code{long double}
+ */
#define H5T_NATIVE_LDOUBLE (H5OPEN H5T_NATIVE_LDOUBLE_g)
#endif
-#define H5T_NATIVE_B8 (H5OPEN H5T_NATIVE_B8_g)
-#define H5T_NATIVE_B16 (H5OPEN H5T_NATIVE_B16_g)
-#define H5T_NATIVE_B32 (H5OPEN H5T_NATIVE_B32_g)
-#define H5T_NATIVE_B64 (H5OPEN H5T_NATIVE_B64_g)
+/**
+ * \ingroup PDTNAT
+ * HDF5 8-bit bitfield based on native types
+ */
+#define H5T_NATIVE_B8 (H5OPEN H5T_NATIVE_B8_g)
+/**
+ * \ingroup PDTNAT
+ * HDF5 16-bit bitfield based on native types
+ */
+#define H5T_NATIVE_B16 (H5OPEN H5T_NATIVE_B16_g)
+/**
+ * \ingroup PDTNAT
+ * HDF5 32-bit bitfield based on native types
+ */
+#define H5T_NATIVE_B32 (H5OPEN H5T_NATIVE_B32_g)
+/**
+ * \ingroup PDTNAT
+ * HDF5 64-bit bitfield based on native types
+ */
+#define H5T_NATIVE_B64 (H5OPEN H5T_NATIVE_B64_g)
+/**
+ * \ingroup PDTNAT
+ * HDF5 opaque unit based on native types
+ */
#define H5T_NATIVE_OPAQUE (H5OPEN H5T_NATIVE_OPAQUE_g)
-#define H5T_NATIVE_HADDR (H5OPEN H5T_NATIVE_HADDR_g)
-#define H5T_NATIVE_HSIZE (H5OPEN H5T_NATIVE_HSIZE_g)
+/**
+ * \ingroup PDTNAT
+ * HDF5 address type based on native types
+ */
+#define H5T_NATIVE_HADDR (H5OPEN H5T_NATIVE_HADDR_g)
+/**
+ * \ingroup PDTNAT
+ * HDF5 size type based on native types
+ */
+#define H5T_NATIVE_HSIZE (H5OPEN H5T_NATIVE_HSIZE_g)
+/**
+ * \ingroup PDTNAT
+ * HDF5 signed size type based on native types
+ */
#define H5T_NATIVE_HSSIZE (H5OPEN H5T_NATIVE_HSSIZE_g)
-#define H5T_NATIVE_HERR (H5OPEN H5T_NATIVE_HERR_g)
-#define H5T_NATIVE_HBOOL (H5OPEN H5T_NATIVE_HBOOL_g)
+/**
+ * \ingroup PDTNAT
+ * HDF5 error code type based on native types
+ */
+#define H5T_NATIVE_HERR (H5OPEN H5T_NATIVE_HERR_g)
+/**
+ * \ingroup PDTNAT
+ * HDF5 Boolean type based on native types
+ */
+#define H5T_NATIVE_HBOOL (H5OPEN H5T_NATIVE_HBOOL_g)
H5_DLLVAR hid_t H5T_NATIVE_SCHAR_g;
H5_DLLVAR hid_t H5T_NATIVE_UCHAR_g;
H5_DLLVAR hid_t H5T_NATIVE_SHORT_g;
@@ -446,12 +934,30 @@ H5_DLLVAR hid_t H5T_NATIVE_HERR_g;
H5_DLLVAR hid_t H5T_NATIVE_HBOOL_g;
/* C9x integer types */
-#define H5T_NATIVE_INT8 (H5OPEN H5T_NATIVE_INT8_g)
-#define H5T_NATIVE_UINT8 (H5OPEN H5T_NATIVE_UINT8_g)
-#define H5T_NATIVE_INT_LEAST8 (H5OPEN H5T_NATIVE_INT_LEAST8_g)
+/**
+ * \ingroup PDTC9x
+ */
+#define H5T_NATIVE_INT8 (H5OPEN H5T_NATIVE_INT8_g)
+/**
+ * \ingroup PDTC9x
+ */
+#define H5T_NATIVE_UINT8 (H5OPEN H5T_NATIVE_UINT8_g)
+/**
+ * \ingroup PDTC9x
+ */
+#define H5T_NATIVE_INT_LEAST8 (H5OPEN H5T_NATIVE_INT_LEAST8_g)
+/**
+ * \ingroup PDTC9x
+ */
#define H5T_NATIVE_UINT_LEAST8 (H5OPEN H5T_NATIVE_UINT_LEAST8_g)
-#define H5T_NATIVE_INT_FAST8 (H5OPEN H5T_NATIVE_INT_FAST8_g)
-#define H5T_NATIVE_UINT_FAST8 (H5OPEN H5T_NATIVE_UINT_FAST8_g)
+/**
+ * \ingroup PDTC9x
+ */
+#define H5T_NATIVE_INT_FAST8 (H5OPEN H5T_NATIVE_INT_FAST8_g)
+/**
+ * \ingroup PDTC9x
+ */
+#define H5T_NATIVE_UINT_FAST8 (H5OPEN H5T_NATIVE_UINT_FAST8_g)
H5_DLLVAR hid_t H5T_NATIVE_INT8_g;
H5_DLLVAR hid_t H5T_NATIVE_UINT8_g;
H5_DLLVAR hid_t H5T_NATIVE_INT_LEAST8_g;
@@ -459,12 +965,30 @@ H5_DLLVAR hid_t H5T_NATIVE_UINT_LEAST8_g;
H5_DLLVAR hid_t H5T_NATIVE_INT_FAST8_g;
H5_DLLVAR hid_t H5T_NATIVE_UINT_FAST8_g;
-#define H5T_NATIVE_INT16 (H5OPEN H5T_NATIVE_INT16_g)
-#define H5T_NATIVE_UINT16 (H5OPEN H5T_NATIVE_UINT16_g)
-#define H5T_NATIVE_INT_LEAST16 (H5OPEN H5T_NATIVE_INT_LEAST16_g)
+/**
+ * \ingroup PDTC9x
+ */
+#define H5T_NATIVE_INT16 (H5OPEN H5T_NATIVE_INT16_g)
+/**
+ * \ingroup PDTC9x
+ */
+#define H5T_NATIVE_UINT16 (H5OPEN H5T_NATIVE_UINT16_g)
+/**
+ * \ingroup PDTC9x
+ */
+#define H5T_NATIVE_INT_LEAST16 (H5OPEN H5T_NATIVE_INT_LEAST16_g)
+/**
+ * \ingroup PDTC9x
+ */
#define H5T_NATIVE_UINT_LEAST16 (H5OPEN H5T_NATIVE_UINT_LEAST16_g)
-#define H5T_NATIVE_INT_FAST16 (H5OPEN H5T_NATIVE_INT_FAST16_g)
-#define H5T_NATIVE_UINT_FAST16 (H5OPEN H5T_NATIVE_UINT_FAST16_g)
+/**
+ * \ingroup PDTC9x
+ */
+#define H5T_NATIVE_INT_FAST16 (H5OPEN H5T_NATIVE_INT_FAST16_g)
+/**
+ * \ingroup PDTC9x
+ */
+#define H5T_NATIVE_UINT_FAST16 (H5OPEN H5T_NATIVE_UINT_FAST16_g)
H5_DLLVAR hid_t H5T_NATIVE_INT16_g;
H5_DLLVAR hid_t H5T_NATIVE_UINT16_g;
H5_DLLVAR hid_t H5T_NATIVE_INT_LEAST16_g;
@@ -472,12 +996,30 @@ H5_DLLVAR hid_t H5T_NATIVE_UINT_LEAST16_g;
H5_DLLVAR hid_t H5T_NATIVE_INT_FAST16_g;
H5_DLLVAR hid_t H5T_NATIVE_UINT_FAST16_g;
-#define H5T_NATIVE_INT32 (H5OPEN H5T_NATIVE_INT32_g)
-#define H5T_NATIVE_UINT32 (H5OPEN H5T_NATIVE_UINT32_g)
-#define H5T_NATIVE_INT_LEAST32 (H5OPEN H5T_NATIVE_INT_LEAST32_g)
+/**
+ * \ingroup PDTC9x
+ */
+#define H5T_NATIVE_INT32 (H5OPEN H5T_NATIVE_INT32_g)
+/**
+ * \ingroup PDTC9x
+ */
+#define H5T_NATIVE_UINT32 (H5OPEN H5T_NATIVE_UINT32_g)
+/**
+ * \ingroup PDTC9x
+ */
+#define H5T_NATIVE_INT_LEAST32 (H5OPEN H5T_NATIVE_INT_LEAST32_g)
+/**
+ * \ingroup PDTC9x
+ */
#define H5T_NATIVE_UINT_LEAST32 (H5OPEN H5T_NATIVE_UINT_LEAST32_g)
-#define H5T_NATIVE_INT_FAST32 (H5OPEN H5T_NATIVE_INT_FAST32_g)
-#define H5T_NATIVE_UINT_FAST32 (H5OPEN H5T_NATIVE_UINT_FAST32_g)
+/**
+ * \ingroup PDTC9x
+ */
+#define H5T_NATIVE_INT_FAST32 (H5OPEN H5T_NATIVE_INT_FAST32_g)
+/**
+ * \ingroup PDTC9x
+ */
+#define H5T_NATIVE_UINT_FAST32 (H5OPEN H5T_NATIVE_UINT_FAST32_g)
H5_DLLVAR hid_t H5T_NATIVE_INT32_g;
H5_DLLVAR hid_t H5T_NATIVE_UINT32_g;
H5_DLLVAR hid_t H5T_NATIVE_INT_LEAST32_g;
@@ -485,12 +1027,30 @@ H5_DLLVAR hid_t H5T_NATIVE_UINT_LEAST32_g;
H5_DLLVAR hid_t H5T_NATIVE_INT_FAST32_g;
H5_DLLVAR hid_t H5T_NATIVE_UINT_FAST32_g;
-#define H5T_NATIVE_INT64 (H5OPEN H5T_NATIVE_INT64_g)
-#define H5T_NATIVE_UINT64 (H5OPEN H5T_NATIVE_UINT64_g)
-#define H5T_NATIVE_INT_LEAST64 (H5OPEN H5T_NATIVE_INT_LEAST64_g)
+/**
+ * \ingroup PDTC9x
+ */
+#define H5T_NATIVE_INT64 (H5OPEN H5T_NATIVE_INT64_g)
+/**
+ * \ingroup PDTC9x
+ */
+#define H5T_NATIVE_UINT64 (H5OPEN H5T_NATIVE_UINT64_g)
+/**
+ * \ingroup PDTC9x
+ */
+#define H5T_NATIVE_INT_LEAST64 (H5OPEN H5T_NATIVE_INT_LEAST64_g)
+/**
+ * \ingroup PDTC9x
+ */
#define H5T_NATIVE_UINT_LEAST64 (H5OPEN H5T_NATIVE_UINT_LEAST64_g)
-#define H5T_NATIVE_INT_FAST64 (H5OPEN H5T_NATIVE_INT_FAST64_g)
-#define H5T_NATIVE_UINT_FAST64 (H5OPEN H5T_NATIVE_UINT_FAST64_g)
+/**
+ * \ingroup PDTC9x
+ */
+#define H5T_NATIVE_INT_FAST64 (H5OPEN H5T_NATIVE_INT_FAST64_g)
+/**
+ * \ingroup PDTC9x
+ */
+#define H5T_NATIVE_UINT_FAST64 (H5OPEN H5T_NATIVE_UINT_FAST64_g)
H5_DLLVAR hid_t H5T_NATIVE_INT64_g;
H5_DLLVAR hid_t H5T_NATIVE_UINT64_g;
H5_DLLVAR hid_t H5T_NATIVE_INT_LEAST64_g;
@@ -499,98 +1059,1867 @@ H5_DLLVAR hid_t H5T_NATIVE_INT_FAST64_g;
H5_DLLVAR hid_t H5T_NATIVE_UINT_FAST64_g;
/* Operations defined on all datatypes */
-H5_DLL hid_t H5Tcreate(H5T_class_t type, size_t size);
-H5_DLL hid_t H5Tcopy(hid_t type_id);
+/**
+ * \ingroup H5T
+ *
+ * \brief Creates a new datatype.
+ *
+ * \param[in] type Class of datatype to create
+ * \param[in] size Size, in bytes, of the datatype being created
+ *
+ * \return \hid_t{datatype}
+ *
+ * \details H5Tcreate() creates a new datatype of the specified class with the
+ * specified number of bytes. This function is used only with the
+ * following datatype classes:
+ * - #H5T_COMPOUND
+ * - #H5T_OPAQUE
+ * - #H5T_ENUM
+ * - #H5T_STRING
+ *
+ * Other datatypes, including integer and floating-point datatypes,
+ * are typically created by using H5Tcopy() to copy and modify a
+ * predefined datatype.
+ *
+ * When creating a variable-length string datatype, \p size must
+ * be #H5T_VARIABLE; see \ref_vlen_strings.
+ *
+ * When creating a fixed-length string datatype, \p size will
+ * be the length of the string in bytes. The length of the
+ * string in characters will depend on i the encoding used; see
+ * H5Pset_char_encoding().
+ *
+ * ENUMs created with this function have a signed native integer
+ * base datatype. Use H5Tenum_create() if a different integer base
+ * datatype is required.
+ *
+ * The datatype identifier returned from this function should be
+ * released with H5Tclose or resource leaks will result.
+ *
+ * \see H5Tclose()
+ *
+ * \since 1.2.0
+ *
+ */
+H5_DLL hid_t H5Tcreate(H5T_class_t type, size_t size);
+/**
+ * \ingroup H5T
+ *
+ * \brief Copies an existing datatype.
+ *
+ * \type_id
+ *
+ * \return \hid_t{datatype}
+ *
+ * \details H5Tcopy() makes a copy of an existing datatype. The returned type
+ * is always transient and unlocked.
+ *
+ * The \p type_id argument can be either a datatype identifier,
+ * a predefined datatype (defined in H5Tpublic.h), or a dataset
+ * identifier. If \p type_id is a dataset identifier, this function
+ * returns a transient, modifiable datatype which is a copy of the
+ * dataset's datatype.
+ *
+ * The returned datatype identifier should be released with H5Tclose()
+ * to prevent resource leak.
+ *
+ */
+H5_DLL hid_t H5Tcopy(hid_t type_id);
+/**
+ * \ingroup H5T
+ *
+ * \brief Releases a datatype
+ *
+ * \type_id
+ *
+ * \return \herr_t
+ *
+ * \details H5Tclose() releases the datatype \p dtype_id. Further access
+ * through this datatype identifier is illegal. Failure to release
+ * a datatype with this call will result in resource leaks.
+ *
+ */
H5_DLL herr_t H5Tclose(hid_t type_id);
+/**
+ * \ingroup H5T
+ *
+ * \brief Asynchronous version of H5Tclose().
+ *
+ */
+H5_DLL herr_t H5Tclose_async(const char *app_file, const char *app_func, unsigned app_line, hid_t type_id,
+ hid_t es_id);
+/**
+ * \ingroup H5T
+ *
+ * \brief Determines whether two datatype identifiers refer to the same datatype
+ *
+ * \type_id{type1_id}
+ * \type_id{type2_id}
+ *
+ * \return \htri_t
+ *
+ * \details H5Tequal() determines whether two datatype identifiers refer to
+ * the same datatype.
+ *
+ * \since 1.6 or earlier
+ *
+ */
H5_DLL htri_t H5Tequal(hid_t type1_id, hid_t type2_id);
+/**
+ * \ingroup H5T
+ *
+ * \brief Locks a datatype
+ *
+ * \type_id
+ *
+ * \return \herr_t
+ *
+ * \details H5Tlock() locks the datatype specified by the dtype_id identifier,
+ * making it read-only and non-destructible. This is normally done by
+ * the library for predefined datatypes so the application does not
+ * inadvertently change or delete a predefined type. Once a datatype
+ * is locked it can never be unlocked.
+ *
+ */
H5_DLL herr_t H5Tlock(hid_t type_id);
+/**
+ * \ingroup H5T
+ *
+ * \brief Commits a transient datatype, linking it into the file and creating
+ * a new committed datatype
+ *
+ * \fg_loc_id
+ * \param[in] name Name given to committed datatype
+ * \type_id Identifier of datatype to be committed and, upon function’s
+ * return, identifier for the committed datatype
+ * \lcpl_id
+ * \tcpl_id
+ * \tapl_id
+ *
+ * \return \herr_t
+ *
+ * \details H5Tcommit2() saves a transient datatype as an immutable committed
+ * datatype in a file. The datatype specified by \p dtype_id is
+ * committed to the file with the name name at the location specified
+ * by \p loc_id and with the datatype creation and access property
+ * lists \p tcpl_id and \p tapl_id, respectively.
+ *
+ * \p loc_id may be a file identifier, or a group identifier within
+ * that file. \p name may be either an absolute path in the file or
+ * a relative path from \p loc_id naming the newly-commited datatype.
+ *
+ * The link creation property list, \p lcpl_id, governs creation of
+ * the link(s) by which the new committed datatype is accessed and
+ * the creation of any intermediate groups that may be missing.
+ *
+ * Once commited, this datatype may be used to define the datatype
+ * of any other dataset or attribute in the file.
+ *
+ * This function will not accept a datatype that cannot actually hold
+ * information. This currently includes compound datatypes with no
+ * fields and enumerated datatypes with no members.
+ *
+ * Committed datatypes are sometimes referred to as named datatypes.
+ *
+ * \version 1.8.7 Function modified in this release to reject datatypes that
+ * will not accomodate actual data, such as a compound datatype
+ * with no fields or an enumerated datatype with no members.
+ *
+ * \since 1.8.0
+ *
+ */
H5_DLL herr_t H5Tcommit2(hid_t loc_id, const char *name, hid_t type_id, hid_t lcpl_id, hid_t tcpl_id,
hid_t tapl_id);
-H5_DLL hid_t H5Topen2(hid_t loc_id, const char *name, hid_t tapl_id);
+/**
+ * \ingroup H5T
+ *
+ * \brief Asynchronous version of H5Tcommit2().
+ *
+ */
+H5_DLL herr_t H5Tcommit_async(const char *app_file, const char *app_func, unsigned app_line, hid_t loc_id,
+ const char *name, hid_t type_id, hid_t lcpl_id, hid_t tcpl_id, hid_t tapl_id,
+ hid_t es_id);
+/**
+ * --------------------------------------------------------------------------
+ * \ingroup H5T
+ *
+ * \brief Opens a committed (named) datatype
+ *
+ * \fgdta_loc_id
+ * \param[in] name Name of the datatype to open
+ * \tapl_id
+ *
+ * \return \hid_t{datatype}
+ *
+ * \details H5Topen2() opens a committed datatype at the location specified
+ * by \p loc_id and returns an identifier for the datatype. \p
+ * loc_id is either a file or group identifier. The identifier should
+ * eventually be closed by calling H5Tclose() to release resources.
+ *
+ * The committed datatype is opened with the datatype access property
+ * list tapl_id.
+ *
+ * \since 1.8.0
+ *
+ */
+H5_DLL hid_t H5Topen2(hid_t loc_id, const char *name, hid_t tapl_id);
+/**
+ * \ingroup H5T
+ *
+ * \brief Asynchronous version of H5Topen2().
+ *
+ */
+H5_DLL hid_t H5Topen_async(const char *app_file, const char *app_func, unsigned app_line, hid_t loc_id,
+ const char *name, hid_t tapl_id, hid_t es_id);
+/**
+ * \ingroup H5T
+ *
+ * \brief Commits a transient datatype to a file, creating a new named
+ * datatype, but does not link it into the file structure
+ *
+ * \fg_loc_id
+ * \type_id
+ * \tcpl_id
+ * \tapl_id
+ *
+ * \return \herr_t
+ *
+ * \details H5Tcommit_anon() commits a transient datatype (not immutable)
+ * to a file, turning it into a named datatype with the specified
+ * creation and property lists. With default property lists,
+ * #H5P_DEFAULT, H5Tcommit_anon() provides similar functionality to
+ * that of H5Tcommit(), with the differences described below.
+ *
+ * #H5P_DEFAULT can be passed in for the datatype creation property
+ * list identifier, \p tcpl_id. The datatype access property list
+ * identifier, \p tapl_id, is provided for future functionality and
+ * is not used at this time. This parameter should always be passed
+ * as the value #H5P_DEFAULT.
+ *
+ * Note that H5Tcommit_anon() does not link this newly-committed
+ * datatype into the file. After the H5Tcommit_anon() call, the
+ * datatype identifier \p type_id must be linked into the HDF5 file
+ * structure with H5Olink() or it will be deleted from the file when
+ * the file is closed.
+ *
+ * The differences between this function and H5Tcommit() are as follows:
+ * \li H5Tcommit_anon() explicitly includes property lists,
+ * which provides for greater control of the creation process
+ * and of the properties of the new named datatype. H5Tcommit()
+ * always uses default properties.
+ * \li H5Tcommit_anon() neither provides the new named datatype’s
+ * name nor links it into the HDF5 file structure; those actions
+ * must be performed separately through a call to H5Olink(),
+ * which offers greater control over linking.
+ *
+ * This function will not accept a datatype that cannot actually
+ * hold data. This currently includes compound datatypes with no
+ * fields and enumerated datatypes with no members.
+ *
+ * \version 1.8.7 Function modified in this release to reject datatypes that
+ * will not accomodate actual data, such as a compound datatype
+ * with no fields or an enumerated datatype with no members.
+ *
+ * \since 1.2.0
+ *
+ */
H5_DLL herr_t H5Tcommit_anon(hid_t loc_id, hid_t type_id, hid_t tcpl_id, hid_t tapl_id);
-H5_DLL hid_t H5Tget_create_plist(hid_t type_id);
+/**
+ * \ingroup H5T
+ *
+ * \brief Returns a copy of a datatype's creation property list
+ *
+ * \type_id
+ *
+ * \return \hid_t{datatype creation property list}
+ *
+ * \details H5Tget_create_plist() returns a property list identifier
+ * for the datatype creation property list associated with the datatype
+ * specified by \p type_id.
+ *
+ * The creation property list identifier should be released with
+ * H5Pclose() to prevent memory leaks.
+ *
+ * \since 1.8.0
+ *
+ */
+H5_DLL hid_t H5Tget_create_plist(hid_t type_id);
+/**
+ * \ingroup H5T
+ *
+ * \brief Determines whether a datatype is a committed type or a transient type
+ *
+ * \type_id
+ *
+ * \return \htri_t
+ *
+ * \details H5Tcommitted() queries a type to determine whether the type
+ * specified by the \p dtype_id identifier is a committed (formerly
+ * known as a \Emph{named}) type or a transient type. If this function returns
+ * a positive value, then the type is committed (that is, it has been
+ * committed, perhaps by some other application). Datasets which
+ * return committed datatypes with H5Dget_type() are able to share
+ * the datatype with other datasets in the same file.
+ *
+ * \version 1.8.0 Fortran API was added
+ *
+ * \since 1.6 or earlier
+ *
+ */
H5_DLL htri_t H5Tcommitted(hid_t type_id);
-H5_DLL herr_t H5Tencode(hid_t obj_id, void *buf, size_t *nalloc);
-H5_DLL hid_t H5Tdecode(const void *buf);
-H5_DLL herr_t H5Tflush(hid_t type_id);
-H5_DLL herr_t H5Trefresh(hid_t type_id);
-
-/* Operations defined on compound datatypes */
-H5_DLL herr_t H5Tinsert(hid_t parent_id, const char *name, size_t offset, hid_t member_id);
-H5_DLL herr_t H5Tpack(hid_t type_id);
+/**
+ * \ingroup H5T
+ *
+ * \brief Encodes a datatype object description into a binary buffer
+ *
+ * \param[in] obj_id Identifier of the object to be encoded
+ * \param[in,out] buf Buffer for the object to be encoded into.
+ * \param[in,out] nalloc IN: The size of the allocated buffer
+ * OUT: The size of the buffer needed
+ *
+ * \return \herr_t
+ *
+ * \details H5Tencode() Given datatype identifier, H5Tencode() converts a
+ * datatype description into binary form in a buffer. Using this
+ * binary form in the buffer, a datatype object can be reconstructed
+ * using H5Tdecode() to return a new object handle (\ref hid_t) for
+ * this datatype.
+ *
+ * If the provided buffer is NULL, only the size of buffer needed is
+ * returned through \p nalloc.
+ *
+ * A preliminary H5Tencode() call can be made to find out the size
+ * of the buffer needed. This value is returned as \p nalloc. That
+ * value can then be assigned to \p nalloc for a second H5Tencode()
+ * call, which will retrieve the actual encoded object.
+ *
+ * If the library finds that \p nalloc is not big enough for the
+ * object, it simply returns the size of the buffer needed through
+ * \p nalloc without encoding the provided buffer.
+ *
+ * \since 1.2.0
+ *
+ */
+H5_DLL herr_t H5Tencode(hid_t obj_id, void *buf, size_t *nalloc);
+/**
+ * \ingroup H5T
+ *
+ * \brief Decodes a binary object description of datatype and return a new
+ * object handle
+ *
+ * \param[in] buf Buffer for the datatype object to be decoded
+ *
+ * \return \hid_t{datatype}
+ *
+ * \details H5Tdecode() Given an object description of datatype in binary in a
+ * buffer, H5Tdecode() reconstructs the HDF5 datatype object and
+ * returns a new object handle for it. The binary description of
+ * the object is encoded by H5Tencode(). User is responsible for
+ * passing in the right buffer.
+ *
+ * The datatype identifier returned by this function can be released
+ * with H5Tclose() when the identifier is no longer needed so that
+ * resource leaks will not develop.
+ *
+ */
+H5_DLL hid_t H5Tdecode(const void *buf);
+/**
+ * \ingroup H5T
+ *
+ * \brief Flushes all buffers associated with a committed datatype to disk
+ *
+ * \type_id
+ *
+ * \return \herr_t
+ *
+ * \details H5Tflush() causes all buffers associated with a committed datatype
+ * \p type_id to be immediately flushed to disk without removing the
+ * data from the cache.
+ *
+ * HDF5 does not possess full control over buffering. H5Tflush()
+ * flushes the internal HDF5 buffers and then asks the operating
+ * system (the OS) to flush the system buffers for the open
+ * files. After that, the OS is responsible for ensuring that the
+ * data is actually flushed to disk.
+ *
+ * \return \herr_t
+ *
+ * \since 1.10.0 C function introduced with this release.
+ *
+ * \see H5Dflush()
+ * H5Drefresh()
+ * H5Tflush()
+ * H5Grefresh()
+ * H5Oflush()
+ * H5Orefresh()
+ * H5Tflush()
+ * H5Trefresh()
+ * H5Fstart_swmr_write()
+ * H5Pget_append_flush()
+ * H5Pget_object_flush_cb()
+ * H5Pset_append_flush()
+ * H5Pset_object_flush_cb()
+ *
+ */
+H5_DLL herr_t H5Tflush(hid_t type_id);
+/**
+ * \ingroup H5T
+ *
+ * \brief Refreshes all buffers associated with a committed datatype
+ *
+ * \type_id
+ *
+ * \return \herr_t
+ *
+ * \details H5Trefresh() causes all buffers associated with a committed
+ * datatype to be cleared and immediately re-loaded with updated
+ * contents from disk.
+ *
+ * This function essentially closes the datatype, evicts all
+ * metadata associated with it from the cache, and then re-opens the
+ * datatype. The reopened datatype is automatically re-registered
+ * with the same identifier.
+ *
+ * \since 1.2.0
+ *
+ */
+H5_DLL herr_t H5Trefresh(hid_t type_id);
+
+/* Operations defined on compound datatypes */
+/**
+ * \ingroup COMPOUND
+ *
+ * \brief Adds a new member to a compound datatype.
+ *
+ * \type_id{parent_id}
+ * \param[in] name Name of the field to insert
+ * \param[in] offset Offset in memory structure of the field to insert
+ * \param[in] member_id Datatype identifier of the field to insert
+ *
+ * \return \herr_t
+ *
+ * \details H5Tinsert() adds another member to the compound datatype, specified
+ * \p type_id.
+ *
+ * The new member has a \p name which must be unique within the
+ * compound datatype. The \p offset argument defines the start of the
+ * member in an instance of the compound datatype, and \p member_id
+ * is the datatype identifier of the new member.
+ *
+ * \note Members of a compound datatype do not have to be atomic
+ * datatypes; a compound datatype can have a member which is a
+ * compound datatype.
+ *
+ * \since 1.2.0
+ *
+ */
+H5_DLL herr_t H5Tinsert(hid_t parent_id, const char *name, size_t offset, hid_t member_id);
+/**
+ * \ingroup COMPOUND
+ *
+ * \brief Recursively removes padding from within a compound datatype
+ *
+ * \type_id
+ *
+ * \return \herr_t
+ *
+ * \details H5Tpack() recursively removes padding from within a compound
+ * datatype to make it more efficient (space-wise) to store that data.
+ *
+ * \since 1.2.0
+ *
+ */
+H5_DLL herr_t H5Tpack(hid_t type_id);
/* Operations defined on enumeration datatypes */
-H5_DLL hid_t H5Tenum_create(hid_t base_id);
+/**
+ * \ingroup ENUM
+ *
+ * \brief Creates a new enumeration datatype
+ *
+ * \param[in] base_id Datatype identifier for the base datatype. Must be an
+ * integer datatype
+ *
+ * \return \hid_t{enumeration datatype}
+ *
+ * \details H5Tenum_create() creates a new enumeration datatype based on the
+ * specified base datatype, dtype_id, which must be an integer datatype.
+ *
+ * If a particular architecture datatype is required, a little endian
+ * or big endian datatype for example, use a native datatype as the
+ * base datatype and use H5Tconvert() on values as they are read
+ * from or written to a dataset.
+ *
+ * \since 1.2.0
+ *
+ */
+H5_DLL hid_t H5Tenum_create(hid_t base_id);
+/**
+ * \ingroup ENUM
+ *
+ * \brief Inserts a new enumeration datatype member
+ *
+ * \type_id{type}
+ * \param[in] name Name of the new member
+ * \param[in] value Pointer to the value of the new member
+ *
+ * \return \herr_t
+ *
+ * \details H5Tenum_insert() inserts a new enumeration datatype member into an
+ * enumeration datatype.
+ *
+ * \p type_id is the datatype identifier for the enumeration datatype,
+ * \p name is the name of the new member, and \p value points to the
+ * value of the new member.
+ *
+ * \p name and \p value must both be unique within \p dtype_id.
+ *
+ * \p value points to data which must be of the integer base datatype
+ * used when the enumeration datatype was created. If a particular
+ * architecture datatype is required, a little endian or big endian
+ * datatype for example, use a native datatype as the base datatype
+ * and use H5Tconvert() on values as they are read from or written
+ * to a dataset.
+ *
+ * \since 1.2.0
+ *
+ */
H5_DLL herr_t H5Tenum_insert(hid_t type, const char *name, const void *value);
+/**
+ * \ingroup ENUM
+ *
+ * \brief Returns the symbol name corresponding to a specified member of an
+ * enumeration datatype
+ *
+ * \type_id{type}
+ * \param[in] value Value of the enumeration datatype
+ * \param[out] name Buffer for output of the symbol name
+ * \param[in] size Anticipated size of the symbol name, in bytes
+ *
+ * \return Returns a non-negative value if successful. Otherwise returns a
+ * negative value
+ *
+ * \details H5Tenum_nameof() finds the symbol name that corresponds to the
+ * specified \p value of the enumeration datatype \p type.
+ *
+ * At most \p size characters of the symbol \p name are copied into
+ * the \p name buffer. If the entire symbol name and null terminator
+ * do not fit in the name buffer, then as many characters as possible
+ * are copied (not null terminated) and the function fails.
+ *
+ * \since 1.2.0
+ *
+ */
H5_DLL herr_t H5Tenum_nameof(hid_t type, const void *value, char *name /*out*/, size_t size);
+/**
+ * \ingroup ENUM
+ *
+ * \brief Returns the value corresponding to a specified member of an
+ * enumeration datatype
+ *
+ * \type_id{type}
+ * \param[in] name Symbol name of the enumeration datatype
+ * \param[out] value Buffer for the value of the enumeration datatype
+ *
+ * \return \herr_t
+ *
+ * \details H5Tenum_valueof() finds the value that corresponds to the
+ * specified name of the enumeration datatype \p dtype_id.
+ *
+ * Values returned in \p value will be of the enumerated type’s
+ * base type, that is, the datatype used by H5Tenum_create() when
+ * the enumerated type was created.
+ *
+ * The \p value buffer must be at least large enough to hold a value
+ * of that base type. If the size is unknown, you can determine it
+ * with H5Tget_size().
+ *
+ * \since 1.2.0
+ *
+ */
H5_DLL herr_t H5Tenum_valueof(hid_t type, const char *name, void *value /*out*/);
/* Operations defined on variable-length datatypes */
+/**
+ * \ingroup VLEN
+ *
+ * \brief Creates a new variable-length array datatype
+ *
+ * \type_id{base_id}, the element type of the datatype to create
+ *
+ * \return \hid_t{variable-length datatype}
+ *
+ * \details H5Tvlen_create() creates a new one-dimensional array datatype of
+ * variable-length (VL) with the base datatype \p base_id.
+ *
+ * This one-dimensional array often represents a data sequence of the
+ * base datatype, such as characters for character sequences or vertex
+ * coordinates for polygon lists. The base type specified for the VL
+ * datatype can be any HDF5 datatype, including another VL datatype, a
+ * compound datatype, or an atomic datatype.
+ *
+ * When necessary, use H5Tget_super() to determine the base type of
+ * the VL datatype.
+ *
+ * The datatype identifier returned from this function should be
+ * released with H5Tclose() or resource leaks will result. Under
+ * certain circumstances, H5Dvlen_reclaim() must also be used.
+ *
+ * \attention H5Tvlen_create() cannot be used to create a variable-length
+ * string datatype. H5Tvlen_create() called with a string or
+ * character base type creates a variable-length sequence of strings
+ * (a variable-length, 1-dimensional array), with each element of
+ * the array being of the string or character base type.\n
+ * To create a variable-length string datatype, see \ref_vlen_strings.
+ *
+ */
H5_DLL hid_t H5Tvlen_create(hid_t base_id);
/* Operations defined on array datatypes */
+/**
+ * \ingroup ARRAY
+ *
+ * \brief Creates an array datatype object
+ *
+ * \param[in] base_id Datatype identifier for the array base datatype
+ * \param[in] ndims Rank of the array
+ * \param[in] dim Size of each array dimension
+ *
+ * \return \hid_t{array datatype}
+ *
+ * \details H5Tarray_create2() creates a new array datatype object.\n\n
+ * \p base_id is the datatype of every element of the array, i.e.,
+ * of the number at each position in the array.
+ *
+ * \p ndims is the number of dimensions and the size of each dimension
+ * is specified in the array \p dim. The value of \p rank is
+ * currently limited to #H5S_MAX_RANK and must be greater than 0
+ * (zero). All dimension sizes specified in \p dim must be greater
+ * than 0 (zero).
+ *
+ * \since 1.8.0
+ *
+ */
H5_DLL hid_t H5Tarray_create2(hid_t base_id, unsigned ndims, const hsize_t dim[/* ndims */]);
-H5_DLL int H5Tget_array_ndims(hid_t type_id);
-H5_DLL int H5Tget_array_dims2(hid_t type_id, hsize_t dims[]);
+/**
+ * \ingroup ARRAY
+ *
+ * \brief Returns the rank of an array datatype
+ *
+ * \type_id
+ *
+ * \return Returns the rank of the array if successful; otherwise returns a
+ * negative value.
+ *
+ * \details H5Tget_array_ndims() returns the rank, i.e., the number of
+ * dimensions, of an array datatype object.
+ *
+ * \since 1.2.0
+ *
+ */
+H5_DLL int H5Tget_array_ndims(hid_t type_id);
+/**
+ * \ingroup ARRAY
+ *
+ * \brief Retrieves sizes of array dimensions
+ *
+ * \type_id
+ * \param[out] dims Sizes of array dimensions
+ *
+ * \return Returns the non-negative number of dimensions of the array type
+ * if successful; otherwise returns a negative value.
+ *
+ * \details H5Tget_array_dims2() returns the sizes of the dimensions of the
+ * specified array datatype object in the array \p dims.
+ *
+ * \since 1.2.0
+ *
+ */
+H5_DLL int H5Tget_array_dims2(hid_t type_id, hsize_t dims[]);
/* Operations defined on opaque datatypes */
+/**
+ * \ingroup OPAQUE
+ *
+ * \brief Tags an opaque datatype
+ *
+ * \type_id{type} of an opaque datatype
+ * \param[in] tag Descriptive ASCII string with which the opaque datatype is
+ * to be tagged
+ *
+ * \return \herr_t
+ *
+ * \details H5Tset_tag() tags an opaque datatype \p type with a descriptive
+ * ASCII identifier, \p tag.
+ *
+ * \p tag is intended to provide a concise description; the maximum
+ * size is hard-coded in the HDF5 library as 256 bytes
+ * (#H5T_OPAQUE_TAG_MAX).
+ *
+ * \version 1.6.5 The #H5T_OPAQUE_TAG_MAX macro constant, specifying the
+ * maximum size of an opaque datatype tag, was added in
+ * H5Tpublic.h.
+ *
+ */
H5_DLL herr_t H5Tset_tag(hid_t type, const char *tag);
-H5_DLL char * H5Tget_tag(hid_t type);
+/**
+ * \ingroup OPAQUE
+ *
+ * \brief Gets the tag associated with an opaque datatype
+ *
+ * \type_id{type} of an opaque datatype
+ *
+ * \return Returns a pointer to an allocated string if successful; otherwise
+ * returns NULL.
+ *
+ * \details H5Tget_tag() returns the tag associated with the opaque datatype
+ * \p type.
+ *
+ * \attention The tag is returned via a pointer to an allocated string, which
+ * the caller must free.
+ *
+ */
+H5_DLL char *H5Tget_tag(hid_t type);
/* Querying property values */
-H5_DLL hid_t H5Tget_super(hid_t type);
+/**
+ * \ingroup H5T
+ *
+ * \brief Returns the base datatype from which a datatype is derived
+ *
+ * \type_id{type}
+ *
+ * \return \hid_t{datatype}
+ *
+ * \details H5Tget_super() returns the base datatype from which the datatype
+ * \p type_id is derived. In the case of an enumeration type, the
+ * return value is an integer type.
+ *
+ * The datatype identifier returned by this function must be released
+ * with H5Tclose() when the identifier is no longer needed so that
+ * resource leaks will not develop.
+ *
+ */
+H5_DLL hid_t H5Tget_super(hid_t type);
+/**
+ * \ingroup H5T
+ *
+ * \brief Returns a datatype class
+ *
+ * \type_id
+ *
+ * \return Returns the datatype class if successful; otherwise #H5T_NO_CLASS.
+ *
+ * \details H5Tget_class() returns the class of the datatype \p type_id.
+ * Valid class identifiers, as defined in H5Tpublic.h, are:
+ * \snippet this H5T_class_t_snip
+ *
+ * \note The library returns #H5T_STRING for both fixed-length and
+ * variable-length strings.
+ *
+ * \note Unsupported datatype: The time datatype class, #H5T_TIME,
+ * is not supported. If #H5T_TIME is used, the resulting data will
+ * be readable and modifiable only on the originating computing
+ * platform; it will not be portable to other platforms.
+ *
+ */
H5_DLL H5T_class_t H5Tget_class(hid_t type_id);
-H5_DLL htri_t H5Tdetect_class(hid_t type_id, H5T_class_t cls);
-H5_DLL size_t H5Tget_size(hid_t type_id);
+/**
+ * \ingroup H5T
+ *
+ * \brief Determines whether a datatype contains any datatypes of the given
+ * datatype class
+ *
+ * \type_id
+ * \param[in] cls Datatype class
+ *
+ * \return \htri_t
+ *
+ * \details H5Tdetect_class() determines whether the datatype specified in
+ * \p type_id contains any datatypes of the datatype class specified
+ * in \p dtype_class.
+ *
+ * This function is useful primarily in recursively examining all the
+ * fields and/or base types of compound, array, and variable-length
+ * datatypes.
+ *
+ * Valid class identifiers, as defined in H5Tpublic.h, are:
+ * \snippet this H5T_class_t_snip
+ *
+ * \since 1.6.0
+ *
+ */
+H5_DLL htri_t H5Tdetect_class(hid_t type_id, H5T_class_t cls);
+/**
+ * \ingroup H5T
+ *
+ * \brief Returns the size of a datatype
+ *
+ * \type_id
+ *
+ * \return Returns the size of the datatype in bytes if successful; otherwise,
+ * returns 0.
+ *
+ * \details H5Tget_size() returns the size of a datatype in bytes.
+ * \li For atomic datatypes, array datatypes, compound datatypes, and
+ * other datatypes of a constant size, the returned value is the
+ * size of the actual datatype in bytes.
+ * \li For variable-length string datatypes the returned value is
+ * the size of the pointer to the actual string, or \c sizeof(\c
+ * char \c *). This function does not return the size of actual
+ * variable-length string data.
+ * \li For variable-length sequence datatypes (see H5Tvlen_create()),
+ * the returned value is the size of the \p hvl_t struct, or \c
+ * sizeof(\p hvl_t). The \p hvl_t struct contains a pointer to the
+ * actual data and a size value. This function does not return the
+ * size of actual variable-length sequence data.
+ *
+ * \see H5Tset_size()
+ *
+ * \since 1.2.0
+ */
+H5_DLL size_t H5Tget_size(hid_t type_id);
+/**
+ * \ingroup ATOM
+ *
+ * \brief Returns the byte order of an atomic datatype
+ *
+ * \type_id
+ *
+ * \return Returns a byte order constant if successful; otherwise returns
+ * #H5T_ORDER_ERROR (-1)
+ *
+ * \details H5Tget_order() returns the byte order of an atomic datatype.
+ * Possible return values are:
+ * \snippet this H5T_order_t_snip
+ * Members of a compound datatype need not have the same byte
+ * order. If members of a compound datatype have more than one of
+ * little endian, big endian, or VAX byte order, H5Tget_order() will
+ * return #H5T_ORDER_MIXED for the compound datatype. A byte order of
+ * #H5T_ORDER_NONE will, however, be ignored; for example, if one or
+ * more members of a compound datatype have byte order #H5T_ORDER_NONE
+ * but all other members have byte order #H5T_ORDER_LE, H5Tget_order()
+ * will return #H5T_ORDER_LE for the compound datatype.
+ *
+ * \since 1.2.0
+ *
+ */
H5_DLL H5T_order_t H5Tget_order(hid_t type_id);
-H5_DLL size_t H5Tget_precision(hid_t type_id);
-H5_DLL int H5Tget_offset(hid_t type_id);
-H5_DLL herr_t H5Tget_pad(hid_t type_id, H5T_pad_t *lsb /*out*/, H5T_pad_t *msb /*out*/);
-H5_DLL H5T_sign_t H5Tget_sign(hid_t type_id);
+/**
+ * \ingroup ATOM
+ *
+ * \brief Returns the precision of an atomic datatype
+ *
+ * \type_id
+ *
+ * \return Returns the number of significant bits if successful; otherwise 0
+ *
+ * \details H5Tget_precision() returns the precision of an atomic datatype
+ * (for example, integer or float) or a datatype whose base (parent)
+ * type is an atomic type (for example, array, enum and variable
+ * length). The precision is the number of significant bits which,
+ * unless padding is present, is 8 times larger than the value
+ * returned by H5Tget_size().
+ *
+ * \since 1.2.0
+ *
+ */
+H5_DLL size_t H5Tget_precision(hid_t type_id);
+/**
+ * \ingroup ATOM
+ *
+ * \brief Retrieves the bit offset of the first significant bit
+ *
+ * \type_id
+ *
+ * \return Returns an offset value if successful; otherwise returns a
+ * negative value.
+ *
+ * \details H5Tget_offset() retrieves the bit offset of the first significant
+ * bit. The significant bits of an atomic datum can be offset from the
+ * beginning of the memory for that datum by an amount of padding. The
+ * 'offset' property specifies the number of bits of padding that
+ * appear to the "right of" the value. That is, if we have a 32-bit
+ * datum with 16-bits of precision having the value 0x1122 then it
+ * will be laid out in memory as (from small byte address toward
+ * larger byte addresses):
+ * \code{.unparsed}
+ * 0: [ pad] [0x11] [0x22] [ pad]
+ * 1: [ pad] [0x22] [0x11] [ pad]
+ * 2: [0x11] [ pad] [ pad] [0x22]
+ * 3: [0x22] [ pad] [ pad] [0x11]
+ * \endcode
+ *
+ * \since 1.2.0
+ *
+ */
+H5_DLL int H5Tget_offset(hid_t type_id);
+/**
+ * \ingroup ATOM
+ *
+ * \brief Retrieves the padding type of the least and most-significant bit padding
+ *
+ * \type_id
+ * \param[out] lsb Buffer for the least-significant bit padding type
+ * \param[out] msb Buffer for the most-significant bit padding type
+ *
+ * \return \herr_t
+ *
+ * \details H5Tget_pad() retrieves the padding type of the least and
+ * most-significant bit padding. Valid padding types are:
+ * \snippet this H5T_pad_t_snip
+ *
+ * \since 1.2.0
+ *
+ */
+H5_DLL herr_t H5Tget_pad(hid_t type_id, H5T_pad_t *lsb /*out*/, H5T_pad_t *msb /*out*/);
+/**
+ * \ingroup ATOM
+ *
+ * \brief Retrieves the sign type for an integer type
+ *
+ * \type_id
+ *
+ * \return Returns a valid sign type if successful; otherwise #H5T_SGN_ERROR (-1)
+ *
+ * \details H5Tget_sign() retrieves the sign type for an integer type.
+ * Valid types are:
+ * \snippet this H5T_sign_t_snip
+ *
+ * \since 1.2.0
+ *
+ */
+H5_DLL H5T_sign_t H5Tget_sign(hid_t type_id);
+/**
+ * \ingroup ATOM
+ *
+ * \brief Retrieves floating point datatype bit field information
+ *
+ * \type_id
+ * \param[out] spos Pointer to location to return floating-point sign bit
+ * \param[out] epos Pointer to location to return exponent bit-position
+ * \param[out] esize Pointer to location to return size of exponent in bits
+ * \param[out] mpos Pointer to location to return mantissa bit-position
+ * \param[out] msize Pointer to location to return size of mantissa in bits
+ *
+ * \return \herr_t
+ *
+ * \details H5Tget_fields() retrieves information about the locations of
+ * the various bit fields of a floating point datatype. The field
+ * positions are bit positions in the significant region of the
+ * datatype. Bits are numbered with the least significant bit number
+ * zero. Any (or even all) of the arguments can be null pointers.
+ *
+ * \since 1.2.0
+ *
+ */
H5_DLL herr_t H5Tget_fields(hid_t type_id, size_t *spos /*out*/, size_t *epos /*out*/, size_t *esize /*out*/,
size_t *mpos /*out*/, size_t *msize /*out*/);
+/**
+ * \ingroup ATOM
+ *
+ * \brief Retrieves the exponent bias of a floating-point type
+ *
+ * \type_id
+ *
+ * \return Returns the bias if successful and 0, otherwise.
+ *
+ * \details H5Tget_ebias() retrieves the exponent bias of a floating-point type.
+ *
+ * \since 1.2.0
+ *
+ */
H5_DLL size_t H5Tget_ebias(hid_t type_id);
-H5_DLL H5T_norm_t H5Tget_norm(hid_t type_id);
-H5_DLL H5T_pad_t H5Tget_inpad(hid_t type_id);
-H5_DLL H5T_str_t H5Tget_strpad(hid_t type_id);
-H5_DLL int H5Tget_nmembers(hid_t type_id);
-H5_DLL char * H5Tget_member_name(hid_t type_id, unsigned membno);
-H5_DLL int H5Tget_member_index(hid_t type_id, const char *name);
-H5_DLL size_t H5Tget_member_offset(hid_t type_id, unsigned membno);
+/**
+ * --------------------------------------------------------------------------
+ * \ingroup ATOM
+ *
+ * \brief Retrieves mantissa normalization of a floating-point datatype
+ *
+ * \type_id
+ *
+ * \return Returns a valid normalization type if successful; otherwise
+ * returns #H5T_NORM_ERROR (-1)
+ *
+ * \details H5Tget_norm() retrieves the mantissa normalization of a
+ * floating-point datatype. Valid normalization types are:
+ * \snippet this H5T_norm_t_snip
+ *
+ * \since 1.2.0
+ *
+ */
+H5_DLL H5T_norm_t H5Tget_norm(hid_t type_id);
+/**
+ * \ingroup ATOM
+ *
+ * \brief Retrieves the internal padding type for unused bits in floating-point
+ * datatypes
+ *
+ * \type_id
+ *
+ * \return Returns a valid padding type if successful; otherwise returns
+ * #H5T_PAD_ERROR (-1).
+ *
+ * \details H5Tget_inpad() retrieves the internal padding type for unused
+ * bits in floating-point datatypes. Valid padding types are:
+ * \snippet this H5T_pad_t_snip
+ *
+ * \since 1.2.0
+ *
+ */
+H5_DLL H5T_pad_t H5Tget_inpad(hid_t type_id);
+/**
+ * \ingroup ATOM
+ *
+ * \brief Retrieves the type of padding used for a string datatype
+ *
+ * \type_id
+ *
+ * \return Returns a valid string of the padding if successful; otherwise
+ * returns #H5T_STR_ERROR (-1)
+ *
+ * \details H5Tget_strpad() retrieves the type of padding used for a string
+ * datatype.
+ *
+ * The string padding type is set with H5Tset_strpad(). Possible
+ * values returned are:
+ * \str_pad_type
+ *
+ * \since 1.2.0
+ *
+ */
+H5_DLL H5T_str_t H5Tget_strpad(hid_t type_id);
+/**
+ * \ingroup COMPOUND ENUM
+ *
+ * \brief Retrieves the number of elements in a compound or enumeration datatype
+ *
+ * \type_id
+ *
+ * \return Returns the number of elements if successful; otherwise returns a
+ * negative value.
+ *
+ * \details H5Tget_nmembers() retrieves the number of fields in a compound
+ * datatype or the number of members of an enumeration datatype.
+ *
+ * \since 1.2.0
+ *
+ */
+H5_DLL int H5Tget_nmembers(hid_t type_id);
+/**
+ * \ingroup COMPOUND ENUM
+ *
+ * \brief Retrieves the name of a compound or enumeration datatype member
+ *
+ * \type_id
+ * \param[in] membno Zero-based index of the field or element
+ *
+ * \return Returns a valid pointer to a string allocated with malloc() if
+ * successful; otherwise returns NULL.
+ *
+ * \details H5Tget_member_name() retrieves the name of a field of a compound
+ * datatype or an element of an enumeration datatype.
+ *
+ * The index of the target field or element is specified in \p
+ * member_no. Compound datatype fields and enumeration datatype
+ * elements are stored in no particular order with index values of
+ * 0 through N-1, where N is the value returned by H5Tget_nmembers().
+ *
+ * The HDF5 library allocates a buffer to receive the name of
+ * the field. The caller must subsequently free the buffer with
+ * H5free_memory().
+ *
+ * \since 1.2.0
+ *
+ */
+H5_DLL char *H5Tget_member_name(hid_t type_id, unsigned membno);
+/**
+ * \ingroup COMPOUND ENUM
+ *
+ * \brief Retrieves the index of a compound or enumeration datatype member
+ *
+ * \type_id
+ * \param[in] name Name of the field or member
+ *
+ * \return \herr_t
+ *
+ * \details H5Tget_member_index() retrieves the index of a field of a compound
+ * datatype or an element of an enumeration datatype.
+ *
+ * The name of the target field or element is specified by \p name.
+ *
+ * Fields are stored in no particular order with index values of 0
+ * through N-1, where N is the value returned by H5Tget_nmembers() .
+ *
+ * \since 1.2.0
+ *
+ */
+H5_DLL int H5Tget_member_index(hid_t type_id, const char *name);
+/**
+ * \ingroup COMPOUND
+ *
+ * \brief Retrieves the offset of a field of a compound datatype
+ *
+ * \type_id
+ * \param[in] membno Zero-based index of the field or element
+ *
+ * \return Returns the byte offset of the field if successful; otherwise
+ * returns 0 (zero).
+ *
+ * \details H5Tget_member_offset() retrieves the byte offset of the beginning
+ * of a field within a compound datatype with respect to the beginning
+ * of the compound datatype datum.
+ *
+ * Note that zero is a valid offset and that this function will fail
+ * only if a call to H5Tget_member_class() fails with the same arguments.
+ *
+ * \version 1.6.4 \p member_no parameter type changed to unsigned.
+ *
+ * \since 1.2.0
+ *
+ */
+H5_DLL size_t H5Tget_member_offset(hid_t type_id, unsigned membno);
+/**
+ * \ingroup COMPOUND
+ *
+ * \brief Returns datatype class of compound datatype member
+ *
+ * \type_id
+ * \param[in] membno Zero-based index of the field or element
+ *
+ * \return Returns the datatype class, a non-negative value, if successful;
+ * otherwise returns a negative value.
+ *
+ * \details Given a compound datatype, \p dtype_id, H5Tget_member_class()
+ * returns the datatype class of the member specified by \p member_no.
+ *
+ * Valid class identifiers, as defined in H5Tpublic.h, are:
+ * \snippet this H5T_class_t_snip
+ *
+ * \since 1.2.0
+ *
+ */
H5_DLL H5T_class_t H5Tget_member_class(hid_t type_id, unsigned membno);
-H5_DLL hid_t H5Tget_member_type(hid_t type_id, unsigned membno);
-H5_DLL herr_t H5Tget_member_value(hid_t type_id, unsigned membno, void *value /*out*/);
-H5_DLL H5T_cset_t H5Tget_cset(hid_t type_id);
-H5_DLL htri_t H5Tis_variable_str(hid_t type_id);
-H5_DLL hid_t H5Tget_native_type(hid_t type_id, H5T_direction_t direction);
+/**
+ * \ingroup COMPOUND
+ *
+ * \brief Returns the datatype of the specified member
+ *
+ * \type_id
+ * \param[in] membno Zero-based index of the field or element
+ *
+ * \return Returns the identifier of a copy of the datatype of the field if
+ * successful; otherwise returns a negative value.
+ *
+ * \details H5Tget_member_type() returns the datatype of the specified member.
+ * The caller should invoke H5Tclose() to release resources associated
+ * with the type.
+ *
+ * \version 1.6.4 \p membno parameter type changed to unsigned.
+ *
+ * \since 1.2.0
+ *
+ */
+H5_DLL hid_t H5Tget_member_type(hid_t type_id, unsigned membno);
+/**
+ * \ingroup ENUM
+ *
+ * \brief Returns the value of an enumeration datatype member
+ *
+ * \type_id
+ * \param[in] membno Number of the enumeration datatype member
+ * \param[out] value Buffer for the value of the enumeration datatype member
+ *
+ * \return \herr_t
+ *
+ * \details H5Tget_member_value() returns the value of the enumeration datatype
+ * member \p member_no.
+ *
+ * The member value is returned in a user-supplied buffer pointed to
+ * by \p value. Values returned in \p value will be of the enumerated
+ * type’s base type, that is, the datatype used by H5Tenum_create()
+ * when the enumerated type was created.
+ *
+ * The value buffer must be at least large enough to hold a value
+ * of that base type. If the size is unknown, you can determine it
+ * with H5Tget_size().
+ *
+ * \since 1.2.0
+ *
+ */
+H5_DLL herr_t H5Tget_member_value(hid_t type_id, unsigned membno, void *value /*out*/);
+/**
+ * \ingroup ATOM
+ *
+ * \brief Retrieves the character set type of a string datatype
+ *
+ * \type_id
+ *
+ * \return Returns a valid character set type if successful; otherwise
+ * #H5T_CSET_ERROR (-1).
+ *
+ * \details H5Tget_cset() retrieves the character set type of a string datatype.
+ * Valid character set types are:
+ * \csets
+ *
+ * \since 1.2.0
+ *
+ */
+H5_DLL H5T_cset_t H5Tget_cset(hid_t type_id);
+/**
+ * \ingroup ATOM
+ *
+ * \brief Determines whether datatype is a variable-length string
+ *
+ * \type_id
+ *
+ * \return Returns:
+ * \li a positive value if the specified datatype is a variable-length
+ * string
+ * \li 0 if the specified datatype is not a variable-length string
+ * \li a negative value when the function fails
+ *
+ * \details H5Tis_variable_str() determines whether the datatype identified
+ * by \p dtype_id is a variable-length string.
+ *
+ * This function can be used to distinguish between fixed and
+ * variable-length string datatypes.
+ *
+ * \since 1.6.0
+ *
+ */
+H5_DLL htri_t H5Tis_variable_str(hid_t type_id);
+/**
+ * \ingroup H5T
+ *
+ * \brief Returns the native datatype identifier of a specified datatype
+ *
+ * \type_id
+ * \param[in] direction Direction of search
+ *
+ * \return \hid_t{native datatype}
+ *
+ * \details H5Tget_native_type() returns the equivalent native datatype
+ * identifier for the datatype specified by \p type_id.
+ *
+ * H5Tget_native_type() is designed primarily to facilitate use of
+ * the H5Dread() function, for which users otherwise must undertake a
+ * multi-step process to determine the native datatype of a dataset
+ * prior to reading it into memory. This function can be used for
+ * the following purposes:
+ *
+ * \li To determine the native datatype of an atomic datatype
+ * \li To determine the base datatype of an array, enumerated, or
+ * variable-length datatype
+ * \li To determine the native atomic datatypes of the individual
+ * components of a compound datatype
+ *
+ * For example, if \p type_id is a compound datatype, the returned
+ * datatype identifier will be for a similar compound datatype with
+ * each element converted to the corresponding native datatype;
+ * nested compound datatypes will be unwound. If \p type_id is an
+ * array, the returned datatype identifier will be for the native
+ * datatype of a single array element.
+ *
+ * H5Tget_native_type() selects the first matching native datatype
+ * from the following list:
+ *
+ * \li #H5T_NATIVE_CHAR
+ * \li #H5T_NATIVE_SHORT
+ * \li #H5T_NATIVE_INT
+ * \li #H5T_NATIVE_LONG
+ * \li #H5T_NATIVE_LLONG
+ *
+ * \li #H5T_NATIVE_UCHAR
+ * \li #H5T_NATIVE_USHORT
+ * \li #H5T_NATIVE_UINT
+ * \li #H5T_NATIVE_ULONG
+ * \li #H5T_NATIVE_ULLONG
+ *
+ * \li #H5T_NATIVE_FLOAT
+ * \li #H5T_NATIVE_DOUBLE
+ * \li #H5T_NATIVE_LDOUBLE
+ *
+ * \li #H5T_NATIVE_B8
+ * \li #H5T_NATIVE_B16
+ * \li #H5T_NATIVE_B32
+ * \li #H5T_NATIVE_B64
+ *
+ * The direction parameter indicates the order in which the library
+ * searches for a native datatype match. Valid values for direction
+ * are as follows:
+ * \snippet this H5T_direction_t_snip
+ *
+ * H5Tget_native_type() is designed primarily for use with integer,
+ * floating point, and bitfield datatypes. String, time, opaque, and
+ * reference datatypes are returned as a copy of dtype_id. See above
+ * for compound, array, enumerated, and variable-length datatypes.
+ *
+ * The identifier returned by H5Tget_native_type() should eventually
+ * be closed by calling H5Tclose() to release resources.
+ *
+ * \note Please note that a datatype is actually an object
+ * identifier or handle returned from opening the datatype. It
+ * is not persistent and its value can be different from one HDF5
+ * session to the next.
+ *
+ * \note H5Tequal() can be used to compare datatypes.
+ *
+ * \note HDF5 High Level APIs that may also be of interest are: H5LTdtype_to_text()
+ * creates a text description of a datatype. H5LTtext_to_dtype() creates an
+ * HDF5 datatype given a text description.
+ *
+ * \since 1.6.0
+ *
+ */
+H5_DLL hid_t H5Tget_native_type(hid_t type_id, H5T_direction_t direction);
/* Setting property values */
+/**
+ * \ingroup H5T
+ *
+ * \brief Sets size for a datatype.
+ *
+ * \type_id
+ * \param[in] size New datatype size is bytes or #H5T_VARIABLE
+ *
+ * \return \herr_t
+ *
+ * \details H5Tset_size() sets the total size, \p size, in bytes, for a
+ * datatype.
+ *
+ * \p size must have a positive value, unless it is passed in as
+ * #H5T_VARIABLE and the datatype is a string datatype.
+ *
+ * \li Numeric datatypes: If the datatype is atomic and the size
+ * is decreased so that significant bits of the datatype extend
+ * beyond the edge of the new size, then the offset property of the
+ * datatype is decreased toward zero. If the offset becomes zero
+ * and the significant bits of the datatype still hang over the edge
+ * of the new size, then the number of significant bits is decreased.
+ *
+ * \li String or character datatypes: The size set for a string
+ * datatype should include space for the null-terminator character,
+ * otherwise it will not be stored on (or retrieved from)
+ * disk. Adjusting the size of a string automatically sets the
+ * precision to \p 8*size.
+ *
+ * \li Variable-length string datatypes: If \p dtype_id is a
+ * variable-length string, size must normally be set to #H5T_VARIABLE.
+ * See \ref_vlen_strings.
+ *
+ * \li Compound datatypes: This function may be used to increase or
+ * decrease the size of a compound datatype, but the function will
+ * fail if the new size is too small to accommodate all member fields.
+ *
+ * \li Ineligible datatypes: This function cannot be used with
+ * enumerated datatypes (#H5T_ENUM), array datatypes (#H5T_ARRAY),
+ * variable-length array datatypes (#H5T_VLEN), or reference datatypes
+ * (#H5T_REFERENCE).
+ *
+ * \see H5Tget_size()
+ *
+ * \since 1.2.0
+ *
+ */
H5_DLL herr_t H5Tset_size(hid_t type_id, size_t size);
+/**
+ * \ingroup ATOM
+ *
+ * \brief Sets the byte order of a datatype
+ *
+ * \type_id
+ * \param[in] order Byte order constant
+ *
+ * \return \herr_t
+ *
+ * \details H5Tset_order() sets the byte order of a datatype.\n
+ * Byte order can currently be set to any of the following:
+ * \snippet this H5T_order_t_snip
+ * #H5T_ORDER_MIXED (3) is a valid value for order only when
+ * returned by the function H5Tget_order(); it cannot be set with
+ * H5Tset_order().
+ *
+ * #H5T_ORDER_NONE (4) is a valid value for order, but it has no
+ * effect. It is valid only for fixed-length strings and object and
+ * region references and specifies “no particular order.”
+ *
+ * The byte order of a derived datatype is initially the same as
+ * that of the parent type, but can be changed with H5Tset_order().
+ *
+ * This function cannot be used with a datatype after it has been
+ * committed.
+ *
+ * \note Special considerations:
+ * \li ENUM datatypes: Byte order must be set before any member on
+ * an ENUM is defined.
+ * \li Compound datatypes: Byte order is set individually on each member
+ * of a compound datatype; members of a compound datatype need not
+ * have the same byte order.
+ * \li Opaque datatypes: Byte order can be set but has no effect.
+ *
+ * \since 1.2.0
+ *
+ */
H5_DLL herr_t H5Tset_order(hid_t type_id, H5T_order_t order);
+/**
+ * \ingroup ATOM
+ *
+ * \brief Sets the precision of an atomic datatype
+ *
+ * \type_id
+ * \param[in] prec Number of bits of precision for datatype
+ *
+ * \return \herr_t
+ *
+ * \details H5Tset_precision() sets the precision of an atomic datatype. The
+ * precision is the number of significant bits which, unless
+ * padding is present, is 8 times larger than the value returned
+ * by H5Tget_size().
+ *
+ * If the precision is increased then the offset is decreased and
+ * then the size is increased to insure that significant bits do not
+ * "hang over" the edge of the datatype.
+ *
+ * Changing the precision of an #H5T_STRING automatically changes
+ * the size as well. The precision must be a multiple of 8.
+ *
+ * When decreasing the precision of a floating point type, set the
+ * locations and sizes of the sign, mantissa, and exponent fields
+ * first.
+ *
+ * \since 1.2.0
+ *
+ */
H5_DLL herr_t H5Tset_precision(hid_t type_id, size_t prec);
+/**
+ * \ingroup ATOM
+ *
+ * \brief Sets the bit offset of the first significant bit
+ *
+ * \type_id
+ * \param[in] offset Offset of first significant bit
+ *
+ * \return \herr_t
+ *
+ * \details H5Tset_offset() sets the bit offset of the first significant
+ * bit. The significant bits of an atomic datum can be offset from
+ * the beginning of the memory for that datum by an amount of
+ * padding. The offset property specifies the number of bits of
+ * padding that appear “to the right of” the value. That is,
+ * if we have a 32-bit datum with 16-bits of precision having the
+ * value 0x1122, then it will be laid out in memory as (from small
+ * byte address toward larger byte addresses):
+ * \code{.unparsed}
+ * 0: [ pad] [0x11] [0x22] [ pad]
+ * 1: [ pad] [0x22] [0x11] [ pad]
+ * 2: [0x11] [ pad] [ pad] [0x22]
+ * 3: [0x22] [ pad] [ pad] [0x11]
+ * \endcode
+ * If the offset is incremented then the total size is incremented
+ * also if necessary to prevent significant bits of the value from
+ * hanging over the edge of the datatype.
+ *
+ * The offset of an #H5T_STRING cannot be set to anything but zero.
+ *
+ * \since 1.2.0
+ *
+ */
H5_DLL herr_t H5Tset_offset(hid_t type_id, size_t offset);
+/**
+ * \ingroup ATOM
+ *
+ * \brief Sets the least and most-significant bits padding types
+ *
+ * \type_id
+ * \param[in] lsb Padding type for least-significant bits
+ * \param[in] msb Padding type for most-significant bits
+ *
+ * \return \herr_t
+ *
+ * \details H5Tset_pad() sets the least and most-significant bits padding types.
+ * Available values are:
+ * \padding_type
+ *
+ * \since 1.2.0
+ *
+ */
H5_DLL herr_t H5Tset_pad(hid_t type_id, H5T_pad_t lsb, H5T_pad_t msb);
+/**
+ * \ingroup ATOM
+ *
+ * \brief Sets the sign property for an integer type
+ *
+ * \type_id
+ * \param[in] sign Sign type
+ *
+ * \return \herr_t
+ *
+ * \details H5Tset_sign() sets the sign property for an integer type:
+ * \sign_prop
+ *
+ * \since 1.2.0
+ *
+ */
H5_DLL herr_t H5Tset_sign(hid_t type_id, H5T_sign_t sign);
+/**
+ * \ingroup ATOM
+ *
+ * \brief Sets locations and sizes of floating point bit fields
+ *
+ * \type_id
+ * \param[in] spos Sign position, i.e., the bit offset of the floating-point
+ * sign bit
+ * \param[in] epos Exponent bit position
+ * \param[in] esize Size of exponent in bits
+ * \param[in] mpos Mantissa bit position
+ * \param[in] msize Size of mantissa in bits
+ *
+ * \return \herr_t
+ *
+ * \details H5Tset_fields() sets the locations and sizes of the various
+ * floating-point bit fields. The field positions are bit positions
+ * in the significant region of the datatype. Bits are numbered with
+ * the least significant bit number zero.
+ *
+ * Fields are not allowed to extend beyond the number of bits of
+ * precision, nor are they allowed to overlap with one another.
+ *
+ * \since 1.2.0
+ *
+ */
H5_DLL herr_t H5Tset_fields(hid_t type_id, size_t spos, size_t epos, size_t esize, size_t mpos, size_t msize);
+/**
+ * \ingroup ATOM
+ *
+ * \brief Sets the exponent bias of a floating-point type
+ *
+ * \type_id
+ * \param[in] ebias Exponent bias value
+ *
+ * \return \herr_t
+ *
+ * \details H5Tset_ebias() sets the exponent bias of a floating-point type.
+ *
+ * \since 1.2.0
+ *
+ */
H5_DLL herr_t H5Tset_ebias(hid_t type_id, size_t ebias);
+/**
+ * \ingroup ATOM
+ *
+ * \brief Sets the mantissa normalization of a floating-point datatype
+ *
+ * \type_id
+ * \param[in] norm Mantissa normalization type
+ *
+ * \return \herr_t
+ *
+ * \details H5Tset_norm() sets the mantissa normalization of a floating-point
+ * datatype. Valid normalization types are:
+ * \snippet this H5T_norm_t_snip
+ *
+ * \since 1.2.0
+ *
+ */
H5_DLL herr_t H5Tset_norm(hid_t type_id, H5T_norm_t norm);
+/**
+ * \ingroup ATOM
+ *
+ * \brief Fills unused internal floating-point bits
+ *
+ * \type_id
+ * \param[in] pad Padding type
+ *
+ * \return \herr_t
+ *
+ * \details H5Tset_inpad() If any internal bits of a floating point-type are
+ * unused (that is, those significant bits which are not part of the
+ * sign, exponent, or mantissa), then H5Tset_inpad() will be filled
+ * according to the value of the padding value property inpad. Valid
+ * padding types are:
+ * \snippet this H5T_pad_t_snip
+ *
+ * \since 1.2.0
+ *
+ */
H5_DLL herr_t H5Tset_inpad(hid_t type_id, H5T_pad_t pad);
+/**
+ * \ingroup ATOM
+ *
+ * \brief Sets character set to be used in a string or character datatype
+ *
+ * \type_id
+ * \param[in] cset Character set type
+ *
+ * \return \herr_t
+ *
+ * \details H5Tset_cset() sets the character set to be used in a dataset with
+ * a string or character datatype.
+ *
+ * Valid values for cset include the following:
+ * \csets
+ * For example, if the character set for the datatype \p type_id is set
+ * to #H5T_CSET_UTF8, string or character data of datatype dtype_id
+ * will be encoded using the UTF-8 Unicode character set.
+ *
+ * ASCII and UTF-8 Unicode are the only currently supported character
+ * encodings. Extended ASCII encodings (for example, ISO 8859) are
+ * not supported. This encoding policy is not enforced by the HDF5
+ * library. Using encodings other than ASCII and UTF-8 can lead to
+ * compatibility and usability problems.
+ *
+ * Note that H5Tset_cset() sets the character set for a character or
+ * string datatype while H5Pset_char_encoding() sets the character
+ * set used for an HDF5 link or attribute name.
+ *
+ * \since 1.2.0
+ *
+ */
H5_DLL herr_t H5Tset_cset(hid_t type_id, H5T_cset_t cset);
+/**
+ * \ingroup ATOM
+ *
+ * \brief Defines the type of padding used for character strings
+ *
+ * \type_id
+ * \param[in] strpad String padding type
+ *
+ * \return \herr_t
+ *
+ * \details H5Tset_strpad() defines the type of padding used for a string
+ * datatype.
+ *
+ * The method used to store character strings differs with the
+ * programming language. C usually null terminates strings while
+ * Fortran left-justifies and space-pads strings.
+ *
+ * Valid values of \p strpad are as follows:
+ * \str_pad_type
+ * When converting from a longer string to a shorter string, the
+ * behavior is as follows. If the shorter string is #H5T_STR_NULLPAD
+ * or #H5T_STR_SPACEPAD, then the string is simply truncated. If
+ * the short string is #H5T_STR_NULLTERM, it is truncated and a null
+ * terminator is appended.
+ *
+ * When converting from a shorter string to a longer string, the
+ * longer string is padded on the end by appending nulls or spaces.
+ *
+ * \since 1.2.0
+ *
+ */
H5_DLL herr_t H5Tset_strpad(hid_t type_id, H5T_str_t strpad);
/* Type conversion database */
+/**
+ * \ingroup CONV
+ *
+ * \brief Registers a datatype conversion function
+ *
+ * \param[in] pers Conversion function type
+ * \param[in] name Name displayed in diagnostic output
+ * \type_id{src_id} of source datatype
+ * \type_id{dst_id} of destination datatype
+ * \param[in] func Function to convert between source and destination datatypes
+ *
+ * \return \herr_t
+ *
+ * \details H5Tregister() registers a hard or soft conversion function for a
+ * datatype conversion path. The parameter \p pers indicates whether a
+ * conversion function is hard (#H5T_PERS_HARD) or soft
+ * (#H5T_PERS_SOFT). User-defined functions employing compiler casting
+ * are designated as \Emph{hard}; other user-defined conversion
+ * functions registered with the HDF5 library (with H5Tregister() )
+ * are designated as \Emph{soft}. The HDF5 library also has its own
+ * hard and soft conversion functions.
+ *
+ * A conversion path can have only one hard function. When type is
+ * #H5T_PERS_HARD, \p func replaces any previous hard function.
+ *
+ * When type is #H5T_PERS_SOFT, H5Tregister() adds the function to the
+ * end of the master soft list and replaces the soft function in all
+ * applicable existing conversion paths. Soft functions are used when
+ * determining which conversion function is appropriate for this path.
+ *
+ * The \p name is used only for debugging and should be a short
+ * identifier for the function.
+ *
+ * The path is specified by the source and destination datatypes \p
+ * src_id and \p dst_id. For soft conversion functions, only the class
+ * of these types is important.
+ *
+ * The type of the conversion function pointer is declared as:
+ * \snippet this H5T_conv_t_snip
+ *
+ * The \ref H5T_cdata_t \c struct is declared as:
+ * \snippet this H5T_cdata_t_snip
+ *
+ * \since 1.6.3 The following change occurred in the \ref H5T_conv_t function:
+ * the \c nelmts parameter type changed to size_t.
+ *
+ */
H5_DLL herr_t H5Tregister(H5T_pers_t pers, const char *name, hid_t src_id, hid_t dst_id, H5T_conv_t func);
+/**
+ * \ingroup CONV
+ *
+ * \brief Removes a conversion function
+ *
+ * \param[in] pers Conversion function type
+ * \param[in] name Name displayed in diagnostic output
+ * \type_id{src_id} of source datatype
+ * \type_id{dst_id} of destination datatype
+ * \param[in] func Function to convert between source and destination datatypes
+ *
+ * \return \herr_t
+ *
+ * \details H5Tunregister() removes a conversion function matching criteria
+ * such as soft or hard conversion, source and destination types, and
+ * the conversion function.
+ *
+ * If a user is trying to remove a conversion function he registered,
+ * all parameters can be used. If he is trying to remove a library’s
+ * default conversion function, there is no guarantee the \p name and
+ * \p func parameters will match the user’s chosen values. Passing in
+ * some values may cause this function to fail. A good practice is to
+ * pass in NULL as their values.
+ *
+ * All parameters are optional. The missing parameters will be used to
+ * generalize the search criteria.
+ *
+ * The conversion function pointer type declaration is described in
+ * H5Tregister().
+ *
+ * \version 1.6.3 The following change occurred in the \ref H5T_conv_t function:
+ * the \c nelmts parameter type changed to size_t.
+ *
+ */
H5_DLL herr_t H5Tunregister(H5T_pers_t pers, const char *name, hid_t src_id, hid_t dst_id, H5T_conv_t func);
+/**
+ * \ingroup CONV
+ *
+ * \brief Finds a conversion function
+ *
+ * \type_id{src_id} of source datatype
+ * \type_id{dst_id} of destination datatype
+ * \param[out] pcdata Pointer to type conversion data
+ *
+ * \return Returns a pointer to a suitable conversion function if successful.
+ * Otherwise returns NULL.
+ *
+ * \details H5Tfind() finds a conversion function that can handle a conversion
+ * from type \p src_id to type \p dst_id. The \p pcdata argument is a
+ * pointer to a pointer to type conversion data which was created and
+ * initialized by the soft type conversion function of this path when
+ * the conversion function was installed on the path.
+ *
+ */
H5_DLL H5T_conv_t H5Tfind(hid_t src_id, hid_t dst_id, H5T_cdata_t **pcdata);
-H5_DLL htri_t H5Tcompiler_conv(hid_t src_id, hid_t dst_id);
-H5_DLL herr_t H5Tconvert(hid_t src_id, hid_t dst_id, size_t nelmts, void *buf, void *background,
- hid_t plist_id);
-H5_DLL herr_t H5Treclaim(hid_t type_id, hid_t space_id, hid_t plist_id, void *buf);
+/**
+ * \ingroup CONV
+ *
+ * \brief Check whether the library’s default conversion is hard conversion
+ *
+ * \type_id{src_id} of source datatype
+ * \type_id{dst_id} of destination datatype
+ *
+ * \return \htri_t
+ *
+ * \details H5Tcompiler_conv() determines whether the library’s conversion
+ * function from type \p src_id to type \p dst_id is a compiler (hard)
+ * conversion or not. A compiler conversion uses compiler’s casting; a
+ * library (soft) conversion uses the library’s own conversion
+ * function.
+ *
+ * \since 1.8.0
+ *
+ */
+H5_DLL htri_t H5Tcompiler_conv(hid_t src_id, hid_t dst_id);
+/**
+ * --------------------------------------------------------------------------
+ * \ingroup CONV
+ *
+ * \brief Converts data from one specified datatype to another
+ *
+ * \type_id{src_id} of source datatype
+ * \type_id{dst_id} of destination datatype
+ * \param[in] nelmts Size of array \p buf
+ * \param[in,out] buf Array containing pre- and post-conversion values
+ * \param[in] background Optional background buffer
+ * \dxpl_id{plist_id}
+ *
+ * \return \herr_t
+ *
+ * \details H5Tconvert() converts \p nelmts elements from a source datatype,
+ * specified by \p src_id, to a destination datatype, \p dst_id. The
+ * source elements are packed in \p buf and on return the destination
+ * elements will be packed in \p buf. That is, the conversion is
+ * performed in place.
+ *
+ * The optional background buffer is for use with compound datatypes.
+ * It is an array of \p nelmts values for the destination datatype
+ * which can then be merged with the converted values to recreate the
+ * compound datatype. For instance, background might be an array of
+ * structs with the \c a and \c b fields already initialized and the
+ * conversion of buf supplies the \c c and \c d field values.
+ *
+ * The parameter \p plist_id contains the dataset transfer property list
+ * identifier which is passed to the conversion functions. As of
+ * Release 1.2, this parameter is only used to pass along the
+ * variable-length datatype custom allocation information.
+ *
+ * \note H5Tconvert() will not resize the buffer \p buf; it must be large
+ * enough to hold the larger of the input and output data.
+ *
+ * \version 1.6.3 \p nelmts parameter type changed to size_t.
+ * \version 1.4.0 \p nelmts parameter type changed to hsize_t.
+ *
+ */
+H5_DLL herr_t H5Tconvert(hid_t src_id, hid_t dst_id, size_t nelmts, void *buf, void *background,
+ hid_t plist_id);
+/**
+ * \ingroup VLEN
+ *
+ * \brief Reclaims the variable length (VL) datatype memory buffers
+ *
+ * \type_id
+ * \space_id
+ * \dxpl_id{plist_id} used to create the buffer
+ * \param[in] buf Pointer to the buffer to be reclaimed
+ *
+ * \return \herr_t
+ *
+ * \details H5Treclaim() reclaims memory buffers created to store VL datatypes.
+ * It only frees the variable length data in the selection defined in
+ * the dataspace specified by \p space_id. The dataset transfer
+ * property list \p plist_id is required to find the correct
+ * allocation and/or free methods for the variable-length data in the
+ * buffer.
+ *
+ * \since 1.12.0
+ *
+ */
+H5_DLL herr_t H5Treclaim(hid_t type_id, hid_t space_id, hid_t plist_id, void *buf);
/* Symbols defined for compatibility with previous versions of the HDF5 API.
*
* Use of these symbols is deprecated.
*/
+
+/* API Wrappers for async routines */
+/* (Must be defined _after_ the function prototype) */
+/* (And must only defined when included in application code, not the library) */
+#ifndef H5T_MODULE
+#define H5Tcommit_async(...) H5Tcommit_async(__FILE__, __func__, __LINE__, __VA_ARGS__)
+#define H5Topen_async(...) H5Topen_async(__FILE__, __func__, __LINE__, __VA_ARGS__)
+#define H5Tclose_async(...) H5Tclose_async(__FILE__, __func__, __LINE__, __VA_ARGS__)
+
+/* Define "wrapper" versions of function calls, to allow compile-time values to
+ * be passed in by language wrapper or library layer on top of HDF5. */
+#define H5Tcommit_async_wrap H5_NO_EXPAND(H5Tcommit_async)
+#define H5Topen_async_wrap H5_NO_EXPAND(H5Topen_async)
+#define H5Tclose_async_wrap H5_NO_EXPAND(H5Tclose_async)
+#endif /* H5T_MODULE */
+
#ifndef H5_NO_DEPRECATED_SYMBOLS
/* Macros */
@@ -598,11 +2927,140 @@ H5_DLL herr_t H5Treclaim(hid_t type_id, hid_t space_id, hid_t plist_id, void
/* Typedefs */
/* Function prototypes */
+/**
+ * \ingroup H5T
+ *
+ * \brief Commits a transient datatype to a file, creating a new named datatype
+ *
+ * \fg_loc_id
+ * \param[in] name Name given to committed datatype
+ * \param[in] type_id Identifier of datatype to be committed
+ *
+ * \return \herr_t
+ *
+ * \deprecated This function has been renamed from H5Tcommit() and is
+ * deprecated in favor of the macro #H5Tcommit or the function
+ * H5Tcommit2().
+ *
+ * \details H5Tcommit1() commits the transient datatype (not immutable) to
+ * a file, turning it into a named datatype.
+ *
+ * The datatype \p dtype_id is committed as a named datatype at the
+ * location \p loc_id, which is either a file or group identifier,
+ * with the name \p name.
+ *
+ * \p name can be a relative path based at \p loc_id or an absolute
+ * path from the root of the file. Use of this function requires
+ * that any intermediate groups specified in the path already exist.
+ *
+ * As is the case for any object in a group, the length of the name
+ * of a named datatype is not limited.
+ *
+ * See H5Tcommit_anon() for a discussion of the differences between
+ * H5Tcommit() and H5Tcommit_anon().
+ *
+ * This function will not accept a datatype that cannot actually
+ * hold data. This currently includes compound datatypes with no
+ * fields and enumerated datatypes with no members.
+ *
+ * \version 1.8.7 Function modified in this release to reject datatypes that
+ * will not accommodate actual data, such as a compound datatype with
+ * no fields or an enumerated datatype with no members.
+ * \version 1.8.0 C function H5Tcommit() renamed to H5Tcommit1() and deprecated
+ * in this release.
+ * \since 1.2.0
+ *
+ */
H5_DLL herr_t H5Tcommit1(hid_t loc_id, const char *name, hid_t type_id);
-H5_DLL hid_t H5Topen1(hid_t loc_id, const char *name);
-H5_DLL hid_t H5Tarray_create1(hid_t base_id, int ndims, const hsize_t dim[/* ndims */],
- const int perm[/* ndims */]);
-H5_DLL int H5Tget_array_dims1(hid_t type_id, hsize_t dims[], int perm[]);
+/**
+ * \ingroup H5T
+ *
+ * \brief Opens a named datatype
+ *
+ * \fg_loc_id
+ * \param[in] name A datatype name, defined within the specified file or group
+ *
+ * \return \herr_t
+ *
+ * \deprecated This function has been renamed from H5Topen() and is
+ * deprecated in favor of the macro #H5Topen or the function
+ * H5Topen2().
+ *
+ * \details H5Topen1() opens a named datatype at the location specified by
+ * \p loc_id and returns an identifier for the datatype. \p loc_id
+ * can be either a file or group identifier. The identifier should
+ * eventually be closed by calling H5Tclose() to release resources.
+ *
+ * \version 1.8.0 Function H5Topen() renamed to H5Topen1() and deprecated in
+ * this release.
+ *
+ * \since 1.2.0
+ *
+ */
+H5_DLL hid_t H5Topen1(hid_t loc_id, const char *name);
+/**
+ * \ingroup ARRAY
+ *
+ * \brief Creates an array datatype object
+ *
+ * \param[in] base_id Datatype identifier for the array base datatype
+ * \param[in] ndims Rank of the array
+ * \param[in] dim Size of each array dimension
+ * \param[in] perm Dimension permutation (Currently not implemented.)
+ *
+ * \return \hid_t{array datatype}
+ *
+ * \deprecated This function has been renamed from H5Tarray_create() and is
+ * deprecated in favor of the macro #H5Tarray_create or the function
+ * H5Tarray_create2().
+ *
+ * \details H5Tarray_create1() creates a new array datatype object.\n\n
+ * \p base_id is the datatype of every element of the array, i.e.,
+ * of the number at each position in the array.
+ *
+ * \p rank is the number of dimensions and the size of each dimension
+ * is specified in the array dims. The value of rank is currently
+ * limited to #H5S_MAX_RANK and must be greater than 0 (zero). All
+ * dimension sizes specified in dims must be greater than 0 (zero).
+ *
+ * The array \p perm is designed to contain the dimension permutation,
+ * i.e. C versus FORTRAN array order. (The parameter perm is
+ * currently unused and is not yet implemented.)
+ *
+ * \version 1.8.0 Function H5Tarray_create() renamed to H5Tarray_create1()
+ * and deprecated in this release.
+ * \since 1.4.0
+ *
+ */
+H5_DLL hid_t H5Tarray_create1(hid_t base_id, int ndims, const hsize_t dim[/* ndims */],
+ const int perm[/* ndims */]);
+/**
+ * \ingroup ARRAY
+ *
+ * \brief Retrieves sizes of array dimensions
+ *
+ * \type_id
+ * \param[out] dims Sizes of array dimensions
+ * \param[out] perm Dimension permutations (This parameter is not used.)
+ *
+ * \return Returns the non-negative number of dimensions of the array type
+ * if successful; otherwise, returns a negative value.
+ *
+ * \deprecated This function has been renamed from H5Tget_array_dims() and is
+ * deprecated in favor of the macro #H5Tget_array_dims or the
+ * function H5Tget_array_dims2().
+ *
+ * \details H5Tget_array_dims1() returns the sizes of the dimensions and
+ * the dimension permutations of the specified array datatype object.
+ *
+ * The sizes of the dimensions are returned in the array \p dims.
+ *
+ * \version 1.8.0 Function H5Tarray_create() renamed to H5Tarray_create1()
+ * and deprecated in this release.
+ * \since 1.2.0
+ *
+ */
+H5_DLL int H5Tget_array_dims1(hid_t type_id, hsize_t dims[], int perm[]);
#endif /* H5_NO_DEPRECATED_SYMBOLS */
diff --git a/src/H5Tref.c b/src/H5Tref.c
index 98389e8f520..1114c25ad39 100644
--- a/src/H5Tref.c
+++ b/src/H5Tref.c
@@ -156,7 +156,7 @@ static const H5T_ref_class_t H5T_ref_dsetreg_disk_g = {
*-------------------------------------------------------------------------
*/
htri_t
-H5T__ref_set_loc(const H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc)
+H5T__ref_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc)
{
htri_t ret_value = FALSE; /* Indicate success, but no location change */
@@ -180,6 +180,13 @@ H5T__ref_set_loc(const H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc)
/* Mark this type as being stored in memory */
dt->shared->u.atomic.u.r.loc = H5T_LOC_MEMORY;
+ /* Release owned file */
+ if (dt->shared->owned_vol_obj) {
+ if (H5VL_free_object(dt->shared->owned_vol_obj) < 0)
+ HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCLOSEOBJ, FAIL, "unable to close owned VOL object")
+ dt->shared->owned_vol_obj = NULL;
+ } /* end if */
+
/* Reset file ID (since this reference is in memory) */
dt->shared->u.atomic.u.r.file = file; /* file is NULL */
@@ -220,6 +227,10 @@ H5T__ref_set_loc(const H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc)
/* Set file pointer (since this reference is on disk) */
dt->shared->u.atomic.u.r.file = file;
+ /* dt now owns a reference to file */
+ if (H5T_own_vol_obj(dt, file) < 0)
+ HGOTO_ERROR(H5E_REFERENCE, H5E_CANTINIT, FAIL, "can't give ownership of VOL object")
+
if (dt->shared->u.atomic.u.r.rtype == H5R_OBJECT1) {
H5F_t *f;
diff --git a/src/H5Tvlen.c b/src/H5Tvlen.c
index e2204508bc8..39d14f32f20 100644
--- a/src/H5Tvlen.c
+++ b/src/H5Tvlen.c
@@ -245,7 +245,7 @@ H5T__vlen_create(const H5T_t *base)
*-------------------------------------------------------------------------
*/
htri_t
-H5T__vlen_set_loc(const H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc)
+H5T__vlen_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc)
{
H5VL_file_cont_info_t cont_info = {H5VL_CONTAINER_INFO_VERSION, 0, 0, 0};
htri_t ret_value = FALSE; /* Indicate success, but no location change */
@@ -282,6 +282,13 @@ H5T__vlen_set_loc(const H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc)
else
HDassert(0 && "Invalid VL type");
+ /* Release owned file */
+ if (dt->shared->owned_vol_obj) {
+ if (H5VL_free_object(dt->shared->owned_vol_obj) < 0)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCLOSEOBJ, FAIL, "unable to close owned VOL object")
+ dt->shared->owned_vol_obj = NULL;
+ } /* end if */
+
/* Reset file pointer (since this VL is in memory) */
dt->shared->u.vlen.file = NULL;
break;
@@ -307,6 +314,10 @@ H5T__vlen_set_loc(const H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc)
/* Set file ID (since this VL is on disk) */
dt->shared->u.vlen.file = file;
+
+ /* dt now owns a reference to file */
+ if (H5T_own_vol_obj(dt, file) < 0)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "can't give ownership of VOL object")
break;
case H5T_LOC_BADLOC:
diff --git a/src/H5VL.c b/src/H5VL.c
index 77a749fc206..a77a6f372bc 100644
--- a/src/H5VL.c
+++ b/src/H5VL.c
@@ -87,25 +87,6 @@ H5VLregister_connector(const H5VL_class_t *cls, hid_t vipl_id)
FUNC_ENTER_API(H5I_INVALID_HID)
H5TRACE2("i", "*#i", cls, vipl_id);
- /* Check arguments */
- if (!cls)
- HGOTO_ERROR(H5E_ARGS, H5E_UNINITIALIZED, H5I_INVALID_HID,
- "VOL connector class pointer cannot be NULL")
- if (!cls->name)
- HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID,
- "VOL connector class name cannot be the NULL pointer")
- if (0 == HDstrlen(cls->name))
- HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID,
- "VOL connector class name cannot be the empty string")
- if (cls->info_cls.copy && !cls->info_cls.free)
- HGOTO_ERROR(
- H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID,
- "VOL connector must provide free callback for VOL info objects when a copy callback is provided")
- if (cls->wrap_cls.get_wrap_ctx && !cls->wrap_cls.free_wrap_ctx)
- HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID,
- "VOL connector must provide free callback for object wrapping contexts when a get "
- "callback is provided")
-
/* Check VOL initialization property list */
if (H5P_DEFAULT == vipl_id)
vipl_id = H5P_VOL_INITIALIZE_DEFAULT;
@@ -113,7 +94,7 @@ H5VLregister_connector(const H5VL_class_t *cls, hid_t vipl_id)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a VOL initialize property list")
/* Register connector */
- if ((ret_value = H5VL__register_connector(cls, TRUE, vipl_id)) < 0)
+ if ((ret_value = H5VL__register_connector_by_class(cls, TRUE, vipl_id)) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register VOL connector")
done:
@@ -628,6 +609,7 @@ H5VLwrap_register(void *obj, H5I_type_t type)
case H5I_ERROR_MSG:
case H5I_ERROR_STACK:
case H5I_SPACE_SEL_ITER:
+ case H5I_EVENTSET:
case H5I_NTYPES:
default:
HGOTO_ERROR(H5E_VOL, H5E_BADRANGE, H5I_INVALID_HID, "invalid type number")
@@ -686,7 +668,7 @@ H5VLobject(hid_t id)
hid_t
H5VLget_file_type(void *file_obj, hid_t connector_id, hid_t dtype_id)
{
- H5T_t * dtype; /* unatomized type */
+ H5T_t * dtype; /* unregistered type */
H5T_t * file_type = NULL; /* copied file type */
hid_t file_type_id = -1; /* copied file type id */
H5VL_object_t *file_vol_obj = NULL; /* VOL object for file */
@@ -701,8 +683,10 @@ H5VLget_file_type(void *file_obj, hid_t connector_id, hid_t dtype_id)
if (NULL == (dtype = (H5T_t *)H5I_object_verify(dtype_id, H5I_DATATYPE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type")
- /* Create VOL object for file */
- if (NULL == (file_vol_obj = H5VL_create_object_using_vol_id(H5I_FILE, file_obj, connector_id)))
+ /* Create VOL object for file if necessary (force_conv will be TRUE if and
+ * only if file needs to be passed to H5T_set_loc) */
+ if (H5T_GET_FORCE_CONV(dtype) &&
+ (NULL == (file_vol_obj = H5VL_create_object_using_vol_id(H5I_FILE, file_obj, connector_id))))
HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, FAIL, "can't create VOL object")
/* Copy the datatype */
@@ -719,10 +703,12 @@ H5VLget_file_type(void *file_obj, hid_t connector_id, hid_t dtype_id)
if (H5T_set_loc(file_type, file_vol_obj, H5T_LOC_DISK) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTINIT, FAIL, "can't set datatype location")
- /* file_type now owns file_vol_obj */
- if (H5T_own_vol_obj(file_type, file_vol_obj) < 0)
- HGOTO_ERROR(H5E_VOL, H5E_CANTINIT, FAIL, "can't give ownership of VOL object")
- file_vol_obj = NULL;
+ /* Release our reference to file_type */
+ if (file_vol_obj) {
+ if (H5VL_free_object(file_vol_obj) < 0)
+ HGOTO_ERROR(H5E_VOL, H5E_CANTDEC, FAIL, "unable to free VOL object")
+ file_vol_obj = NULL;
+ } /* end if */
/* Set return value */
ret_value = file_type_id;
@@ -757,13 +743,13 @@ H5VLget_file_type(void *file_obj, hid_t connector_id, hid_t dtype_id)
*---------------------------------------------------------------------------
*/
herr_t
-H5VLretrieve_lib_state(void **state)
+H5VLretrieve_lib_state(void **state /*out*/)
{
herr_t ret_value = SUCCEED; /* Return value */
/* Must use this, to avoid modifying the API context stack in FUNC_ENTER */
FUNC_ENTER_API_NOINIT
- H5TRACE1("e", "**x", state);
+ H5TRACE1("e", "x", state);
/* Check args */
if (NULL == state)
@@ -895,7 +881,8 @@ H5VLfree_lib_state(void *state)
* Function: H5VLquery_optional
*
* Purpose: Determine if a VOL connector supports a particular optional
- * callback operation.
+ * callback operation, and a general sense of the operation's
+ * behavior.
*
* Return: Success: Non-negative
* Failure: Negative
@@ -903,23 +890,23 @@ H5VLfree_lib_state(void *state)
*---------------------------------------------------------------------------
*/
herr_t
-H5VLquery_optional(hid_t obj_id, H5VL_subclass_t subcls, int opt_type, hbool_t *supported)
+H5VLquery_optional(hid_t obj_id, H5VL_subclass_t subcls, int opt_type, uint64_t *flags /*out*/)
{
H5VL_object_t *vol_obj = NULL;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
- H5TRACE4("e", "iVSIs*b", obj_id, subcls, opt_type, supported);
+ H5TRACE4("e", "iVSIsx", obj_id, subcls, opt_type, flags);
/* Check args */
- if (NULL == supported)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid supported pointer")
+ if (NULL == flags)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid 'flags' pointer")
if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(obj_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid object identifier")
/* Query the connector */
- if (H5VL_introspect_opt_query(vol_obj, subcls, opt_type, supported) < 0)
- HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "unable to query VOL connector support")
+ if (H5VL_introspect_opt_query(vol_obj, subcls, opt_type, flags) < 0)
+ HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "unable to query VOL connector operation")
done:
FUNC_LEAVE_API(ret_value)
diff --git a/src/H5VLcallback.c b/src/H5VLcallback.c
index 85c5ebdfd56..02e0ee04826 100644
--- a/src/H5VLcallback.c
+++ b/src/H5VLcallback.c
@@ -29,10 +29,11 @@
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
-#include "H5Fprivate.h" /* File access */
+#include "H5Fprivate.h" /* File access */
#include "H5Iprivate.h" /* IDs */
#include "H5MMprivate.h" /* Memory management */
#include "H5Pprivate.h" /* Property lists */
+#include "H5PLprivate.h" /* Plugins */
#include "H5VLpkg.h" /* Virtual Object Layer */
/****************/
@@ -43,6 +44,16 @@
/* Local Typedefs */
/******************/
+/* Structure used when trying to find a
+ * VOL connector to open a given file with.
+ */
+typedef struct H5VL_file_open_find_connector_t {
+ const char * filename;
+ const H5VL_class_t * cls;
+ H5VL_connector_prop_t *connector_prop;
+ hid_t fapl_id;
+} H5VL_file_open_find_connector_t;
+
/********************/
/* Package Typedefs */
/********************/
@@ -101,6 +112,8 @@ static void * H5VL__file_create(const H5VL_class_t *cls, const char *name, unsig
hid_t fapl_id, hid_t dxpl_id, void **req);
static void * H5VL__file_open(const H5VL_class_t *cls, const char *name, unsigned flags, hid_t fapl_id,
hid_t dxpl_id, void **req);
+static herr_t H5VL__file_open_find_connector_cb(H5PL_type_t plugin_type, const void *plugin_info,
+ void *op_data);
static herr_t H5VL__file_get(void *obj, const H5VL_class_t *cls, H5VL_file_get_t get_type, hid_t dxpl_id,
void **req, va_list arguments);
static herr_t H5VL__file_specific(void *obj, const H5VL_class_t *cls, H5VL_file_specific_t specific_type,
@@ -152,10 +165,11 @@ static herr_t H5VL__object_optional(void *obj, const H5VL_class_t *cls, H5VL_obj
static herr_t H5VL__introspect_get_conn_cls(void *obj, const H5VL_class_t *cls, H5VL_get_conn_lvl_t lvl,
const H5VL_class_t **conn_cls);
static herr_t H5VL__introspect_opt_query(void *obj, const H5VL_class_t *cls, H5VL_subclass_t subcls,
- int opt_type, hbool_t *supported);
-static herr_t H5VL__request_wait(void *req, const H5VL_class_t *cls, uint64_t timeout, H5ES_status_t *status);
+ int opt_type, uint64_t *flags);
+static herr_t H5VL__request_wait(void *req, const H5VL_class_t *cls, uint64_t timeout,
+ H5VL_request_status_t *status);
static herr_t H5VL__request_notify(void *req, const H5VL_class_t *cls, H5VL_request_notify_t cb, void *ctx);
-static herr_t H5VL__request_cancel(void *req, const H5VL_class_t *cls);
+static herr_t H5VL__request_cancel(void *req, const H5VL_class_t *cls, H5VL_request_status_t *status);
static herr_t H5VL__request_specific(void *req, const H5VL_class_t *cls,
H5VL_request_specific_t specific_type, va_list arguments);
static herr_t H5VL__request_optional(void *req, const H5VL_class_t *cls, H5VL_request_optional_t opt_type,
@@ -263,13 +277,13 @@ H5VLterminate(hid_t connector_id)
*---------------------------------------------------------------------------
*/
herr_t
-H5VLget_cap_flags(hid_t connector_id, unsigned *cap_flags)
+H5VLget_cap_flags(hid_t connector_id, unsigned *cap_flags /*out*/)
{
H5VL_class_t *cls; /* VOL connector's class struct */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API_NOINIT
- H5TRACE2("e", "i*Iu", connector_id, cap_flags);
+ H5TRACE2("e", "ix", connector_id, cap_flags);
/* Check args */
if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL)))
@@ -294,13 +308,13 @@ H5VLget_cap_flags(hid_t connector_id, unsigned *cap_flags)
*---------------------------------------------------------------------------
*/
herr_t
-H5VLget_value(hid_t connector_id, H5VL_class_value_t *value)
+H5VLget_value(hid_t connector_id, H5VL_class_value_t *value /*out*/)
{
H5VL_class_t *cls; /* VOL connector's class struct */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API_NOINIT
- H5TRACE2("e", "i*VC", connector_id, value);
+ H5TRACE2("e", "ix", connector_id, value);
/* Check args */
if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL)))
@@ -599,12 +613,12 @@ H5VLconnector_info_to_str(const void *info, hid_t connector_id, char **str)
*---------------------------------------------------------------------------
*/
herr_t
-H5VLconnector_str_to_info(const char *str, hid_t connector_id, void **info)
+H5VLconnector_str_to_info(const char *str, hid_t connector_id, void **info /*out*/)
{
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API_NOINIT
- H5TRACE3("e", "*si**x", str, connector_id, info);
+ H5TRACE3("e", "*six", str, connector_id, info);
/* Call internal routine */
if (H5VL__connector_str_to_info(str, connector_id, info) < 0)
@@ -698,13 +712,13 @@ H5VL_get_wrap_ctx(const H5VL_class_t *connector, void *obj, void **wrap_ctx)
*---------------------------------------------------------------------------
*/
herr_t
-H5VLget_wrap_ctx(void *obj, hid_t connector_id, void **wrap_ctx)
+H5VLget_wrap_ctx(void *obj, hid_t connector_id, void **wrap_ctx /*out*/)
{
H5VL_class_t *cls; /* VOL connector's class struct */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API_NOINIT
- H5TRACE3("e", "*xi**x", obj, connector_id, wrap_ctx);
+ H5TRACE3("e", "*xix", obj, connector_id, wrap_ctx);
/* Check args and get class pointer */
if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL)))
@@ -994,14 +1008,15 @@ H5VL_attr_create(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_para
*/
void *
H5VLattr_create(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_id, const char *name,
- hid_t type_id, hid_t space_id, hid_t acpl_id, hid_t aapl_id, hid_t dxpl_id, void **req)
+ hid_t type_id, hid_t space_id, hid_t acpl_id, hid_t aapl_id, hid_t dxpl_id,
+ void **req /*out*/)
{
H5VL_class_t *cls; /* VOL connector's class struct */
void * ret_value = NULL; /* Return value */
FUNC_ENTER_API_NOINIT
- H5TRACE10("*x", "*x*#i*siiiii**x", obj, loc_params, connector_id, name, type_id, space_id, acpl_id,
- aapl_id, dxpl_id, req);
+ H5TRACE10("*x", "*x*#i*siiiiix", obj, loc_params, connector_id, name, type_id, space_id, acpl_id, aapl_id,
+ dxpl_id, req);
/* Check args and get class pointer */
if (NULL == obj)
@@ -1097,13 +1112,13 @@ H5VL_attr_open(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_params
*/
void *
H5VLattr_open(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_id, const char *name,
- hid_t aapl_id, hid_t dxpl_id, void **req)
+ hid_t aapl_id, hid_t dxpl_id, void **req /*out*/)
{
H5VL_class_t *cls; /* VOL connector's class struct */
void * ret_value = NULL; /* Return value */
FUNC_ENTER_API_NOINIT
- H5TRACE7("*x", "*x*#i*sii**x", obj, loc_params, connector_id, name, aapl_id, dxpl_id, req);
+ H5TRACE7("*x", "*x*#i*siix", obj, loc_params, connector_id, name, aapl_id, dxpl_id, req);
/* Check args and get class pointer */
if (NULL == obj)
@@ -1194,13 +1209,13 @@ H5VL_attr_read(const H5VL_object_t *vol_obj, hid_t mem_type_id, void *buf, hid_t
*-------------------------------------------------------------------------
*/
herr_t
-H5VLattr_read(void *obj, hid_t connector_id, hid_t mem_type_id, void *buf, hid_t dxpl_id, void **req)
+H5VLattr_read(void *obj, hid_t connector_id, hid_t mem_type_id, void *buf, hid_t dxpl_id, void **req /*out*/)
{
H5VL_class_t *cls; /* VOL connector's class struct */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API_NOINIT
- H5TRACE6("e", "*xii*xi**x", obj, connector_id, mem_type_id, buf, dxpl_id, req);
+ H5TRACE6("e", "*xii*xix", obj, connector_id, mem_type_id, buf, dxpl_id, req);
/* Check args and get class pointer */
if (NULL == obj)
@@ -1292,13 +1307,14 @@ H5VL_attr_write(const H5VL_object_t *vol_obj, hid_t mem_type_id, const void *buf
*-------------------------------------------------------------------------
*/
herr_t
-H5VLattr_write(void *obj, hid_t connector_id, hid_t mem_type_id, const void *buf, hid_t dxpl_id, void **req)
+H5VLattr_write(void *obj, hid_t connector_id, hid_t mem_type_id, const void *buf, hid_t dxpl_id,
+ void **req /*out*/)
{
H5VL_class_t *cls; /* VOL connector's class struct */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API_NOINIT
- H5TRACE6("e", "*xii*xi**x", obj, connector_id, mem_type_id, buf, dxpl_id, req);
+ H5TRACE6("e", "*xii*xix", obj, connector_id, mem_type_id, buf, dxpl_id, req);
/* Check args and get class pointer */
if (NULL == obj)
@@ -1398,14 +1414,14 @@ H5VL_attr_get(const H5VL_object_t *vol_obj, H5VL_attr_get_t get_type, hid_t dxpl
*-------------------------------------------------------------------------
*/
herr_t
-H5VLattr_get(void *obj, hid_t connector_id, H5VL_attr_get_t get_type, hid_t dxpl_id, void **req,
+H5VLattr_get(void *obj, hid_t connector_id, H5VL_attr_get_t get_type, hid_t dxpl_id, void **req /*out*/,
va_list arguments)
{
H5VL_class_t *cls; /* VOL connector's class struct */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API_NOINIT
- H5TRACE6("e", "*xiVai**xx", obj, connector_id, get_type, dxpl_id, req, arguments);
+ H5TRACE6("e", "*xiVaixx", obj, connector_id, get_type, dxpl_id, req, arguments);
/* Check args and get class pointer */
if (NULL == obj)
@@ -1508,13 +1524,13 @@ H5VL_attr_specific(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_pa
*/
herr_t
H5VLattr_specific(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_id,
- H5VL_attr_specific_t specific_type, hid_t dxpl_id, void **req, va_list arguments)
+ H5VL_attr_specific_t specific_type, hid_t dxpl_id, void **req /*out*/, va_list arguments)
{
H5VL_class_t *cls; /* VOL connector's class struct */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API_NOINIT
- H5TRACE7("e", "*x*#iVbi**xx", obj, loc_params, connector_id, specific_type, dxpl_id, req, arguments);
+ H5TRACE7("e", "*x*#iVbixx", obj, loc_params, connector_id, specific_type, dxpl_id, req, arguments);
/* Check args and get class pointer */
if (NULL == obj)
@@ -1616,14 +1632,14 @@ H5VL_attr_optional(const H5VL_object_t *vol_obj, H5VL_attr_optional_t opt_type,
*-------------------------------------------------------------------------
*/
herr_t
-H5VLattr_optional(void *obj, hid_t connector_id, H5VL_attr_optional_t opt_type, hid_t dxpl_id, void **req,
- va_list arguments)
+H5VLattr_optional(void *obj, hid_t connector_id, H5VL_attr_optional_t opt_type, hid_t dxpl_id,
+ void **req /*out*/, va_list arguments)
{
H5VL_class_t *cls; /* VOL connector's class struct */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API_NOINIT
- H5TRACE6("e", "*xiVsi**xx", obj, connector_id, opt_type, dxpl_id, req, arguments);
+ H5TRACE6("e", "*xiVsixx", obj, connector_id, opt_type, dxpl_id, req, arguments);
/* Check args and get class pointer */
if (NULL == obj)
@@ -1707,13 +1723,13 @@ H5VL_attr_close(const H5VL_object_t *vol_obj, hid_t dxpl_id, void **req)
*-------------------------------------------------------------------------
*/
herr_t
-H5VLattr_close(void *obj, hid_t connector_id, hid_t dxpl_id, void **req)
+H5VLattr_close(void *obj, hid_t connector_id, hid_t dxpl_id, void **req /*out*/)
{
H5VL_class_t *cls; /* VOL connector's class struct */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API_NOINIT
- H5TRACE4("e", "*xii**x", obj, connector_id, dxpl_id, req);
+ H5TRACE4("e", "*xiix", obj, connector_id, dxpl_id, req);
/* Check args and get class pointer */
if (NULL == obj)
@@ -1813,13 +1829,13 @@ H5VL_dataset_create(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_p
void *
H5VLdataset_create(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_id, const char *name,
hid_t lcpl_id, hid_t type_id, hid_t space_id, hid_t dcpl_id, hid_t dapl_id, hid_t dxpl_id,
- void **req)
+ void **req /*out*/)
{
H5VL_class_t *cls; /* VOL connector's class struct */
void * ret_value = NULL; /* Return value */
FUNC_ENTER_API_NOINIT
- H5TRACE11("*x", "*x*#i*siiiiii**x", obj, loc_params, connector_id, name, lcpl_id, type_id, space_id,
+ H5TRACE11("*x", "*x*#i*siiiiiix", obj, loc_params, connector_id, name, lcpl_id, type_id, space_id,
dcpl_id, dapl_id, dxpl_id, req);
/* Check args and get class pointer */
@@ -1916,13 +1932,13 @@ H5VL_dataset_open(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_par
*/
void *
H5VLdataset_open(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_id, const char *name,
- hid_t dapl_id, hid_t dxpl_id, void **req)
+ hid_t dapl_id, hid_t dxpl_id, void **req /*out*/)
{
H5VL_class_t *cls; /* VOL connector's class struct */
void * ret_value = NULL; /* Return value */
FUNC_ENTER_API_NOINIT
- H5TRACE7("*x", "*x*#i*sii**x", obj, loc_params, connector_id, name, dapl_id, dxpl_id, req);
+ H5TRACE7("*x", "*x*#i*siix", obj, loc_params, connector_id, name, dapl_id, dxpl_id, req);
/* Check args and get class pointer */
if (NULL == obj)
@@ -2017,13 +2033,13 @@ H5VL_dataset_read(const H5VL_object_t *vol_obj, hid_t mem_type_id, hid_t mem_spa
*/
herr_t
H5VLdataset_read(void *obj, hid_t connector_id, hid_t mem_type_id, hid_t mem_space_id, hid_t file_space_id,
- hid_t dxpl_id, void *buf, void **req)
+ hid_t dxpl_id, void *buf, void **req /*out*/)
{
H5VL_class_t *cls; /* VOL connector's class struct */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API_NOINIT
- H5TRACE8("e", "*xiiiii*x**x", obj, connector_id, mem_type_id, mem_space_id, file_space_id, dxpl_id, buf,
+ H5TRACE8("e", "*xiiiii*xx", obj, connector_id, mem_type_id, mem_space_id, file_space_id, dxpl_id, buf,
req);
/* Check args and get class pointer */
@@ -2119,13 +2135,13 @@ H5VL_dataset_write(const H5VL_object_t *vol_obj, hid_t mem_type_id, hid_t mem_sp
*/
herr_t
H5VLdataset_write(void *obj, hid_t connector_id, hid_t mem_type_id, hid_t mem_space_id, hid_t file_space_id,
- hid_t dxpl_id, const void *buf, void **req)
+ hid_t dxpl_id, const void *buf, void **req /*out*/)
{
H5VL_class_t *cls; /* VOL connector's class struct */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API_NOINIT
- H5TRACE8("e", "*xiiiii*x**x", obj, connector_id, mem_type_id, mem_space_id, file_space_id, dxpl_id, buf,
+ H5TRACE8("e", "*xiiiii*xx", obj, connector_id, mem_type_id, mem_space_id, file_space_id, dxpl_id, buf,
req);
/* Check args and get class pointer */
@@ -2226,14 +2242,14 @@ H5VL_dataset_get(const H5VL_object_t *vol_obj, H5VL_dataset_get_t get_type, hid_
*-------------------------------------------------------------------------
*/
herr_t
-H5VLdataset_get(void *obj, hid_t connector_id, H5VL_dataset_get_t get_type, hid_t dxpl_id, void **req,
+H5VLdataset_get(void *obj, hid_t connector_id, H5VL_dataset_get_t get_type, hid_t dxpl_id, void **req /*out*/,
va_list arguments)
{
H5VL_class_t *cls; /* VOL connector's class struct */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API_NOINIT
- H5TRACE6("e", "*xiVci**xx", obj, connector_id, get_type, dxpl_id, req, arguments);
+ H5TRACE6("e", "*xiVcixx", obj, connector_id, get_type, dxpl_id, req, arguments);
/* Check args and get class pointer */
if (NULL == obj)
@@ -2336,13 +2352,13 @@ H5VL_dataset_specific(const H5VL_object_t *vol_obj, H5VL_dataset_specific_t spec
*/
herr_t
H5VLdataset_specific(void *obj, hid_t connector_id, H5VL_dataset_specific_t specific_type, hid_t dxpl_id,
- void **req, va_list arguments)
+ void **req /*out*/, va_list arguments)
{
H5VL_class_t *cls; /* VOL connector's class struct */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API_NOINIT
- H5TRACE6("e", "*xiVdi**xx", obj, connector_id, specific_type, dxpl_id, req, arguments);
+ H5TRACE6("e", "*xiVdixx", obj, connector_id, specific_type, dxpl_id, req, arguments);
/* Check args and get class pointer */
if (NULL == obj)
@@ -2444,13 +2460,13 @@ H5VL_dataset_optional(const H5VL_object_t *vol_obj, H5VL_dataset_optional_t opt_
*/
herr_t
H5VLdataset_optional(void *obj, hid_t connector_id, H5VL_dataset_optional_t opt_type, hid_t dxpl_id,
- void **req, va_list arguments)
+ void **req /*out*/, va_list arguments)
{
H5VL_class_t *cls; /* VOL connector's class struct */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API_NOINIT
- H5TRACE6("e", "*xiVti**xx", obj, connector_id, opt_type, dxpl_id, req, arguments);
+ H5TRACE6("e", "*xiVtixx", obj, connector_id, opt_type, dxpl_id, req, arguments);
/* Check args and get class pointer */
if (NULL == obj)
@@ -2551,13 +2567,13 @@ H5VL_dataset_close(const H5VL_object_t *vol_obj, hid_t dxpl_id, void **req)
*-------------------------------------------------------------------------
*/
herr_t
-H5VLdataset_close(void *obj, hid_t connector_id, hid_t dxpl_id, void **req)
+H5VLdataset_close(void *obj, hid_t connector_id, hid_t dxpl_id, void **req /*out*/)
{
H5VL_class_t *cls; /* VOL connector's class struct */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API_NOINIT
- H5TRACE4("e", "*xii**x", obj, connector_id, dxpl_id, req);
+ H5TRACE4("e", "*xiix", obj, connector_id, dxpl_id, req);
/* Check args and get class pointer */
if (NULL == obj)
@@ -2654,14 +2670,15 @@ H5VL_datatype_commit(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_
*/
void *
H5VLdatatype_commit(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_id, const char *name,
- hid_t type_id, hid_t lcpl_id, hid_t tcpl_id, hid_t tapl_id, hid_t dxpl_id, void **req)
+ hid_t type_id, hid_t lcpl_id, hid_t tcpl_id, hid_t tapl_id, hid_t dxpl_id,
+ void **req /*out*/)
{
H5VL_class_t *cls; /* VOL connector's class struct */
void * ret_value = NULL; /* Return value */
FUNC_ENTER_API_NOINIT
- H5TRACE10("*x", "*x*#i*siiiii**x", obj, loc_params, connector_id, name, type_id, lcpl_id, tcpl_id,
- tapl_id, dxpl_id, req);
+ H5TRACE10("*x", "*x*#i*siiiiix", obj, loc_params, connector_id, name, type_id, lcpl_id, tcpl_id, tapl_id,
+ dxpl_id, req);
/* Check args and get class pointer */
if (NULL == obj)
@@ -2757,13 +2774,13 @@ H5VL_datatype_open(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_pa
*/
void *
H5VLdatatype_open(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_id, const char *name,
- hid_t tapl_id, hid_t dxpl_id, void **req)
+ hid_t tapl_id, hid_t dxpl_id, void **req /*out*/)
{
H5VL_class_t *cls; /* VOL connector's class struct */
void * ret_value = NULL; /* Return value */
FUNC_ENTER_API_NOINIT
- H5TRACE7("*x", "*x*#i*sii**x", obj, loc_params, connector_id, name, tapl_id, dxpl_id, req);
+ H5TRACE7("*x", "*x*#i*siix", obj, loc_params, connector_id, name, tapl_id, dxpl_id, req);
/* Check args and get class pointer */
if (NULL == obj)
@@ -2863,14 +2880,14 @@ H5VL_datatype_get(const H5VL_object_t *vol_obj, H5VL_datatype_get_t get_type, hi
*-------------------------------------------------------------------------
*/
herr_t
-H5VLdatatype_get(void *obj, hid_t connector_id, H5VL_datatype_get_t get_type, hid_t dxpl_id, void **req,
- va_list arguments)
+H5VLdatatype_get(void *obj, hid_t connector_id, H5VL_datatype_get_t get_type, hid_t dxpl_id,
+ void **req /*out*/, va_list arguments)
{
H5VL_class_t *cls; /* VOL connector's class struct */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API_NOINIT
- H5TRACE6("e", "*xiVei**xx", obj, connector_id, get_type, dxpl_id, req, arguments);
+ H5TRACE6("e", "*xiVeixx", obj, connector_id, get_type, dxpl_id, req, arguments);
/* Check args and get class pointer */
if (NULL == obj)
@@ -2977,13 +2994,13 @@ H5VL_datatype_specific(const H5VL_object_t *vol_obj, H5VL_datatype_specific_t sp
*/
herr_t
H5VLdatatype_specific(void *obj, hid_t connector_id, H5VL_datatype_specific_t specific_type, hid_t dxpl_id,
- void **req, va_list arguments)
+ void **req /*out*/, va_list arguments)
{
H5VL_class_t *cls; /* VOL connector's class struct */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API_NOINIT
- H5TRACE6("e", "*xiVfi**xx", obj, connector_id, specific_type, dxpl_id, req, arguments);
+ H5TRACE6("e", "*xiVfixx", obj, connector_id, specific_type, dxpl_id, req, arguments);
/* Check args and get class pointer */
if (NULL == obj)
@@ -3086,13 +3103,13 @@ H5VL_datatype_optional(const H5VL_object_t *vol_obj, H5VL_datatype_optional_t op
*/
herr_t
H5VLdatatype_optional(void *obj, hid_t connector_id, H5VL_datatype_optional_t opt_type, hid_t dxpl_id,
- void **req, va_list arguments)
+ void **req /*out*/, va_list arguments)
{
H5VL_class_t *cls; /* VOL connector's class struct */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API_NOINIT
- H5TRACE6("e", "*xiVui**xx", obj, connector_id, opt_type, dxpl_id, req, arguments);
+ H5TRACE6("e", "*xiVuixx", obj, connector_id, opt_type, dxpl_id, req, arguments);
/* Check args and get class pointer */
if (NULL == obj)
@@ -3183,13 +3200,13 @@ H5VL_datatype_close(const H5VL_object_t *vol_obj, hid_t dxpl_id, void **req)
*-------------------------------------------------------------------------
*/
herr_t
-H5VLdatatype_close(void *obj, hid_t connector_id, hid_t dxpl_id, void **req)
+H5VLdatatype_close(void *obj, hid_t connector_id, hid_t dxpl_id, void **req /*out*/)
{
H5VL_class_t *cls; /* VOL connector's class struct */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API_NOINIT
- H5TRACE4("e", "*xii**x", obj, connector_id, dxpl_id, req);
+ H5TRACE4("e", "*xiix", obj, connector_id, dxpl_id, req);
/* Check args and get class pointer */
if (NULL == obj)
@@ -3283,7 +3300,8 @@ H5VL_file_create(const H5VL_connector_prop_t *connector_prop, const char *name,
*-------------------------------------------------------------------------
*/
void *
-H5VLfile_create(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id, hid_t dxpl_id, void **req)
+H5VLfile_create(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id, hid_t dxpl_id,
+ void **req /*out*/)
{
H5P_genplist_t * plist; /* Property list pointer */
H5VL_connector_prop_t connector_prop; /* Property for VOL connector ID & info */
@@ -3291,7 +3309,7 @@ H5VLfile_create(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id,
void * ret_value = NULL; /* Return value */
FUNC_ENTER_API_NOINIT
- H5TRACE6("*x", "*sIuiii**x", name, flags, fcpl_id, fapl_id, dxpl_id, req);
+ H5TRACE6("*x", "*sIuiiix", name, flags, fcpl_id, fapl_id, dxpl_id, req);
/* Get the VOL info from the fapl */
if (NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_id)))
@@ -3341,6 +3359,98 @@ H5VL__file_open(const H5VL_class_t *cls, const char *name, unsigned flags, hid_t
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5VL__file_open() */
+/*-------------------------------------------------------------------------
+ * Function: H5VL__file_open_find_connector_cb
+ *
+ * Purpose: Iteration callback for H5PL_iterate that tries to find the
+ * correct VOL connector to open a file with when
+ * H5VL_file_open fails for its given VOL connector. Iterates
+ * through all of the available VOL connector plugins until
+ * H5Fis_accessible returns true for the given filename and
+ * VOL connector.
+ *
+ * Return: H5_ITER_CONT if current plugin can't open the given file
+ * H5_ITER_STOP if current plugin can open given file
+ * H5_ITER_ERROR if an error occurs while trying to determine
+ * if current plugin can open given file.
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5VL__file_open_find_connector_cb(H5PL_type_t plugin_type, const void *plugin_info, void *op_data)
+{
+ H5VL_file_open_find_connector_t *udata = (H5VL_file_open_find_connector_t *)op_data;
+ const H5VL_class_t * cls = (const H5VL_class_t *)plugin_info;
+ H5P_genplist_t * fapl_plist;
+ H5P_genplist_t * fapl_plist_copy;
+ herr_t status;
+ htri_t is_accessible = FALSE;
+ hid_t connector_id = H5I_INVALID_HID;
+ hid_t fapl_id = H5I_INVALID_HID;
+ herr_t ret_value = H5_ITER_CONT;
+
+ FUNC_ENTER_STATIC
+
+ HDassert(udata);
+ HDassert(udata->filename);
+ HDassert(udata->connector_prop);
+ HDassert(cls);
+ HDassert(plugin_type == H5PL_TYPE_VOL);
+
+ /* Silence compiler */
+ (void)plugin_type;
+
+ udata->cls = cls;
+
+ /* Attempt to register plugin as a VOL connector */
+ if ((connector_id = H5VL__register_connector_by_class(cls, TRUE, H5P_VOL_INITIALIZE_DEFAULT)) < 0)
+ HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5_ITER_ERROR, "unable to register VOL connector")
+
+ /* Setup FAPL with registered VOL connector */
+ if (NULL == (fapl_plist = (H5P_genplist_t *)H5I_object_verify(udata->fapl_id, H5I_GENPROP_LST)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5_ITER_ERROR, "not a property list")
+ if ((fapl_id = H5P_copy_plist(fapl_plist, TRUE)) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, H5_ITER_ERROR, "can't copy fapl");
+ if (NULL == (fapl_plist_copy = (H5P_genplist_t *)H5I_object_verify(fapl_id, H5I_GENPROP_LST)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5_ITER_ERROR, "not a property list")
+ if (H5P_set_vol(fapl_plist_copy, connector_id, NULL) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, H5_ITER_ERROR, "can't set VOL connector on fapl")
+
+ /* Check if file is accessible with given VOL connector */
+ H5E_BEGIN_TRY
+ {
+ status = H5VL_file_specific(NULL, H5VL_FILE_IS_ACCESSIBLE, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL,
+ fapl_id, udata->filename, &is_accessible);
+ }
+ H5E_END_TRY;
+
+ /* If the file was accessible with the current VOL connector, return
+ * the FAPL with that VOL connector set on it. Errors are ignored here
+ * as some VOL connectors may not support H5Fis_accessible.
+ */
+ if (status == SUCCEED && is_accessible > 0) {
+ /* Modify 'connector_prop' to point to the VOL connector that
+ * was actually used to open the file, rather than the original
+ * VOL connector that was requested.
+ */
+ udata->connector_prop->connector_id = connector_id;
+ udata->connector_prop->connector_info = NULL;
+
+ udata->fapl_id = fapl_id;
+ ret_value = H5_ITER_STOP;
+ } /* end if */
+
+done:
+ if (ret_value != H5_ITER_STOP) {
+ if (fapl_id >= 0 && H5I_dec_app_ref(fapl_id) < 0)
+ HDONE_ERROR(H5E_PLIST, H5E_CANTCLOSEOBJ, H5_ITER_ERROR, "can't close fapl")
+ if (connector_id >= 0 && H5I_dec_app_ref(connector_id) < 0)
+ HDONE_ERROR(H5E_ID, H5E_CANTCLOSEOBJ, H5_ITER_ERROR, "can't close VOL connector ID")
+ } /* end if */
+
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5VL__file_open_find_connector_cb() */
+
/*-------------------------------------------------------------------------
* Function: H5VL_file_open
*
@@ -3355,7 +3465,7 @@ H5VL__file_open(const H5VL_class_t *cls, const char *name, unsigned flags, hid_t
*-------------------------------------------------------------------------
*/
void *
-H5VL_file_open(const H5VL_connector_prop_t *connector_prop, const char *name, unsigned flags, hid_t fapl_id,
+H5VL_file_open(H5VL_connector_prop_t *connector_prop, const char *name, unsigned flags, hid_t fapl_id,
hid_t dxpl_id, void **req)
{
H5VL_class_t *cls; /* VOL Class structure for callback info */
@@ -3368,8 +3478,54 @@ H5VL_file_open(const H5VL_connector_prop_t *connector_prop, const char *name, un
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a VOL connector ID")
/* Call the corresponding internal VOL routine */
- if (NULL == (ret_value = H5VL__file_open(cls, name, flags, fapl_id, dxpl_id, req)))
- HGOTO_ERROR(H5E_VOL, H5E_CANTOPENOBJ, NULL, "open failed")
+ if (NULL == (ret_value = H5VL__file_open(cls, name, flags, fapl_id, dxpl_id, req))) {
+ H5VL_file_open_find_connector_t find_connector_ud;
+ hbool_t find_connector;
+ hbool_t connector_available = FALSE;
+
+ /* Opening the file failed - Determine whether we should search
+ * the plugin path to see if any other VOL connectors are available
+ * to attempt to open the file with. This only occurs if no particular
+ * VOL connector was specified (either via a FAPL or the
+ * HDF5_VOL_CONNECTOR environment variable).
+ */
+ find_connector = !getenv("HDF5_VOL_CONNECTOR") && ((H5P_FILE_ACCESS_DEFAULT == fapl_id) ||
+ connector_prop->connector_id == H5_DEFAULT_VOL);
+
+ if (find_connector) {
+ herr_t iter_ret;
+
+ find_connector_ud.connector_prop = connector_prop;
+ find_connector_ud.filename = name;
+ find_connector_ud.cls = NULL;
+ find_connector_ud.fapl_id = fapl_id;
+
+ iter_ret = H5PL_iterate(H5PL_ITER_TYPE_VOL, H5VL__file_open_find_connector_cb,
+ (void *)&find_connector_ud);
+ if (iter_ret < 0)
+ HGOTO_ERROR(H5E_VOL, H5E_BADITER, NULL,
+ "failed to iterate over available VOL connector plugins")
+ else if (iter_ret)
+ connector_available = TRUE;
+ } /* end if */
+
+ /* If one of the available VOL connector plugins is
+ * able to open the file, clear the error stack from any
+ * previous file open failures and then open the file.
+ * Otherwise, if no VOL connectors are available, throw
+ * error from original file open failure.
+ */
+ if (connector_available) {
+ H5E_clear_stack(NULL);
+
+ if (NULL == (ret_value = H5VL__file_open(find_connector_ud.cls, name, flags,
+ find_connector_ud.fapl_id, dxpl_id, req)))
+ HGOTO_ERROR(H5E_VOL, H5E_CANTOPENOBJ, NULL, "can't open file '%s' with VOL connector '%s'",
+ name, find_connector_ud.cls->name)
+ }
+ else
+ HGOTO_ERROR(H5E_VOL, H5E_CANTOPENOBJ, NULL, "open failed")
+ } /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -3386,7 +3542,7 @@ H5VL_file_open(const H5VL_connector_prop_t *connector_prop, const char *name, un
*-------------------------------------------------------------------------
*/
void *
-H5VLfile_open(const char *name, unsigned flags, hid_t fapl_id, hid_t dxpl_id, void **req)
+H5VLfile_open(const char *name, unsigned flags, hid_t fapl_id, hid_t dxpl_id, void **req /*out*/)
{
H5P_genplist_t * plist; /* Property list pointer */
H5VL_connector_prop_t connector_prop; /* Property for VOL connector ID & info */
@@ -3394,7 +3550,7 @@ H5VLfile_open(const char *name, unsigned flags, hid_t fapl_id, hid_t dxpl_id, vo
void * ret_value = NULL; /* Return value */
FUNC_ENTER_API_NOINIT
- H5TRACE5("*x", "*sIuii**x", name, flags, fapl_id, dxpl_id, req);
+ H5TRACE5("*x", "*sIuiix", name, flags, fapl_id, dxpl_id, req);
/* Get the VOL info from the fapl */
if (NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_id)))
@@ -3498,14 +3654,14 @@ H5VL_file_get(const H5VL_object_t *vol_obj, H5VL_file_get_t get_type, hid_t dxpl
*-------------------------------------------------------------------------
*/
herr_t
-H5VLfile_get(void *obj, hid_t connector_id, H5VL_file_get_t get_type, hid_t dxpl_id, void **req,
+H5VLfile_get(void *obj, hid_t connector_id, H5VL_file_get_t get_type, hid_t dxpl_id, void **req /*out*/,
va_list arguments)
{
H5VL_class_t *cls; /* VOL connector's class struct */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API_NOINIT
- H5TRACE6("e", "*xiVgi**xx", obj, connector_id, get_type, dxpl_id, req, arguments);
+ H5TRACE6("e", "*xiVgixx", obj, connector_id, get_type, dxpl_id, req, arguments);
/* Check args and get class pointer */
if (NULL == obj)
@@ -3643,13 +3799,13 @@ H5VL_file_specific(const H5VL_object_t *vol_obj, H5VL_file_specific_t specific_t
*/
herr_t
H5VLfile_specific(void *obj, hid_t connector_id, H5VL_file_specific_t specific_type, hid_t dxpl_id,
- void **req, va_list arguments)
+ void **req /*out*/, va_list arguments)
{
H5VL_class_t *cls; /* VOL connector's class struct */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API_NOINIT
- H5TRACE6("e", "*xiVhi**xx", obj, connector_id, specific_type, dxpl_id, req, arguments);
+ H5TRACE6("e", "*xiVhixx", obj, connector_id, specific_type, dxpl_id, req, arguments);
/* Check args and get class pointer */
if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL)))
@@ -3748,14 +3904,14 @@ H5VL_file_optional(const H5VL_object_t *vol_obj, H5VL_file_optional_t opt_type,
*-------------------------------------------------------------------------
*/
herr_t
-H5VLfile_optional(void *obj, hid_t connector_id, H5VL_file_optional_t opt_type, hid_t dxpl_id, void **req,
- va_list arguments)
+H5VLfile_optional(void *obj, hid_t connector_id, H5VL_file_optional_t opt_type, hid_t dxpl_id,
+ void **req /*out*/, va_list arguments)
{
H5VL_class_t *cls; /* VOL connector's class struct */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API_NOINIT
- H5TRACE6("e", "*xiVvi**xx", obj, connector_id, opt_type, dxpl_id, req, arguments);
+ H5TRACE6("e", "*xiVvixx", obj, connector_id, opt_type, dxpl_id, req, arguments);
/* Check args and get class pointer */
if (NULL == obj)
@@ -3850,13 +4006,13 @@ H5VL_file_close(const H5VL_object_t *vol_obj, hid_t dxpl_id, void **req)
*-------------------------------------------------------------------------
*/
herr_t
-H5VLfile_close(void *obj, hid_t connector_id, hid_t dxpl_id, void **req)
+H5VLfile_close(void *obj, hid_t connector_id, hid_t dxpl_id, void **req /*out*/)
{
H5VL_class_t *cls; /* VOL connector's class struct */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API_NOINIT
- H5TRACE4("e", "*xii**x", obj, connector_id, dxpl_id, req);
+ H5TRACE4("e", "*xiix", obj, connector_id, dxpl_id, req);
/* Check args and get class pointer */
if (NULL == obj)
@@ -3952,13 +4108,13 @@ H5VL_group_create(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_par
*/
void *
H5VLgroup_create(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_id, const char *name,
- hid_t lcpl_id, hid_t gcpl_id, hid_t gapl_id, hid_t dxpl_id, void **req)
+ hid_t lcpl_id, hid_t gcpl_id, hid_t gapl_id, hid_t dxpl_id, void **req /*out*/)
{
H5VL_class_t *cls; /* VOL connector's class struct */
void * ret_value = NULL; /* Return value */
FUNC_ENTER_API_NOINIT
- H5TRACE9("*x", "*x*#i*siiii**x", obj, loc_params, connector_id, name, lcpl_id, gcpl_id, gapl_id, dxpl_id,
+ H5TRACE9("*x", "*x*#i*siiiix", obj, loc_params, connector_id, name, lcpl_id, gcpl_id, gapl_id, dxpl_id,
req);
/* Check args and get class pointer */
@@ -4055,13 +4211,13 @@ H5VL_group_open(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_param
*/
void *
H5VLgroup_open(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_id, const char *name,
- hid_t gapl_id, hid_t dxpl_id, void **req)
+ hid_t gapl_id, hid_t dxpl_id, void **req /*out*/)
{
H5VL_class_t *cls; /* VOL connector's class struct */
void * ret_value = NULL; /* Return value */
FUNC_ENTER_API_NOINIT
- H5TRACE7("*x", "*x*#i*sii**x", obj, loc_params, connector_id, name, gapl_id, dxpl_id, req);
+ H5TRACE7("*x", "*x*#i*siix", obj, loc_params, connector_id, name, gapl_id, dxpl_id, req);
/* Check args and get class pointer */
if (NULL == obj)
@@ -4161,14 +4317,14 @@ H5VL_group_get(const H5VL_object_t *vol_obj, H5VL_group_get_t get_type, hid_t dx
*-------------------------------------------------------------------------
*/
herr_t
-H5VLgroup_get(void *obj, hid_t connector_id, H5VL_group_get_t get_type, hid_t dxpl_id, void **req,
+H5VLgroup_get(void *obj, hid_t connector_id, H5VL_group_get_t get_type, hid_t dxpl_id, void **req /*out*/,
va_list arguments)
{
H5VL_class_t *cls; /* VOL connector's class struct */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API_NOINIT
- H5TRACE6("e", "*xiVii**xx", obj, connector_id, get_type, dxpl_id, req, arguments);
+ H5TRACE6("e", "*xiViixx", obj, connector_id, get_type, dxpl_id, req, arguments);
/* Check args and get class pointer */
if (NULL == obj)
@@ -4271,13 +4427,13 @@ H5VL_group_specific(const H5VL_object_t *vol_obj, H5VL_group_specific_t specific
*/
herr_t
H5VLgroup_specific(void *obj, hid_t connector_id, H5VL_group_specific_t specific_type, hid_t dxpl_id,
- void **req, va_list arguments)
+ void **req /*out*/, va_list arguments)
{
H5VL_class_t *cls; /* VOL connector's class struct */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API_NOINIT
- H5TRACE6("e", "*xiVji**xx", obj, connector_id, specific_type, dxpl_id, req, arguments);
+ H5TRACE6("e", "*xiVjixx", obj, connector_id, specific_type, dxpl_id, req, arguments);
/* Check args and get class pointer */
if (NULL == obj)
@@ -4379,14 +4535,14 @@ H5VL_group_optional(const H5VL_object_t *vol_obj, H5VL_group_optional_t opt_type
*-------------------------------------------------------------------------
*/
herr_t
-H5VLgroup_optional(void *obj, hid_t connector_id, H5VL_group_optional_t opt_type, hid_t dxpl_id, void **req,
- va_list arguments)
+H5VLgroup_optional(void *obj, hid_t connector_id, H5VL_group_optional_t opt_type, hid_t dxpl_id,
+ void **req /*out*/, va_list arguments)
{
H5VL_class_t *cls; /* VOL connector's class struct */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API_NOINIT
- H5TRACE6("e", "*xiVwi**xx", obj, connector_id, opt_type, dxpl_id, req, arguments);
+ H5TRACE6("e", "*xiVwixx", obj, connector_id, opt_type, dxpl_id, req, arguments);
/* Check args and get class pointer */
if (NULL == obj)
@@ -4481,13 +4637,13 @@ H5VL_group_close(const H5VL_object_t *vol_obj, hid_t dxpl_id, void **req)
*-------------------------------------------------------------------------
*/
herr_t
-H5VLgroup_close(void *obj, hid_t connector_id, hid_t dxpl_id, void **req)
+H5VLgroup_close(void *obj, hid_t connector_id, hid_t dxpl_id, void **req /*out*/)
{
H5VL_class_t *cls; /* VOL connector's class struct */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API_NOINIT
- H5TRACE4("e", "*xii**x", obj, connector_id, dxpl_id, req);
+ H5TRACE4("e", "*xiix", obj, connector_id, dxpl_id, req);
/* Check args and get class pointer */
if (NULL == obj)
@@ -4613,15 +4769,15 @@ H5VL_link_create(H5VL_link_create_type_t create_type, const H5VL_object_t *vol_o
*/
herr_t
H5VLlink_create(H5VL_link_create_type_t create_type, void *obj, const H5VL_loc_params_t *loc_params,
- hid_t connector_id, hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id, void **req,
+ hid_t connector_id, hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id, void **req /*out*/,
va_list arguments)
{
H5VL_class_t *cls; /* VOL connector's class struct */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API_NOINIT
- H5TRACE9("e", "Vk*x*#iiii**xx", create_type, obj, loc_params, connector_id, lcpl_id, lapl_id, dxpl_id,
- req, arguments);
+ H5TRACE9("e", "Vk*x*#iiiixx", create_type, obj, loc_params, connector_id, lcpl_id, lapl_id, dxpl_id, req,
+ arguments);
/* Get class pointer */
if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL)))
@@ -4721,14 +4877,14 @@ H5VL_link_copy(const H5VL_object_t *src_vol_obj, const H5VL_loc_params_t *loc_pa
herr_t
H5VLlink_copy(void *src_obj, const H5VL_loc_params_t *loc_params1, void *dst_obj,
const H5VL_loc_params_t *loc_params2, hid_t connector_id, hid_t lcpl_id, hid_t lapl_id,
- hid_t dxpl_id, void **req)
+ hid_t dxpl_id, void **req /*out*/)
{
H5VL_class_t *cls; /* VOL connector's class struct */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API_NOINIT
- H5TRACE9("e", "*x*#*x*#iiii**x", src_obj, loc_params1, dst_obj, loc_params2, connector_id, lcpl_id,
- lapl_id, dxpl_id, req);
+ H5TRACE9("e", "*x*#*x*#iiiix", src_obj, loc_params1, dst_obj, loc_params2, connector_id, lcpl_id, lapl_id,
+ dxpl_id, req);
/* Get class pointer */
if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL)))
@@ -4828,14 +4984,14 @@ H5VL_link_move(const H5VL_object_t *src_vol_obj, const H5VL_loc_params_t *loc_pa
herr_t
H5VLlink_move(void *src_obj, const H5VL_loc_params_t *loc_params1, void *dst_obj,
const H5VL_loc_params_t *loc_params2, hid_t connector_id, hid_t lcpl_id, hid_t lapl_id,
- hid_t dxpl_id, void **req)
+ hid_t dxpl_id, void **req /*out*/)
{
H5VL_class_t *cls; /* VOL connector's class struct */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API_NOINIT
- H5TRACE9("e", "*x*#*x*#iiii**x", src_obj, loc_params1, dst_obj, loc_params2, connector_id, lcpl_id,
- lapl_id, dxpl_id, req);
+ H5TRACE9("e", "*x*#*x*#iiiix", src_obj, loc_params1, dst_obj, loc_params2, connector_id, lcpl_id, lapl_id,
+ dxpl_id, req);
/* Get class pointer */
if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL)))
@@ -4936,13 +5092,13 @@ H5VL_link_get(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_params,
*/
herr_t
H5VLlink_get(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_id, H5VL_link_get_t get_type,
- hid_t dxpl_id, void **req, va_list arguments)
+ hid_t dxpl_id, void **req /*out*/, va_list arguments)
{
H5VL_class_t *cls; /* VOL connector's class struct */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API_NOINIT
- H5TRACE7("e", "*x*#iVli**xx", obj, loc_params, connector_id, get_type, dxpl_id, req, arguments);
+ H5TRACE7("e", "*x*#iVlixx", obj, loc_params, connector_id, get_type, dxpl_id, req, arguments);
/* Check args and get class pointer */
if (NULL == obj)
@@ -5045,13 +5201,13 @@ H5VL_link_specific(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_pa
*/
herr_t
H5VLlink_specific(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_id,
- H5VL_link_specific_t specific_type, hid_t dxpl_id, void **req, va_list arguments)
+ H5VL_link_specific_t specific_type, hid_t dxpl_id, void **req /*out*/, va_list arguments)
{
H5VL_class_t *cls; /* VOL connector's class struct */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API_NOINIT
- H5TRACE7("e", "*x*#iVmi**xx", obj, loc_params, connector_id, specific_type, dxpl_id, req, arguments);
+ H5TRACE7("e", "*x*#iVmixx", obj, loc_params, connector_id, specific_type, dxpl_id, req, arguments);
/* Check args and get class pointer */
if (NULL == obj)
@@ -5152,14 +5308,14 @@ H5VL_link_optional(const H5VL_object_t *vol_obj, H5VL_link_optional_t opt_type,
*-------------------------------------------------------------------------
*/
herr_t
-H5VLlink_optional(void *obj, hid_t connector_id, H5VL_link_optional_t opt_type, hid_t dxpl_id, void **req,
- va_list arguments)
+H5VLlink_optional(void *obj, hid_t connector_id, H5VL_link_optional_t opt_type, hid_t dxpl_id,
+ void **req /*out*/, va_list arguments)
{
H5VL_class_t *cls; /* VOL connector's class struct */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API_NOINIT
- H5TRACE6("e", "*xiVxi**xx", obj, connector_id, opt_type, dxpl_id, req, arguments);
+ H5TRACE6("e", "*xiVxixx", obj, connector_id, opt_type, dxpl_id, req, arguments);
/* Check args and get class pointer */
if (NULL == obj)
@@ -5254,13 +5410,13 @@ H5VL_object_open(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *params,
*/
void *
H5VLobject_open(void *obj, const H5VL_loc_params_t *params, hid_t connector_id, H5I_type_t *opened_type,
- hid_t dxpl_id, void **req)
+ hid_t dxpl_id, void **req /*out*/)
{
H5VL_class_t *cls; /* VOL connector's class struct */
void * ret_value = NULL; /* Return value */
FUNC_ENTER_API_NOINIT
- H5TRACE6("*x", "*x*#i*Iti**x", obj, params, connector_id, opened_type, dxpl_id, req);
+ H5TRACE6("*x", "*x*#i*Itix", obj, params, connector_id, opened_type, dxpl_id, req);
/* Check args and get class pointer */
if (NULL == obj)
@@ -5364,14 +5520,14 @@ H5VL_object_copy(const H5VL_object_t *src_obj, const H5VL_loc_params_t *src_loc_
herr_t
H5VLobject_copy(void *src_obj, const H5VL_loc_params_t *src_loc_params, const char *src_name, void *dst_obj,
const H5VL_loc_params_t *dst_loc_params, const char *dst_name, hid_t connector_id,
- hid_t ocpypl_id, hid_t lcpl_id, hid_t dxpl_id, void **req)
+ hid_t ocpypl_id, hid_t lcpl_id, hid_t dxpl_id, void **req /*out*/)
{
H5VL_class_t *cls; /* VOL connector's class struct */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API_NOINIT
- H5TRACE11("e", "*x*#*s*x*#*siiii**x", src_obj, src_loc_params, src_name, dst_obj, dst_loc_params,
- dst_name, connector_id, ocpypl_id, lcpl_id, dxpl_id, req);
+ H5TRACE11("e", "*x*#*s*x*#*siiiix", src_obj, src_loc_params, src_name, dst_obj, dst_loc_params, dst_name,
+ connector_id, ocpypl_id, lcpl_id, dxpl_id, req);
/* Check args and get class pointers */
if (NULL == src_obj || NULL == dst_obj)
@@ -5475,13 +5631,13 @@ H5VL_object_get(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_param
*/
herr_t
H5VLobject_get(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_id, H5VL_object_get_t get_type,
- hid_t dxpl_id, void **req, va_list arguments)
+ hid_t dxpl_id, void **req /*out*/, va_list arguments)
{
H5VL_class_t *cls; /* VOL connector's class struct */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API_NOINIT
- H5TRACE7("e", "*x*#iVni**xx", obj, loc_params, connector_id, get_type, dxpl_id, req, arguments);
+ H5TRACE7("e", "*x*#iVnixx", obj, loc_params, connector_id, get_type, dxpl_id, req, arguments);
/* Check args and get class pointer */
if (NULL == obj)
@@ -5584,13 +5740,14 @@ H5VL_object_specific(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_
*/
herr_t
H5VLobject_specific(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_id,
- H5VL_object_specific_t specific_type, hid_t dxpl_id, void **req, va_list arguments)
+ H5VL_object_specific_t specific_type, hid_t dxpl_id, void **req /*out*/,
+ va_list arguments)
{
H5VL_class_t *cls; /* VOL connector's class struct */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API_NOINIT
- H5TRACE7("e", "*x*#iVoi**xx", obj, loc_params, connector_id, specific_type, dxpl_id, req, arguments);
+ H5TRACE7("e", "*x*#iVoixx", obj, loc_params, connector_id, specific_type, dxpl_id, req, arguments);
/* Check args and get class pointer */
if (NULL == obj)
@@ -5695,14 +5852,14 @@ H5VL_object_optional(const H5VL_object_t *vol_obj, H5VL_object_optional_t opt_ty
*-------------------------------------------------------------------------
*/
herr_t
-H5VLobject_optional(void *obj, hid_t connector_id, H5VL_object_optional_t opt_type, hid_t dxpl_id, void **req,
- va_list arguments)
+H5VLobject_optional(void *obj, hid_t connector_id, H5VL_object_optional_t opt_type, hid_t dxpl_id,
+ void **req /*out*/, va_list arguments)
{
H5VL_class_t *cls; /* VOL connector's class struct */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API_NOINIT
- H5TRACE6("e", "*xiVyi**xx", obj, connector_id, opt_type, dxpl_id, req, arguments);
+ H5TRACE6("e", "*xiVyixx", obj, connector_id, opt_type, dxpl_id, req, arguments);
/* Check args and get class pointer */
if (NULL == obj)
@@ -5805,13 +5962,13 @@ H5VL_introspect_get_conn_cls(const H5VL_object_t *vol_obj, H5VL_get_conn_lvl_t l
*/
herr_t
H5VLintrospect_get_conn_cls(void *obj, hid_t connector_id, H5VL_get_conn_lvl_t lvl,
- const H5VL_class_t **conn_cls)
+ const H5VL_class_t **conn_cls /*out*/)
{
H5VL_class_t *cls; /* VOL connector's class struct */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API_NOINIT
- H5TRACE4("e", "*xiVL**#", obj, connector_id, lvl, conn_cls);
+ H5TRACE4("e", "*xiVLx", obj, connector_id, lvl, conn_cls);
/* Check args */
if (NULL == obj)
@@ -5844,7 +6001,7 @@ H5VLintrospect_get_conn_cls(void *obj, hid_t connector_id, H5VL_get_conn_lvl_t l
*/
static herr_t
H5VL__introspect_opt_query(void *obj, const H5VL_class_t *cls, H5VL_subclass_t subcls, int opt_type,
- hbool_t *supported)
+ uint64_t *flags)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -5855,7 +6012,7 @@ H5VL__introspect_opt_query(void *obj, const H5VL_class_t *cls, H5VL_subclass_t s
HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'opt_query' method")
/* Call the corresponding VOL callback */
- if ((cls->introspect_cls.opt_query)(obj, subcls, opt_type, supported) < 0)
+ if ((cls->introspect_cls.opt_query)(obj, subcls, opt_type, flags) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't query optional operation support")
done:
@@ -5874,8 +6031,7 @@ H5VL__introspect_opt_query(void *obj, const H5VL_class_t *cls, H5VL_subclass_t s
*-------------------------------------------------------------------------
*/
herr_t
-H5VL_introspect_opt_query(const H5VL_object_t *vol_obj, H5VL_subclass_t subcls, int opt_type,
- hbool_t *supported)
+H5VL_introspect_opt_query(const H5VL_object_t *vol_obj, H5VL_subclass_t subcls, int opt_type, uint64_t *flags)
{
hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
herr_t ret_value = SUCCEED; /* Return value */
@@ -5888,7 +6044,7 @@ H5VL_introspect_opt_query(const H5VL_object_t *vol_obj, H5VL_subclass_t subcls,
vol_wrapper_set = TRUE;
/* Call the corresponding internal VOL routine */
- if (H5VL__introspect_opt_query(vol_obj->data, vol_obj->connector->cls, subcls, opt_type, supported) < 0)
+ if (H5VL__introspect_opt_query(vol_obj->data, vol_obj->connector->cls, subcls, opt_type, flags) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't query optional operation support")
done:
@@ -5912,20 +6068,20 @@ H5VL_introspect_opt_query(const H5VL_object_t *vol_obj, H5VL_subclass_t subcls,
*/
herr_t
H5VLintrospect_opt_query(void *obj, hid_t connector_id, H5VL_subclass_t subcls, int opt_type,
- hbool_t *supported)
+ uint64_t *flags /*out*/)
{
H5VL_class_t *cls; /* VOL connector's class struct */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API_NOINIT
- H5TRACE5("e", "*xiVSIs*b", obj, connector_id, subcls, opt_type, supported);
+ H5TRACE5("e", "*xiVSIsx", obj, connector_id, subcls, opt_type, flags);
/* Get class pointer */
if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID")
/* Call the corresponding internal VOL routine */
- if (H5VL__introspect_opt_query(obj, cls, subcls, opt_type, supported) < 0)
+ if (H5VL__introspect_opt_query(obj, cls, subcls, opt_type, flags) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't query optional operation support")
done:
@@ -5937,16 +6093,13 @@ H5VLintrospect_opt_query(void *obj, hid_t connector_id, H5VL_subclass_t subcls,
*
* Purpose: Waits on an asychronous request through the VOL
*
- * Note: Releases the request if the operation has completed and the
- * connector callback succeeds
- *
* Return: Success: Non-negative
* Failure: Negative
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5VL__request_wait(void *req, const H5VL_class_t *cls, uint64_t timeout, H5ES_status_t *status)
+H5VL__request_wait(void *req, const H5VL_class_t *cls, uint64_t timeout, H5VL_request_status_t *status)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -5974,16 +6127,13 @@ H5VL__request_wait(void *req, const H5VL_class_t *cls, uint64_t timeout, H5ES_st
*
* Purpose: Waits on an asychronous request through the VOL
*
- * Note: Releases the request if the operation has completed and the
- * connector callback succeeds
- *
* Return: Success: Non-negative
* Failure: Negative
*
*-------------------------------------------------------------------------
*/
herr_t
-H5VL_request_wait(const H5VL_object_t *vol_obj, uint64_t timeout, H5ES_status_t *status)
+H5VL_request_wait(const H5VL_object_t *vol_obj, uint64_t timeout, H5VL_request_status_t *status)
{
hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
herr_t ret_value = SUCCEED; /* Return value */
@@ -6015,22 +6165,19 @@ H5VL_request_wait(const H5VL_object_t *vol_obj, uint64_t timeout, H5ES_status_t
*
* Purpose: Waits on a request
*
- * Note: Releases the request if the operation has completed and the
- * connector callback succeeds
- *
* Return: Success: Non-negative
* Failure: Negative
*
*-------------------------------------------------------------------------
*/
herr_t
-H5VLrequest_wait(void *req, hid_t connector_id, uint64_t timeout, H5ES_status_t *status)
+H5VLrequest_wait(void *req, hid_t connector_id, uint64_t timeout, H5VL_request_status_t *status /*out*/)
{
H5VL_class_t *cls; /* VOL connector's class struct */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API_NOINIT
- H5TRACE4("e", "*xiUL*Es", req, connector_id, timeout, status);
+ H5TRACE4("e", "*xiULx", req, connector_id, timeout, status);
/* Get class pointer */
if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL)))
@@ -6050,8 +6197,6 @@ H5VLrequest_wait(void *req, hid_t connector_id, uint64_t timeout, H5ES_status_t
* Purpose: Registers a user callback to be invoked when an asynchronous
* operation completes
*
- * Note: Releases the request, if connector callback succeeds
- *
* Return: Success: Non-negative
* Failure: Negative
*
@@ -6086,8 +6231,6 @@ H5VL__request_notify(void *req, const H5VL_class_t *cls, H5VL_request_notify_t c
* Purpose: Registers a user callback to be invoked when an asynchronous
* operation completes
*
- * Note: Releases the request, if connector callback succeeds
- *
* Return: Success: Non-negative
* Failure: Negative
*
@@ -6127,8 +6270,6 @@ H5VL_request_notify(const H5VL_object_t *vol_obj, H5VL_request_notify_t cb, void
* Purpose: Registers a user callback to be invoked when an asynchronous
* operation completes
*
- * Note: Releases the request, if connector callback succeeds
- *
* Return: Success: Non-negative
* Failure: Negative
*
@@ -6160,15 +6301,13 @@ H5VLrequest_notify(void *req, hid_t connector_id, H5VL_request_notify_t cb, void
*
* Purpose: Cancels an asynchronous request through the VOL
*
- * Note: Releases the request, if connector callback succeeds
- *
* Return: Success: Non-negative
* Failure: Negative
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5VL__request_cancel(void *req, const H5VL_class_t *cls)
+H5VL__request_cancel(void *req, const H5VL_class_t *cls, H5VL_request_status_t *status)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -6183,7 +6322,7 @@ H5VL__request_cancel(void *req, const H5VL_class_t *cls)
HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'async cancel' method")
/* Call the corresponding VOL callback */
- if ((cls->request_cls.cancel)(req) < 0)
+ if ((cls->request_cls.cancel)(req, status) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTRELEASE, FAIL, "request cancel failed")
done:
@@ -6195,15 +6334,13 @@ H5VL__request_cancel(void *req, const H5VL_class_t *cls)
*
* Purpose: Cancels an asynchronous request through the VOL
*
- * Note: Releases the request, if connector callback succeeds
- *
* Return: Success: Non-negative
* Failure: Negative
*
*-------------------------------------------------------------------------
*/
herr_t
-H5VL_request_cancel(const H5VL_object_t *vol_obj)
+H5VL_request_cancel(const H5VL_object_t *vol_obj, H5VL_request_status_t *status)
{
hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
herr_t ret_value = SUCCEED; /* Return value */
@@ -6219,7 +6356,7 @@ H5VL_request_cancel(const H5VL_object_t *vol_obj)
vol_wrapper_set = TRUE;
/* Call the corresponding internal VOL routine */
- if (H5VL__request_cancel(vol_obj->data, vol_obj->connector->cls) < 0)
+ if (H5VL__request_cancel(vol_obj->data, vol_obj->connector->cls, status) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTRELEASE, FAIL, "request cancel failed")
done:
@@ -6235,28 +6372,26 @@ H5VL_request_cancel(const H5VL_object_t *vol_obj)
*
* Purpose: Cancels a request
*
- * Note: Releases the request, if connector callback succeeds
- *
* Return: Success: Non-negative
* Failure: Negative
*
*-------------------------------------------------------------------------
*/
herr_t
-H5VLrequest_cancel(void *req, hid_t connector_id)
+H5VLrequest_cancel(void *req, hid_t connector_id, H5VL_request_status_t *status)
{
H5VL_class_t *cls; /* VOL connector's class struct */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API_NOINIT
- H5TRACE2("e", "*xi", req, connector_id);
+ H5TRACE3("e", "*xi*#", req, connector_id, status);
/* Get class pointer */
if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID")
/* Call the corresponding internal VOL routine */
- if (H5VL__request_cancel(req, cls) < 0)
+ if (H5VL__request_cancel(req, cls, status) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTRELEASE, FAIL, "unable to cancel request")
done:
@@ -6783,13 +6918,13 @@ H5VL_blob_get(const H5VL_object_t *vol_obj, const void *blob_id, void *buf, size
*-------------------------------------------------------------------------
*/
herr_t
-H5VLblob_get(void *obj, hid_t connector_id, const void *blob_id, void *buf, size_t size, void *ctx)
+H5VLblob_get(void *obj, hid_t connector_id, const void *blob_id, void *buf /*out*/, size_t size, void *ctx)
{
H5VL_class_t *cls; /* VOL connector's class struct */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API_NOINIT
- H5TRACE6("e", "*xi*x*xz*x", obj, connector_id, blob_id, buf, size, ctx);
+ H5TRACE6("e", "*xi*xxz*x", obj, connector_id, blob_id, buf, size, ctx);
/* Get class pointer */
if (NULL == obj)
@@ -7495,13 +7630,13 @@ H5VL_optional(const H5VL_object_t *vol_obj, int op_type, hid_t dxpl_id, void **r
*-------------------------------------------------------------------------
*/
herr_t
-H5VLoptional(void *obj, hid_t connector_id, int op_type, hid_t dxpl_id, void **req, va_list arguments)
+H5VLoptional(void *obj, hid_t connector_id, int op_type, hid_t dxpl_id, void **req /*out*/, va_list arguments)
{
H5VL_class_t *cls; /* VOL connector's class struct */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API_NOINIT
- H5TRACE6("e", "*xiIsi**xx", obj, connector_id, op_type, dxpl_id, req, arguments);
+ H5TRACE6("e", "*xiIsixx", obj, connector_id, op_type, dxpl_id, req, arguments);
/* Check args and get class pointer */
if (NULL == obj)
diff --git a/src/H5VLconnector.h b/src/H5VLconnector.h
index acebe2762ab..63613bc7fc0 100644
--- a/src/H5VLconnector.h
+++ b/src/H5VLconnector.h
@@ -82,7 +82,8 @@ typedef enum H5VL_dataset_specific_t {
H5VL_DATASET_SET_EXTENT, /* H5Dset_extent */
H5VL_DATASET_FLUSH, /* H5Dflush */
H5VL_DATASET_REFRESH, /* H5Drefresh */
- H5VL_DATASET_WAIT /* H5Dwait */
+ H5VL_DATASET_WAIT, /* H5Dwait */
+ H5VL_DATASET_CHUNK_ITER /* H5Dchunk_iter */
} H5VL_dataset_specific_t;
/* Typedef for VOL connector dataset optional VOL operations */
@@ -410,7 +411,7 @@ typedef struct H5VL_object_class_t {
} H5VL_object_class_t;
/* Asynchronous request 'notify' callback */
-typedef herr_t (*H5VL_request_notify_t)(void *ctx, H5ES_status_t status);
+typedef herr_t (*H5VL_request_notify_t)(void *ctx, H5VL_request_status_t status);
/* "Levels" for 'get connector class' introspection callback */
typedef enum H5VL_get_conn_lvl_t {
@@ -426,14 +427,14 @@ struct H5VL_class_t;
/* Container/connector introspection routines */
typedef struct H5VL_introspect_class_t {
herr_t (*get_conn_cls)(void *obj, H5VL_get_conn_lvl_t lvl, const struct H5VL_class_t **conn_cls);
- herr_t (*opt_query)(void *obj, H5VL_subclass_t cls, int opt_type, hbool_t *supported);
+ herr_t (*opt_query)(void *obj, H5VL_subclass_t cls, int opt_type, uint64_t *flags);
} H5VL_introspect_class_t;
/* Async request operation routines */
typedef struct H5VL_request_class_t {
- herr_t (*wait)(void *req, uint64_t timeout, H5ES_status_t *status);
+ herr_t (*wait)(void *req, uint64_t timeout, H5VL_request_status_t *status);
herr_t (*notify)(void *req, H5VL_request_notify_t cb, void *ctx);
- herr_t (*cancel)(void *req);
+ herr_t (*cancel)(void *req, H5VL_request_status_t *status);
herr_t (*specific)(void *req, H5VL_request_specific_t specific_type, va_list arguments);
herr_t (*optional)(void *req, H5VL_request_optional_t opt_type, va_list arguments);
herr_t (*free)(void *req);
diff --git a/src/H5VLconnector_passthru.h b/src/H5VLconnector_passthru.h
index 1b6715b0ba7..720740f64fe 100644
--- a/src/H5VLconnector_passthru.h
+++ b/src/H5VLconnector_passthru.h
@@ -195,12 +195,13 @@ H5_DLL herr_t H5VLobject_optional(void *obj, hid_t connector_id, H5VL_object_opt
H5_DLL herr_t H5VLintrospect_get_conn_cls(void *obj, hid_t connector_id, H5VL_get_conn_lvl_t lvl,
const H5VL_class_t **conn_cls);
H5_DLL herr_t H5VLintrospect_opt_query(void *obj, hid_t connector_id, H5VL_subclass_t subcls, int opt_type,
- hbool_t *supported);
+ uint64_t *flags);
/* Public wrappers for asynchronous request callbacks */
-H5_DLL herr_t H5VLrequest_wait(void *req, hid_t connector_id, uint64_t timeout, H5ES_status_t *status);
+H5_DLL herr_t H5VLrequest_wait(void *req, hid_t connector_id, uint64_t timeout,
+ H5VL_request_status_t *status);
H5_DLL herr_t H5VLrequest_notify(void *req, hid_t connector_id, H5VL_request_notify_t cb, void *ctx);
-H5_DLL herr_t H5VLrequest_cancel(void *req, hid_t connector_id);
+H5_DLL herr_t H5VLrequest_cancel(void *req, hid_t connector_id, H5VL_request_status_t *status);
H5_DLL herr_t H5VLrequest_specific(void *req, hid_t connector_id, H5VL_request_specific_t specific_type,
va_list arguments);
H5_DLL herr_t H5VLrequest_optional(void *req, hid_t connector_id, H5VL_request_optional_t opt_type,
diff --git a/src/H5VLint.c b/src/H5VLint.c
index 7b3da7a72b1..500e075ed42 100644
--- a/src/H5VLint.c
+++ b/src/H5VLint.c
@@ -86,14 +86,12 @@ typedef struct {
/********************/
/* Local Prototypes */
/********************/
-static herr_t H5VL__free_cls(H5VL_class_t *cls);
+static herr_t H5VL__free_cls(H5VL_class_t *cls, void **request);
static int H5VL__get_connector_cb(void *obj, hid_t id, void *_op_data);
static herr_t H5VL__set_def_conn(void);
static void * H5VL__wrap_obj(void *obj, H5I_type_t obj_type);
static H5VL_object_t *H5VL__new_vol_obj(H5I_type_t type, void *object, H5VL_t *vol_connector,
hbool_t wrap_obj);
-static int64_t H5VL__conn_inc_rc(H5VL_t *connector);
-static int64_t H5VL__conn_dec_rc(H5VL_t *connector);
static void * H5VL__object(hid_t id, H5I_type_t obj_type);
static herr_t H5VL__free_vol_wrapper(H5VL_wrap_ctx_t *vol_wrap_ctx);
@@ -289,7 +287,7 @@ H5VL_term_package(void)
*-------------------------------------------------------------------------
*/
static herr_t
-H5VL__free_cls(H5VL_class_t *cls)
+H5VL__free_cls(H5VL_class_t *cls, void H5_ATTR_UNUSED **request)
{
herr_t ret_value = SUCCEED;
@@ -570,9 +568,10 @@ H5VL__new_vol_obj(H5I_type_t type, void *object, H5VL_t *vol_connector, hbool_t
} /* end if */
else
new_vol_obj->data = object;
+ new_vol_obj->rc = 1;
/* Bump the reference count on the VOL connector */
- H5VL__conn_inc_rc(vol_connector);
+ H5VL_conn_inc_rc(vol_connector);
conn_rc_incr = TRUE;
/* If this is a datatype, we have to hide the VOL object under the H5T_t pointer */
@@ -586,7 +585,7 @@ H5VL__new_vol_obj(H5I_type_t type, void *object, H5VL_t *vol_connector, hbool_t
done:
/* Cleanup on error */
if (NULL == ret_value) {
- if (conn_rc_incr && H5VL__conn_dec_rc(vol_connector) < 0)
+ if (conn_rc_incr && H5VL_conn_dec_rc(vol_connector) < 0)
HDONE_ERROR(H5E_VOL, H5E_CANTDEC, NULL, "unable to decrement ref count on VOL connector")
} /* end if */
@@ -815,6 +814,46 @@ H5VL_register_using_vol_id(H5I_type_t type, void *obj, hid_t connector_id, hbool
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5VL_register_using_vol_id() */
+/*-------------------------------------------------------------------------
+ * Function: H5VL_create_object
+ *
+ * Purpose: Similar to H5VL_register but does not create an ID.
+ * Creates a new VOL object for the provided generic object
+ * using the provided vol connector. Should only be used for
+ * internal objects returned from the connector such as
+ * requests.
+ *
+ * Return: Success: A valid VOL object
+ * Failure: NULL
+ *
+ *-------------------------------------------------------------------------
+ */
+H5VL_object_t *
+H5VL_create_object(void *object, H5VL_t *vol_connector)
+{
+ H5VL_object_t *ret_value = NULL; /* Return value */
+
+ FUNC_ENTER_NOAPI(NULL)
+
+ /* Check arguments */
+ HDassert(object);
+ HDassert(vol_connector);
+
+ /* Set up VOL object for the passed-in data */
+ /* (Does not wrap object, since it's from a VOL callback) */
+ if (NULL == (ret_value = H5FL_CALLOC(H5VL_object_t)))
+ HGOTO_ERROR(H5E_VOL, H5E_CANTALLOC, NULL, "can't allocate memory for VOL object")
+ ret_value->connector = vol_connector;
+ ret_value->data = object;
+ ret_value->rc = 1;
+
+ /* Bump the reference count on the VOL connector */
+ H5VL_conn_inc_rc(vol_connector);
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5VL_create_object() */
+
/*-------------------------------------------------------------------------
* Function: H5VL_create_object_using_vol_id
*
@@ -871,7 +910,7 @@ H5VL_create_object_using_vol_id(H5I_type_t type, void *obj, hid_t connector_id)
} /* end H5VL_create_object_using_vol_id() */
/*-------------------------------------------------------------------------
- * Function: H5VL__conn_inc_rc
+ * Function: H5VL_conn_inc_rc
*
* Purpose: Wrapper to increment the ref. count on a connector.
*
@@ -882,10 +921,12 @@ H5VL_create_object_using_vol_id(H5I_type_t type, void *obj, hid_t connector_id)
*
*-------------------------------------------------------------------------
*/
-static int64_t
-H5VL__conn_inc_rc(H5VL_t *connector)
+int64_t
+H5VL_conn_inc_rc(H5VL_t *connector)
{
- FUNC_ENTER_STATIC_NOERR
+ int64_t ret_value = -1;
+
+ FUNC_ENTER_NOAPI(-1)
/* Check arguments */
HDassert(connector);
@@ -893,11 +934,14 @@ H5VL__conn_inc_rc(H5VL_t *connector)
/* Increment refcount for connector */
connector->nrefs++;
- FUNC_LEAVE_NOAPI(connector->nrefs)
-} /* end H5VL__conn_inc_rc() */
+ ret_value = connector->nrefs;
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5VL_conn_inc_rc() */
/*-------------------------------------------------------------------------
- * Function: H5VL__conn_dec_rc
+ * Function: H5VL_conn_dec_rc
*
* Purpose: Wrapper to decrement the ref. count on a connector.
*
@@ -908,12 +952,12 @@ H5VL__conn_inc_rc(H5VL_t *connector)
*
*-------------------------------------------------------------------------
*/
-static int64_t
-H5VL__conn_dec_rc(H5VL_t *connector)
+int64_t
+H5VL_conn_dec_rc(H5VL_t *connector)
{
int64_t ret_value = -1; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_NOAPI(-1)
/* Check arguments */
HDassert(connector);
@@ -936,7 +980,28 @@ H5VL__conn_dec_rc(H5VL_t *connector)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5VL__conn_dec_rc() */
+} /* end H5VL_conn_dec_rc() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5VL_object_inc_rc
+ *
+ * Purpose: Wrapper to increment the ref count on a VOL object.
+ *
+ * Return: SUCCEED/FAIL
+ *
+ *-------------------------------------------------------------------------
+ */
+hsize_t
+H5VL_object_inc_rc(H5VL_object_t *vol_obj)
+{
+ FUNC_ENTER_NOAPI_NOERR_NOFS
+
+ /* Check arguments */
+ HDassert(vol_obj);
+
+ /* Increment refcount for object and return */
+ FUNC_LEAVE_NOAPI(++vol_obj->rc)
+} /* end H5VL_object_inc_rc() */
/*-------------------------------------------------------------------------
* Function: H5VL_free_object
@@ -958,11 +1023,13 @@ H5VL_free_object(H5VL_object_t *vol_obj)
/* Check arguments */
HDassert(vol_obj);
- /* Decrement refcount on connector */
- if (H5VL__conn_dec_rc(vol_obj->connector) < 0)
- HGOTO_ERROR(H5E_VOL, H5E_CANTDEC, FAIL, "unable to decrement ref count on VOL connector")
+ if (--vol_obj->rc == 0) {
+ /* Decrement refcount on connector */
+ if (H5VL_conn_dec_rc(vol_obj->connector) < 0)
+ HGOTO_ERROR(H5E_VOL, H5E_CANTDEC, FAIL, "unable to decrement ref count on VOL connector")
- vol_obj = H5FL_FREE(H5VL_object_t, vol_obj);
+ vol_obj = H5FL_FREE(H5VL_object_t, vol_obj);
+ } /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1075,7 +1142,7 @@ H5VL_file_is_same(const H5VL_object_t *vol_obj1, const H5VL_object_t *vol_obj2,
} /* end H5VL_file_is_same() */
/*-------------------------------------------------------------------------
- * Function: H5VL_register_connector
+ * Function: H5VL__register_connector
*
* Purpose: Registers a new VOL connector as a member of the virtual object
* layer class.
@@ -1091,13 +1158,13 @@ H5VL_file_is_same(const H5VL_object_t *vol_obj1, const H5VL_object_t *vol_obj2,
*-------------------------------------------------------------------------
*/
hid_t
-H5VL_register_connector(const void *_cls, hbool_t app_ref, hid_t vipl_id)
+H5VL__register_connector(const void *_cls, hbool_t app_ref, hid_t vipl_id)
{
const H5VL_class_t *cls = (const H5VL_class_t *)_cls;
H5VL_class_t * saved = NULL;
hid_t ret_value = H5I_INVALID_HID;
- FUNC_ENTER_NOAPI(H5I_INVALID_HID)
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(cls);
@@ -1128,10 +1195,10 @@ H5VL_register_connector(const void *_cls, hbool_t app_ref, hid_t vipl_id)
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5VL_register_connector() */
+} /* end H5VL__register_connector() */
/*-------------------------------------------------------------------------
- * Function: H5VL__register_connector
+ * Function: H5VL__register_connector_by_class
*
* Purpose: Registers a new VOL connector as a member of the virtual object
* layer class.
@@ -1148,13 +1215,34 @@ H5VL_register_connector(const void *_cls, hbool_t app_ref, hid_t vipl_id)
*-------------------------------------------------------------------------
*/
hid_t
-H5VL__register_connector(const H5VL_class_t *cls, hbool_t app_ref, hid_t vipl_id)
+H5VL__register_connector_by_class(const H5VL_class_t *cls, hbool_t app_ref, hid_t vipl_id)
{
H5VL_get_connector_ud_t op_data; /* Callback info for connector search */
hid_t ret_value = H5I_INVALID_HID; /* Return value */
FUNC_ENTER_PACKAGE
+ /* Check arguments */
+ if (!cls)
+ HGOTO_ERROR(H5E_ARGS, H5E_UNINITIALIZED, H5I_INVALID_HID,
+ "VOL connector class pointer cannot be NULL")
+ if (H5VL_VERSION != cls->version)
+ HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID, "VOL connector has incompatible version")
+ if (!cls->name)
+ HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID,
+ "VOL connector class name cannot be the NULL pointer")
+ if (0 == HDstrlen(cls->name))
+ HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID,
+ "VOL connector class name cannot be the empty string")
+ if (cls->info_cls.copy && !cls->info_cls.free)
+ HGOTO_ERROR(
+ H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID,
+ "VOL connector must provide free callback for VOL info objects when a copy callback is provided")
+ if (cls->wrap_cls.get_wrap_ctx && !cls->wrap_cls.free_wrap_ctx)
+ HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID,
+ "VOL connector must provide free callback for object wrapping contexts when a get "
+ "callback is provided")
+
/* Set up op data for iteration */
op_data.kind = H5VL_GET_CONNECTOR_BY_NAME;
op_data.u.name = cls->name;
@@ -1173,13 +1261,13 @@ H5VL__register_connector(const H5VL_class_t *cls, hbool_t app_ref, hid_t vipl_id
} /* end if */
else {
/* Create a new class ID */
- if ((ret_value = H5VL_register_connector(cls, app_ref, vipl_id)) < 0)
+ if ((ret_value = H5VL__register_connector(cls, app_ref, vipl_id)) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register VOL connector")
} /* end else */
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5VL__register_connector() */
+} /* end H5VL__register_connector_by_class() */
/*-------------------------------------------------------------------------
* Function: H5VL__register_connector_by_name
@@ -1233,7 +1321,7 @@ H5VL__register_connector_by_name(const char *name, hbool_t app_ref, hid_t vipl_i
HGOTO_ERROR(H5E_VOL, H5E_CANTINIT, H5I_INVALID_HID, "unable to load VOL connector")
/* Register the connector we loaded */
- if ((ret_value = H5VL_register_connector(cls, app_ref, vipl_id)) < 0)
+ if ((ret_value = H5VL__register_connector(cls, app_ref, vipl_id)) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register VOL connector ID")
} /* end else */
@@ -1293,7 +1381,7 @@ H5VL__register_connector_by_value(H5VL_class_value_t value, hbool_t app_ref, hid
HGOTO_ERROR(H5E_VOL, H5E_CANTINIT, H5I_INVALID_HID, "unable to load VOL connector")
/* Register the connector we loaded */
- if ((ret_value = H5VL_register_connector(cls, app_ref, vipl_id)) < 0)
+ if ((ret_value = H5VL__register_connector(cls, app_ref, vipl_id)) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register VOL connector ID")
} /* end else */
@@ -1650,7 +1738,7 @@ H5VL_vol_object(hid_t id)
obj_type = H5I_get_type(id);
if (H5I_FILE == obj_type || H5I_GROUP == obj_type || H5I_ATTR == obj_type || H5I_DATASET == obj_type ||
- H5I_DATATYPE == obj_type) {
+ H5I_DATATYPE == obj_type || H5I_MAP == obj_type) {
/* Get the object */
if (NULL == (obj = H5I_object(id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "invalid identifier")
@@ -1776,6 +1864,7 @@ H5VL__object(hid_t id, H5I_type_t obj_type)
case H5I_ERROR_MSG:
case H5I_ERROR_STACK:
case H5I_SPACE_SEL_ITER:
+ case H5I_EVENTSET:
case H5I_NTYPES:
default:
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "unknown data object type")
@@ -2095,7 +2184,7 @@ H5VL__free_vol_wrapper(H5VL_wrap_ctx_t *vol_wrap_ctx)
"unable to release connector's object wrapping context")
/* Decrement refcount on connector */
- if (H5VL__conn_dec_rc(vol_wrap_ctx->connector) < 0)
+ if (H5VL_conn_dec_rc(vol_wrap_ctx->connector) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTDEC, FAIL, "unable to decrement ref count on VOL connector")
/* Release object wrapping context */
@@ -2152,7 +2241,7 @@ H5VL_set_vol_wrapper(const H5VL_object_t *vol_obj)
HGOTO_ERROR(H5E_VOL, H5E_CANTALLOC, FAIL, "can't allocate VOL wrap context")
/* Increment the outstanding objects that are using the connector */
- H5VL__conn_inc_rc(vol_obj->connector);
+ H5VL_conn_inc_rc(vol_obj->connector);
/* Set up VOL object wrapper context */
vol_wrap_ctx->rc = 1;
@@ -2342,6 +2431,58 @@ H5VL_wrap_register(H5I_type_t type, void *obj, hbool_t app_ref)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5VL_wrap_register() */
+/*-------------------------------------------------------------------------
+ * Function: H5VL_check_plugin_load
+ *
+ * Purpose: Check if a VOL connector matches the search criteria, and
+ * can be loaded.
+ *
+ * Note: Matching the connector's name / value, but the connector
+ * having an incompatible version is not an error, but means
+ * that the connector isn't a "match". Setting the SUCCEED
+ * value to FALSE and not failing for that case allows the
+ * plugin framework to keep looking for other DLLs that match
+ * and have a compatible version.
+ *
+ * Return: SUCCEED / FAIL
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5VL_check_plugin_load(const H5VL_class_t *cls, const H5PL_key_t *key, hbool_t *success)
+{
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_NOAPI(FAIL)
+
+ /* Sanity checks */
+ HDassert(cls);
+ HDassert(key);
+ HDassert(success);
+
+ /* Which kind of key are we looking for? */
+ if (key->vol.kind == H5VL_GET_CONNECTOR_BY_NAME) {
+ /* Check if plugin name matches VOL connector class name */
+ if (cls->name && !HDstrcmp(cls->name, key->vol.u.name))
+ *success = TRUE;
+ } /* end if */
+ else {
+ /* Sanity check */
+ HDassert(key->vol.kind == H5VL_GET_CONNECTOR_BY_VALUE);
+
+ /* Check if plugin value matches VOL connector class value */
+ if (cls->value == key->vol.u.value)
+ *success = TRUE;
+ } /* end else */
+
+ /* Connector is a match, but might not be a compatible version */
+ if (*success && cls->version != H5VL_VERSION)
+ *success = FALSE;
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5VL_check_plugin_load() */
+
/*-------------------------------------------------------------------------
* Function: H5VL_setup_args
*
diff --git a/src/H5VLnative.c b/src/H5VLnative.c
index 4d914b052e0..b70d489e07d 100644
--- a/src/H5VLnative.c
+++ b/src/H5VLnative.c
@@ -187,7 +187,7 @@ H5VL_native_register(void)
/* Register the native VOL connector, if it isn't already */
if (H5I_INVALID_HID == H5VL_NATIVE_ID_g)
if ((H5VL_NATIVE_ID_g =
- H5VL_register_connector(&H5VL_native_cls_g, TRUE, H5P_VOL_INITIALIZE_DEFAULT)) < 0)
+ H5VL__register_connector(&H5VL_native_cls_g, TRUE, H5P_VOL_INITIALIZE_DEFAULT)) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTINSERT, H5I_INVALID_HID, "can't create ID for native VOL connector")
/* Set return value */
diff --git a/src/H5VLnative_attr.c b/src/H5VLnative_attr.c
index ab97c40bb18..7beb98fa312 100644
--- a/src/H5VLnative_attr.c
+++ b/src/H5VLnative_attr.c
@@ -430,17 +430,18 @@ H5VL__native_attr_specific(void *obj, const H5VL_loc_params_t *loc_params, H5VL_
}
case H5VL_ATTR_EXISTS: {
- const char *attr_name = HDva_arg(arguments, const char *);
- htri_t * ret = HDva_arg(arguments, htri_t *);
+ const char *attr_name = HDva_arg(arguments, const char *);
+ hbool_t * attr_exists = HDva_arg(arguments, hbool_t *);
if (loc_params->type == H5VL_OBJECT_BY_SELF) { /* H5Aexists */
/* Check if the attribute exists */
- if ((*ret = H5O__attr_exists(loc.oloc, attr_name)) < 0)
+ if (H5O__attr_exists(loc.oloc, attr_name, attr_exists) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "unable to determine if attribute exists")
} /* end if */
else if (loc_params->type == H5VL_OBJECT_BY_NAME) { /* H5Aexists_by_name */
/* Check if the attribute exists */
- if ((*ret = H5A__exists_by_name(loc, loc_params->loc_data.loc_by_name.name, attr_name)) < 0)
+ if (H5A__exists_by_name(loc, loc_params->loc_data.loc_by_name.name, attr_name, attr_exists) <
+ 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "unable to determine if attribute exists")
} /* end else-if */
else
diff --git a/src/H5VLnative_dataset.c b/src/H5VLnative_dataset.c
index d78388eddb3..21491e706ff 100644
--- a/src/H5VLnative_dataset.c
+++ b/src/H5VLnative_dataset.c
@@ -353,6 +353,24 @@ H5VL__native_dataset_specific(void *obj, H5VL_dataset_specific_t specific_type,
break;
}
+ case H5VL_DATASET_CHUNK_ITER: { /* H5Dchunk_iter */
+ H5D_chunk_iter_op_t cb = HDva_arg(arguments, H5D_chunk_iter_op_t);
+ void * op_data = HDva_arg(arguments, void *);
+
+ HDassert(dset->shared);
+
+ /* Make sure the dataset is chunked */
+ if (H5D_CHUNKED != dset->shared->layout.type) {
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a chunked dataset")
+ }
+
+ /* Call private function */
+ if (H5D__chunk_iter(dset, cb, op_data) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't iterate over chunks")
+
+ break;
+ }
+
default:
HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "invalid specific operation")
} /* end switch */
diff --git a/src/H5VLnative_introspect.c b/src/H5VLnative_introspect.c
index 9d1244b41b9..6af33ba29ef 100644
--- a/src/H5VLnative_introspect.c
+++ b/src/H5VLnative_introspect.c
@@ -35,16 +35,192 @@
*---------------------------------------------------------------------------
*/
herr_t
-H5VL__native_introspect_opt_query(void H5_ATTR_UNUSED *obj, H5VL_subclass_t H5_ATTR_UNUSED cls,
- int H5_ATTR_UNUSED opt_type, hbool_t *supported)
+H5VL__native_introspect_opt_query(void H5_ATTR_UNUSED *obj, H5VL_subclass_t subcls, int opt_type,
+ uint64_t *flags)
{
- FUNC_ENTER_PACKAGE_NOERR
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(supported);
+ HDassert(flags);
/* The native VOL connector supports all optional operations */
- *supported = TRUE;
+ *flags = H5VL_OPT_QUERY_SUPPORTED;
+
+ /* Set appropriate flags for each operation in each subclass */
+ switch (subcls) {
+ case H5VL_SUBCLS_NONE:
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unknown optional 'none' operation")
+
+ case H5VL_SUBCLS_INFO:
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unknown optional info operation")
+
+ case H5VL_SUBCLS_WRAP:
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unknown optional wrapper operation")
+
+ case H5VL_SUBCLS_ATTR:
+ switch (opt_type) {
+#ifndef H5_NO_DEPRECATED_SYMBOLS
+ case H5VL_NATIVE_ATTR_ITERATE_OLD:
+ /* Don't allow asynchronous execution, due to iterator callbacks */
+ *flags |= H5VL_OPT_QUERY_NO_ASYNC;
+ break;
+#endif /* H5_NO_DEPRECATED_SYMBOLS */
+
+ default:
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unknown optional attribute operation")
+ break;
+ } /* end switch */
+ break;
+
+ case H5VL_SUBCLS_DATASET:
+ switch (opt_type) {
+ case H5VL_NATIVE_DATASET_FORMAT_CONVERT:
+ *flags |= H5VL_OPT_QUERY_MODIFY_METADATA;
+ break;
+
+ case H5VL_NATIVE_DATASET_GET_CHUNK_INDEX_TYPE:
+ case H5VL_NATIVE_DATASET_GET_CHUNK_STORAGE_SIZE:
+ case H5VL_NATIVE_DATASET_GET_NUM_CHUNKS:
+ case H5VL_NATIVE_DATASET_GET_CHUNK_INFO_BY_IDX:
+ case H5VL_NATIVE_DATASET_GET_CHUNK_INFO_BY_COORD:
+ case H5VL_NATIVE_DATASET_GET_VLEN_BUF_SIZE:
+ case H5VL_NATIVE_DATASET_GET_OFFSET:
+ *flags |= H5VL_OPT_QUERY_QUERY_METADATA;
+ break;
+
+ case H5VL_NATIVE_DATASET_CHUNK_READ:
+ *flags |= H5VL_OPT_QUERY_READ_DATA;
+ break;
+
+ case H5VL_NATIVE_DATASET_CHUNK_WRITE:
+ *flags |= H5VL_OPT_QUERY_WRITE_DATA;
+ break;
+
+ default:
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unknown optional dataset operation")
+ break;
+ } /* end switch */
+ break;
+
+ case H5VL_SUBCLS_DATATYPE:
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unknown optional datatype operation")
+
+ case H5VL_SUBCLS_FILE:
+ switch (opt_type) {
+ case H5VL_NATIVE_FILE_CLEAR_ELINK_CACHE:
+ case H5VL_NATIVE_FILE_RESET_MDC_HIT_RATE:
+ case H5VL_NATIVE_FILE_SET_MDC_CONFIG:
+ *flags |= H5VL_OPT_QUERY_MODIFY_METADATA;
+ break;
+
+ case H5VL_NATIVE_FILE_GET_FILE_IMAGE:
+ *flags |= H5VL_OPT_QUERY_QUERY_METADATA;
+ *flags |= H5VL_OPT_QUERY_READ_DATA;
+ break;
+
+ case H5VL_NATIVE_FILE_GET_FREE_SECTIONS:
+ case H5VL_NATIVE_FILE_GET_FREE_SPACE:
+ case H5VL_NATIVE_FILE_GET_INFO:
+ case H5VL_NATIVE_FILE_GET_MDC_CONF:
+ case H5VL_NATIVE_FILE_GET_MDC_HR:
+ case H5VL_NATIVE_FILE_GET_MDC_SIZE:
+ case H5VL_NATIVE_FILE_GET_SIZE:
+ case H5VL_NATIVE_FILE_GET_VFD_HANDLE:
+ case H5VL_NATIVE_FILE_GET_METADATA_READ_RETRY_INFO:
+ *flags |= H5VL_OPT_QUERY_QUERY_METADATA;
+ break;
+
+ case H5VL_NATIVE_FILE_START_SWMR_WRITE:
+ *flags |= H5VL_OPT_QUERY_MODIFY_METADATA;
+ *flags |= H5VL_OPT_QUERY_WRITE_DATA;
+ *flags |= H5VL_OPT_QUERY_NO_ASYNC;
+ break;
+
+ case H5VL_NATIVE_FILE_START_MDC_LOGGING:
+ case H5VL_NATIVE_FILE_STOP_MDC_LOGGING:
+ case H5VL_NATIVE_FILE_GET_MDC_LOGGING_STATUS:
+ case H5VL_NATIVE_FILE_FORMAT_CONVERT:
+ case H5VL_NATIVE_FILE_RESET_PAGE_BUFFERING_STATS:
+ case H5VL_NATIVE_FILE_GET_PAGE_BUFFERING_STATS:
+ case H5VL_NATIVE_FILE_GET_MDC_IMAGE_INFO:
+ case H5VL_NATIVE_FILE_GET_EOA:
+ case H5VL_NATIVE_FILE_INCR_FILESIZE:
+ case H5VL_NATIVE_FILE_SET_LIBVER_BOUNDS:
+ case H5VL_NATIVE_FILE_GET_MIN_DSET_OHDR_FLAG:
+ case H5VL_NATIVE_FILE_SET_MIN_DSET_OHDR_FLAG:
+ case H5VL_NATIVE_FILE_GET_MPI_ATOMICITY:
+ case H5VL_NATIVE_FILE_SET_MPI_ATOMICITY:
+ case H5VL_NATIVE_FILE_POST_OPEN:
+ break;
+
+ default:
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unknown optional file operation")
+ break;
+ } /* end switch */
+ break;
+
+ case H5VL_SUBCLS_GROUP:
+ switch (opt_type) {
+#ifndef H5_NO_DEPRECATED_SYMBOLS
+ case H5VL_NATIVE_GROUP_ITERATE_OLD:
+ /* Don't allow asynchronous execution, due to iterator callbacks */
+ *flags |= H5VL_OPT_QUERY_NO_ASYNC;
+ break;
+
+ case H5VL_NATIVE_GROUP_GET_OBJINFO:
+ *flags |= H5VL_OPT_QUERY_QUERY_METADATA;
+ break;
+#endif /* H5_NO_DEPRECATED_SYMBOLS */
+
+ default:
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unknown optional group operation")
+ break;
+ } /* end switch */
+ break;
+
+ case H5VL_SUBCLS_LINK:
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unknown optional link operation")
+
+ case H5VL_SUBCLS_OBJECT:
+ switch (opt_type) {
+ case H5VL_NATIVE_OBJECT_GET_COMMENT:
+ *flags |= H5VL_OPT_QUERY_QUERY_METADATA;
+ break;
+
+ case H5VL_NATIVE_OBJECT_SET_COMMENT:
+ *flags |= H5VL_OPT_QUERY_MODIFY_METADATA;
+ break;
+
+ case H5VL_NATIVE_OBJECT_DISABLE_MDC_FLUSHES:
+ case H5VL_NATIVE_OBJECT_ENABLE_MDC_FLUSHES:
+ case H5VL_NATIVE_OBJECT_ARE_MDC_FLUSHES_DISABLED:
+ break;
+
+ case H5VL_NATIVE_OBJECT_GET_NATIVE_INFO:
+ *flags |= H5VL_OPT_QUERY_QUERY_METADATA;
+ break;
+
+ default:
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unknown optional object operation")
+ break;
+ } /* end switch */
+ break;
+
+ case H5VL_SUBCLS_REQUEST:
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unknown optional request operation")
+
+ case H5VL_SUBCLS_BLOB:
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unknown optional blob operation")
+
+ case H5VL_SUBCLS_TOKEN:
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unknown optional token operation")
+
+ default:
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unknown H5VL subclass")
+ } /* end switch */
- FUNC_LEAVE_NOAPI(SUCCEED)
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5VL__native_introspect_opt_query() */
diff --git a/src/H5VLnative_link.c b/src/H5VLnative_link.c
index 4128ac0afc5..72f6cde1405 100644
--- a/src/H5VLnative_link.c
+++ b/src/H5VLnative_link.c
@@ -73,8 +73,9 @@ H5VL__native_link_create(H5VL_link_create_type_t create_type, void *obj, const H
"source and destination should be in the same file.")
/* Create the link */
- if ((ret_value = H5L_create_hard(cur_loc_p, cur_params->loc_data.loc_by_name.name, link_loc_p,
- loc_params->loc_data.loc_by_name.name, lcpl_id)) < 0)
+ if ((ret_value =
+ H5L__create_hard(cur_loc_p, cur_params->loc_data.loc_by_name.name, link_loc_p,
+ loc_params->loc_data.loc_by_name.name, lcpl_id)) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create link")
} /* end if */
else { /* H5Olink */
@@ -93,8 +94,8 @@ H5VL__native_link_create(H5VL_link_create_type_t create_type, void *obj, const H
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object")
/* Create the link */
- if ((ret_value = H5L_create_soft(target_name, &link_loc, loc_params->loc_data.loc_by_name.name,
- lcpl_id)) < 0)
+ if ((ret_value = H5L__create_soft(target_name, &link_loc, loc_params->loc_data.loc_by_name.name,
+ lcpl_id)) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create link")
break;
}
@@ -157,8 +158,8 @@ H5VL__native_link_copy(void *src_obj, const H5VL_loc_params_t *loc_params1, void
dst_loc_p = src_loc_p;
/* Copy the link */
- if (H5L_move(src_loc_p, loc_params1->loc_data.loc_by_name.name, dst_loc_p,
- loc_params2->loc_data.loc_by_name.name, TRUE, lcpl_id) < 0)
+ if (H5L__move(src_loc_p, loc_params1->loc_data.loc_by_name.name, dst_loc_p,
+ loc_params2->loc_data.loc_by_name.name, TRUE, lcpl_id) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTCOPY, FAIL, "unable to copy link")
done:
@@ -199,8 +200,8 @@ H5VL__native_link_move(void *src_obj, const H5VL_loc_params_t *loc_params1, void
dst_loc_p = src_loc_p;
/* Move the link */
- if (H5L_move(src_loc_p, loc_params1->loc_data.loc_by_name.name, dst_loc_p,
- loc_params2->loc_data.loc_by_name.name, FALSE, lcpl_id) < 0)
+ if (H5L__move(src_loc_p, loc_params1->loc_data.loc_by_name.name, dst_loc_p,
+ loc_params2->loc_data.loc_by_name.name, FALSE, lcpl_id) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTMOVE, FAIL, "unable to move link")
done:
@@ -239,7 +240,7 @@ H5VL__native_link_get(void *obj, const H5VL_loc_params_t *loc_params, H5VL_link_
HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "unable to get link info")
} /* end if */
else if (loc_params->type == H5VL_OBJECT_BY_IDX) { /* H5Lget_info_by_idx */
- if (H5L_get_info_by_idx(
+ if (H5L__get_info_by_idx(
&loc, loc_params->loc_data.loc_by_idx.name, loc_params->loc_data.loc_by_idx.idx_type,
loc_params->loc_data.loc_by_idx.order, loc_params->loc_data.loc_by_idx.n, linfo2) < 0)
HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "unable to get link info")
@@ -257,10 +258,10 @@ H5VL__native_link_get(void *obj, const H5VL_loc_params_t *loc_params, H5VL_link_
ssize_t *ret = HDva_arg(arguments, ssize_t *);
/* Get the link name */
- if ((*ret = H5L_get_name_by_idx(&loc, loc_params->loc_data.loc_by_idx.name,
- loc_params->loc_data.loc_by_idx.idx_type,
- loc_params->loc_data.loc_by_idx.order,
- loc_params->loc_data.loc_by_idx.n, name, size)) < 0)
+ if ((*ret = H5L__get_name_by_idx(&loc, loc_params->loc_data.loc_by_idx.name,
+ loc_params->loc_data.loc_by_idx.idx_type,
+ loc_params->loc_data.loc_by_idx.order,
+ loc_params->loc_data.loc_by_idx.n, name, size)) < 0)
HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "unable to get link info")
break;
@@ -273,15 +274,15 @@ H5VL__native_link_get(void *obj, const H5VL_loc_params_t *loc_params, H5VL_link_
/* Get the link information */
if (loc_params->type == H5VL_OBJECT_BY_NAME) { /* H5Lget_val */
- if (H5L_get_val(&loc, loc_params->loc_data.loc_by_name.name, buf, size) < 0)
+ if (H5L__get_val(&loc, loc_params->loc_data.loc_by_name.name, buf, size) < 0)
HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "unable to get link value")
}
else if (loc_params->type == H5VL_OBJECT_BY_IDX) { /* H5Lget_val_by_idx */
- if (H5L_get_val_by_idx(&loc, loc_params->loc_data.loc_by_idx.name,
- loc_params->loc_data.loc_by_idx.idx_type,
- loc_params->loc_data.loc_by_idx.order,
- loc_params->loc_data.loc_by_idx.n, buf, size) < 0)
+ if (H5L__get_val_by_idx(&loc, loc_params->loc_data.loc_by_idx.name,
+ loc_params->loc_data.loc_by_idx.idx_type,
+ loc_params->loc_data.loc_by_idx.order,
+ loc_params->loc_data.loc_by_idx.n, buf, size) < 0)
HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "unable to get link val")
}
else
@@ -317,14 +318,14 @@ H5VL__native_link_specific(void *obj, const H5VL_loc_params_t *loc_params, H5VL_
switch (specific_type) {
case H5VL_LINK_EXISTS: {
- htri_t * ret = HDva_arg(arguments, htri_t *);
+ hbool_t * exists = HDva_arg(arguments, hbool_t *);
H5G_loc_t loc;
if (H5G_loc_real(obj, loc_params->obj_type, &loc) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object")
/* Check for the existence of the link */
- if ((*ret = H5L_exists(&loc, loc_params->loc_data.loc_by_name.name)) < 0)
+ if (H5L__exists(&loc, loc_params->loc_data.loc_by_name.name, exists) < 0)
HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "unable to specific link info")
break;
}
@@ -383,11 +384,11 @@ H5VL__native_link_specific(void *obj, const H5VL_loc_params_t *loc_params, H5VL_
/* Unlink */
if (loc_params->type == H5VL_OBJECT_BY_NAME) { /* H5Ldelete */
- if (H5L_delete(&loc, loc_params->loc_data.loc_by_name.name) < 0)
+ if (H5L__delete(&loc, loc_params->loc_data.loc_by_name.name) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTDELETE, FAIL, "unable to delete link")
} /* end if */
else if (loc_params->type == H5VL_OBJECT_BY_IDX) { /* H5Ldelete_by_idx */
- if (H5L_delete_by_idx(
+ if (H5L__delete_by_idx(
&loc, loc_params->loc_data.loc_by_idx.name, loc_params->loc_data.loc_by_idx.idx_type,
loc_params->loc_data.loc_by_idx.order, loc_params->loc_data.loc_by_idx.n) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTDELETE, FAIL, "unable to delete link")
diff --git a/src/H5VLnative_object.c b/src/H5VLnative_object.c
index c9851206ee5..449f3896fb1 100644
--- a/src/H5VLnative_object.c
+++ b/src/H5VLnative_object.c
@@ -61,10 +61,10 @@ H5VL__native_object_open(void *obj, const H5VL_loc_params_t *loc_params, H5I_typ
case H5VL_OBJECT_BY_IDX: {
/* Open the object */
- if (NULL == (ret_value = H5O_open_by_idx(&loc, loc_params->loc_data.loc_by_idx.name,
- loc_params->loc_data.loc_by_idx.idx_type,
- loc_params->loc_data.loc_by_idx.order,
- loc_params->loc_data.loc_by_idx.n, opened_type)))
+ if (NULL == (ret_value = H5O__open_by_idx(&loc, loc_params->loc_data.loc_by_idx.name,
+ loc_params->loc_data.loc_by_idx.idx_type,
+ loc_params->loc_data.loc_by_idx.order,
+ loc_params->loc_data.loc_by_idx.n, opened_type)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, NULL, "unable to open object by index")
break;
}
@@ -79,7 +79,7 @@ H5VL__native_object_open(void *obj, const H5VL_loc_params_t *loc_params, H5I_typ
"can't deserialize object token into address")
/* Open the object */
- if (NULL == (ret_value = H5O_open_by_addr(&loc, addr, opened_type)))
+ if (NULL == (ret_value = H5O__open_by_addr(&loc, addr, opened_type)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, NULL, "unable to open object by address")
break;
}
@@ -121,7 +121,7 @@ H5VL__native_object_copy(void *src_obj, const H5VL_loc_params_t *loc_params1, co
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object")
/* Copy the object */
- if ((ret_value = H5O_copy(&src_loc, src_name, &dst_loc, dst_name, ocpypl_id, lcpl_id)) < 0)
+ if ((ret_value = H5O__copy(&src_loc, src_name, &dst_loc, dst_name, ocpypl_id, lcpl_id)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object")
done:
diff --git a/src/H5VLnative_private.h b/src/H5VLnative_private.h
index 126441d00e5..687221a4af9 100644
--- a/src/H5VLnative_private.h
+++ b/src/H5VLnative_private.h
@@ -151,7 +151,7 @@ H5_DLL herr_t H5VL__native_object_optional(void *obj, H5VL_object_optional_t opt
H5_DLL herr_t H5VL__native_introspect_get_conn_cls(void *obj, H5VL_get_conn_lvl_t lvl,
const H5VL_class_t **conn_cls);
H5_DLL herr_t H5VL__native_introspect_opt_query(void *obj, H5VL_subclass_t cls, int opt_type,
- hbool_t *supported);
+ uint64_t *flags);
/* Blob callbacks */
H5_DLL herr_t H5VL__native_blob_put(void *obj, const void *buf, size_t size, void *blob_id, void *ctx);
diff --git a/src/H5VLpassthru.c b/src/H5VLpassthru.c
index fa59f4abc46..5ccc0823da0 100644
--- a/src/H5VLpassthru.c
+++ b/src/H5VLpassthru.c
@@ -225,12 +225,12 @@ static herr_t H5VL_pass_through_object_optional(void *obj, H5VL_object_optional_
static herr_t H5VL_pass_through_introspect_get_conn_cls(void *obj, H5VL_get_conn_lvl_t lvl,
const H5VL_class_t **conn_cls);
static herr_t H5VL_pass_through_introspect_opt_query(void *obj, H5VL_subclass_t cls, int opt_type,
- hbool_t *supported);
+ uint64_t *flags);
/* Async request callbacks */
-static herr_t H5VL_pass_through_request_wait(void *req, uint64_t timeout, H5ES_status_t *status);
+static herr_t H5VL_pass_through_request_wait(void *req, uint64_t timeout, H5VL_request_status_t *status);
static herr_t H5VL_pass_through_request_notify(void *obj, H5VL_request_notify_t cb, void *ctx);
-static herr_t H5VL_pass_through_request_cancel(void *req);
+static herr_t H5VL_pass_through_request_cancel(void *req, H5VL_request_status_t *status);
static herr_t H5VL_pass_through_request_specific(void *req, H5VL_request_specific_t specific_type,
va_list arguments);
static herr_t H5VL_pass_through_request_optional(void *req, H5VL_request_optional_t opt_type,
@@ -488,7 +488,7 @@ H5VL_pass_through_init(hid_t vipl_id)
#endif
/* Shut compiler up about unused parameter */
- vipl_id = vipl_id;
+ (void)vipl_id;
return 0;
} /* end H5VL_pass_through_init() */
@@ -2636,7 +2636,7 @@ H5VL_pass_through_introspect_get_conn_cls(void *obj, H5VL_get_conn_lvl_t lvl, co
*-------------------------------------------------------------------------
*/
herr_t
-H5VL_pass_through_introspect_opt_query(void *obj, H5VL_subclass_t cls, int opt_type, hbool_t *supported)
+H5VL_pass_through_introspect_opt_query(void *obj, H5VL_subclass_t cls, int opt_type, uint64_t *flags)
{
H5VL_pass_through_t *o = (H5VL_pass_through_t *)obj;
herr_t ret_value;
@@ -2645,7 +2645,7 @@ H5VL_pass_through_introspect_opt_query(void *obj, H5VL_subclass_t cls, int opt_t
printf("------- PASS THROUGH VOL INTROSPECT OptQuery\n");
#endif
- ret_value = H5VLintrospect_opt_query(o->under_object, o->under_vol_id, cls, opt_type, supported);
+ ret_value = H5VLintrospect_opt_query(o->under_object, o->under_vol_id, cls, opt_type, flags);
return ret_value;
} /* end H5VL_pass_through_introspect_opt_query() */
@@ -2664,7 +2664,7 @@ H5VL_pass_through_introspect_opt_query(void *obj, H5VL_subclass_t cls, int opt_t
*-------------------------------------------------------------------------
*/
static herr_t
-H5VL_pass_through_request_wait(void *obj, uint64_t timeout, H5ES_status_t *status)
+H5VL_pass_through_request_wait(void *obj, uint64_t timeout, H5VL_request_status_t *status)
{
H5VL_pass_through_t *o = (H5VL_pass_through_t *)obj;
herr_t ret_value;
@@ -2725,7 +2725,7 @@ H5VL_pass_through_request_notify(void *obj, H5VL_request_notify_t cb, void *ctx)
*-------------------------------------------------------------------------
*/
static herr_t
-H5VL_pass_through_request_cancel(void *obj)
+H5VL_pass_through_request_cancel(void *obj, H5VL_request_status_t *status)
{
H5VL_pass_through_t *o = (H5VL_pass_through_t *)obj;
herr_t ret_value;
@@ -2734,7 +2734,7 @@ H5VL_pass_through_request_cancel(void *obj)
printf("------- PASS THROUGH VOL REQUEST Cancel\n");
#endif
- ret_value = H5VLrequest_cancel(o->under_object, o->under_vol_id);
+ ret_value = H5VLrequest_cancel(o->under_object, o->under_vol_id, status);
if (ret_value >= 0)
H5VL_pass_through_free_obj(o);
@@ -2822,13 +2822,13 @@ H5VL_pass_through_request_specific(void *obj, H5VL_request_specific_t specific_t
/* Release requests that have completed */
if (H5VL_REQUEST_WAITANY == specific_type) {
- size_t * idx; /* Pointer to the index of completed request */
- H5ES_status_t *status; /* Pointer to the request's status */
+ size_t * idx; /* Pointer to the index of completed request */
+ H5VL_request_status_t *status; /* Pointer to the request's status */
/* Retrieve the remaining arguments */
idx = va_arg(tmp_arguments, size_t *);
assert(*idx <= req_count);
- status = va_arg(tmp_arguments, H5ES_status_t *);
+ status = va_arg(tmp_arguments, H5VL_request_status_t *);
/* Reissue the WAITANY 'request specific' call */
ret_value = H5VL_pass_through_request_specific_reissue(o->under_object, o->under_vol_id,
@@ -2844,15 +2844,15 @@ H5VL_pass_through_request_specific(void *obj, H5VL_request_specific_t specific_t
} /* end if */
} /* end if */
else if (H5VL_REQUEST_WAITSOME == specific_type) {
- size_t * outcount; /* # of completed requests */
- unsigned * array_of_indices; /* Array of indices for completed requests */
- H5ES_status_t *array_of_statuses; /* Array of statuses for completed requests */
+ size_t * outcount; /* # of completed requests */
+ unsigned * array_of_indices; /* Array of indices for completed requests */
+ H5VL_request_status_t *array_of_statuses; /* Array of statuses for completed requests */
/* Retrieve the remaining arguments */
outcount = va_arg(tmp_arguments, size_t *);
assert(*outcount <= req_count);
array_of_indices = va_arg(tmp_arguments, unsigned *);
- array_of_statuses = va_arg(tmp_arguments, H5ES_status_t *);
+ array_of_statuses = va_arg(tmp_arguments, H5VL_request_status_t *);
/* Reissue the WAITSOME 'request specific' call */
ret_value = H5VL_pass_through_request_specific_reissue(
@@ -2872,14 +2872,14 @@ H5VL_pass_through_request_specific(void *obj, H5VL_request_specific_t specific_t
tmp_o = (H5VL_pass_through_t *)req_array[idx_array[u]];
H5VL_pass_through_free_obj(tmp_o);
- } /* end for */
- } /* end if */
- } /* end else-if */
- else { /* H5VL_REQUEST_WAITALL == specific_type */
- H5ES_status_t *array_of_statuses; /* Array of statuses for completed requests */
+ } /* end for */
+ } /* end if */
+ } /* end else-if */
+ else { /* H5VL_REQUEST_WAITALL == specific_type */
+ H5VL_request_status_t *array_of_statuses; /* Array of statuses for completed requests */
/* Retrieve the remaining arguments */
- array_of_statuses = va_arg(tmp_arguments, H5ES_status_t *);
+ array_of_statuses = va_arg(tmp_arguments, H5VL_request_status_t *);
/* Reissue the WAITALL 'request specific' call */
ret_value = H5VL_pass_through_request_specific_reissue(
@@ -2906,8 +2906,11 @@ H5VL_pass_through_request_specific(void *obj, H5VL_request_specific_t specific_t
/* Finish use of copied vararg list */
va_end(tmp_arguments);
} /* end if */
- else
- assert(0 && "Unknown 'specific' operation");
+ else {
+ H5VL_pass_through_t *o = (H5VL_pass_through_t *)obj;
+
+ ret_value = H5VLrequest_specific(o->under_object, o->under_vol_id, specific_type, arguments);
+ } /* end else */
return ret_value;
} /* end H5VL_pass_through_request_specific() */
diff --git a/src/H5VLpkg.h b/src/H5VLpkg.h
index fa1d37e81a2..7b8a8779d6f 100644
--- a/src/H5VLpkg.h
+++ b/src/H5VLpkg.h
@@ -43,7 +43,8 @@
/******************************/
/* Package Private Prototypes */
/******************************/
-H5_DLL hid_t H5VL__register_connector(const H5VL_class_t *cls, hbool_t app_ref, hid_t vipl_id);
+H5_DLL hid_t H5VL__register_connector(const void *cls, hbool_t app_ref, hid_t vipl_id);
+H5_DLL hid_t H5VL__register_connector_by_class(const H5VL_class_t *cls, hbool_t app_ref, hid_t vipl_id);
H5_DLL hid_t H5VL__register_connector_by_name(const char *name, hbool_t app_ref, hid_t vipl_id);
H5_DLL hid_t H5VL__register_connector_by_value(H5VL_class_value_t value, hbool_t app_ref, hid_t vipl_id);
H5_DLL htri_t H5VL__is_connector_registered_by_name(const char *name);
diff --git a/src/H5VLprivate.h b/src/H5VLprivate.h
index e116c8f7e1f..34fb13df2ea 100644
--- a/src/H5VLprivate.h
+++ b/src/H5VLprivate.h
@@ -37,6 +37,7 @@ typedef struct H5VL_t {
typedef struct H5VL_object_t {
void * data; /* Pointer to connector-managed data for this object */
H5VL_t *connector; /* Pointer to VOL connector struct */
+ size_t rc; /* Reference count */
} H5VL_object_t;
/* Internal structure to hold the connector ID & info for FAPLs */
@@ -60,14 +61,17 @@ typedef enum H5VL_get_connector_kind_t {
/******************************/
/* Utility functions */
-H5_DLL herr_t H5VL_init_phase1(void);
-H5_DLL herr_t H5VL_init_phase2(void);
-H5_DLL herr_t H5VL_cmp_connector_cls(int *cmp_value, const H5VL_class_t *cls1, const H5VL_class_t *cls2);
-H5_DLL herr_t H5VL_conn_copy(H5VL_connector_prop_t *value);
-H5_DLL herr_t H5VL_conn_free(const H5VL_connector_prop_t *info);
+H5_DLL herr_t H5VL_init_phase1(void);
+H5_DLL herr_t H5VL_init_phase2(void);
+H5_DLL herr_t H5VL_cmp_connector_cls(int *cmp_value, const H5VL_class_t *cls1, const H5VL_class_t *cls2);
+H5_DLL herr_t H5VL_conn_copy(H5VL_connector_prop_t *value);
+H5_DLL int64_t H5VL_conn_inc_rc(H5VL_t *connector);
+H5_DLL int64_t H5VL_conn_dec_rc(H5VL_t *connector);
+H5_DLL herr_t H5VL_conn_free(const H5VL_connector_prop_t *info);
/* Functions that deal with VOL connectors */
-H5_DLL hid_t H5VL_register_connector(const void *cls, hbool_t app_ref, hid_t vipl_id);
+union H5PL_key_t;
+H5_DLL herr_t H5VL_check_plugin_load(const H5VL_class_t *cls, const union H5PL_key_t *key, hbool_t *success);
/* NOTE: The object and ID functions below deal in VOL objects (i.e.;
* H5VL_object_t). Similar non-VOL calls exist in H5Iprivate.h. Use
@@ -85,7 +89,9 @@ H5_DLL void *H5VL_object_data(const H5VL_object_t *vol_obj);
H5_DLL void *H5VL_object_unwrap(const H5VL_object_t *vol_obj);
H5_DLL void *H5VL_object_verify(hid_t id, H5I_type_t obj_type);
H5_DLL H5VL_object_t *H5VL_vol_object(hid_t id);
+H5_DLL H5VL_object_t *H5VL_create_object(void *object, H5VL_t *vol_connector);
H5_DLL H5VL_object_t *H5VL_create_object_using_vol_id(H5I_type_t type, void *obj, hid_t connector_id);
+H5_DLL hsize_t H5VL_object_inc_rc(H5VL_object_t *obj);
H5_DLL herr_t H5VL_free_object(H5VL_object_t *obj);
H5_DLL herr_t H5VL_object_is_native(const H5VL_object_t *obj, hbool_t *is_native);
H5_DLL herr_t H5VL_file_is_same(const H5VL_object_t *vol_obj1, const H5VL_object_t *vol_obj2,
@@ -193,7 +199,7 @@ H5_DLL herr_t H5VL_datatype_close(const H5VL_object_t *vol_obj, hid_t dxpl_id, v
/* File functions */
H5_DLL void * H5VL_file_create(const H5VL_connector_prop_t *connector_prop, const char *name, unsigned flags,
hid_t fcpl_id, hid_t fapl_id, hid_t dxpl_id, void **req);
-H5_DLL void * H5VL_file_open(const H5VL_connector_prop_t *connector_prop, const char *name, unsigned flags,
+H5_DLL void * H5VL_file_open(H5VL_connector_prop_t *connector_prop, const char *name, unsigned flags,
hid_t fapl_id, hid_t dxpl_id, void **req);
H5_DLL herr_t H5VL_file_get(const H5VL_object_t *vol_obj, H5VL_file_get_t get_type, hid_t dxpl_id, void **req,
...);
@@ -252,12 +258,13 @@ H5_DLL herr_t H5VL_object_optional(const H5VL_object_t *vol_obj, H5VL_object_opt
H5_DLL herr_t H5VL_introspect_get_conn_cls(const H5VL_object_t *vol_obj, H5VL_get_conn_lvl_t lvl,
const H5VL_class_t **conn_cls);
H5_DLL herr_t H5VL_introspect_opt_query(const H5VL_object_t *vol_obj, H5VL_subclass_t subcls, int opt_type,
- hbool_t *supported);
+ uint64_t *flags);
/* Asynchronous functions */
-H5_DLL herr_t H5VL_request_wait(const H5VL_object_t *vol_obj, uint64_t timeout, H5ES_status_t *status);
+H5_DLL herr_t H5VL_request_wait(const H5VL_object_t *vol_obj, uint64_t timeout,
+ H5VL_request_status_t *status);
H5_DLL herr_t H5VL_request_notify(const H5VL_object_t *vol_obj, H5VL_request_notify_t cb, void *ctx);
-H5_DLL herr_t H5VL_request_cancel(const H5VL_object_t *vol_obj);
+H5_DLL herr_t H5VL_request_cancel(const H5VL_object_t *vol_obj, H5VL_request_status_t *status);
H5_DLL herr_t H5VL_request_specific(const H5VL_object_t *vol_obj, H5VL_request_specific_t specific_type, ...);
H5_DLL herr_t H5VL_request_optional(const H5VL_object_t *vol_obj, H5VL_request_optional_t opt_type, ...);
H5_DLL herr_t H5VL_request_free(const H5VL_object_t *vol_obj);
diff --git a/src/H5VLpublic.h b/src/H5VLpublic.h
index 63fea646ade..c5f85dc1db4 100644
--- a/src/H5VLpublic.h
+++ b/src/H5VLpublic.h
@@ -352,7 +352,7 @@ H5_DLL herr_t H5VLunregister_connector(hid_t connector_id);
*
* \since 1.12.0
*/
-H5_DLL herr_t H5VLquery_optional(hid_t obj_id, H5VL_subclass_t subcls, int opt_type, hbool_t *supported);
+H5_DLL herr_t H5VLquery_optional(hid_t obj_id, H5VL_subclass_t subcls, int opt_type, uint64_t *flags);
#ifdef __cplusplus
}
diff --git a/src/H5VM.c b/src/H5VM.c
index 49cad204172..4d65d7525a4 100644
--- a/src/H5VM.c
+++ b/src/H5VM.c
@@ -43,20 +43,20 @@ static void H5VM__stride_copy2(hsize_t nelmts, hsize_t elmt_size, unsigned dst_n
#endif /* LATER */
/*-------------------------------------------------------------------------
- * Function: H5VM__stride_optimize1
+ * Function: H5VM__stride_optimize1
*
- * Purpose: Given a stride vector which references elements of the
- * specified size, optimize the dimensionality, the stride
- * vector, and the element size to minimize the dimensionality
- * and the number of memory accesses.
+ * Purpose: Given a stride vector which references elements of the
+ * specified size, optimize the dimensionality, the stride
+ * vector, and the element size to minimize the dimensionality
+ * and the number of memory accesses.
*
- * All arguments are passed by reference and their values may be
- * modified by this function.
+ * All arguments are passed by reference and their values may be
+ * modified by this function.
*
- * Return: None
+ * Return: void
*
- * Programmer: Robb Matzke
- * Saturday, October 11, 1997
+ * Programmer: Robb Matzke
+ * Saturday, October 11, 1997
*
*-------------------------------------------------------------------------
*/
@@ -66,15 +66,12 @@ H5VM__stride_optimize1(unsigned *np /*in,out*/, hsize_t *elmt_size /*in,out*/, c
{
FUNC_ENTER_STATIC_NOERR
- /*
- * This has to be true because if we optimize the dimensionality down to
+ /* This has to be true because if we optimize the dimensionality down to
* zero we still must make one reference.
*/
HDassert(1 == H5VM_vector_reduce_product(0, NULL));
- /*
- * Combine adjacent memory accesses
- */
+ /* Combine adjacent memory accesses */
while (*np && stride1[*np - 1] > 0 && (hsize_t)(stride1[*np - 1]) == *elmt_size) {
*elmt_size *= size[*np - 1];
if (--*np)
@@ -85,20 +82,20 @@ H5VM__stride_optimize1(unsigned *np /*in,out*/, hsize_t *elmt_size /*in,out*/, c
}
/*-------------------------------------------------------------------------
- * Function: H5VM__stride_optimize2
+ * Function: H5VM__stride_optimize2
*
- * Purpose: Given two stride vectors which reference elements of the
- * specified size, optimize the dimensionality, the stride
- * vectors, and the element size to minimize the dimensionality
- * and the number of memory accesses.
+ * Purpose: Given two stride vectors which reference elements of the
+ * specified size, optimize the dimensionality, the stride
+ * vectors, and the element size to minimize the dimensionality
+ * and the number of memory accesses.
*
- * All arguments are passed by reference and their values may be
- * modified by this function.
+ * All arguments are passed by reference and their values may be
+ * modified by this function.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Saturday, October 11, 1997
+ * Programmer: Robb Matzke
+ * Saturday, October 11, 1997
*
*-------------------------------------------------------------------------
*/
@@ -108,16 +105,13 @@ H5VM__stride_optimize2(unsigned *np /*in,out*/, hsize_t *elmt_size /*in,out*/, c
{
FUNC_ENTER_STATIC_NOERR
- /*
- * This has to be true because if we optimize the dimensionality down to
+ /* This has to be true because if we optimize the dimensionality down to
* zero we still must make one reference.
*/
HDassert(1 == H5VM_vector_reduce_product(0, NULL));
HDassert(*elmt_size > 0);
- /*
- * Combine adjacent memory accesses
- */
+ /* Combine adjacent memory accesses */
/* Unroll loop for common cases */
switch (*np) {
@@ -206,29 +200,26 @@ H5VM__stride_optimize2(unsigned *np /*in,out*/, hsize_t *elmt_size /*in,out*/, c
}
/*-------------------------------------------------------------------------
- * Function: H5VM_hyper_stride
- *
- * Purpose: Given a description of a hyperslab, this function returns
- * (through STRIDE[]) the byte strides appropriate for accessing
- * all bytes of the hyperslab and the byte offset where the
- * striding will begin. The SIZE can be passed to the various
- * stride functions.
+ * Function: H5VM_hyper_stride
*
- * The dimensionality of the whole array, the hyperslab, and the
- * returned stride array is N. The whole array dimensions are
- * TOTAL_SIZE and the hyperslab is at offset OFFSET and has
- * dimensions SIZE.
+ * Purpose: Given a description of a hyperslab, this function returns
+ * (through STRIDE[]) the byte strides appropriate for accessing
+ * all bytes of the hyperslab and the byte offset where the
+ * striding will begin. The SIZE can be passed to the various
+ * stride functions.
*
- * The stride and starting point returned will cause the
- * hyperslab elements to be referenced in C order.
+ * The dimensionality of the whole array, the hyperslab, and the
+ * returned stride array is N. The whole array dimensions are
+ * TOTAL_SIZE and the hyperslab is at offset OFFSET and has
+ * dimensions SIZE.
*
- * Return: Success: Byte offset from beginning of array to start
- * of striding.
+ * The stride and starting point returned will cause the
+ * hyperslab elements to be referenced in C order.
*
- * Failure: abort() -- should never fail
+ * Return: Byte offset from beginning of array to start of striding.
*
- * Programmer: Robb Matzke
- * Saturday, October 11, 1997
+ * Programmer: Robb Matzke
+ * Saturday, October 11, 1997
*
*-------------------------------------------------------------------------
*/
@@ -308,23 +299,22 @@ H5VM_hyper_stride(unsigned n, const hsize_t *size, const hsize_t *total_size, co
}
/*-------------------------------------------------------------------------
- * Function: H5VM_hyper_eq
+ * Function: H5VM_hyper_eq
*
- * Purpose: Determines whether two hyperslabs are equal. This function
- * assumes that both hyperslabs are relative to the same array,
- * for if not, they could not possibly be equal.
+ * Purpose: Determines whether two hyperslabs are equal. This function
+ * assumes that both hyperslabs are relative to the same array,
+ * for if not, they could not possibly be equal.
*
- * Return: Success: TRUE if the hyperslabs are equal (that is,
- * both refer to exactly the same elements of an
- * array)
+ * Return: TRUE if the hyperslabs are equal (that is,
+ * both refer to exactly the same elements of an
+ * array)
*
- * FALSE otherwise.
+ * FALSE otherwise
*
- * Failure: TRUE the rank is zero or if both hyperslabs
- * are of zero size.
+ * Never returns FAIL
*
- * Programmer: Robb Matzke
- * Friday, October 17, 1997
+ * Programmer: Robb Matzke
+ * Friday, October 17, 1997
*
*-------------------------------------------------------------------------
*/
@@ -360,19 +350,19 @@ H5VM_hyper_eq(unsigned n, const hsize_t *offset1, const hsize_t *size1, const hs
/*-------------------------------------------------------------------------
* Function: H5VM_hyper_fill
*
- * Purpose: Similar to memset() except it operates on hyperslabs...
+ * Purpose: Similar to memset() except it operates on hyperslabs...
*
- * Fills a hyperslab of array BUF with some value VAL. BUF
- * is treated like a C-order array with N dimensions where the
- * size of each dimension is TOTAL_SIZE[]. The hyperslab which
- * will be filled with VAL begins at byte offset OFFSET[] from
- * the minimum corner of BUF and continues for SIZE[] bytes in
- * each dimension.
+ * Fills a hyperslab of array BUF with some value VAL. BUF
+ * is treated like a C-order array with N dimensions where the
+ * size of each dimension is TOTAL_SIZE[]. The hyperslab which
+ * will be filled with VAL begins at byte offset OFFSET[] from
+ * the minimum corner of BUF and continues for SIZE[] bytes in
+ * each dimension.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Friday, October 10, 1997
+ * Programmer: Robb Matzke
+ * Friday, October 10, 1997
*
*-------------------------------------------------------------------------
*/
@@ -418,31 +408,31 @@ H5VM_hyper_fill(unsigned n, const hsize_t *_size, const hsize_t *total_size, con
}
/*-------------------------------------------------------------------------
- * Function: H5VM_hyper_copy
+ * Function: H5VM_hyper_copy
*
- * Purpose: Copies a hyperslab from the source to the destination.
+ * Purpose: Copies a hyperslab from the source to the destination.
*
- * A hyperslab is a logically contiguous region of
- * multi-dimensional size SIZE of an array whose dimensionality
- * is N and whose total size is DST_TOTAL_SIZE or SRC_TOTAL_SIZE.
- * The minimum corner of the hyperslab begins at a
- * multi-dimensional offset from the minimum corner of the DST
- * (destination) or SRC (source) array. The sizes and offsets
- * are assumed to be in C order, that is, the first size/offset
- * varies the slowest while the last varies the fastest in the
- * mapping from N-dimensional space to linear space. This
- * function assumes that the array elements are single bytes (if
- * your array has multi-byte elements then add an additional
- * dimension whose size is that of your element).
+ * A hyperslab is a logically contiguous region of
+ * multi-dimensional size SIZE of an array whose dimensionality
+ * is N and whose total size is DST_TOTAL_SIZE or SRC_TOTAL_SIZE.
+ * The minimum corner of the hyperslab begins at a
+ * multi-dimensional offset from the minimum corner of the DST
+ * (destination) or SRC (source) array. The sizes and offsets
+ * are assumed to be in C order, that is, the first size/offset
+ * varies the slowest while the last varies the fastest in the
+ * mapping from N-dimensional space to linear space. This
+ * function assumes that the array elements are single bytes (if
+ * your array has multi-byte elements then add an additional
+ * dimension whose size is that of your element).
*
- * The SRC and DST array may be the same array, but the results
- * are undefined if the source hyperslab overlaps the
- * destination hyperslab.
+ * The SRC and DST array may be the same array, but the results
+ * are undefined if the source hyperslab overlaps the
+ * destination hyperslab.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Friday, October 10, 1997
+ * Programmer: Robb Matzke
+ * Friday, October 10, 1997
*
*-------------------------------------------------------------------------
*/
@@ -592,13 +582,13 @@ H5VM_hyper_copy(unsigned n, const hsize_t *_size, const hsize_t *dst_size, const
/*-------------------------------------------------------------------------
* Function: H5VM_stride_fill
*
- * Purpose: Fills all bytes of a hyperslab with the same value using
- * memset().
+ * Purpose: Fills all bytes of a hyperslab with the same value using
+ * memset().
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Saturday, October 11, 1997
+ * Programmer: Robb Matzke
+ * Saturday, October 11, 1997
*
*-------------------------------------------------------------------------
*/
@@ -643,19 +633,19 @@ H5VM_stride_fill(unsigned n, hsize_t elmt_size, const hsize_t *size, const hsize
/*-------------------------------------------------------------------------
* Function: H5VM_stride_copy
*
- * Purpose: Uses DST_STRIDE and SRC_STRIDE to advance through the arrays
- * DST and SRC while copying bytes from SRC to DST. This
- * function minimizes the number of calls to memcpy() by
- * combining various strides, but it will never touch memory
- * outside the hyperslab defined by the strides.
+ * Purpose: Uses DST_STRIDE and SRC_STRIDE to advance through the arrays
+ * DST and SRC while copying bytes from SRC to DST. This
+ * function minimizes the number of calls to memcpy() by
+ * combining various strides, but it will never touch memory
+ * outside the hyperslab defined by the strides.
*
- * Note: If the src_stride is all zero and elmt_size is one, then it's
- * probably more efficient to use H5VM_stride_fill() instead.
+ * Note: If the src_stride is all zero and elmt_size is one, then it's
+ * probably more efficient to use H5VM_stride_fill() instead.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Saturday, October 11, 1997
+ * Programmer: Robb Matzke
+ * Saturday, October 11, 1997
*
*-------------------------------------------------------------------------
*/
@@ -709,19 +699,19 @@ H5VM_stride_copy(unsigned n, hsize_t elmt_size, const hsize_t *size, const hsize
/*-------------------------------------------------------------------------
* Function: H5VM_stride_copy_s
*
- * Purpose: Uses DST_STRIDE and SRC_STRIDE to advance through the arrays
- * DST and SRC while copying bytes from SRC to DST. This
- * function minimizes the number of calls to memcpy() by
- * combining various strides, but it will never touch memory
- * outside the hyperslab defined by the strides.
+ * Purpose: Uses DST_STRIDE and SRC_STRIDE to advance through the arrays
+ * DST and SRC while copying bytes from SRC to DST. This
+ * function minimizes the number of calls to memcpy() by
+ * combining various strides, but it will never touch memory
+ * outside the hyperslab defined by the strides.
*
- * Note: If the src_stride is all zero and elmt_size is one, then it's
- * probably more efficient to use H5VM_stride_fill() instead.
+ * Note: If the src_stride is all zero and elmt_size is one, then it's
+ * probably more efficient to use H5VM_stride_fill() instead.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Saturday, October 11, 1997
+ * Programmer: Robb Matzke
+ * Saturday, October 11, 1997
*
*-------------------------------------------------------------------------
*/
@@ -775,17 +765,17 @@ H5VM_stride_copy_s(unsigned n, hsize_t elmt_size, const hsize_t *size, const hss
#ifdef LATER
/*-------------------------------------------------------------------------
- * Function: H5VM__stride_copy2
+ * Function: H5VM__stride_copy2
*
- * Purpose: Similar to H5VM_stride_copy() except the source and
- * destination each have their own dimensionality and size and
- * we copy exactly NELMTS elements each of size ELMT_SIZE. The
- * size counters wrap if NELMTS is more than a size counter.
+ * Purpose: Similar to H5VM_stride_copy() except the source and
+ * destination each have their own dimensionality and size and
+ * we copy exactly NELMTS elements each of size ELMT_SIZE. The
+ * size counters wrap if NELMTS is more than a size counter.
*
- * Return: None
+ * Return: void
*
- * Programmer: Robb Matzke
- * Saturday, October 11, 1997
+ * Programmer: Robb Matzke
+ * Saturday, October 11, 1997
*
*-------------------------------------------------------------------------
*/
@@ -843,16 +833,16 @@ H5VM__stride_copy2(hsize_t nelmts, hsize_t elmt_size, unsigned dst_n, const hsiz
#endif /* LATER */
/*-------------------------------------------------------------------------
- * Function: H5VM_array_fill
+ * Function: H5VM_array_fill
*
- * Purpose: Fills all bytes of an array with the same value using
- * memset(). Increases amount copied by power of two until the
- * halfway point is crossed, then copies the rest in one swoop.
+ * Purpose: Fills all bytes of an array with the same value using
+ * memset(). Increases amount copied by power of two until the
+ * halfway point is crossed, then copies the rest in one swoop.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * Thursday, June 18, 1998
+ * Programmer: Quincey Koziol
+ * Thursday, June 18, 1998
*
*-------------------------------------------------------------------------
*/
@@ -895,25 +885,25 @@ H5VM_array_fill(void *_dst, const void *src, size_t size, size_t count)
} /* H5VM_array_fill() */
/*-------------------------------------------------------------------------
- * Function: H5VM_array_down
+ * Function: H5VM_array_down
*
- * Purpose: Given a set of dimension sizes, calculate the size of each
+ * Purpose: Given a set of dimension sizes, calculate the size of each
* "down" slice. This is the size of the dimensions for all the
* dimensions below the current one, which is used for indexing
* offsets in this dimension.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: void
*
- * Programmer: Quincey Koziol
- * Monday, April 28, 2003
+ * Programmer: Quincey Koziol
+ * Monday, April 28, 2003
*
*-------------------------------------------------------------------------
*/
-herr_t
+void
H5VM_array_down(unsigned n, const hsize_t *total_size, hsize_t *down)
{
- hsize_t acc; /*accumulator */
- int i; /*counter */
+ hsize_t acc; /* Accumulator */
+ int i; /* Counter */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -921,31 +911,31 @@ H5VM_array_down(unsigned n, const hsize_t *total_size, hsize_t *down)
HDassert(total_size);
HDassert(down);
- /* Build the sizes of each dimension in the array */
- /* (From fastest to slowest) */
+ /* Build the sizes of each dimension in the array
+ * (From fastest to slowest)
+ */
for (i = (int)(n - 1), acc = 1; i >= 0; i--) {
down[i] = acc;
acc *= total_size[i];
- } /* end for */
+ }
- FUNC_LEAVE_NOAPI(SUCCEED)
+ FUNC_LEAVE_NOAPI_VOID
} /* end H5VM_array_down() */
/*-------------------------------------------------------------------------
* Function: H5VM_array_offset_pre
*
- * Purpose: Given a coordinate description of a location in an array, this
- * function returns the byte offset of the coordinate.
+ * Purpose: Given a coordinate description of a location in an array, this
+ * function returns the byte offset of the coordinate.
*
- * The dimensionality of the whole array, and the offset is N.
+ * The dimensionality of the whole array, and the offset is N.
* The whole array dimensions are TOTAL_SIZE and the coordinate
* is at offset OFFSET.
*
- * Return: Success: Byte offset from beginning of array to element offset
- * Failure: abort() -- should never fail
+ * Return: Byte offset from beginning of array to element offset
*
* Programmer: Quincey Koziol
- * Tuesday, June 22, 1999
+ * Tuesday, June 22, 1999
*
*-------------------------------------------------------------------------
*/
@@ -971,18 +961,17 @@ H5VM_array_offset_pre(unsigned n, const hsize_t *acc, const hsize_t *offset)
/*-------------------------------------------------------------------------
* Function: H5VM_array_offset
*
- * Purpose: Given a coordinate description of a location in an array, this
- * function returns the byte offset of the coordinate.
+ * Purpose: Given a coordinate description of a location in an array,
+ * this function returns the byte offset of the coordinate.
*
- * The dimensionality of the whole array, and the offset is N.
+ * The dimensionality of the whole array, and the offset is N.
* The whole array dimensions are TOTAL_SIZE and the coordinate
* is at offset OFFSET.
*
- * Return: Success: Byte offset from beginning of array to element offset
- * Failure: abort() -- should never fail
+ * Return: Byte offset from beginning of array to element offset
*
* Programmer: Quincey Koziol
- * Tuesday, June 22, 1999
+ * Tuesday, June 22, 1999
*
*-------------------------------------------------------------------------
*/
@@ -992,38 +981,36 @@ H5VM_array_offset(unsigned n, const hsize_t *total_size, const hsize_t *offset)
hsize_t acc_arr[H5VM_HYPER_NDIMS]; /* Accumulated size of down dimensions */
hsize_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI((HDabort(), 0)) /*lint !e527 Don't worry about unreachable statement */
+ FUNC_ENTER_NOAPI_NOERR
HDassert(n <= H5VM_HYPER_NDIMS);
HDassert(total_size);
HDassert(offset);
/* Build the sizes of each dimension in the array */
- if (H5VM_array_down(n, total_size, acc_arr) < 0)
- HGOTO_ERROR(H5E_INTERNAL, H5E_BADVALUE, UFAIL, "can't compute down sizes")
+ H5VM_array_down(n, total_size, acc_arr);
/* Set return value */
ret_value = H5VM_array_offset_pre(n, acc_arr, offset);
-done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5VM_array_offset() */
/*-------------------------------------------------------------------------
* Function: H5VM_array_calc_pre
*
- * Purpose: Given a linear offset in an array, the dimensions of that
+ * Purpose: Given a linear offset in an array, the dimensions of that
* array and the pre-computed 'down' (accumulator) sizes, this
* function computes the coordinates of that offset in the array.
*
- * The dimensionality of the whole array, and the coordinates is N.
+ * The dimensionality of the whole array, and the coordinates is N.
* The array dimensions are TOTAL_SIZE and the coordinates
* are returned in COORD. The linear offset is in OFFSET.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * Thursday, July 16, 2009
+ * Programmer: Quincey Koziol
+ * Thursday, July 16, 2009
*
*-------------------------------------------------------------------------
*/
@@ -1050,18 +1037,18 @@ H5VM_array_calc_pre(hsize_t offset, unsigned n, const hsize_t *down, hsize_t *co
/*-------------------------------------------------------------------------
* Function: H5VM_array_calc
*
- * Purpose: Given a linear offset in an array and the dimensions of that
+ * Purpose: Given a linear offset in an array and the dimensions of that
* array, this function computes the coordinates of that offset
* in the array.
*
- * The dimensionality of the whole array, and the coordinates is N.
+ * The dimensionality of the whole array, and the coordinates is N.
* The array dimensions are TOTAL_SIZE and the coordinates
* are returned in COORD. The linear offset is in OFFSET.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * Wednesday, April 16, 2003
+ * Programmer: Quincey Koziol
+ * Wednesday, April 16, 2003
*
*-------------------------------------------------------------------------
*/
@@ -1079,8 +1066,7 @@ H5VM_array_calc(hsize_t offset, unsigned n, const hsize_t *total_size, hsize_t *
HDassert(coords);
/* Build the sizes of each dimension in the array */
- if (H5VM_array_down(n, total_size, idx) < 0)
- HGOTO_ERROR(H5E_INTERNAL, H5E_BADVALUE, FAIL, "can't compute down sizes")
+ H5VM_array_down(n, total_size, idx);
/* Compute the coordinates from the offset */
if (H5VM_array_calc_pre(offset, n, idx, coords) < 0)
@@ -1093,7 +1079,7 @@ H5VM_array_calc(hsize_t offset, unsigned n, const hsize_t *total_size, hsize_t *
/*-------------------------------------------------------------------------
* Function: H5VM_chunk_index
*
- * Purpose: Given a coordinate offset (COORD), the size of each chunk
+ * Purpose: Given a coordinate offset (COORD), the size of each chunk
* (CHUNK), the number of chunks in each dimension (NCHUNKS)
* and the number of dimensions of all of these (NDIMS), calculate
* a "chunk index" for the chunk that the coordinate offset is
@@ -1123,10 +1109,10 @@ H5VM_array_calc(hsize_t offset, unsigned n, const hsize_t *total_size, hsize_t *
* The chunk index is placed in the CHUNK_IDX location for return
* from this function
*
- * Return: Chunk index on success (can't fail)
+ * Return: Chunk index on success (can't fail)
*
- * Programmer: Quincey Koziol
- * Monday, April 21, 2003
+ * Programmer: Quincey Koziol
+ * Monday, April 21, 2003
*
*-------------------------------------------------------------------------
*/
@@ -1151,14 +1137,14 @@ H5VM_chunk_index(unsigned ndims, const hsize_t *coord, const uint32_t *chunk, co
} /* end H5VM_chunk_index() */
/*-------------------------------------------------------------------------
- * Function: H5VM_chunk_scaled
+ * Function: H5VM_chunk_scaled
*
- * Purpose: Compute the scaled coordinates for a chunk offset
+ * Purpose: Compute the scaled coordinates for a chunk offset
*
- * Return:
+ * Return: void
*
- * Programmer: Quincey Koziol
- * Wednesday, November 19, 2014
+ * Programmer: Quincey Koziol
+ * Wednesday, November 19, 2014
*
*-------------------------------------------------------------------------
*/
@@ -1186,7 +1172,7 @@ H5VM_chunk_scaled(unsigned ndims, const hsize_t *coord, const uint32_t *chunk, h
/*-------------------------------------------------------------------------
* Function: H5VM_chunk_index_scaled
*
- * Purpose: Given a coordinate offset (COORD), the size of each chunk
+ * Purpose: Given a coordinate offset (COORD), the size of each chunk
* (CHUNK), the number of chunks in each dimension (NCHUNKS)
* and the number of dimensions of all of these (NDIMS), calculate
* a "chunk index" for the chunk that the coordinate offset is
@@ -1216,13 +1202,13 @@ H5VM_chunk_scaled(unsigned ndims, const hsize_t *coord, const uint32_t *chunk, h
* The chunk index is placed in the CHUNK_IDX location for return
* from this function
*
- * Note: This routine is identical to H5VM_chunk_index(), except for
- * caching the scaled information. Make changes in both places.
+ * Note: This routine is identical to H5VM_chunk_index(), except for
+ * caching the scaled information. Make changes in both places.
*
- * Return: Chunk index on success (can't fail)
+ * Return: Chunk index on success (can't fail)
*
- * Programmer: Vailin Choi
- * Monday, February 9, 2015
+ * Programmer: Vailin Choi
+ * Monday, February 9, 2015
*
*-------------------------------------------------------------------------
*/
@@ -1257,22 +1243,22 @@ H5VM_chunk_index_scaled(unsigned ndims, const hsize_t *coord, const uint32_t *ch
/*-------------------------------------------------------------------------
* Function: H5VM_opvv
*
- * Purpose: Perform an operation on a source & destination sequences
- * of offset/length pairs. Each set of sequnces has an array
- * of lengths, an array of offsets, the maximum number of
- * sequences and the current sequence to start at in the sequence.
+ * Purpose: Perform an operation on a source & destination sequences
+ * of offset/length pairs. Each set of sequnces has an array
+ * of lengths, an array of offsets, the maximum number of
+ * sequences and the current sequence to start at in the sequence.
*
* There may be different numbers of bytes in the source and
* destination sequences, the operation stops when either the
* source or destination sequence runs out of information.
*
- * Note: The algorithm in this routine is [basically] the same as for
- * H5VM_memcpyvv(). Changes should be made to both!
+ * Note: The algorithm in this routine is [basically] the same as for
+ * H5VM_memcpyvv(). Changes should be made to both!
*
- * Return: Non-negative # of bytes operated on, on success/Negative on failure
+ * Return: Non-negative # of bytes operated on, on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * Thursday, September 30, 2010
+ * Programmer: Quincey Koziol
+ * Thursday, September 30, 2010
*
*-------------------------------------------------------------------------
*/
@@ -1460,7 +1446,7 @@ H5VM_opvv(size_t dst_max_nseq, size_t *dst_curr_seq, size_t dst_len_arr[], hsize
/*-------------------------------------------------------------------------
* Function: H5VM_memcpyvv
*
- * Purpose: Given source and destination buffers in memory (SRC & DST)
+ * Purpose: Given source and destination buffers in memory (SRC & DST)
* copy sequences of from the source buffer into the destination
* buffer. Each set of sequences has an array of lengths, an
* array of offsets, the maximum number of sequences and the
@@ -1470,13 +1456,13 @@ H5VM_opvv(size_t dst_max_nseq, size_t *dst_curr_seq, size_t dst_len_arr[], hsize
* destination sequences, data copying stops when either the
* source or destination buffer runs out of sequence information.
*
- * Note: The algorithm in this routine is [basically] the same as for
- * H5VM_opvv(). Changes should be made to both!
+ * Note: The algorithm in this routine is [basically] the same as for
+ * H5VM_opvv(). Changes should be made to both!
*
- * Return: Non-negative # of bytes copied on success/Negative on failure
+ * Return: Non-negative # of bytes copied on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * Friday, May 2, 2003
+ * Programmer: Quincey Koziol
+ * Friday, May 2, 2003
*
*-------------------------------------------------------------------------
*/
diff --git a/src/H5VMprivate.h b/src/H5VMprivate.h
index 2fea2fcd7ad..0d3bd0fe795 100644
--- a/src/H5VMprivate.h
+++ b/src/H5VMprivate.h
@@ -105,7 +105,7 @@ H5_DLL herr_t H5VM_stride_copy_s(unsigned n, hsize_t elmt_size, const hsize_t *_
const hssize_t *dst_stride, void *_dst, const hssize_t *src_stride,
const void *_src);
H5_DLL herr_t H5VM_array_fill(void *_dst, const void *src, size_t size, size_t count);
-H5_DLL herr_t H5VM_array_down(unsigned n, const hsize_t *total_size, hsize_t *down);
+H5_DLL void H5VM_array_down(unsigned n, const hsize_t *total_size, hsize_t *down);
H5_DLL hsize_t H5VM_array_offset_pre(unsigned n, const hsize_t *acc, const hsize_t *offset);
H5_DLL hsize_t H5VM_array_offset(unsigned n, const hsize_t *total_size, const hsize_t *offset);
H5_DLL herr_t H5VM_array_calc_pre(hsize_t offset, unsigned n, const hsize_t *down, hsize_t *coords);
diff --git a/src/H5Zdeflate.c b/src/H5Zdeflate.c
index d8fed413190..d29d8e565eb 100644
--- a/src/H5Zdeflate.c
+++ b/src/H5Zdeflate.c
@@ -48,7 +48,7 @@ const H5Z_class2_t H5Z_DEFLATE[1] = {{
H5Z__filter_deflate, /* The actual filter function */
}};
-#define H5Z_DEFLATE_SIZE_ADJUST(s) (HDceil(((double)(s)) * (double)1.001f) + 12)
+#define H5Z_DEFLATE_SIZE_ADJUST(s) (HDceil(((double)(s)) * 1.001) + 12)
/*-------------------------------------------------------------------------
* Function: H5Z__filter_deflate
diff --git a/src/H5Zscaleoffset.c b/src/H5Zscaleoffset.c
index 5310f7de3cc..2e1a474bc55 100644
--- a/src/H5Zscaleoffset.c
+++ b/src/H5Zscaleoffset.c
@@ -1116,7 +1116,7 @@ H5Z__filter_scaleoffset(unsigned flags, size_t cd_nelmts, const unsigned cd_valu
unsigned filavail; /* flag indicating if fill value is defined or not */
H5Z_SO_scale_type_t scale_type = H5Z_SO_FLOAT_DSCALE; /* scale type */
int scale_factor = 0; /* scale factor */
- double D_val = 0.0f; /* decimal scale factor */
+ double D_val = 0.0; /* decimal scale factor */
uint32_t minbits = 0; /* minimum number of bits to store values */
unsigned long long minval = 0; /* minimum value of input buffer */
enum H5Z_scaleoffset_t type; /* memory type corresponding to dataset datatype */
diff --git a/src/H5private.h b/src/H5private.h
index 8a9f5c9b058..75b94bdbdc3 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -370,7 +370,6 @@
*/
#define SUCCEED 0
#define FAIL (-1)
-#define UFAIL (unsigned)(-1)
/* The HDF5 library uses the symbol `ERR` frequently. So do
* header files for libraries such as curses(3), terminfo(3), etc.
@@ -2961,6 +2960,7 @@ H5_DLL int H5CX_term_package(void);
H5_DLL int H5D_term_package(void);
H5_DLL int H5D_top_term_package(void);
H5_DLL int H5E_term_package(void);
+H5_DLL int H5ES_term_package(void);
H5_DLL int H5F_term_package(void);
H5_DLL int H5FD_term_package(void);
H5_DLL int H5FL_term_package(void);
diff --git a/src/H5timer.c b/src/H5timer.c
index 54a336599c0..b2cc5f09ae4 100644
--- a/src/H5timer.c
+++ b/src/H5timer.c
@@ -42,9 +42,9 @@
#define H5TIMER_TIME_STRING_LEN 1536
/* Conversion factors */
-#define H5_SEC_PER_DAY (double)(24.0F * 60.0F * 60.0F)
-#define H5_SEC_PER_HOUR (double)(60.0F * 60.0F)
-#define H5_SEC_PER_MIN (double)(60.0F)
+#define H5_SEC_PER_DAY (24.0 * 60.0 * 60.0)
+#define H5_SEC_PER_HOUR (60.0 * 60.0)
+#define H5_SEC_PER_MIN (60.0)
/******************/
/* Local Typedefs */
@@ -100,13 +100,13 @@ H5_bandwidth(char *buf /*out*/, double nbytes, double nseconds)
{
double bw;
- if (nseconds <= (double)0.0F)
+ if (nseconds <= 0.0)
HDstrcpy(buf, " NaN");
else {
bw = nbytes / nseconds;
- if (H5_DBL_ABS_EQUAL(bw, (double)0.0F))
+ if (H5_DBL_ABS_EQUAL(bw, 0.0))
HDstrcpy(buf, "0.000 B/s");
- else if (bw < (double)1.0F)
+ else if (bw < 1.0)
HDsprintf(buf, "%10.4e", bw);
else if (bw < (double)H5_KB) {
HDsprintf(buf, "%05.4f", bw);
@@ -224,7 +224,7 @@ H5_now_usec(void)
double
H5_get_time(void)
{
- double ret_value = (double)0.0f;
+ double ret_value = 0.0;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -233,14 +233,14 @@ H5_get_time(void)
struct timespec ts;
HDclock_gettime(CLOCK_MONOTONIC, &ts);
- ret_value = (double)ts.tv_sec + ((double)ts.tv_nsec / (double)1000000000.0f);
+ ret_value = (double)ts.tv_sec + ((double)ts.tv_nsec / 1000000000.0);
}
#elif defined(H5_HAVE_GETTIMEOFDAY)
{
struct timeval now_tv;
HDgettimeofday(&now_tv, NULL);
- ret_value = (double)now_tv.tv_sec + ((double)now_tv.tv_usec / (double)1000000.0f);
+ ret_value = (double)now_tv.tv_sec + ((double)now_tv.tv_usec / 1000000.0);
}
#else
ret_value = (double)HDtime(NULL);
@@ -289,8 +289,8 @@ H5__timer_get_timevals(H5_timevals_t *times /*in,out*/)
if (HDgetrusage(RUSAGE_SELF, &res) < 0)
return -1;
- times->system = (double)res.ru_stime.tv_sec + ((double)res.ru_stime.tv_usec / (double)1.0E6F);
- times->user = (double)res.ru_utime.tv_sec + ((double)res.ru_utime.tv_usec / (double)1.0E6F);
+ times->system = (double)res.ru_stime.tv_sec + ((double)res.ru_stime.tv_usec / 1.0E6);
+ times->user = (double)res.ru_utime.tv_sec + ((double)res.ru_utime.tv_usec / 1.0E6);
}
#else
/* No suitable way to get system/user times */
@@ -589,7 +589,7 @@ H5_timer_get_time_string(double seconds)
double remainder_sec = 0.0;
/* Extract larger time units from count of seconds */
- if (seconds > (double)60.0F) {
+ if (seconds > 60.0) {
/* Set initial # of seconds */
remainder_sec = seconds;
@@ -617,19 +617,19 @@ H5_timer_get_time_string(double seconds)
* time unit. Perhaps this could be passed as an integer.
* (name? round_up_size? ?)
*/
- if (seconds < (double)0.0F)
+ if (seconds < 0.0)
HDsprintf(s, "N/A");
- else if (H5_DBL_ABS_EQUAL((double)0.0F, seconds))
+ else if (H5_DBL_ABS_EQUAL(0.0, seconds))
HDsprintf(s, "0.0 s");
- else if (seconds < (double)1.0E-6F)
+ else if (seconds < 1.0E-6)
/* t < 1 us, Print time in ns */
- HDsprintf(s, "%.f ns", seconds * (double)1.0E9F);
- else if (seconds < (double)1.0E-3F)
+ HDsprintf(s, "%.f ns", seconds * 1.0E9);
+ else if (seconds < 1.0E-3)
/* t < 1 ms, Print time in us */
- HDsprintf(s, "%.1f us", seconds * (double)1.0E6F);
- else if (seconds < (double)1.0F)
+ HDsprintf(s, "%.1f us", seconds * 1.0E6);
+ else if (seconds < 1.0)
/* t < 1 s, Print time in ms */
- HDsprintf(s, "%.1f ms", seconds * (double)1.0E3F);
+ HDsprintf(s, "%.1f ms", seconds * 1.0E3);
else if (seconds < H5_SEC_PER_MIN)
/* t < 1 m, Print time in s */
HDsprintf(s, "%.2f s", seconds);
diff --git a/src/H5trace.c b/src/H5trace.c
index d587853d349..ecb27057629 100644
--- a/src/H5trace.c
+++ b/src/H5trace.c
@@ -3903,14 +3903,14 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
if (returning) {
if (current_depth > 1) {
--current_depth;
- return (double)0.0F;
+ return 0.0;
}
}
else {
if (current_depth > 0) {
/* Do not update last_call_depth */
current_depth++;
- return (double)0.0F;
+ return 0.0;
}
}
}
@@ -3997,5 +3997,5 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
if (H5_debug_g.ttimes)
return function_times.elapsed;
else
- return (double)0.0F;
+ return 0.0;
} /* end H5_trace() */
diff --git a/src/Makefile.am b/src/Makefile.am
index 65002c1899c..deda22b56f0 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -55,6 +55,7 @@ libhdf5_la_SOURCES= H5.c H5checksum.c H5dbg.c H5lib_settings.c H5system.c \
H5E.c H5Edeprec.c H5Eint.c \
H5EA.c H5EAcache.c H5EAdbg.c H5EAdblkpage.c H5EAdblock.c H5EAhdr.c \
H5EAiblock.c H5EAint.c H5EAsblock.c H5EAstat.c H5EAtest.c \
+ H5ES.c H5ESevent.c H5ESint.c H5ESlist.c \
H5F.c H5Faccum.c H5Fcwfs.c H5Fdbg.c H5Fdeprec.c H5Fefc.c H5Ffake.c \
H5Fint.c H5Fio.c H5Fmount.c H5Fquery.c H5Fsfile.c H5Fspace.c \
H5Fsuper.c H5Fsuper_cache.c H5Ftest.c \
@@ -154,7 +155,7 @@ include_HEADERS = hdf5.h H5api_adpt.h H5overflow.h H5pubconf.h H5public.h H5queu
H5Gpublic.h H5Ipublic.h H5Lpublic.h \
H5Mpublic.h H5MMpublic.h H5Opublic.h H5Ppublic.h \
H5PLextern.h H5PLpublic.h \
- H5Rpublic.h H5Spublic.h H5Tpublic.h \
+ H5Rpublic.h H5Spublic.h H5Tpublic.h H5TSpublic.h \
H5VLconnector.h H5VLconnector_passthru.h \
H5VLnative.h H5VLpassthru.h H5VLpublic.h \
H5Zpublic.h
@@ -203,11 +204,6 @@ $(top_srcdir)/src/H5version.h: $(top_srcdir)/src/H5vers.txt
$(top_srcdir)/src/H5overflow.h: $(top_srcdir)/src/H5overflow.txt
perl $(top_srcdir)/bin/make_overflow $?
-# doxygen support
-if BUILD_DOXYGEN_CONDITIONAL
-doxygen: doxygen-doc
-endif
-
# Add TRACE macros to library source files. This is done via the trace script
# in the hdf5/bin directory. If the file contains HDF5 API macros, a "clean"
# version of the source file is saved with a tilde (~) after its name and
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 6770666c3c5..22f63f73ba2 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -352,6 +352,9 @@ set (H5_TESTS
thread_id # special link
vol
timer
+ cmpd_dtransform
+ event_set
+ vfd_swmr
)
macro (ADD_H5_EXE file)
@@ -546,6 +549,12 @@ if (HDF5_ENABLE_FORMATTERS)
clang_format (HDF5_TEST_mirror_vfd_FORMAT mirror_vfd)
endif ()
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TEST_event_set_FORMAT event_set)
+endif ()
##############################################################################
### A D D I T I O N A L T E S T S ###
diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake
index e5ad9621e52..17931cf3a3a 100644
--- a/test/CMakeTests.cmake
+++ b/test/CMakeTests.cmake
@@ -318,14 +318,6 @@ set (test_CLEANFILES
tvlstr.h5
tvlstr2.h5
twriteorder.dat
- flush.h5
- flush-swmr.h5
- noflush.h5
- noflush-swmr.h5
- flush_extend.h5
- flush_extend-swmr.h5
- noflush_extend.h5
- noflush_extend-swmr.h5
enum1.h5
titerate.h5
ttsafe.h5
@@ -409,6 +401,7 @@ set (test_CLEANFILES
splitter.log
mirror_rw/*
mirror_wo/*
+ event_set_*.h5
)
# Remove any output file left over from previous test run
@@ -869,7 +862,7 @@ if (BUILD_SHARED_LIBS)
##############################################################################
endif ()
-option (TEST_SHELL_SCRIPTS "Enable shell script tests" OFF)
+option (TEST_SHELL_SCRIPTS "Enable shell script tests" ON)
if (TEST_SHELL_SCRIPTS)
include (ShellTests.cmake)
endif()
diff --git a/test/Makefile.am b/test/Makefile.am
index 8aeb9acc0bc..82fee2a32c6 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -71,12 +71,13 @@ TEST_PROG= testhdf5 \
cache cache_api cache_image cache_tagging lheap ohdr \
stab gheap evict_on_close farray earray btree2 fheap \
pool accum hyperslab istore bittests dt_arith page_buffer vfd_swmr \
- dtypes dsets chunk_info cmpd_dset filter_fail extend direct_chunk \
- external efc objcopy objcopy_ref links unlink twriteorder big mtime fillval mount \
+ dtypes dsets chunk_info cmpd_dset cmpd_dtransform filter_fail extend direct_chunk \
+ external efc objcopy objcopy_ref links unlink twriteorder big mtime \
+ fillval mount \
flush1 flush2 app_ref enum set_extent ttsafe enc_dec_plist \
enc_dec_plist_cross_platform getname vfd ros3 s3comms hdfs ntypes \
dangle dtransform reserved cross_read freespace mf vds file_image \
- unregister cache_logging cork swmr thread_id vol timer
+ unregister cache_logging cork swmr thread_id vol timer event_set
# List programs to be built when testing here.
# error_test and err_compat are built at the same time as the other tests, but executed by testerror.sh.
@@ -240,7 +241,7 @@ CHECK_CLEANFILES+=accum.h5 cmpd_dset.h5 compact_dataset.h5 dataset.h5 dset_offse
test_swmr*.h5 cache_logging.h5 cache_logging.out vds_swmr.h5 vds_swmr_src_*.h5 \
swmr[0-2].h5 swmr_writer.out swmr_writer.log.* swmr_reader.out.* swmr_reader.log.* \
tbogus.h5.copy cache_image_test.h5 direct_chunk.h5 native_vol_test.h5 \
- splitter*.h5 splitter.log mirror_rw mirror_ro
+ splitter*.h5 splitter.log mirror_rw mirror_ro event_set_[0-9].h5
# Sources for testhdf5 executable
testhdf5_SOURCES=testhdf5.c tarray.c tattr.c tchecksum.c tconfig.c tfile.c \
diff --git a/test/ShellTests.cmake b/test/ShellTests.cmake
index b28bbd60717..812121e453a 100644
--- a/test/ShellTests.cmake
+++ b/test/ShellTests.cmake
@@ -17,7 +17,7 @@
if (UNIX)
- find_program (SH_PROGRAM sh)
+ find_program (SH_PROGRAM bash)
if (SH_PROGRAM)
##############################################################################
diff --git a/test/btree2.c b/test/btree2.c
index f18b65cfb3f..aca0c776ddd 100644
--- a/test/btree2.c
+++ b/test/btree2.c
@@ -631,6 +631,7 @@ test_insert_basic(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_
haddr_t bt2_addr; /* Address of B-tree created */
hsize_t record; /* Record to insert into tree */
hsize_t idx; /* Index within B-tree, for iterator */
+ hbool_t found; /* Whether record was found */
herr_t ret; /* Generic error return value */
/*
@@ -666,8 +667,11 @@ test_insert_basic(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_
TEST_ERROR
/* Attempt to find record in B-tree with no records */
- idx = 0;
- if (H5B2_find(bt2, &idx, find_cb, NULL) != FALSE)
+ idx = 0;
+ found = FALSE;
+ if (H5B2_find(bt2, &idx, &found, find_cb, NULL) < 0)
+ TEST_ERROR
+ if (found)
TEST_ERROR
/* Attempt to index record in B-tree with no records */
@@ -698,22 +702,34 @@ test_insert_basic(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_
/* Attempt to find non-existant record in B-tree with 1 record */
/* (Should not be found, but not fail) */
- idx = 41;
- if (H5B2_find(bt2, &idx, find_cb, &idx) != FALSE)
+ idx = 41;
+ found = FALSE;
+ if (H5B2_find(bt2, &idx, &found, find_cb, &idx) < 0)
+ TEST_ERROR
+ if (found)
TEST_ERROR
/* Try again with NULL 'op' */
/* (Should not be found, but not fail) */
- if (H5B2_find(bt2, &idx, NULL, NULL) != FALSE)
+ found = FALSE;
+ if (H5B2_find(bt2, &idx, &found, NULL, NULL) < 0)
+ TEST_ERROR
+ if (found)
TEST_ERROR
/* Attempt to find existant record in B-tree with 1 record */
- idx = 42;
- if (H5B2_find(bt2, &idx, find_cb, &idx) != TRUE)
+ idx = 42;
+ found = FALSE;
+ if (H5B2_find(bt2, &idx, &found, find_cb, &idx) < 0)
+ TEST_ERROR
+ if (!found)
TEST_ERROR
/* Try again with NULL 'op' */
- if (H5B2_find(bt2, &idx, NULL, NULL) != TRUE)
+ found = FALSE;
+ if (H5B2_find(bt2, &idx, &found, NULL, NULL) < 0)
+ TEST_ERROR
+ if (!found)
TEST_ERROR
/* Attempt to index non-existant record in B-tree with 1 record */
@@ -766,13 +782,19 @@ test_insert_basic(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_
/* Attempt to find non-existant record in level-0 B-tree with several records */
/* (Should not be found, but not fail) */
- idx = 41;
- if (H5B2_find(bt2, &idx, find_cb, &idx) != FALSE)
+ idx = 41;
+ found = FALSE;
+ if (H5B2_find(bt2, &idx, &found, find_cb, &idx) < 0)
+ TEST_ERROR
+ if (found)
TEST_ERROR
/* Attempt to find existant record in level-0 B-tree with several record */
- idx = 56;
- if (H5B2_find(bt2, &idx, find_cb, &idx) != TRUE)
+ idx = 56;
+ found = FALSE;
+ if (H5B2_find(bt2, &idx, &found, find_cb, &idx) < 0)
+ TEST_ERROR
+ if (!found)
TEST_ERROR
/* Attempt to index non-existant record in B-tree with several records */
@@ -852,6 +874,7 @@ test_insert_split_root(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_p
hsize_t idx; /* Index within B-tree, for iterator */
H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
unsigned u; /* Local index variable */
+ hbool_t found; /* Whether record was found */
herr_t ret; /* Generic error return value */
/*
@@ -937,19 +960,28 @@ test_insert_split_root(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_p
/* Attempt to find non-existant record in level-1 B-tree */
/* (Should not be found, but not fail) */
- idx = INSERT_SPLIT_ROOT_NREC + 10;
- if (H5B2_find(bt2, &idx, find_cb, &idx) != FALSE)
+ idx = INSERT_SPLIT_ROOT_NREC + 10;
+ found = FALSE;
+ if (H5B2_find(bt2, &idx, &found, find_cb, &idx) < 0)
+ TEST_ERROR
+ if (found)
TEST_ERROR
/* Attempt to find existant record in root of level-1 B-tree */
- idx = 33;
- if (H5B2_find(bt2, &idx, find_cb, &idx) != TRUE)
+ idx = 33;
+ found = FALSE;
+ if (H5B2_find(bt2, &idx, &found, find_cb, &idx) < 0)
FAIL_STACK_ERROR
+ if (!found)
+ TEST_ERROR
/* Attempt to find existant record in leaf of level-1 B-tree */
- idx = 56;
- if (H5B2_find(bt2, &idx, find_cb, &idx) != TRUE)
+ idx = 56;
+ found = FALSE;
+ if (H5B2_find(bt2, &idx, &found, find_cb, &idx) < 0)
FAIL_STACK_ERROR
+ if (!found)
+ TEST_ERROR
/* Attempt to index non-existant record in level-1 B-tree */
idx = 0;
@@ -1602,6 +1634,7 @@ test_insert_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_
H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
hsize_t idx; /* Index within B-tree, for iterator */
unsigned u; /* Local index variable */
+ hbool_t found; /* Whether record was found */
herr_t ret; /* Generic error return value */
/*
@@ -1673,14 +1706,20 @@ test_insert_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_
/* Attempt to find non-existant record in level-2 B-tree */
/* (Should not be found, but not fail) */
- idx = INSERT_SPLIT_ROOT_NREC * 30;
- if (H5B2_find(bt2, &idx, find_cb, &idx) != FALSE)
+ idx = INSERT_SPLIT_ROOT_NREC * 30;
+ found = FALSE;
+ if (H5B2_find(bt2, &idx, &found, find_cb, &idx) < 0)
+ TEST_ERROR
+ if (found)
TEST_ERROR
/* Attempt to find existant record in root of level-2 B-tree */
- idx = 948;
- if (H5B2_find(bt2, &idx, find_cb, &idx) != TRUE)
+ idx = 948;
+ found = FALSE;
+ if (H5B2_find(bt2, &idx, &found, find_cb, &idx) < 0)
FAIL_STACK_ERROR
+ if (!found)
+ TEST_ERROR
/* Check with B-tree */
record = 948;
@@ -1688,9 +1727,12 @@ test_insert_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_
TEST_ERROR
/* Attempt to find existant record in internal node of level-2 B-tree */
- idx = 505;
- if (H5B2_find(bt2, &idx, find_cb, &idx) != TRUE)
+ idx = 505;
+ found = FALSE;
+ if (H5B2_find(bt2, &idx, &found, find_cb, &idx) < 0)
FAIL_STACK_ERROR
+ if (!found)
+ TEST_ERROR
/* Check with B-tree */
record = 505;
@@ -1698,9 +1740,12 @@ test_insert_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_
TEST_ERROR
/* Attempt to find existant record in leaf of level-2 B-tree */
- idx = 555;
- if (H5B2_find(bt2, &idx, find_cb, &idx) != TRUE)
+ idx = 555;
+ found = FALSE;
+ if (H5B2_find(bt2, &idx, &found, find_cb, &idx) < 0)
FAIL_STACK_ERROR
+ if (!found)
+ TEST_ERROR
/* Check with B-tree */
record = 555;
@@ -2957,14 +3002,15 @@ test_insert_lots(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t
hsize_t temp_rec; /* Temporary record */
H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
hsize_t nrec; /* Number of records in B-tree */
+ hbool_t found; /* Whether record was found */
herr_t ret; /* Generic error return value */
/* Initialize random number seed */
curr_time = HDtime(NULL);
-#ifdef QAK
- curr_time = 1109170019;
- HDfprintf(stderr, "curr_time=%lu\n", (unsigned long)curr_time);
-#endif /* QAK */
+#if 0
+curr_time=1109170019;
+HDfprintf(stderr,"curr_time=%lu\n",(unsigned long)curr_time);
+#endif
HDsrandom((unsigned)curr_time);
/*
@@ -3062,8 +3108,11 @@ test_insert_lots(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t
/* Attempt to find non-existant record in level-4 B-tree */
/* (Should not be found, but not fail) */
- idx = INSERT_MANY * 2;
- if (H5B2_find(bt2, &idx, find_cb, &idx) != FALSE)
+ idx = INSERT_MANY * 2;
+ found = FALSE;
+ if (H5B2_find(bt2, &idx, &found, find_cb, &idx) < 0)
+ TEST_ERROR
+ if (found)
TEST_ERROR
/* Find random records */
@@ -3072,8 +3121,11 @@ test_insert_lots(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t
idx = (hsize_t)(HDrandom() % INSERT_MANY);
/* Attempt to find existant record in root of level-4 B-tree */
- if (H5B2_find(bt2, &idx, find_cb, &idx) != TRUE)
+ found = FALSE;
+ if (H5B2_find(bt2, &idx, &found, find_cb, &idx) < 0)
FAIL_STACK_ERROR
+ if (!found)
+ TEST_ERROR
} /* end for */
/* Attempt to index non-existant record in level-4 B-tree, in increasing & decreasing order */
@@ -3186,6 +3238,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_
H5B2_test_rec_t record; /* Record to insert into tree */
H5B2_test_rec_t modify; /* Modified value */
H5B2_test_rec_t find; /* Record to find */
+ hbool_t found; /* Whether record was found */
herr_t ret; /* Generic error return value */
/* Create the file for the test */
@@ -3214,31 +3267,43 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_
/* (Should not be found, but not fail) */
find.key = 10;
find.val = (hsize_t)-1;
- if (H5B2_find(bt2, &find, find_rec_cb, &find) != FALSE)
+ found = FALSE;
+ if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
FAIL_STACK_ERROR
if (find.val != (hsize_t)-1)
TEST_ERROR
+ if (found)
+ TEST_ERROR
/* Try again with NULL 'op' */
/* (Should not be found, but not fail) */
- if (H5B2_find(bt2, &find, NULL, NULL) != FALSE)
+ found = FALSE;
+ if (H5B2_find(bt2, &find, &found, NULL, NULL) < 0)
FAIL_STACK_ERROR
if (find.val != (hsize_t)-1)
TEST_ERROR
+ if (found)
+ TEST_ERROR
/* Attempt to find existant record in B-tree with 1 record */
find.key = 42;
- if (H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE)
+ found = FALSE;
+ if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
FAIL_STACK_ERROR
if (find.val != 72)
TEST_ERROR
+ if (!found)
+ TEST_ERROR
/* Try again with NULL 'op' */
find.val = (hsize_t)-1;
- if (H5B2_find(bt2, &find, NULL, NULL) != TRUE)
+ found = FALSE;
+ if (H5B2_find(bt2, &find, &found, NULL, NULL) < 0)
FAIL_STACK_ERROR
if (find.val != (hsize_t)-1)
TEST_ERROR
+ if (!found)
+ TEST_ERROR
/* Attempt to index non-existant record in B-tree with 1 record */
H5E_BEGIN_TRY
@@ -3279,31 +3344,43 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_
/* (Should not be found, but not fail) */
find.key = 10;
find.val = (hsize_t)-1;
- if (H5B2_find(bt2, &find, find_rec_cb, &find) != FALSE)
+ found = FALSE;
+ if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
FAIL_STACK_ERROR
if (find.val != (hsize_t)-1)
TEST_ERROR
+ if (found)
+ TEST_ERROR
/* Try again with NULL 'op' */
/* (Should not be found, but not fail) */
- if (H5B2_find(bt2, &find, NULL, NULL) != FALSE)
+ found = FALSE;
+ if (H5B2_find(bt2, &find, &found, NULL, NULL) < 0)
FAIL_STACK_ERROR
if (find.val != (hsize_t)-1)
TEST_ERROR
+ if (found)
+ TEST_ERROR
/* Attempt to find modified record in B-tree with 1 record */
find.key = 42;
- if (H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE)
+ found = FALSE;
+ if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
FAIL_STACK_ERROR
if (find.val != 43)
TEST_ERROR
+ if (!found)
+ TEST_ERROR
/* Try again with NULL 'op' */
find.val = (hsize_t)-1;
- if (H5B2_find(bt2, &find, NULL, NULL) != TRUE)
+ found = FALSE;
+ if (H5B2_find(bt2, &find, &found, NULL, NULL) < 0)
FAIL_STACK_ERROR
if (find.val != (hsize_t)-1)
TEST_ERROR
+ if (!found)
+ TEST_ERROR
/* Attempt to index non-existant record in B-tree with 1 record */
H5E_BEGIN_TRY
@@ -3364,17 +3441,23 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_
/* (Should not be found, but not fail) */
find.key = 10;
find.val = (hsize_t)-1;
- if (H5B2_find(bt2, &find, find_rec_cb, &find) != FALSE)
+ found = FALSE;
+ if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
TEST_ERROR
if (find.val != (hsize_t)-1)
TEST_ERROR
+ if (found)
+ TEST_ERROR
/* Attempt to find existant record in level-0 B-tree with several records */
find.key = 56;
- if (H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE)
+ found = FALSE;
+ if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
TEST_ERROR
if (find.val != 12)
TEST_ERROR
+ if (!found)
+ TEST_ERROR
/* Attempt to index non-existant record in B-tree with several records */
H5E_BEGIN_TRY
@@ -3452,17 +3535,23 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_
/* (Should not be found, but not fail) */
find.key = 41;
find.val = (hsize_t)-1;
- if (H5B2_find(bt2, &find, find_rec_cb, &find) != FALSE)
+ found = FALSE;
+ if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
TEST_ERROR
if (find.val != (hsize_t)-1)
TEST_ERROR
+ if (found)
+ TEST_ERROR
/* Attempt to find existant record in level-0 B-tree with several record */
find.key = 56;
- if (H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE)
+ found = FALSE;
+ if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
TEST_ERROR
if (find.val != 22)
TEST_ERROR
+ if (!found)
+ TEST_ERROR
/* Attempt to index non-existant record in B-tree with several records */
H5E_BEGIN_TRY
@@ -3562,6 +3651,7 @@ test_update_split_root(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_p
H5B2_test_rec_t idx; /* Index within B-tree, for iterator */
H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
unsigned u; /* Local index variable */
+ hbool_t found; /* Whether record was found */
herr_t ret; /* Generic error return value */
/*
@@ -3696,30 +3786,39 @@ test_update_split_root(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_p
/* (Should not be found, but not fail) */
find.key = 800;
find.val = (hsize_t)-1;
- if (H5B2_find(bt2, &find, find_rec_cb, &find) != FALSE)
+ found = FALSE;
+ if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
TEST_ERROR
if (find.val != (hsize_t)-1)
TEST_ERROR
+ if (found)
+ TEST_ERROR
/* Attempt to find existant record in root of level-1 B-tree */
find.key = 33;
find.val = (hsize_t)-1;
- if (H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE)
+ found = FALSE;
+ if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
FAIL_STACK_ERROR
if (find.key != 33)
TEST_ERROR
if (find.val != 67)
TEST_ERROR
+ if (!found)
+ TEST_ERROR
/* Attempt to find existant record in leaf of level-1 B-tree */
find.key = 56;
find.val = (hsize_t)-1;
- if (H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE)
+ found = FALSE;
+ if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
FAIL_STACK_ERROR
if (find.key != 56)
TEST_ERROR
if (find.val != 113)
TEST_ERROR
+ if (!found)
+ TEST_ERROR
/* Attempt to index non-existant record in level-1 B-tree */
H5E_BEGIN_TRY
@@ -4402,6 +4501,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_
H5B2_test_rec_t idx; /* Index within B-tree, for iterator */
H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
unsigned u; /* Local index variable */
+ hbool_t found; /* Whether record was found */
herr_t ret; /* Generic error return value */
/*
@@ -4482,18 +4582,24 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_
/* (Should not be found, but not fail) */
find.key = INSERT_SPLIT_ROOT_NREC_REC * 42;
find.val = (hsize_t)-1;
- if (H5B2_find(bt2, &find, find_rec_cb, &find) != FALSE)
+ found = FALSE;
+ if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
TEST_ERROR
if (find.val != (hsize_t)-1)
TEST_ERROR
+ if (found)
+ TEST_ERROR
/* Attempt to find existant record in root of level-2 B-tree */
find.key = 1347;
find.val = (hsize_t)-1;
- if (H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE)
+ found = FALSE;
+ if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
FAIL_STACK_ERROR
if (find.val != (1347 * 2))
TEST_ERROR
+ if (!found)
+ TEST_ERROR
/* Check with B-tree */
record.key = 1347;
@@ -4503,10 +4609,13 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_
/* Attempt to find existant record in internal node of level-2 B-tree */
find.key = 513;
find.val = (hsize_t)-1;
- if (H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE)
+ found = FALSE;
+ if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
FAIL_STACK_ERROR
if (find.val != (513 * 2))
TEST_ERROR
+ if (!found)
+ TEST_ERROR
/* Check with B-tree */
record.key = 513;
@@ -4516,10 +4625,13 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_
/* Attempt to find existant record in leaf of level-2 B-tree */
find.key = 555;
find.val = (hsize_t)-1;
- if (H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE)
+ found = FALSE;
+ if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
FAIL_STACK_ERROR
if (find.val != (555 * 2))
TEST_ERROR
+ if (!found)
+ TEST_ERROR
/* Check with B-tree */
record.key = 555;
@@ -4647,18 +4759,24 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_
/* (Should not be found, but not fail) */
find.key = INSERT_SPLIT_ROOT_NREC_REC * 42;
find.val = (hsize_t)-1;
- if (H5B2_find(bt2, &find, find_rec_cb, &find) != FALSE)
+ found = FALSE;
+ if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
TEST_ERROR
if (find.val != (hsize_t)-1)
TEST_ERROR
+ if (found)
+ TEST_ERROR
/* Attempt to find existant record in root of level-2 B-tree */
find.key = 1344;
find.val = (hsize_t)-1;
- if (H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE)
+ found = FALSE;
+ if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
FAIL_STACK_ERROR
if (find.val != (1344 * 2))
TEST_ERROR
+ if (!found)
+ TEST_ERROR
/* Check with B-tree */
record.key = 1344;
@@ -4668,10 +4786,13 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_
/* Attempt to find existant record in internal node of level-2 B-tree */
find.key = 512;
find.val = (hsize_t)-1;
- if (H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE)
+ found = FALSE;
+ if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
FAIL_STACK_ERROR
if (find.val != (512 * 2))
TEST_ERROR
+ if (!found)
+ TEST_ERROR
/* Check with B-tree */
record.key = 512;
@@ -4681,10 +4802,13 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_
/* Attempt to find existant record in leaf of level-2 B-tree */
find.key = 555;
find.val = (hsize_t)-1;
- if (H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE)
+ found = FALSE;
+ if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
FAIL_STACK_ERROR
if (find.val != (555 * 2))
TEST_ERROR
+ if (!found)
+ TEST_ERROR
/* Check with B-tree */
record.key = 555;
@@ -4822,18 +4946,24 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_
/* (Should not be found, but not fail) */
find.key = INSERT_SPLIT_ROOT_NREC_REC * 42;
find.val = (hsize_t)-1;
- if (H5B2_find(bt2, &find, find_rec_cb, &find) != FALSE)
+ found = FALSE;
+ if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
TEST_ERROR
if (find.val != (hsize_t)-1)
TEST_ERROR
+ if (found)
+ TEST_ERROR
/* Attempt to find existant record in root of level-2 B-tree */
find.key = 1345;
find.val = (hsize_t)-1;
- if (H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE)
+ found = FALSE;
+ if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
FAIL_STACK_ERROR
if (find.val != (1345 * 2))
TEST_ERROR
+ if (!found)
+ TEST_ERROR
/* Check with B-tree */
record.key = 1345;
@@ -4843,10 +4973,13 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_
/* Attempt to find existant record in internal node of level-2 B-tree */
find.key = 513;
find.val = (hsize_t)-1;
- if (H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE)
+ found = FALSE;
+ if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
FAIL_STACK_ERROR
if (find.val != (513 * 2))
TEST_ERROR
+ if (!found)
+ TEST_ERROR
/* Check with B-tree */
record.key = 513;
@@ -4856,10 +4989,13 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_
/* Attempt to find existant record in leaf of level-2 B-tree */
find.key = 555;
find.val = (hsize_t)-1;
- if (H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE)
+ found = FALSE;
+ if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
FAIL_STACK_ERROR
if (find.val != (555 * 2))
TEST_ERROR
+ if (!found)
+ TEST_ERROR
/* Check with B-tree */
record.key = 555;
@@ -4960,6 +5096,7 @@ test_update_lots(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t
H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
hsize_t nrec; /* Number of records in B-tree */
unsigned u; /* Local index variable */
+ hbool_t found; /* Whether record was found */
herr_t ret; /* Generic error return value */
/* Initialize random number seed */
@@ -5055,10 +5192,13 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time);
/* (Should not be found, but not fail) */
find.key = INSERT_MANY_REC * 2;
find.val = (hsize_t)-1;
- if (H5B2_find(bt2, &find, find_rec_cb, &find) != FALSE)
+ found = FALSE;
+ if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
TEST_ERROR
if (find.val != (hsize_t)-1)
TEST_ERROR
+ if (found)
+ TEST_ERROR
/* Find random records */
for (u = 0; u < FIND_MANY_REC; u++) {
@@ -5067,10 +5207,13 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time);
find.val = (hsize_t)-1;
/* Attempt to find existant record in level-4 B-tree */
- if (H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE)
+ found = FALSE;
+ if (H5B2_find(bt2, &find, &found, find_rec_cb, &find) < 0)
FAIL_STACK_ERROR
if (find.val != (find.key * 2))
TEST_ERROR
+ if (!found)
+ TEST_ERROR
} /* end for */
/* Attempt to index non-existant record in level-4 B-tree, in increasing & decreasing order */
@@ -9600,6 +9743,7 @@ test_modify(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tpa
H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
H5B2_node_info_test_t ninfo; /* B-tree node info */
unsigned u; /* Local index variable */
+ hbool_t rec_found; /* Whether record was found */
herr_t ret; /* Generic error return value */
/*
@@ -9669,12 +9813,15 @@ test_modify(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tpa
TEST_ERROR
/* Attempt to find modified record */
- record = 4331;
- found = 4331;
- if (H5B2_find(bt2, &record, find_cb, &found) != TRUE)
+ record = 4331;
+ found = 4331;
+ rec_found = FALSE;
+ if (H5B2_find(bt2, &record, &rec_found, find_cb, &found) < 0)
FAIL_STACK_ERROR
if (found != 4331)
TEST_ERROR
+ if (!rec_found)
+ TEST_ERROR
/* Attempt to find original record */
record = 4330;
@@ -9717,12 +9864,15 @@ test_modify(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tpa
TEST_ERROR
/* Attempt to find modified record */
- record = 5352;
- found = 5352;
- if (H5B2_find(bt2, &record, find_cb, &found) != TRUE)
+ record = 5352;
+ found = 5352;
+ rec_found = FALSE;
+ if (H5B2_find(bt2, &record, &rec_found, find_cb, &found) < 0)
STACK_ERROR
if (found != 5352)
TEST_ERROR
+ if (!rec_found)
+ TEST_ERROR
/* Attempt to find original record */
record = 5350;
@@ -9765,12 +9915,15 @@ test_modify(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t *tpa
TEST_ERROR
/* Attempt to find modified record */
- record = 9448;
- found = 9448;
- if (H5B2_find(bt2, &record, find_cb, &found) != TRUE)
+ record = 9448;
+ found = 9448;
+ rec_found = FALSE;
+ if (H5B2_find(bt2, &record, &rec_found, find_cb, &found) < 0)
STACK_ERROR
if (found != 9448)
TEST_ERROR
+ if (!rec_found)
+ TEST_ERROR
/* Attempt to find original record */
record = 9445;
diff --git a/test/cache.c b/test/cache.c
index c7b2a2536bb..e83dd147c73 100644
--- a/test/cache.c
+++ b/test/cache.c
@@ -26392,7 +26392,7 @@ check_auto_cache_resize_aux_fcns(unsigned paged)
pass = FALSE;
failure_mssg = "H5C_get_cache_hit_rate failed.\n";
}
- else if (!H5_DBL_ABS_EQUAL(hit_rate, (double)0.0f)) { /* i.e. hit_rate != 0.0 */
+ else if (!H5_DBL_ABS_EQUAL(hit_rate, 0.0)) { /* i.e. hit_rate != 0.0 */
pass = FALSE;
failure_mssg = "H5C_get_cache_hit_rate returned unexpected hit rate 1.\n";
@@ -26423,7 +26423,7 @@ check_auto_cache_resize_aux_fcns(unsigned paged)
pass = FALSE;
failure_mssg = "H5C_get_cache_hit_rate failed.\n";
}
- else if (!H5_DBL_ABS_EQUAL(hit_rate, (double)0.0f)) { /* i.e. hit_rate != 0.0 */
+ else if (!H5_DBL_ABS_EQUAL(hit_rate, 0.0)) { /* i.e. hit_rate != 0.0 */
pass = FALSE;
failure_mssg = "H5C_get_cache_hit_rate returned unexpected hit rate 2.\n";
@@ -26464,7 +26464,7 @@ check_auto_cache_resize_aux_fcns(unsigned paged)
pass = FALSE;
failure_mssg = "H5C_get_cache_hit_rate failed.\n";
}
- else if (!H5_DBL_ABS_EQUAL(hit_rate, (double)0.5f)) { /* i.e. hit_rate != 0.5 */
+ else if (!H5_DBL_ABS_EQUAL(hit_rate, 0.5)) { /* i.e. hit_rate != 0.5 */
pass = FALSE;
failure_mssg = "H5C_get_cache_hit_rate returned unexpected hit rate 3.\n";
@@ -26537,7 +26537,7 @@ check_auto_cache_resize_aux_fcns(unsigned paged)
pass = FALSE;
failure_mssg = "H5C_get_cache_hit_rate failed.\n";
}
- else if (!H5_DBL_ABS_EQUAL(hit_rate, (double)0.5F)) { /* i.e. hit_rate != 0.5 */
+ else if (!H5_DBL_ABS_EQUAL(hit_rate, 0.5)) { /* i.e. hit_rate != 0.5 */
pass = FALSE;
failure_mssg = "H5C_get_cache_hit_rate returned unexpected hit rate 4.\n";
diff --git a/test/cache_api.c b/test/cache_api.c
index 75e1b9d195a..5d0f3950faf 100644
--- a/test/cache_api.c
+++ b/test/cache_api.c
@@ -81,27 +81,27 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
/* hbool_t evictions_enabled = */ TRUE,
/* hbool_t set_initial_size = */ TRUE,
/* size_t initial_size = */ (1 * 1024 * 1024 + 1),
- /* double min_clean_fraction = */ 0.2f,
+ /* double min_clean_fraction = */ 0.2,
/* size_t max_size = */ (16 * 1024 * 1024 + 1),
/* size_t min_size = */ (1 * 1024 * 1024 + 1),
/* long int epoch_length = */ 50001,
/* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold,
- /* double lower_hr_threshold = */ 0.91f,
- /* double increment = */ 2.1f,
+ /* double lower_hr_threshold = */ 0.91,
+ /* double increment = */ 2.1,
/* hbool_t apply_max_increment = */ TRUE,
/* size_t max_increment = */ (4 * 1024 * 1024 + 1),
/* enum H5C_cache_flash_incr_mode */
/* flash_incr_mode = */ H5C_flash_incr__off,
- /* double flash_multiple = */ 2.0f,
- /* double flash_threshold = */ 0.5f,
+ /* double flash_multiple = */ 2.0,
+ /* double flash_threshold = */ 0.5,
/* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out,
- /* double upper_hr_threshold = */ 0.998f,
- /* double decrement = */ 0.91f,
+ /* double upper_hr_threshold = */ 0.998,
+ /* double decrement = */ 0.91,
/* hbool_t apply_max_decrement = */ TRUE,
/* size_t max_decrement = */ (1 * 1024 * 1024 - 1),
/* int epochs_before_eviction = */ 4,
/* hbool_t apply_empty_reserve = */ TRUE,
- /* double empty_reserve = */ 0.05f,
+ /* double empty_reserve = */ 0.05,
/* int dirty_bytes_threshold = */ (256 * 1024),
/* int metadata_write_strategy = */
H5AC__DEFAULT_METADATA_WRITE_STRATEGY};
@@ -526,22 +526,22 @@ check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id)
/* hbool_t evictions_enabled = */ TRUE,
/* hbool_t set_initial_size = */ TRUE,
/* size_t initial_size = */ (1 * 1024 * 1024 + 1),
- /* double min_clean_fraction = */ 0.2f,
+ /* double min_clean_fraction = */ 0.2,
/* size_t max_size = */ (16 * 1024 * 1024 + 1),
/* size_t min_size = */ (1 * 1024 * 1024 + 1),
/* long int epoch_length = */ 50001,
/* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold,
- /* double lower_hr_threshold = */ 0.91f,
- /* double increment = */ 2.1f,
+ /* double lower_hr_threshold = */ 0.91,
+ /* double increment = */ 2.1,
/* hbool_t apply_max_increment = */ TRUE,
/* size_t max_increment = */ (4 * 1024 * 1024 + 1),
/* enum H5C_cache_flash_incr_mode */
/* flash_incr_mode = */ H5C_flash_incr__off,
- /* double flash_multiple = */ 2.0f,
- /* double flash_threshold = */ 0.5f,
+ /* double flash_multiple = */ 2.0,
+ /* double flash_threshold = */ 0.5,
/* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out,
- /* double upper_hr_threshold = */ 0.998f,
- /* double decrement = */ 0.91f,
+ /* double upper_hr_threshold = */ 0.998,
+ /* double decrement = */ 0.91,
/* hbool_t apply_max_decrement = */ TRUE,
/* size_t max_decrement = */ (1 * 1024 * 1024 - 1),
/* int epochs_before_eviction = */ 4,
@@ -559,27 +559,27 @@ check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id)
/* hbool_t evictions_enabled = */ TRUE,
/* hbool_t set_initial_size = */ TRUE,
/* size_t initial_size = */ (512 * 1024),
- /* double min_clean_fraction = */ 0.1f,
+ /* double min_clean_fraction = */ 0.1,
/* size_t max_size = */ (8 * 1024 * 1024),
/* size_t min_size = */ (512 * 1024),
/* long int epoch_length = */ 25000,
/* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold,
- /* double lower_hr_threshold = */ 0.9f,
- /* double increment = */ 2.0f,
+ /* double lower_hr_threshold = */ 0.9,
+ /* double increment = */ 2.0,
/* hbool_t apply_max_increment = */ TRUE,
/* size_t max_increment = */ (2 * 1024 * 1024),
/* enum H5C_cache_flash_incr_mode */
/* flash_incr_mode = */ H5C_flash_incr__off,
- /* double flash_multiple = */ 1.5f,
- /* double flash_threshold = */ 0.4f,
+ /* double flash_multiple = */ 1.5,
+ /* double flash_threshold = */ 0.4,
/* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__threshold,
- /* double upper_hr_threshold = */ 0.9995f,
- /* double decrement = */ 0.95f,
+ /* double upper_hr_threshold = */ 0.9995,
+ /* double decrement = */ 0.95,
/* hbool_t apply_max_decrement = */ TRUE,
/* size_t max_decrement = */ (512 * 1024),
/* int epochs_before_eviction = */ 4,
/* hbool_t apply_empty_reserve = */ TRUE,
- /* double empty_reserve = */ 0.05f,
+ /* double empty_reserve = */ 0.05,
/* int dirty_bytes_threshold = */ (256 * 1024),
/* int metadata_write_strategy = */
H5AC__DEFAULT_METADATA_WRITE_STRATEGY};
@@ -592,27 +592,27 @@ check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id)
/* hbool_t evictions_enabled = */ TRUE,
/* hbool_t set_initial_size = */ TRUE,
/* size_t initial_size = */ (1 * 1024 * 1024),
- /* double min_clean_fraction = */ 0.2f,
+ /* double min_clean_fraction = */ 0.2,
/* size_t max_size = */ (16 * 1024 * 1024),
/* size_t min_size = */ (1 * 1024 * 1024),
/* long int epoch_length = */ 50000,
/* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__off,
- /* double lower_hr_threshold = */ 0.90f,
- /* double increment = */ 2.0f,
+ /* double lower_hr_threshold = */ 0.90,
+ /* double increment = */ 2.0,
/* hbool_t apply_max_increment = */ TRUE,
/* size_t max_increment = */ (4 * 1024 * 1024),
/* enum H5C_cache_flash_incr_mode */
/* flash_incr_mode = */ H5C_flash_incr__off,
- /* double flash_multiple = */ 2.1f,
- /* double flash_threshold = */ 0.6f,
+ /* double flash_multiple = */ 2.1,
+ /* double flash_threshold = */ 0.6,
/* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__off,
- /* double upper_hr_threshold = */ 0.999f,
- /* double decrement = */ 0.9f,
+ /* double upper_hr_threshold = */ 0.999,
+ /* double decrement = */ 0.9,
/* hbool_t apply_max_decrement = */ FALSE,
/* size_t max_decrement = */ (1 * 1024 * 1024 - 1),
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ FALSE,
- /* double empty_reserve = */ 0.05f,
+ /* double empty_reserve = */ 0.05,
/* int dirty_bytes_threshold = */ (256 * 1024),
/* int metadata_write_strategy = */
H5AC__DEFAULT_METADATA_WRITE_STRATEGY};
@@ -625,28 +625,28 @@ check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id)
/* hbool_t evictions_enabled = */ TRUE,
/* hbool_t set_initial_size = */ TRUE,
/* size_t initial_size = */ (1 * 1024 * 1024),
- /* double min_clean_fraction = */ 0.15f,
+ /* double min_clean_fraction = */ 0.15,
/* size_t max_size = */ (20 * 1024 * 1024),
/* size_t min_size = */ (1 * 1024 * 1024),
/* long int epoch_length = */ 75000,
/* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold,
- /* double lower_hr_threshold = */ 0.9f,
- /* double increment = */ 2.0f,
+ /* double lower_hr_threshold = */ 0.9,
+ /* double increment = */ 2.0,
/* hbool_t apply_max_increment = */ TRUE,
/* size_t max_increment = */ (2 * 1024 * 1024),
/* enum H5C_cache_flash_incr_mode */
/* flash_incr_mode = */ H5C_flash_incr__off,
- /* double flash_multiple = */ 1.1f,
- /* double flash_threshold = */ 0.3f,
+ /* double flash_multiple = */ 1.1,
+ /* double flash_threshold = */ 0.3,
/* enum H5C_cache_decr_mode decr_mode = */
H5C_decr__age_out_with_threshold,
- /* double upper_hr_threshold = */ 0.999f,
- /* double decrement = */ 0.9f,
+ /* double upper_hr_threshold = */ 0.999,
+ /* double decrement = */ 0.9,
/* hbool_t apply_max_decrement = */ TRUE,
/* size_t max_decrement = */ (1 * 1024 * 1024),
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
- /* double empty_reserve = */ 0.1f,
+ /* double empty_reserve = */ 0.1,
/* int dirty_bytes_threshold = */ (256 * 1024),
/* int metadata_write_strategy = */
H5AC__DEFAULT_METADATA_WRITE_STRATEGY};
@@ -755,7 +755,7 @@ check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id)
pass = FALSE;
failure_mssg = "H5Fget_mdc_hit_rate() failed 1.\n";
}
- else if (!H5_DBL_ABS_EQUAL(hit_rate, (double)0.0f)) {
+ else if (!H5_DBL_ABS_EQUAL(hit_rate, 0.0)) {
pass = FALSE;
failure_mssg = "H5Fget_mdc_hit_rate() returned unexpected hit rate.\n";
@@ -857,7 +857,7 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
hbool_t valid_chunk;
hbool_t dump_hit_rate = FALSE;
int64_t min_accesses = 1000;
- double min_hit_rate = 0.90f;
+ double min_hit_rate = 0.90;
hbool_t dump_cache_size = FALSE;
hid_t file_id = -1;
hid_t dataspace_id = -1;
@@ -883,27 +883,27 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
/* hbool_t evictions_enabled = */ TRUE,
/* hbool_t set_initial_size = */ TRUE,
/* size_t initial_size = */ 500000,
- /* double min_clean_fraction = */ 0.1f,
+ /* double min_clean_fraction = */ 0.1,
/* size_t max_size = */ 16000000,
/* size_t min_size = */ 250000,
/* long int epoch_length = */ 50000,
/* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__off,
- /* double lower_hr_threshold = */ 0.95f,
- /* double increment = */ 2.0f,
+ /* double lower_hr_threshold = */ 0.95,
+ /* double increment = */ 2.0,
/* hbool_t apply_max_increment = */ FALSE,
/* size_t max_increment = */ 4000000,
/* enum H5C_cache_flash_incr_mode */
/* flash_incr_mode = */ H5C_flash_incr__off,
- /* double flash_multiple = */ 2.0f,
- /* double flash_threshold = */ 0.5f,
+ /* double flash_multiple = */ 2.0,
+ /* double flash_threshold = */ 0.5,
/* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__off,
- /* double upper_hr_threshold = */ 0.999f,
- /* double decrement = */ 0.9f,
+ /* double upper_hr_threshold = */ 0.999,
+ /* double decrement = */ 0.9,
/* hbool_t apply_max_decrement = */ FALSE,
/* size_t max_decrement = */ 1000000,
/* int epochs_before_eviction = */ 2,
/* hbool_t apply_empty_reserve = */ TRUE,
- /* double empty_reserve = */ 0.05f,
+ /* double empty_reserve = */ 0.05,
/* int dirty_bytes_threshold = */ (256 * 1024),
/* int metadata_write_strategy = */
H5AC__DEFAULT_METADATA_WRITE_STRATEGY};
@@ -916,27 +916,27 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
/* hbool_t evictions_enabled = */ TRUE,
/* hbool_t set_initial_size = */ TRUE,
/* size_t initial_size = */ 12000000,
- /* double min_clean_fraction = */ 0.1f,
+ /* double min_clean_fraction = */ 0.1,
/* size_t max_size = */ 16000000,
/* size_t min_size = */ 250000,
/* long int epoch_length = */ 50000,
/* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__off,
- /* double lower_hr_threshold = */ 0.95f,
- /* double increment = */ 2.0f,
+ /* double lower_hr_threshold = */ 0.95,
+ /* double increment = */ 2.0,
/* hbool_t apply_max_increment = */ FALSE,
/* size_t max_increment = */ 4000000,
/* enum H5C_cache_flash_incr_mode */
/* flash_incr_mode = */ H5C_flash_incr__off,
- /* double flash_multiple = */ 2.0f,
- /* double flash_threshold = */ 0.5f,
+ /* double flash_multiple = */ 2.0,
+ /* double flash_threshold = */ 0.5,
/* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__off,
- /* double upper_hr_threshold = */ 0.999f,
- /* double decrement = */ 0.9f,
+ /* double upper_hr_threshold = */ 0.999,
+ /* double decrement = */ 0.9,
/* hbool_t apply_max_decrement = */ FALSE,
/* size_t max_decrement = */ 1000000,
/* int epochs_before_eviction = */ 2,
/* hbool_t apply_empty_reserve = */ TRUE,
- /* double empty_reserve = */ 0.05f,
+ /* double empty_reserve = */ 0.05,
/* int dirty_bytes_threshold = */ (256 * 1024),
/* int metadata_write_strategy = */
H5AC__DEFAULT_METADATA_WRITE_STRATEGY};
@@ -949,27 +949,27 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
/* hbool_t evictions_enabled = */ TRUE,
/* hbool_t set_initial_size = */ TRUE,
/* size_t initial_size = */ 2000000,
- /* double min_clean_fraction = */ 0.1f,
+ /* double min_clean_fraction = */ 0.1,
/* size_t max_size = */ 16000000,
/* size_t min_size = */ 250000,
/* long int epoch_length = */ 50000,
/* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__off,
- /* double lower_hr_threshold = */ 0.95f,
- /* double increment = */ 2.0f,
+ /* double lower_hr_threshold = */ 0.95,
+ /* double increment = */ 2.0,
/* hbool_t apply_max_increment = */ FALSE,
/* size_t max_increment = */ 4000000,
/* enum H5C_cache_flash_incr_mode */
/* flash_incr_mode = */ H5C_flash_incr__off,
- /* double flash_multiple = */ 2.0f,
- /* double flash_threshold = */ 0.5f,
+ /* double flash_multiple = */ 2.0,
+ /* double flash_threshold = */ 0.5,
/* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__off,
- /* double upper_hr_threshold = */ 0.999f,
- /* double decrement = */ 0.9f,
+ /* double upper_hr_threshold = */ 0.999,
+ /* double decrement = */ 0.9,
/* hbool_t apply_max_decrement = */ FALSE,
/* size_t max_decrement = */ 1000000,
/* int epochs_before_eviction = */ 2,
/* hbool_t apply_empty_reserve = */ TRUE,
- /* double empty_reserve = */ 0.05f,
+ /* double empty_reserve = */ 0.05,
/* int dirty_bytes_threshold = */ (256 * 1024),
/* int metadata_write_strategy = */
H5AC__DEFAULT_METADATA_WRITE_STRATEGY};
@@ -1517,26 +1517,26 @@ init_invalid_configs(void)
configs[i].evictions_enabled = TRUE;
configs[i].set_initial_size = TRUE;
configs[i].initial_size = (1 * 1024 * 1024);
- configs[i].min_clean_fraction = 0.25F;
+ configs[i].min_clean_fraction = 0.25;
configs[i].max_size = (16 * 1024 * 1024);
configs[i].min_size = (1 * 1024 * 1024);
configs[i].epoch_length = 50000;
configs[i].incr_mode = H5C_incr__threshold;
- configs[i].lower_hr_threshold = 0.9F;
- configs[i].increment = 2.0F;
+ configs[i].lower_hr_threshold = 0.9;
+ configs[i].increment = 2.0;
configs[i].apply_max_increment = TRUE;
configs[i].max_increment = (4 * 1024 * 1024);
configs[i].flash_incr_mode = H5C_flash_incr__off;
- configs[i].flash_multiple = 2.0F;
- configs[i].flash_threshold = 0.5F;
+ configs[i].flash_multiple = 2.0;
+ configs[i].flash_threshold = 0.5;
configs[i].decr_mode = H5C_decr__age_out_with_threshold;
- configs[i].upper_hr_threshold = 0.999F;
- configs[i].decrement = 0.9F;
+ configs[i].upper_hr_threshold = 0.999;
+ configs[i].decrement = 0.9;
configs[i].apply_max_decrement = TRUE;
configs[i].max_decrement = (1 * 1024 * 1024);
configs[i].epochs_before_eviction = 3;
configs[i].apply_empty_reserve = TRUE;
- configs[i].empty_reserve = 0.1F;
+ configs[i].empty_reserve = 0.1;
configs[i].dirty_bytes_threshold = (256 * 1024);
configs[i].metadata_write_strategy = H5AC__DEFAULT_METADATA_WRITE_STRATEGY;
}
@@ -1567,10 +1567,10 @@ init_invalid_configs(void)
configs[6].initial_size = (1 * 1024 * 1024 - 1);
/* 7 -- min_clean_fraction too big */
- configs[7].min_clean_fraction = 1.000001f;
+ configs[7].min_clean_fraction = 1.000001;
/* 8 -- min_clean_fraction too small */
- configs[8].min_clean_fraction = -0.00000001f;
+ configs[8].min_clean_fraction = -0.00000001;
/* 9 -- epoch_length too small */
configs[9].epoch_length = H5C__MIN_AR_EPOCH_LENGTH - 1;
@@ -1582,10 +1582,10 @@ init_invalid_configs(void)
configs[11].incr_mode = (enum H5C_cache_incr_mode) - 1;
/* 12 -- lower_hr_threshold too small */
- configs[12].lower_hr_threshold = -0.000001f;
+ configs[12].lower_hr_threshold = -0.000001;
/* 13 -- lower_hr_threshold too big */
- configs[13].lower_hr_threshold = 1.00000001f;
+ configs[13].lower_hr_threshold = 1.00000001;
/* 14 -- increment too small */
configs[14].increment = 0.999999999999;
@@ -1595,29 +1595,29 @@ init_invalid_configs(void)
/* 16 -- flash_multiple too small */
configs[16].flash_incr_mode = H5C_flash_incr__add_space;
- configs[16].flash_multiple = 0.09f;
+ configs[16].flash_multiple = 0.09;
/* 17 -- flash_multiple too big */
configs[17].flash_incr_mode = H5C_flash_incr__add_space;
- configs[17].flash_multiple = 10.001f;
+ configs[17].flash_multiple = 10.001;
/* 18 -- flash_threshold too small */
configs[18].flash_incr_mode = H5C_flash_incr__add_space;
- configs[18].flash_threshold = 0.099f;
+ configs[18].flash_threshold = 0.099;
/* 19 -- flash_threshold too big */
configs[19].flash_incr_mode = H5C_flash_incr__add_space;
- configs[19].flash_threshold = 1.001f;
+ configs[19].flash_threshold = 1.001;
/* 20 -- bad decr_mode */
configs[20].decr_mode = (enum H5C_cache_decr_mode) - 1;
/* 21 -- upper_hr_threshold too big */
- configs[21].upper_hr_threshold = 1.00001f;
+ configs[21].upper_hr_threshold = 1.00001;
/* 22 -- decrement too small */
configs[22].decr_mode = H5C_decr__threshold;
- configs[22].decrement = -0.0000000001f;
+ configs[22].decrement = -0.0000000001;
/* 23 -- decrement too big */
configs[23].decr_mode = H5C_decr__threshold;
@@ -1630,20 +1630,20 @@ init_invalid_configs(void)
configs[25].epochs_before_eviction = H5C__MAX_EPOCH_MARKERS + 1;
/* 26 -- empty_reserve too small */
- configs[26].empty_reserve = -0.0000000001f;
+ configs[26].empty_reserve = -0.0000000001;
/* 27 -- empty_reserve too big */
configs[27].empty_reserve = 1.00000000001;
/* 28 -- upper_hr_threshold too small */
- configs[28].upper_hr_threshold = -0.000000001f;
+ configs[28].upper_hr_threshold = -0.000000001;
/* 29 -- upper_hr_threshold too big */
configs[29].upper_hr_threshold = 1.00000001;
/* 30 -- upper_hr_threshold <= lower_hr_threshold */
- configs[30].lower_hr_threshold = 0.9f;
- configs[30].upper_hr_threshold = 0.9f;
+ configs[30].lower_hr_threshold = 0.9;
+ configs[30].upper_hr_threshold = 0.9;
/* 31 -- dirty_bytes_threshold too small */
configs[31].dirty_bytes_threshold = (H5C__MIN_MAX_CACHE_SIZE / 2) - 1;
diff --git a/test/cache_image.c b/test/cache_image.c
index e0748b56845..f5f36bfe840 100644
--- a/test/cache_image.c
+++ b/test/cache_image.c
@@ -15,7 +15,7 @@
* 7/13/15
*
* This file contains tests specific to the cache image
- * feature implemented in H5C.c
+ * feature implemented in H5C.c
*/
#include "cache_common.h"
#include "genall5.h"
@@ -389,8 +389,6 @@ create_datasets(hid_t file_id, int min_dset, int max_dset)
}
}
- return;
-
} /* create_datasets() */
/*-------------------------------------------------------------------------
@@ -462,8 +460,6 @@ delete_datasets(hid_t file_id, int min_dset, int max_dset)
if (show_progress)
HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
- return;
-
} /* delete_datasets() */
/*-------------------------------------------------------------------------
@@ -852,8 +848,6 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected, hbool_t read_onl
if (show_progress)
HDfprintf(stdout, "%s: cp = %d -- exiting.\n", fcn_name, cp++);
- return;
-
} /* open_hdf5_file() */
/*-------------------------------------------------------------------------
@@ -965,8 +959,6 @@ attempt_swmr_open_hdf5_file(const hbool_t create_file, const hbool_t set_mdci_fa
if (show_progress)
HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
- return;
-
} /* attempt_swmr_open_hdf5_file() */
/*-------------------------------------------------------------------------
@@ -1204,8 +1196,6 @@ verify_datasets(hid_t file_id, int min_dset, int max_dset)
}
}
- return;
-
} /* verify_datasets() */
/****************************************************************************/
@@ -7882,8 +7872,8 @@ main(void)
HDprintf("=========================================\n");
/* Check for VFD which stores data in multiple files */
- single_file_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi") &&
- HDstrcmp(env_h5_drvr, "family"));
+ single_file_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0 &&
+ HDstrcmp(env_h5_drvr, "family") != 0);
nerrs += check_cache_image_ctl_flow_1(single_file_vfd);
nerrs += check_cache_image_ctl_flow_2(single_file_vfd);
diff --git a/test/chunk_info.c b/test/chunk_info.c
index ada2d80f851..71049416598 100644
--- a/test/chunk_info.c
+++ b/test/chunk_info.c
@@ -449,7 +449,7 @@ verify_idx_nchunks(hid_t dset, hid_t dspace, H5D_chunk_index_t exp_idx_type, hsi
* Return: Success: SUCCEED
* Failure: FAIL
*
- * Note: Note that the dataspace argument in these new functions are
+ * Note: Note that the dataspace argument in these new functions is
* currently not used. The functionality involved the dataspace
* will be implemented in the next version.
*
@@ -486,10 +486,10 @@ test_get_chunk_info_highest_v18(hid_t fapl)
hsize_t offset[2] = {0, 0}; /* Offset coordinates of a chunk */
#ifdef H5_HAVE_FILTER_DEFLATE
const Bytef *z_src = (const Bytef *)(direct_buf);
- Bytef * z_dst; /*destination buffer */
+ Bytef * z_dst; /* Destination buffer */
uLongf z_dst_nbytes = (uLongf)DEFLATE_SIZE_ADJUST(CHK_SIZE);
uLong z_src_nbytes = (uLong)CHK_SIZE;
-#endif /* end H5_HAVE_FILTER_DEFLATE */
+#endif
void * inbuf = NULL; /* Pointer to new buffer */
hsize_t chunk_size = CHK_SIZE; /* Size of a chunk, can be compressed or not */
hsize_t ii, jj; /* Array indices */
@@ -544,14 +544,15 @@ test_get_chunk_info_highest_v18(hid_t fapl)
/* Allocate input (compressed) buffer */
inbuf = HDcalloc(1, z_dst_nbytes);
- /* Set chunk size to the compressed chunk size and the chunk point
- to the compressed data chunk */
- chunk_size = (hsize_t)z_dst_nbytes;
- z_dst = (Bytef *)inbuf;
+ /* zlib-friendly alias for the input buffer */
+ z_dst = (Bytef *)inbuf;
/* Perform compression from the source to the destination buffer */
ret = compress2(z_dst, &z_dst_nbytes, z_src, z_src_nbytes, aggression);
+ /* Set the chunk size to the compressed chunk size */
+ chunk_size = (hsize_t)z_dst_nbytes;
+
/* Check for various zlib errors */
if (Z_BUF_ERROR == ret) {
HDfprintf(stderr, "overflow");
@@ -1482,6 +1483,50 @@ test_chunk_info_version2_btrees(const char *filename, hid_t fapl)
return FAIL;
} /* test_chunk_info_version2_btrees() */
+typedef struct chunk_iter_info_t {
+ hsize_t offset[2];
+ uint32_t filter_mask;
+ haddr_t addr;
+ uint32_t nbytes;
+} chunk_iter_info_t;
+
+static int
+iter_cb(const hsize_t *offset, uint32_t filter_mask, haddr_t addr, uint32_t nbytes, void *op_data)
+{
+ chunk_iter_info_t **chunk_info = (chunk_iter_info_t **)op_data;
+
+ (*chunk_info)->offset[0] = offset[0];
+ (*chunk_info)->offset[1] = offset[1];
+ (*chunk_info)->filter_mask = filter_mask;
+ (*chunk_info)->addr = addr;
+ (*chunk_info)->nbytes = nbytes;
+
+ /* printf("offset: [%lld, %lld], addr: %ld, size: %d, filter mask: %d\n", offset[0], offset[1], addr,
+ * nbytes, filter_mask); */
+
+ *chunk_info += 1;
+
+ return H5_ITER_CONT;
+}
+
+static int
+iter_cb_stop(const hsize_t H5_ATTR_UNUSED *offset, uint32_t H5_ATTR_UNUSED filter_mask,
+ haddr_t H5_ATTR_UNUSED addr, uint32_t H5_ATTR_UNUSED nbytes, void *op_data)
+{
+ chunk_iter_info_t **chunk_info = (chunk_iter_info_t **)op_data;
+ *chunk_info += 1;
+ return H5_ITER_STOP;
+}
+
+static int
+iter_cb_fail(const hsize_t H5_ATTR_UNUSED *offset, uint32_t H5_ATTR_UNUSED filter_mask,
+ haddr_t H5_ATTR_UNUSED addr, uint32_t H5_ATTR_UNUSED nbytes, void *op_data)
+{
+ chunk_iter_info_t **chunk_info = (chunk_iter_info_t **)op_data;
+ *chunk_info += 1;
+ return H5_ITER_ERROR;
+}
+
/*-------------------------------------------------------------------------
* Function: test_basic_query
*
@@ -1502,24 +1547,26 @@ test_chunk_info_version2_btrees(const char *filename, hid_t fapl)
static herr_t
test_basic_query(hid_t fapl)
{
- char filename[FILENAME_BUF_SIZE]; /* File name */
- hid_t basicfile = H5I_INVALID_HID; /* File ID */
- hid_t dspace = H5I_INVALID_HID; /* Dataspace ID */
- hid_t dset = H5I_INVALID_HID; /* Dataset ID */
- hid_t cparms = H5I_INVALID_HID; /* Creation plist */
- hsize_t dims[2] = {NX, NY}; /* Dataset dimensions */
- hsize_t chunk_dims[2] = {CHUNK_NX, CHUNK_NY}; /* Chunk dimensions */
- int direct_buf[CHUNK_NX][CHUNK_NY]; /* Data in chunks */
- unsigned flt_msk = 0; /* Filter mask */
- unsigned read_flt_msk = 0; /* Filter mask after direct read */
- hsize_t offset[2]; /* Offset coordinates of a chunk */
- hsize_t out_offset[2] = {0, 0}; /* Buffer to get offset coordinates */
- hsize_t size = 0; /* Size of an allocated/written chunk */
- hsize_t nchunks = 0; /* Number of chunks */
- haddr_t addr = 0; /* Address of an allocated/written chunk */
- hsize_t chk_index = 0; /* Index of a chunk */
- hsize_t ii, jj; /* Array indices */
- herr_t ret; /* Temporary returned value for verifying failure */
+ char filename[FILENAME_BUF_SIZE]; /* File name */
+ hid_t basicfile = H5I_INVALID_HID; /* File ID */
+ hid_t dspace = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t dset = H5I_INVALID_HID; /* Dataset ID */
+ hid_t cparms = H5I_INVALID_HID; /* Creation plist */
+ hsize_t dims[2] = {NX, NY}; /* Dataset dimensions */
+ hsize_t chunk_dims[2] = {CHUNK_NX, CHUNK_NY}; /* Chunk dimensions */
+ int direct_buf[CHUNK_NX][CHUNK_NY]; /* Data in chunks */
+ unsigned flt_msk = 0; /* Filter mask */
+ unsigned read_flt_msk = 0; /* Filter mask after direct read */
+ hsize_t offset[2]; /* Offset coordinates of a chunk */
+ hsize_t out_offset[2] = {0, 0}; /* Buffer to get offset coordinates */
+ hsize_t size = 0; /* Size of an allocated/written chunk */
+ hsize_t nchunks = 0; /* Number of chunks */
+ haddr_t addr = 0; /* Address of an allocated/written chunk */
+ hsize_t chk_index = 0; /* Index of a chunk */
+ hsize_t ii, jj; /* Array indices */
+ chunk_iter_info_t chunk_infos[2]; /* chunk infos filled up by iterator */
+ chunk_iter_info_t *cptr; /* pointer to array of chunks */
+ herr_t ret; /* Temporary returned value for verifying failure */
TESTING("basic operations");
@@ -1627,6 +1674,37 @@ test_basic_query(hid_t fapl)
if (verify_empty_chunk_info(dset, offset) == FAIL)
FAIL_PUTS_ERROR("Verification of H5Dget_chunk_info_by_coord on empty chunk failed\n");
+ /* iterate over all chunks */
+ cptr = &(chunk_infos[0]);
+ if (H5Dchunk_iter(dset, &iter_cb, &cptr) < 0)
+ TEST_ERROR;
+
+ VERIFY(cptr, &(chunk_infos[2]), "Iterator did not iterate all chunks");
+ VERIFY(chunk_infos[0].offset[0], 0, "Offset mismatch");
+ VERIFY(chunk_infos[0].offset[1], 0, "Offset mismatch");
+ VERIFY(chunk_infos[0].filter_mask, 0, "Filter mismatch");
+ VERIFY(chunk_infos[0].nbytes, 96, "Size mismatch");
+
+ VERIFY(chunk_infos[1].offset[0], 1, "Offset mismatch");
+ VERIFY(chunk_infos[1].offset[1], 1, "Offset mismatch");
+
+ /* iterate and stop after one iteration */
+ cptr = &(chunk_infos[0]);
+ if (H5Dchunk_iter(dset, &iter_cb_stop, &cptr) < 0)
+ TEST_ERROR;
+ VERIFY(cptr, &(chunk_infos[1]), "Verification of halted iterator failed\n");
+
+ /* iterate and fail after one iteration */
+ cptr = &(chunk_infos[0]);
+ H5E_BEGIN_TRY
+ {
+ ret = H5Dchunk_iter(dset, &iter_cb_fail, &cptr);
+ }
+ H5E_END_TRY;
+ if (ret >= 0)
+ TEST_ERROR;
+ VERIFY(cptr, &(chunk_infos[1]), "Verification of halted iterator failed\n");
+
/* Release resourse */
if (H5Dclose(dset) < 0)
TEST_ERROR
diff --git a/test/cmpd_dtransform.c b/test/cmpd_dtransform.c
new file mode 100644
index 00000000000..76ff287afc3
--- /dev/null
+++ b/test/cmpd_dtransform.c
@@ -0,0 +1,182 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * Programmer: Jan-Willem Blokland
+ * December 1, 2020
+ *
+ * Purpose: Test writing compounded attribute followed by
+ * writing data with a data transform function.
+ */
+
+#include "h5test.h"
+
+#define FILENAME "cmpd_dtransform.h5"
+#define LENGTH 11
+
+typedef struct {
+ char name[64];
+ char unit[64];
+} att_t;
+
+int
+main(void)
+{
+ hsize_t dima[] = {1};
+ hsize_t dims[] = {LENGTH};
+ hid_t str_dtyp_id = H5I_INVALID_HID, att_dtyp_id = H5I_INVALID_HID;
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t fspace_id = H5I_INVALID_HID;
+ hid_t dset_id = H5I_INVALID_HID;
+ hid_t att_dspc_id = H5I_INVALID_HID;
+ hid_t att_attr_id = H5I_INVALID_HID;
+ hid_t dxpl_id = H5I_INVALID_HID;
+ const char *expr = "2*x";
+ int * data = NULL;
+ int * data_res = NULL;
+ att_t * atts = NULL;
+ att_t * atts_res = NULL;
+
+ /* Compound datatype */
+ if (NULL == (atts = HDmalloc(sizeof(att_t))))
+ TEST_ERROR;
+ HDstrcpy(atts[0].name, "Name");
+ HDstrcpy(atts[0].unit, "Unit");
+
+ /* String type */
+ if ((str_dtyp_id = H5Tcopy(H5T_C_S1)) < 0)
+ FAIL_STACK_ERROR
+ if (H5Tset_size(str_dtyp_id, 64) < 0)
+ FAIL_STACK_ERROR
+
+ /* Attribute type */
+ if ((att_dtyp_id = H5Tcreate(H5T_COMPOUND, sizeof(att_t))) < 0)
+ FAIL_STACK_ERROR
+ if (H5Tinsert(att_dtyp_id, "NAME", HOFFSET(att_t, name), str_dtyp_id) < 0)
+ FAIL_STACK_ERROR
+ if (H5Tinsert(att_dtyp_id, "UNIT", HOFFSET(att_t, unit), str_dtyp_id) < 0)
+ FAIL_STACK_ERROR
+
+ /* Create file. */
+ if ((file_id = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ FAIL_STACK_ERROR
+
+ /* Create file dataspace. */
+ if ((fspace_id = H5Screate_simple(1, dims, NULL)) < 0)
+ FAIL_STACK_ERROR
+
+ /* Create dataset. */
+ if ((dset_id = H5Dcreate2(file_id, "test_dset", H5T_NATIVE_INT, fspace_id, H5P_DEFAULT, H5P_DEFAULT,
+ H5P_DEFAULT)) < 0)
+ FAIL_STACK_ERROR
+
+ /* Write the attribute (compound) to the dataset */
+ if ((att_dspc_id = H5Screate_simple(1, dima, NULL)) < 0)
+ FAIL_STACK_ERROR
+ if ((att_attr_id =
+ H5Acreate2(dset_id, "ATTRIBUTES", att_dtyp_id, att_dspc_id, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ FAIL_STACK_ERROR
+ if (H5Awrite(att_attr_id, att_dtyp_id, atts) < 0)
+ FAIL_STACK_ERROR
+
+ /* Create dataset transfer property list */
+ if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
+ FAIL_STACK_ERROR
+ if (H5Pset_data_transform(dxpl_id, expr) < 0) {
+ HDprintf("**** ERROR: H5Pset_data_transform (expression: %s) ****\n", expr);
+ FAIL_STACK_ERROR
+ }
+
+ if (NULL == (data = HDmalloc(LENGTH * sizeof(int))))
+ TEST_ERROR;
+ if (NULL == (data_res = HDmalloc(LENGTH * sizeof(int))))
+ TEST_ERROR;
+ for (unsigned i = 0; i < LENGTH; i++) {
+ data[i] = 10;
+ data_res[i] = 2 * data[i];
+ }
+
+ /* Write the data */
+ if (H5Dwrite(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl_id, data) < 0)
+ FAIL_STACK_ERROR
+
+ /* Read attribute */
+ if (NULL == (atts_res = HDmalloc(sizeof(att_t))))
+ TEST_ERROR;
+ if (H5Aread(att_attr_id, att_dtyp_id, atts_res) < 0)
+ FAIL_STACK_ERROR
+
+ /* Verify attribute */
+ if (HDstrcmp(atts_res[0].name, atts[0].name) != 0)
+ TEST_ERROR;
+ if (HDstrcmp(atts_res[0].unit, atts[0].unit) != 0)
+ TEST_ERROR;
+
+ /* Read the data */
+ if (H5Dread(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data) < 0)
+ FAIL_STACK_ERROR
+
+ /* Verify data */
+ for (unsigned idx = 0; idx < LENGTH; idx++)
+ if (data[idx] != data_res[idx])
+ TEST_ERROR;
+
+ HDfree(atts);
+ HDfree(atts_res);
+ HDfree(data);
+ HDfree(data_res);
+
+ /* Close all identifiers. */
+ if (H5Pclose(dxpl_id) < 0)
+ FAIL_STACK_ERROR
+ if (H5Aclose(att_attr_id) < 0)
+ FAIL_STACK_ERROR
+ if (H5Sclose(att_dspc_id) < 0)
+ FAIL_STACK_ERROR
+ if (H5Dclose(dset_id) < 0)
+ FAIL_STACK_ERROR
+ if (H5Sclose(fspace_id) < 0)
+ FAIL_STACK_ERROR
+ if (H5Fclose(file_id) < 0)
+ FAIL_STACK_ERROR
+ if (H5Tclose(att_dtyp_id) < 0)
+ FAIL_STACK_ERROR
+ if (H5Tclose(str_dtyp_id) < 0)
+ FAIL_STACK_ERROR
+
+ return 0;
+
+error:
+ H5E_BEGIN_TRY
+ {
+ H5Pclose(dxpl_id);
+ H5Aclose(att_attr_id);
+ H5Sclose(att_dspc_id);
+ H5Dclose(dset_id);
+ H5Sclose(fspace_id);
+ H5Fclose(file_id);
+ H5Tclose(att_dtyp_id);
+ H5Tclose(str_dtyp_id);
+ }
+ H5E_END_TRY
+
+ if (atts)
+ HDfree(atts);
+ if (atts_res)
+ HDfree(atts_res);
+ if (data)
+ HDfree(data);
+ if (data_res)
+ HDfree(data_res);
+
+ return 1;
+}
diff --git a/test/cross_read.c b/test/cross_read.c
index 386c0dae73b..eef814f151d 100644
--- a/test/cross_read.c
+++ b/test/cross_read.c
@@ -159,9 +159,9 @@ check_data_f(const char *dsetname, hid_t fid)
/* Input (last row is different) */
for (i = 0; i < NX; i++)
for (j = 0; j < NY; j++)
- data_in[i][j] = ((double)(i + j + 1)) / (double)3.0F;
+ data_in[i][j] = ((double)(i + j + 1)) / 3.0;
for (i = 0; i < NY; i++)
- data_in[NX][i] = -2.2F;
+ data_in[NX][i] = -2.2;
/* Output */
HDmemset(data_out, 0, (NX + 1) * NY * sizeof(double));
@@ -174,7 +174,7 @@ check_data_f(const char *dsetname, hid_t fid)
/* Check results */
for (i = 0; i < (NX + 1); i++)
for (j = 0; j < NY; j++)
- if (!H5_DBL_REL_EQUAL(data_out[i][j], data_in[i][j], (double)0.001F))
+ if (!H5_DBL_REL_EQUAL(data_out[i][j], data_in[i][j], 0.001))
if (!nerrors++) {
H5_FAILED();
HDprintf("element [%d][%d] is %g but should have been %g\n", (int)i, (int)j,
diff --git a/test/dsets.c b/test/dsets.c
index e38f2532543..96f8b817dfd 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -6520,7 +6520,7 @@ test_set_local(hid_t fapl)
for (i = 0; i < DSET_DIM1; i++)
for (j = 0; j < DSET_DIM2; j++) {
points[i][j] = (int)n++;
- points_dbl[i][j] = (double)1.5F * n++;
+ points_dbl[i][j] = 1.5 * n++;
}
/* Open file */
@@ -6716,7 +6716,7 @@ test_set_local(hid_t fapl)
for (j = 0; j < dims[1]; j++) {
/* If the difference between two values is greater than 0.001%, they're
* considered not equal. */
- if (!H5_DBL_REL_EQUAL(points_dbl[i][j], check_dbl[i][j], (double)0.00001F)) {
+ if (!H5_DBL_REL_EQUAL(points_dbl[i][j], check_dbl[i][j], 0.00001)) {
H5_FAILED();
HDprintf(" Line %d: Read different values than written.\n", __LINE__);
HDprintf(" At index %lu,%lu\n", (unsigned long)(i), (unsigned long)(j));
@@ -8803,7 +8803,7 @@ test_chunk_cache(hid_t fapl)
/* Set new rdcc settings on fapl */
nslots_2 = nslots_1 * 2;
nbytes_2 = nbytes_1 * 2;
- w0_2 = w0_1 / (double)2.0F;
+ w0_2 = w0_1 / 2.0;
if (H5Pset_cache(fapl_local, 0, nslots_2, nbytes_2, w0_2) < 0)
FAIL_STACK_ERROR
@@ -9525,8 +9525,7 @@ test_chunk_fast(const char *env_h5_driver, hid_t fapl)
npoints = (hsize_t)snpoints;
/* Compute the "down" dimension values */
- if (H5VM_array_down(ndims, dim, down) < 0)
- FAIL_STACK_ERROR
+ H5VM_array_down(ndims, dim, down);
/* Create chunked dataset */
if ((dsid = H5Dcreate2(fid, "dset", H5T_NATIVE_UINT, sid, H5P_DEFAULT, dcpl,
@@ -9708,8 +9707,7 @@ test_chunk_fast(const char *env_h5_driver, hid_t fapl)
H5VM_swizzle_coords(hsize_t, swizzled_dim, unlim_dim);
/* Compute the "down" dimension values */
- if (H5VM_array_down(ndims, swizzled_dim, down) < 0)
- FAIL_STACK_ERROR
+ H5VM_array_down(ndims, swizzled_dim, down);
/* Read elements */
for (u = 0; u < npoints; u++) {
diff --git a/test/dt_arith.c b/test/dt_arith.c
index f2bf6cf48b9..7b79102e45c 100644
--- a/test/dt_arith.c
+++ b/test/dt_arith.c
@@ -74,9 +74,6 @@ typedef enum dtype_t {
OTHER
} dtype_t;
-/* Skip overflow tests if non-zero */
-static int skip_overflow_tests_g = 0;
-
/*
* Although we check whether a floating point overflow generates a SIGFPE and
* turn off overflow tests in that case, it might still be possible for an
@@ -394,7 +391,6 @@ static int without_hardware_g = 0;
HDfree(value); \
}
-void some_dummy_func(float x);
static hbool_t overflows(unsigned char *origin_bits, hid_t src_id, size_t dst_num_bits);
static int my_isnan(dtype_t type, void *val);
static int my_isinf(int endian, const unsigned char *val, size_t size, size_t mpos, size_t msize, size_t epos,
@@ -514,92 +510,6 @@ except_func(H5T_conv_except_t except_type, hid_t H5_ATTR_UNUSED src_id, hid_t H5
return ret;
}
-/*-------------------------------------------------------------------------
- * Function: some_dummy_func
- *
- * Purpose: A dummy function to help check for overflow.
- *
- * Note: DO NOT DECLARE THIS FUNCTION STATIC OR THE COMPILER MIGHT
- * PROMOTE ARGUMENT `x' TO DOUBLE AND DEFEAT THE OVERFLOW
- * CHECKING.
- *
- * Return: void
- *
- * Programmer: Robb Matzke
- * Tuesday, July 21, 1998
- *
- *-------------------------------------------------------------------------
- */
-void
-some_dummy_func(float x)
-{
- char s[128];
-
- HDsnprintf(s, sizeof(s), "%g", (double)x);
-}
-
-/*-------------------------------------------------------------------------
- * Function: generates_sigfpe
- *
- * Purpose: Determines if SIGFPE is generated from overflows. We must be
- * able to fork() and waitpid() in order for this test to work
- * properly. Sets skip_overflow_tests_g to non-zero if they
- * would generate SIGBUS, zero otherwise.
- *
- * Programmer: Robb Matzke
- * Tuesday, July 21, 1998
- *
- * Modifications:
- *
- *-------------------------------------------------------------------------
- */
-static void
-generates_sigfpe(void)
-{
-#ifdef H5_HAVE_UNISTD_H
- pid_t pid;
- int status;
- size_t i, j;
- double d;
- unsigned char *dp = (unsigned char *)&d;
- float f;
-
- HDfflush(stdout);
- HDfflush(stderr);
- if ((pid = HDfork()) < 0) {
- HDperror("fork");
- HDexit(EXIT_FAILURE);
- }
- else if (0 == pid) {
- for (i = 0; i < 2000; i++) {
- for (j = 0; j < sizeof(double); j++)
- dp[j] = (unsigned char)HDrand();
- f = (float)d;
- some_dummy_func((float)f);
- }
- HDexit(EXIT_SUCCESS);
- }
-
- while (pid != HDwaitpid(pid, &status, 0))
- /*void*/;
- if (WIFEXITED(status) && 0 == WEXITSTATUS(status)) {
- HDputs("Floating-point overflow cases will be tested.");
- skip_overflow_tests_g = FALSE;
- }
- else if (WIFSIGNALED(status) && SIGFPE == WTERMSIG(status)) {
- HDputs("Floating-point overflow cases cannot be safely tested.");
- skip_overflow_tests_g = TRUE;
- /* delete the core dump file that SIGFPE may have created */
- HDunlink("core");
- }
-#else /* H5_HAVE_UNISTD_H */
- HDputs("Cannot determine if floating-point overflows generate a SIGFPE");
- HDputs("due to a lack of fork(2) - assuming yes.");
- HDputs("Overflow cases will not be tested.");
- skip_overflow_tests_g = TRUE;
-#endif /* H5_HAVE_UNISTD_H */
-}
-
/*-------------------------------------------------------------------------
* Function: test_hard_query
*
@@ -3322,7 +3232,7 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst)
int expo_diff = check_expo[0] - check_expo[1];
int valid_bits =
(int)((dst_ebias + dst_msize) + (size_t)MIN(check_expo[0], check_expo[1])) - 1;
- double epsilon = 1.0F;
+ double epsilon = 1.0;
/* Re-scale the mantissas based on any exponent difference */
if (expo_diff != 0)
@@ -5406,9 +5316,6 @@ main(void)
* for user-defined integer types */
nerrors += (unsigned long)test_derived_integer();
- /* Does floating point overflow generate a SIGFPE? */
- generates_sigfpe();
-
/* Test degenerate cases */
nerrors += (unsigned long)run_fp_tests("noop");
diff --git a/test/dtransform.c b/test/dtransform.c
index c679d30a74b..9445d83eb17 100644
--- a/test/dtransform.c
+++ b/test/dtransform.c
@@ -581,6 +581,7 @@ test_specials(hid_t file)
const char *special3 = "1000/x";
const char *special4 = "-x";
const char *special5 = "+x";
+ const char *special6 = "2e+1*x";
TESTING("data transform of some special cases")
@@ -702,6 +703,29 @@ test_specials(hid_t file)
COMPARE_INT(read_buf, data_res)
+ if (H5Dclose(dset_id) < 0)
+ TEST_ERROR
+
+ /*-----------------------------
+ * Operation 6: 2e+1*x
+ *----------------------------*/
+ if (H5Pset_data_transform(dxpl_id, special6) < 0)
+ TEST_ERROR;
+
+ for (row = 0; row < ROWS; row++)
+ for (col = 0; col < COLS; col++)
+ data_res[row][col] = transformData[row][col] * 20;
+
+ if ((dset_id = H5Dcreate2(file, "/special6", H5T_NATIVE_INT, dataspace, H5P_DEFAULT, H5P_DEFAULT,
+ H5P_DEFAULT)) < 0)
+ TEST_ERROR
+ if (H5Dwrite(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl_id, transformData) < 0)
+ TEST_ERROR
+ if (H5Dread(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, read_buf) < 0)
+ TEST_ERROR
+
+ COMPARE_INT(read_buf, data_res)
+
if (H5Dclose(dset_id) < 0)
TEST_ERROR
diff --git a/test/dtypes.c b/test/dtypes.c
index 626c58c809a..52eb0eabaf9 100644
--- a/test/dtypes.c
+++ b/test/dtypes.c
@@ -2284,9 +2284,9 @@ test_compound_11(void)
/* Initialize buffer */
for (u = 0; u < NTESTELEM; u++) {
- ((big_t *)buf)[u].d1 = (double)u * (double)1.5f;
- ((big_t *)buf)[u].d2 = (double)u * (double)2.5f;
- ((big_t *)buf)[u].d3 = (double)u * (double)3.5f;
+ ((big_t *)buf)[u].d1 = (double)u * 1.5;
+ ((big_t *)buf)[u].d2 = (double)u * 2.5;
+ ((big_t *)buf)[u].d3 = (double)u * 3.5;
((big_t *)buf)[u].i1 = (int)(u * 3);
((big_t *)buf)[u].i2 = (int)(u * 5);
((big_t *)buf)[u].s1 = (char *)HDmalloc((size_t)32);
diff --git a/test/enc_dec_plist.c b/test/enc_dec_plist.c
index 83298c82782..9b4879e44a8 100644
--- a/test/enc_dec_plist.c
+++ b/test/enc_dec_plist.c
@@ -141,11 +141,11 @@ main(void)
hid_t vspace = -1; /* Virtual dset dataspaces */
hsize_t dims[1] = {3}; /* Data space current size */
hsize_t chunk_size[2] = {16384, 4}; /* chunk size */
- double fill = 2.7f; /* Fill value */
+ double fill = 2.7; /* Fill value */
hsize_t max_size[1]; /* data space maximum size */
size_t nslots = 521 * 2;
size_t nbytes = 1048576 * 10;
- double w0 = 0.5f;
+ double w0 = 0.5;
unsigned max_compact;
unsigned min_dense;
const char * c_to_f = "x+32";
@@ -159,26 +159,26 @@ main(void)
TRUE,
FALSE,
(2 * 2048 * 1024),
- 0.3f,
+ 0.3,
(64 * 1024 * 1024),
(4 * 1024 * 1024),
60000,
H5C_incr__threshold,
- 0.8f,
- 3.0f,
+ 0.8,
+ 3.0,
TRUE,
(8 * 1024 * 1024),
H5C_flash_incr__add_space,
- 2.0f,
- 0.25f,
+ 2.0,
+ 0.25,
H5C_decr__age_out_with_threshold,
- 0.997f,
- 0.8f,
+ 0.997,
+ 0.8,
TRUE,
(3 * 1024 * 1024),
3,
FALSE,
- 0.2f,
+ 0.2,
(256 * 2048),
H5AC__DEFAULT_METADATA_WRITE_STRATEGY};
diff --git a/test/enc_dec_plist_cross_platform.c b/test/enc_dec_plist_cross_platform.c
index c3f1fc50e12..9ea5cf94a88 100644
--- a/test/enc_dec_plist_cross_platform.c
+++ b/test/enc_dec_plist_cross_platform.c
@@ -156,70 +156,71 @@ main(void)
return 1;
}
-static hid_t
-read_and_decode_plist_file(const char *filename_prefix, unsigned config, char *filename, size_t filename_len)
-{
- int fd;
- size_t size;
- const char *testfile;
- void * buf = NULL;
- hid_t plist = H5I_INVALID_HID;
-
- /* Generate filename from prefix and configuration word */
- if (HDsnprintf(filename, filename_len, "%s%s%s", filename_prefix, config & CONFIG_64 ? "64" : "32",
- config & CONFIG_LE ? "le" : "be") < 0)
- TEST_ERROR
-
- /* Read file 1 */
- testfile = H5_get_srcdir_filename(filename);
- if ((fd = HDopen(testfile, O_RDONLY)) < 0)
- TEST_ERROR
- size = (size_t)HDlseek(fd, 0, SEEK_END);
- HDlseek(fd, 0, SEEK_SET);
- buf = HDmalloc(size);
- if (HDread(fd, buf, size) < 0)
- TEST_ERROR
- HDclose(fd);
-
- /* Decode property lists */
- if ((plist = H5Pdecode(buf)) < 0)
- FAIL_STACK_ERROR
-error:
- if (buf != NULL)
- HDfree(buf);
- return plist;
-}
-
static int
test_plists(const char *filename_prefix)
{
- int i;
- unsigned config[2];
- hid_t plist[2];
- char filename[2][1024];
+ unsigned config_1, config_2;
+ int fd_1, fd_2;
+ size_t size_1 = 0, size_2 = 0;
+ void * buf_1 = NULL, *buf_2 = NULL;
+ hid_t plist_1, plist_2;
+ char filename[1024];
+ const char *testfile;
/* Iterate over all combinations of configurations */
- for (config[0] = 0; config[0] < (NCONFIG - 1); config[0]++) {
- for (config[1] = config[0] + 1; config[1] < NCONFIG; config[1]++) {
- for (i = 0; i < 2; i++) {
- plist[i] =
- read_and_decode_plist_file(filename_prefix, config[i], filename[i], sizeof(filename[i]));
- if (plist[i] == H5I_INVALID_HID)
- goto error;
- }
+ for (config_1 = 0; config_1 < (NCONFIG - 1); config_1++)
+ for (config_2 = config_1 + 1; config_2 < NCONFIG; config_2++) {
+ /* Generate filename for file 1 */
+ if (HDsnprintf(filename, sizeof(filename), "%s%s%s", filename_prefix,
+ config_1 & CONFIG_64 ? "64" : "32", config_1 & CONFIG_LE ? "le" : "be") < 0)
+ TEST_ERROR
+
+ /* Read file 1 */
+ testfile = H5_get_srcdir_filename(filename);
+ if ((fd_1 = HDopen(testfile, O_RDONLY)) < 0)
+ TEST_ERROR
+ size_1 = (size_t)HDlseek(fd_1, (HDoff_t)0, SEEK_END);
+ HDlseek(fd_1, (HDoff_t)0, SEEK_SET);
+ buf_1 = (void *)HDmalloc(size_1);
+ if (HDread(fd_1, buf_1, size_1) < 0)
+ TEST_ERROR
+ HDclose(fd_1);
+
+ /* Generate filename for file 2 */
+ if (HDsnprintf(filename, sizeof(filename), "%s%s%s", filename_prefix,
+ config_2 & CONFIG_64 ? "64" : "32", config_2 & CONFIG_LE ? "le" : "be") < 0)
+ TEST_ERROR
+
+ /* Read file 1 */
+ testfile = H5_get_srcdir_filename(filename);
+ if ((fd_2 = HDopen(testfile, O_RDONLY)) < 0)
+ TEST_ERROR
+ size_2 = (size_t)HDlseek(fd_2, (HDoff_t)0, SEEK_END);
+ HDlseek(fd_2, (HDoff_t)0, SEEK_SET);
+ buf_2 = (void *)HDmalloc(size_2);
+ if (HDread(fd_2, buf_2, size_2) < 0)
+ TEST_ERROR
+ HDclose(fd_2);
+
+ /* Decode property lists */
+ if ((plist_1 = H5Pdecode(buf_1)) < 0)
+ FAIL_STACK_ERROR
+ if ((plist_2 = H5Pdecode(buf_2)) < 0)
+ FAIL_STACK_ERROR
/* Compare decoded property lists */
- if (!H5Pequal(plist[0], plist[1]))
- FAIL_PRINTF_ERROR("PLIST encoding/decoding comparison failed, "
- "%s != %s\n",
- filename[0], filename[1])
-
- for (i = 0; i < 2; i++) {
- if ((H5Pclose(plist[i])) < 0)
- FAIL_STACK_ERROR
- }
- }
- }
+ if (!H5Pequal(plist_1, plist_2))
+ FAIL_PUTS_ERROR("PLIST encoding/decoding comparison failed\n")
+
+ /* Close */
+ if ((H5Pclose(plist_1)) < 0)
+ FAIL_STACK_ERROR
+ if ((H5Pclose(plist_2)) < 0)
+ FAIL_STACK_ERROR
+
+ HDfree(buf_1);
+ HDfree(buf_2);
+ } /* end for */
return 1;
diff --git a/test/err_compat.c b/test/err_compat.c
index 69d62ff6530..6ad69d8161d 100644
--- a/test/err_compat.c
+++ b/test/err_compat.c
@@ -39,7 +39,6 @@ int * ipoints2_data = NULL;
int * icheck2_data = NULL;
#define DSET_NAME "a_dataset"
-#define FAKE_ID (hid_t) - 1
herr_t custom_print_cb1(int n, H5E_error1_t *err_desc, void *client_data);
herr_t custom_print_cb2(int n, H5E_error2_t *err_desc, void *client_data);
@@ -47,13 +46,13 @@ herr_t custom_print_cb2(int n, H5E_error2_t *err_desc, void *client_data);
/*-------------------------------------------------------------------------
* Function: user_print1
*
- * Purpose: This function is a user-defined old-style printing function.
+ * Purpose: This function is a user-defined old-style printing function.
* This is just a convenience function for H5Ewalk1() with a
* function that prints error messages.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* 4 October 2010
*
*-------------------------------------------------------------------------
@@ -66,22 +65,22 @@ user_print1(FILE *stream)
if (H5Ewalk1(H5E_WALK_UPWARD, (H5E_walk1_t)custom_print_cb1, stream) < 0)
TEST_ERROR;
- return 0;
+ return SUCCEED;
error:
- return -1;
+ return FAIL;
}
/*-------------------------------------------------------------------------
* Function: user_print2
*
- * Purpose: This function is a user-defined new-style printing function.
+ * Purpose: This function is a user-defined new-style printing function.
* This is just a convenience function for H5Ewalk2() with a
* function that prints error messages.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* 4 October 2010
*
*-------------------------------------------------------------------------
@@ -94,27 +93,23 @@ user_print2(hid_t err_stack, FILE *stream)
if (H5Ewalk2(err_stack, H5E_WALK_UPWARD, (H5E_walk2_t)custom_print_cb2, stream) < 0)
TEST_ERROR;
- return 0;
+ return SUCCEED;
error:
- return -1;
+ return FAIL;
}
/*-------------------------------------------------------------------------
* Function: custom_print_cb1
*
- * Purpose: Callback function to print error stack in customized way
- * for H5Ewalk1.
+ * Purpose: Callback function to print error stack in customized way
+ * for H5Ewalk1
*
- * Return: Success: 0
+ * Return: SUCCEED/FAIL
*
- * Failure: -1
- *
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* 4 October 2010
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -140,7 +135,7 @@ custom_print_cb1(int n, H5E_error1_t *err_desc, void *client_data)
H5free_memory(maj);
H5free_memory(min);
- return 0;
+ return SUCCEED;
error:
if (maj)
@@ -148,24 +143,20 @@ custom_print_cb1(int n, H5E_error1_t *err_desc, void *client_data)
if (min)
H5free_memory(min);
- return -1;
+ return FAIL;
}
/*-------------------------------------------------------------------------
* Function: custom_print_cb2
*
- * Purpose: Callback function to print error stack in customized way
- * for H5Ewalk1.
- *
- * Return: Success: 0
+ * Purpose: Callback function to print error stack in customized way
+ * for H5Ewalk1
*
- * Failure: -1
+ * Return: SUCCEED/FAIL
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* 4 October 2010
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -191,7 +182,7 @@ custom_print_cb2(int n, H5E_error2_t *err_desc, void *client_data)
H5free_memory(maj);
H5free_memory(min);
- return 0;
+ return SUCCEED;
error:
if (maj)
@@ -199,62 +190,59 @@ custom_print_cb2(int n, H5E_error2_t *err_desc, void *client_data)
if (min)
H5free_memory(min);
- return -1;
+ return FAIL;
}
/*-------------------------------------------------------------------------
- * Function: test_error1
- *
- * Purpose: Test the backward compatibility of H5Eset/get_auto.
- *
- * Return: Success: 0
+ * Function: test_error_compat
*
- * Failure: -1
- *
- * Programmer: Raymond Lu
- * 17 September 2010
+ * Purpose: Test the backward compatibility of H5Eset/get_auto
*
+ * Return: SUCCEED/FAIL
*
- * Modifications:
+ * Programmer: Raymond Lu
+ * 17 September 2010
*
*-------------------------------------------------------------------------
*/
static herr_t
-test_error1(void)
+test_error_compat(void)
{
- hid_t dataset, space;
+ hid_t did = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
hsize_t dims[2];
H5E_auto1_t old_func1;
H5E_auto2_t old_func2;
- void * old_data;
+ void * old_data = NULL;
herr_t ret;
TESTING("error API H5Eset/get_auto");
- printf("\n");
- /* Create the data space */
+ /* Add a newline and flush so the output file looks nicer */
+ HDprintf("\n");
+ HDfflush(stdout);
+
+ /* Create the dataspace */
dims[0] = DIM0;
dims[1] = DIM1;
- if ((space = H5Screate_simple(2, dims, NULL)) < 0)
+ if ((sid = H5Screate_simple(2, dims, NULL)) < 0)
TEST_ERROR;
- /* Use H5Eget_auto2 to query the default printing function. The library
- *should indicate H5Eprint2 as the default. */
+ /* Use H5Eget_auto2 to query the default printing function. */
if (H5Eget_auto2(H5E_DEFAULT, &old_func2, &old_data) < 0)
TEST_ERROR;
if (old_data != NULL)
TEST_ERROR;
- if (!old_func2 || (H5E_auto2_t)H5Eprint2 != old_func2)
+ if (old_func2 == NULL)
TEST_ERROR;
- /* This function sets the default printing function to be H5Eprint2. */
if (H5Eset_auto2(H5E_DEFAULT, old_func2, old_data) < 0)
TEST_ERROR;
/* Try the printing function. Dataset creation should fail because the file
* doesn't exist. */
- dataset = H5Dcreate2(FAKE_ID, DSET_NAME, H5T_STD_I32BE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- if (dataset >= 0)
+ did = H5Dcreate2(H5I_INVALID_HID, DSET_NAME, H5T_STD_I32BE, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ if (did >= 0)
TEST_ERROR;
/* This call should work. It simply returns H5Eprint1. */
@@ -271,8 +259,8 @@ test_error1(void)
/* Try the printing function. Dataset creation should fail because the file
* doesn't exist. */
- dataset = H5Dcreate2(FAKE_ID, DSET_NAME, H5T_STD_I32BE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- if (dataset >= 0)
+ did = H5Dcreate2(H5I_INVALID_HID, DSET_NAME, H5T_STD_I32BE, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ if (did >= 0)
TEST_ERROR;
/* This call should fail because the test mixes H5Eget_auto2 with H5Eset_auto1.
@@ -288,16 +276,16 @@ test_error1(void)
/* Try the printing function. Dataset creation should fail because the file
* doesn't exist. */
- dataset = H5Dcreate2(FAKE_ID, DSET_NAME, H5T_STD_I32BE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- if (dataset >= 0)
+ did = H5Dcreate2(H5I_INVALID_HID, DSET_NAME, H5T_STD_I32BE, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ if (did >= 0)
TEST_ERROR;
- /* This function changes the new-style printing function back to the default H5Eprint2. */
- if (H5Eset_auto2(H5E_DEFAULT, (H5E_auto2_t)H5Eprint2, NULL) < 0)
+ /* This function changes the new-style printing function to the original. */
+ if (H5Eset_auto2(H5E_DEFAULT, old_func2, NULL) < 0)
TEST_ERROR;
- /* This call should work because the H5Eset_auto2 above restored the default printing
- * function H5Eprint2. It simply returns user_print1. */
+ /* This call should work because the H5Eset_auto2 above set the default printing
+ * function to H5Eprint2. It simply returns user_print1. */
if ((ret = H5Eget_auto1(&old_func1, &old_data)) < 0)
TEST_ERROR;
if (old_data != NULL)
@@ -315,70 +303,77 @@ test_error1(void)
TEST_ERROR;
if (old_data != NULL)
TEST_ERROR;
- if (!old_func2 || (H5E_auto2_t)H5Eprint2 != old_func2)
+ if (old_func2 == NULL)
TEST_ERROR;
/* Try the printing function. Dataset creation should fail because the file
* doesn't exist. */
- dataset = H5Dcreate2(FAKE_ID, DSET_NAME, H5T_STD_I32BE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- if (dataset >= 0)
+ did = H5Dcreate2(H5I_INVALID_HID, DSET_NAME, H5T_STD_I32BE, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ if (did >= 0)
TEST_ERROR;
- fprintf(stderr, "\n");
- return 0;
+ if (H5Sclose(sid) < 0)
+ TEST_ERROR;
+
+ return SUCCEED;
error:
- return -1;
+ H5E_BEGIN_TRY
+ {
+ H5Dclose(did);
+ H5Sclose(sid);
+ }
+ H5E_END_TRY
+
+ return FAIL;
}
/*-------------------------------------------------------------------------
- * Function: test_error2
- *
- * Purpose: Test error API functions, mainly on H5Epush1.
+ * Function: test_h5epush1
*
- * Return: Success: 0
- *
- * Failure: -1
- *
- * Programmer: Raymond Lu
- * July 10, 2003
+ * Purpose: Test error API functions, mainly H5Epush1
*
+ * Return: SUCCEED/FAIL
*
- * Modifications:
+ * Programmer: Raymond Lu
+ * July 10, 2003
*
*-------------------------------------------------------------------------
*/
static herr_t
-test_error2(hid_t file)
+test_h5epush1(hid_t file)
{
- hid_t dataset, space;
+ hid_t did = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t estack_id = H5I_INVALID_HID;
hsize_t dims[2];
- const char *FUNC_test_error = "test_error2";
+ const char *FUNC_test_error = "test_h5epush1";
TESTING("error API based on data I/O");
- printf("\n");
- /* Create the data space */
+ /* Add a newline and flush so the output file looks nicer */
+ HDprintf("\n");
+ HDfflush(stdout);
+
+ /* Create the dataspace */
dims[0] = DIM0;
dims[1] = DIM1;
- if ((space = H5Screate_simple(2, dims, NULL)) < 0)
+ if ((sid = H5Screate_simple(2, dims, NULL)) < 0)
TEST_ERROR;
/* Test H5E_BEGIN_TRY */
H5E_BEGIN_TRY
{
- dataset = H5Dcreate2(FAKE_ID, DSET_NAME, H5T_STD_I32BE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ did =
+ H5Dcreate2(H5I_INVALID_HID, DSET_NAME, H5T_STD_I32BE, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
}
H5E_END_TRY;
/* Create the dataset */
- if ((dataset = H5Dcreate2(file, DSET_NAME, H5T_STD_I32BE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) <
- 0) {
- H5Epush1(__FILE__, FUNC_test_error, __LINE__, H5E_ERROR, H5E_CANTCREATE, "H5Dcreate2 failed");
- goto error;
- }
+ if ((did = H5Dcreate2(file, DSET_NAME, H5T_STD_I32BE, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ TEST_ERROR;
- /* Disable the library's default printing function */
+ /* Disable the library's default printing function */
#ifdef H5_USE_16_API_DEFAULT
if (H5Eset_auto(NULL, NULL) < 0)
#else
@@ -387,36 +382,48 @@ test_error2(hid_t file)
TEST_ERROR;
/* Make H5Dwrite fail, verify default print is disabled */
- if (H5Dwrite(FAKE_ID, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, ipoints2) < 0) {
- H5Epush1(__FILE__, FUNC_test_error, __LINE__, H5E_ERROR, H5E_WRITEERROR,
- "H5Dwrite shouldn't succeed");
- goto error;
- }
+ if (H5Dwrite(H5I_INVALID_HID, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, ipoints2) < 0)
+ H5Epush1(__FILE__, FUNC_test_error, __LINE__, H5E_ERROR, H5E_WRITEERROR, "expected H5Dwrite error");
+ else
+ TEST_ERROR;
+
+ /* Save the error stack so the close calls don't interfere with it */
+ if ((estack_id = H5Eget_current_stack()) < 0)
+ TEST_ERROR;
- /* In case program comes to this point, close dataset */
- if (H5Dclose(dataset) < 0)
+ /* Close open identifiers */
+ if (H5Dclose(did) < 0)
+ TEST_ERROR;
+ if (H5Sclose(sid) < 0)
+ TEST_ERROR;
+
+ /* Restore the stack containing errors */
+ if (H5Eset_current_stack(estack_id) < 0)
TEST_ERROR;
- TEST_ERROR;
+ return SUCCEED;
error:
- return -1;
+ H5E_BEGIN_TRY
+ {
+ H5Dclose(did);
+ H5Sclose(sid);
+ H5Eclose_stack(estack_id);
+ }
+ H5E_END_TRY
+
+ return FAIL;
}
/*-------------------------------------------------------------------------
* Function: dump_error
*
- * Purpose: Prints error stack in default and customized ways.
+ * Purpose: Prints error stack in default and customized ways
*
- * Return: Success: 0
+ * Return: SUCCEED/FAIL
*
- * Failure: -1
- *
- * Programmer: Raymond Lu
- * July 17, 2003
- *
- *
- * Modifications:
+ * Programmer: Raymond Lu
+ * July 17, 2003
*
*-------------------------------------------------------------------------
*/
@@ -433,35 +440,34 @@ dump_error(void)
if (H5Ewalk1(H5E_WALK_UPWARD, custom_print_cb1, stderr) < 0)
TEST_ERROR;
- return 0;
+ return SUCCEED;
error:
- return -1;
+ return FAIL;
}
/*-------------------------------------------------------------------------
* Function: main
*
- * Purpose: Test error API.
- *
- * Programmer: Raymond Lu
- * July 10, 2003
+ * Purpose: Test error API
*
- * Modifications:
+ * Programmer: Raymond Lu
+ * July 10, 2003
*
*-------------------------------------------------------------------------
*/
int
main(void)
{
- hid_t file, fapl;
+ hid_t fid = H5I_INVALID_HID;
+ hid_t fapl_id = H5I_INVALID_HID;
char filename[1024];
const char *FUNC_main = "main";
int i;
HDfprintf(stderr, " This program tests the Error API compatible with HDF5 v1.6. There are supposed to "
"be some error messages\n");
- fapl = h5_fileaccess();
+ fapl_id = h5_fileaccess();
/* Set up data arrays */
if (NULL == (ipoints2_data = (int *)HDcalloc(DIM0 * DIM1, sizeof(int))))
@@ -478,34 +484,40 @@ main(void)
for (i = 0; i < DIM0; i++)
icheck2[i] = icheck2_data + (i * DIM1);
- h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
- if ((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
+ h5_fixname(FILENAME[0], fapl_id, filename, sizeof(filename));
+ if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id)) < 0)
TEST_ERROR;
/* Test error stack */
/* Push an error onto error stack */
- H5Epush1(__FILE__, FUNC_main, __LINE__, H5E_ERROR, H5E_BADVALUE, "Error test failed");
+ H5Epush1(__FILE__, FUNC_main, __LINE__, H5E_ERROR, H5E_BADVALUE, "fake error message 1");
/* Print out the errors on stack */
dump_error();
- fprintf(stderr, "\n");
/* Empty error stack */
H5Eclear1();
/* Test error API */
- if (test_error1() < 0)
+ if (test_error_compat() < 0)
TEST_ERROR;
- if (test_error2(file) < 0) {
- H5Epush1(__FILE__, FUNC_main, __LINE__, H5E_ERROR, H5E_BADMESG, "Error test failed");
+ /* Test H5Epush1
+ *
+ * On success, there will be errors on the stack to print.
+ */
+ if (test_h5epush1(fid) < 0) {
+ TEST_ERROR;
+ }
+ else {
+ H5Epush1(__FILE__, FUNC_main, __LINE__, H5E_ERROR, H5E_BADMESG, "fake error message 2");
H5Eprint1(stderr);
}
- if (H5Fclose(file) < 0)
+ if (H5Fclose(fid) < 0)
TEST_ERROR;
- h5_clean_files(FILENAME, fapl);
+ h5_clean_files(FILENAME, fapl_id);
HDfree(ipoints2);
HDfree(ipoints2_data);
@@ -513,7 +525,7 @@ main(void)
HDfree(icheck2_data);
HDprintf("All error API tests passed.\n");
- return 0;
+ return EXIT_SUCCESS;
error:
HDfree(ipoints2);
@@ -521,7 +533,14 @@ main(void)
HDfree(icheck2);
HDfree(icheck2_data);
+ H5E_BEGIN_TRY
+ {
+ H5Fclose(fid);
+ H5Pclose(fapl_id);
+ }
+ H5E_END_TRY
+
HDprintf("***** ERROR TEST FAILED! *****\n");
- return 1;
+ return EXIT_FAILURE;
}
#endif /* H5_NO_DEPRECATED_SYMBOLS */
diff --git a/test/error_test.c b/test/error_test.c
index d1ce00b978e..cf1e82c5c7b 100644
--- a/test/error_test.c
+++ b/test/error_test.c
@@ -129,7 +129,7 @@ test_error(hid_t file)
TEST_ERROR;
if (old_data != NULL)
TEST_ERROR;
- if (old_func != (H5E_auto2_t)H5Eprint2)
+ if (old_func == NULL)
TEST_ERROR;
if (H5Eset_auto2(H5E_DEFAULT, NULL, NULL) < 0)
diff --git a/test/event_set.c b/test/event_set.c
new file mode 100644
index 00000000000..65686634faf
--- /dev/null
+++ b/test/event_set.c
@@ -0,0 +1,135 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * Programmer: Quincey Koziol
+ * Wednesday, April 8, 2020
+ *
+ * Purpose: Tests event sets.
+ */
+#include "h5test.h"
+#include "H5srcdir.h"
+
+const char *FILENAME[] = {"event_set_1", NULL};
+
+/*-------------------------------------------------------------------------
+ * Function: test_es_create
+ *
+ * Purpose: Tests creating event sets.
+ *
+ * Return: Success: 0
+ * Failure: number of errors
+ *
+ * Programmer: Quincey Koziol
+ * Thursday, April 9, 2020
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+test_es_create(void)
+{
+ hid_t es_id; /* Event set ID */
+ size_t count; /* # of events in set */
+ size_t num_errs; /* # of failed events in set */
+ uint64_t num_ops; /* # of events inserted into set */
+ hbool_t err_occurred; /* Whether an error has occurred */
+
+ TESTING("event set creation");
+
+ /* Create an event set */
+ if ((es_id = H5EScreate()) < 0)
+ TEST_ERROR;
+
+ /* Query the # of events in empty event set */
+ count = 0;
+ if (H5ESget_count(es_id, &count) < 0)
+ TEST_ERROR;
+ if (count > 0)
+ FAIL_PUTS_ERROR("should be empty event set");
+
+ /* Check for errors */
+ err_occurred = FALSE;
+ if (H5ESget_err_status(es_id, &err_occurred) < 0)
+ TEST_ERROR;
+ if (err_occurred)
+ FAIL_PUTS_ERROR("should not be an error for the event set");
+
+ /* Check errors count */
+ num_errs = 0;
+ if (H5ESget_err_count(es_id, &num_errs) < 0)
+ TEST_ERROR;
+ if (num_errs)
+ FAIL_PUTS_ERROR("should not be any errors for the event set");
+
+ /* Check errors count */
+ num_ops = 0;
+ if (H5ESget_op_counter(es_id, &num_ops) < 0)
+ TEST_ERROR;
+ if (num_ops)
+ FAIL_PUTS_ERROR("should not be any operations for the event set yet");
+
+ /* Close the event set */
+ if (H5ESclose(es_id) < 0)
+ TEST_ERROR;
+
+ PASSED();
+ return 0;
+
+error:
+ H5E_BEGIN_TRY
+ {
+ H5ESclose(es_id);
+ }
+ H5E_END_TRY;
+ return 1;
+}
+
+/*-------------------------------------------------------------------------
+ * Function: main
+ *
+ * Purpose: Tests event sets
+ *
+ * Return: Success: EXIT_SUCCESS
+ * Failure: EXIT_FAILURE
+ *
+ * Programmer: Quincey Koziol
+ * Wednesday, April 8, 2020
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+main(void)
+{
+ hid_t fapl_id = H5I_INVALID_HID; /* File access property list */
+ int nerrors = 0; /* Error count */
+
+ /* Setup */
+ h5_reset();
+ fapl_id = h5_fileaccess();
+
+ /* Tests */
+ nerrors += test_es_create();
+
+ /* Cleanup */
+ h5_cleanup(FILENAME, fapl_id);
+
+ /* Check for any errors */
+ if (nerrors) {
+ HDputs("***** EVENT SET TESTS FAILED *****");
+ HDexit(EXIT_FAILURE);
+ } /* end if */
+
+ /* Report status */
+ HDputs("All event set tests passed.");
+
+ HDexit(EXIT_SUCCESS);
+} /* end main() */
diff --git a/test/gen_cross.c b/test/gen_cross.c
index 3eac79a1604..2746bb6190c 100644
--- a/test/gen_cross.c
+++ b/test/gen_cross.c
@@ -295,7 +295,7 @@ create_scale_offset_dsets_double(hid_t fid, hid_t fsid, hid_t msid)
hid_t dataset = -1; /* dataset handles */
hid_t dcpl = -1;
double data[NX][NY]; /* data to write */
- double fillvalue = -2.2f;
+ double fillvalue = -2.2;
hsize_t chunk[RANK] = {CHUNK0, CHUNK1};
int i, j;
diff --git a/test/gen_plist.c b/test/gen_plist.c
index 7a67c56984b..10c6423cb76 100644
--- a/test/gen_plist.c
+++ b/test/gen_plist.c
@@ -42,7 +42,7 @@ main(void)
hsize_t max_size[1]; /* data space maximum size */
size_t nslots = 521 * 2;
size_t nbytes = 1048576 * 10;
- double w0 = 0.5f;
+ double w0 = 0.5;
unsigned max_compact;
unsigned min_dense;
const char * c_to_f = "x+32";
@@ -56,26 +56,26 @@ main(void)
1 /*TRUE*/,
0 /*FALSE*/,
(2 * 2048 * 1024),
- 0.3f,
+ 0.3,
(64 * 1024 * 1024),
(4 * 1024 * 1024),
60000,
H5C_incr__threshold,
- 0.8f,
- 3.0f,
+ 0.8,
+ 3.0,
1 /*TRUE*/,
(8 * 1024 * 1024),
H5C_flash_incr__add_space,
- 2.0f,
- 0.25f,
+ 2.0,
+ 0.25,
H5C_decr__age_out_with_threshold,
- 0.997f,
- 0.8f,
+ 0.997,
+ 0.8,
1 /*TRUE*/,
(3 * 1024 * 1024),
3,
0 /*FALSE*/,
- 0.2f,
+ 0.2,
(256 * 2048),
H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY};
H5AC_cache_image_config_t my_cache_image_config = {H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION, TRUE, FALSE,
diff --git a/test/h5test.c b/test/h5test.c
index 3c37cf9bc2d..8f74e4534e9 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -147,16 +147,27 @@ h5_errors(hid_t estack, void H5_ATTR_UNUSED *client_data)
return 0;
}
+/*-------------------------------------------------------------------------
+ * Function: h5_testing
+ *
+ * Purpose: Prints "Testing" + formatted options to stdout
+ * Used in the TESTING macro
+ *
+ * Return: void
+ *-------------------------------------------------------------------------
+ */
void
h5_testing(const char *fmt, ...)
{
va_list ap;
char buf[62 + 1]; /* room for 62-char field + NUL */
- va_start(ap, fmt);
- vsnprintf(buf, sizeof(buf), fmt, ap);
- va_end(ap);
- printf("Testing %s", buf);
- fflush(stdout);
+
+ HDva_start(ap, fmt);
+ HDvsnprintf(buf, sizeof(buf), fmt, ap);
+ HDva_end(ap);
+
+ HDprintf("Testing %s", buf);
+ HDfflush(stdout);
}
/*-------------------------------------------------------------------------
diff --git a/test/lheap.c b/test/lheap.c
index 9bbacbe08df..26095102c91 100644
--- a/test/lheap.c
+++ b/test/lheap.c
@@ -103,7 +103,7 @@ main(void)
if (j > 4)
buf[j] = '\0';
- if (UFAIL == (obj[i] = H5HL_insert(f, heap, HDstrlen(buf) + 1, buf))) {
+ if (H5HL_insert(f, heap, HDstrlen(buf) + 1, buf, &obj[i]) < 0) {
H5_FAILED();
H5Eprint2(H5E_DEFAULT, stdout);
goto error;
diff --git a/test/links.c b/test/links.c
index 2ac2e28c54f..b2d0d9ab664 100644
--- a/test/links.c
+++ b/test/links.c
@@ -140,7 +140,7 @@ const char *FILENAME[] = {"links0",
#define H5L_DIM1 100
#define H5L_DIM2 100
-#define FILTER_FILESIZE_MAX_FRACTION (double)0.9F
+#define FILTER_FILESIZE_MAX_FRACTION 0.9
/* Creation order macros */
#define CORDER_GROUP_NAME "corder_group"
diff --git a/test/mirror_vfd.c b/test/mirror_vfd.c
index 97d32ba5fa0..3556cd2e7f1 100644
--- a/test/mirror_vfd.c
+++ b/test/mirror_vfd.c
@@ -28,6 +28,8 @@
#ifdef H5_HAVE_MIRROR_VFD
+#include "H5FDmirror_priv.h" /* Private header for the mirror VFD */
+
/* For future consideration, IP address and port number might be
* environment variables?
*/
@@ -61,8 +63,8 @@ static unsigned int g_verbosity = DEFAULT_VERBOSITY;
#define LOGPRINT(lvl, ...) \
do { \
if ((lvl) <= g_verbosity) { \
- fprintf(g_log_stream, __VA_ARGS__); \
- fflush(g_log_stream); \
+ HDfprintf(g_log_stream, __VA_ARGS__); \
+ HDfflush(g_log_stream); \
} \
} while (0)
@@ -148,7 +150,7 @@ _populate_filepath(const char *dirname, const char *_basename, hid_t fapl_id, ch
}
if (HDsnprintf(_path, H5FD_SPLITTER_PATH_MAX, "%s%s%s", dirname,
- (dirname[strlen(dirname)] == '/') ? "" : "/", /* slash iff needed */
+ (dirname[HDstrlen(dirname)] == '/') ? "" : "/", /* slash iff needed */
_basename) > H5FD_SPLITTER_PATH_MAX) {
TEST_ERROR;
}
@@ -2339,7 +2341,7 @@ test_vanishing_datasets(void)
TEST_ERROR;
}
if (group_info.nlinks > 0) {
- HDfprintf(stderr, "links in rw file: %d\n", group_info.nlinks);
+ HDfprintf(stderr, "links in rw file: %" PRIuHSIZE "\n", group_info.nlinks);
HDfflush(stderr);
TEST_ERROR;
}
@@ -2354,7 +2356,7 @@ test_vanishing_datasets(void)
TEST_ERROR;
}
if (group_info.nlinks > 0) {
- HDfprintf(stderr, "links in wo file: %d\n", group_info.nlinks);
+ HDfprintf(stderr, "links in wo file: %" PRIuHSIZE "\n", group_info.nlinks);
HDfflush(stderr);
TEST_ERROR;
}
diff --git a/test/mtime.c b/test/mtime.c
index 78f90658077..43dc502293e 100644
--- a/test/mtime.c
+++ b/test/mtime.c
@@ -120,7 +120,7 @@ main(void)
HDputs(" cannot be queried on this system. See H5O_mtime_decode().");
return 0;
}
- else if (HDfabs(HDdifftime(now, oi1.ctime)) > (double)60.0F) {
+ else if (HDfabs(HDdifftime(now, oi1.ctime)) > 60.0) {
H5_FAILED();
tm = HDlocaltime(&(oi1.ctime));
HDstrftime((char *)buf1, sizeof buf1, "%Y-%m-%d %H:%M:%S", tm);
diff --git a/test/objcopy.c b/test/objcopy.c
index 2575bdbddaf..43a57560ff3 100644
--- a/test/objcopy.c
+++ b/test/objcopy.c
@@ -1103,7 +1103,7 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts,
/* Iterate over all elements, calling memcmp() for each */
for (elmt = 0; elmt < nelmts; elmt++) {
- if (HDmemcmp(memb1, memb2, memb_size))
+ if (HDmemcmp(memb1, memb2, memb_size) != 0)
TEST_ERROR
/* Update member pointers */
@@ -1325,7 +1325,7 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts,
else
TEST_ERROR
} /* end else */
- else if (HDmemcmp(buf1, buf2, (elmt_size * nelmts)))
+ else if (HDmemcmp(buf1, buf2, (elmt_size * nelmts)) != 0)
TEST_ERROR
/* Data should be the same. :-) */
@@ -1596,7 +1596,7 @@ compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags)
if (H5Lget_name_by_idx(gid2, ".", H5_INDEX_NAME, H5_ITER_INC, idx, objname2,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(objname, objname2))
+ if (HDstrcmp(objname, objname2) != 0)
TEST_ERROR
/* Get link info */
@@ -1710,7 +1710,7 @@ compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags)
TEST_ERROR
/* Compare link data */
- if (HDmemcmp(linkval, linkval2, linfo.u.val_size))
+ if (HDmemcmp(linkval, linkval2, linfo.u.val_size) != 0)
TEST_ERROR
} /* end else-if */
else {
@@ -2936,7 +2936,7 @@ test_copy_dataset_compound(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
HDmemset(buf, 0, sizeof(buf));
for (i = 0; i < DIM_SIZE_1; i++) {
buf[i].a = i;
- buf[i].d = (double)1.0F / (double)(i + 1);
+ buf[i].d = 1.0 / (double)(i + 1);
} /* end for */
/* Initialize the filenames */
@@ -4499,7 +4499,7 @@ test_copy_dataset_compressed(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
#ifndef H5_HAVE_FILTER_DEFLATE
SKIPPED();
- puts(" Deflation filter not available");
+ HDputs(" Deflation filter not available");
#else /* H5_HAVE_FILTER_DEFLATE */
/* set initial data values */
for (i = 0; i < DIM_SIZE_1; i++)
@@ -4924,7 +4924,7 @@ test_copy_dataset_no_edge_filt(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h
#ifndef H5_HAVE_FILTER_DEFLATE
SKIPPED();
- puts(" Deflation filter not available");
+ HDputs(" Deflation filter not available");
#else /* H5_HAVE_FILTER_DEFLATE */
/* set initial data values */
for (i = 0; i < DIM_SIZE_1; i++)
@@ -7030,7 +7030,7 @@ compare_attribute_compound_vlstr(hid_t loc, hid_t loc2)
FAIL_STACK_ERROR
if (HDstrlen(rbuf.v) != HDstrlen(rbuf2.v))
FAIL_STACK_ERROR
- if (HDmemcmp(rbuf.v, rbuf2.v, HDstrlen(rbuf.v)))
+ if (HDmemcmp(rbuf.v, rbuf2.v, HDstrlen(rbuf.v)) != 0)
FAIL_STACK_ERROR
/* Reclaim vlen buffer */
@@ -7278,7 +7278,7 @@ test_copy_dataset_compressed_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
#ifndef H5_HAVE_FILTER_DEFLATE
SKIPPED();
- puts(" Deflation filter not available");
+ HDputs(" Deflation filter not available");
#else /* H5_HAVE_FILTER_DEFLATE */
/* set initial data values */
for (i = 0; i < DIM_SIZE_1; i++) {
@@ -11700,9 +11700,9 @@ test_copy_null_ref(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fap
TEST_ERROR
/* Verify that the references contain only "0" bytes */
- if (HDmemcmp(obj_buf, zeros, sizeof(obj_buf)))
+ if (HDmemcmp(obj_buf, zeros, sizeof(obj_buf)) != 0)
TEST_ERROR
- if (HDmemcmp(reg_buf, zeros, sizeof(reg_buf)))
+ if (HDmemcmp(reg_buf, zeros, sizeof(reg_buf)) != 0)
TEST_ERROR
/* Close datasets */
@@ -11745,9 +11745,9 @@ test_copy_null_ref(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fap
TEST_ERROR
/* Verify that the references contain only "0" bytes */
- if (HDmemcmp(obj_buf, zeros, sizeof(obj_buf)))
+ if (HDmemcmp(obj_buf, zeros, sizeof(obj_buf)) != 0)
TEST_ERROR
- if (HDmemcmp(reg_buf, zeros, sizeof(reg_buf)))
+ if (HDmemcmp(reg_buf, zeros, sizeof(reg_buf)) != 0)
TEST_ERROR
/* Close */
@@ -11907,9 +11907,9 @@ test_copy_null_ref_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t ds
TEST_ERROR
/* Verify that the references contain only "0" bytes */
- if (HDmemcmp(obj_buf, zeros, sizeof(obj_buf)))
+ if (HDmemcmp(obj_buf, zeros, sizeof(obj_buf)) != 0)
TEST_ERROR
- if (HDmemcmp(reg_buf, zeros, sizeof(reg_buf)))
+ if (HDmemcmp(reg_buf, zeros, sizeof(reg_buf)) != 0)
TEST_ERROR
/* Create destination file */
@@ -11952,9 +11952,9 @@ test_copy_null_ref_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t ds
TEST_ERROR
/* Verify that the references contain only "0" bytes */
- if (HDmemcmp(obj_buf, zeros, sizeof(obj_buf)))
+ if (HDmemcmp(obj_buf, zeros, sizeof(obj_buf)) != 0)
TEST_ERROR
- if (HDmemcmp(reg_buf, zeros, sizeof(reg_buf)))
+ if (HDmemcmp(reg_buf, zeros, sizeof(reg_buf)) != 0)
TEST_ERROR
/* Close */
diff --git a/test/objcopy_ref.c b/test/objcopy_ref.c
index 21fa51a4d30..23df1217746 100644
--- a/test/objcopy_ref.c
+++ b/test/objcopy_ref.c
@@ -887,7 +887,7 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts,
/* Iterate over all elements, calling memcmp() for each */
for (elmt = 0; elmt < nelmts; elmt++) {
- if (HDmemcmp(memb1, memb2, memb_size))
+ if (HDmemcmp(memb1, memb2, memb_size) != 0)
TEST_ERROR
/* Update member pointers */
@@ -1035,7 +1035,7 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts,
else
TEST_ERROR
} /* end else */
- else if (HDmemcmp(buf1, buf2, (elmt_size * nelmts)))
+ else if (HDmemcmp(buf1, buf2, (elmt_size * nelmts)) != 0)
TEST_ERROR
/* Data should be the same. :-) */
@@ -1306,7 +1306,7 @@ compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags)
if (H5Lget_name_by_idx(gid2, ".", H5_INDEX_NAME, H5_ITER_INC, idx, objname2,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(objname, objname2))
+ if (HDstrcmp(objname, objname2) != 0)
TEST_ERROR
/* Get link info */
@@ -1420,7 +1420,7 @@ compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags)
TEST_ERROR
/* Compare link data */
- if (HDmemcmp(linkval, linkval2, linfo.u.val_size))
+ if (HDmemcmp(linkval, linkval2, linfo.u.val_size) != 0)
TEST_ERROR
} /* end else-if */
else {
diff --git a/test/tattr.c b/test/tattr.c
index c30b0f52ad4..b602222e3f2 100644
--- a/test/tattr.c
+++ b/test/tattr.c
@@ -519,13 +519,13 @@ test_attr_basic_read(hid_t fapl)
static void
test_attr_flush(hid_t fapl)
{
- hid_t fil, /* File ID */
- att, /* Attribute ID */
- spc, /* Dataspace ID */
- set; /* Dataset ID */
- double wdata = 3.14159F; /* Data to write */
- double rdata; /* Data read in */
- herr_t ret; /* Generic return value */
+ hid_t fil, /* File ID */
+ att, /* Attribute ID */
+ spc, /* Dataspace ID */
+ set; /* Dataset ID */
+ double wdata = 3.14159; /* Data to write */
+ double rdata; /* Data read in */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Attribute Flushing\n"));
@@ -546,7 +546,7 @@ test_attr_flush(hid_t fapl)
CHECK(ret, FAIL, "H5Awrite");
if (!H5_DBL_ABS_EQUAL(rdata, 0.0))
- TestErrPrintf("attribute value wrong: rdata=%f, should be %f\n", rdata, (double)0.0F);
+ TestErrPrintf("attribute value wrong: rdata=%f, should be %f\n", rdata, 0.0);
ret = H5Fflush(fil, H5F_SCOPE_GLOBAL);
CHECK(ret, FAIL, "H5Fflush");
@@ -555,7 +555,7 @@ test_attr_flush(hid_t fapl)
CHECK(ret, FAIL, "H5Awrite");
if (!H5_DBL_ABS_EQUAL(rdata, 0.0))
- TestErrPrintf("attribute value wrong: rdata=%f, should be %f\n", rdata, (double)0.0F);
+ TestErrPrintf("attribute value wrong: rdata=%f, should be %f\n", rdata, 0.0);
ret = H5Awrite(att, H5T_NATIVE_DOUBLE, &wdata);
CHECK(ret, FAIL, "H5Awrite");
diff --git a/test/testfiles/err_compat_1 b/test/testfiles/err_compat_1
index 978c1f416be..e588a8bcabc 100644
--- a/test/testfiles/err_compat_1
+++ b/test/testfiles/err_compat_1
@@ -4,7 +4,7 @@ All error API tests passed.
This program tests the Error API compatible with HDF5 version (number). There are supposed to be some error messages
********* Print error stack in HDF5 default way *********
HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
- #000: (file name) line (number) in main(): Error test failed
+ #000: (file name) line (number) in main(): fake error message 1
major: Error API
minor: Bad value
@@ -12,38 +12,87 @@ HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
error #000: (file name) in main(): line (number)
major: Error API
minor: Bad value
-
HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
- #000: (file name) line (number) in H5Dcreate2(): invalid location identifier
+ #000: (file name) line (number) in H5Dcreate2(): unable to synchronously create dataset
+ major: Dataset
+ minor: Unable to create file
+ #001: (file name) line (number) in H5D__create_api_common(): can't set object access arguments
+ major: Dataset
+ minor: Can't set value
+ #002: (file name) line (number) in H5VL_setup_acc_args(): invalid location identifier
+ major: Invalid arguments to routine
+ minor: Inappropriate type
+ #003: (file name) line (number) in H5VL_vol_object(): invalid identifier type to function
major: Invalid arguments to routine
minor: Inappropriate type
********* Print error stack in customized way *********
- error #000: (file name) in H5Dcreate2(): line (number)
+ error #000: (file name) in H5VL_vol_object(): line (number)
+ major: Invalid arguments to routine
+ minor: Inappropriate type
+ error #001: (file name) in H5VL_setup_acc_args(): line (number)
major: Invalid arguments to routine
minor: Inappropriate type
+ error #002: (file name) in H5D__create_api_common(): line (number)
+ major: Dataset
+ minor: Can't set value
+ error #003: (file name) in H5Dcreate2(): line (number)
+ major: Dataset
+ minor: Unable to create file
********* Print error stack in customized way *********
- error #000: (file name) in H5Eget_auto(1 or 2)(): line (number)
+ error #000: (file name) in H5VL_vol_object(): line (number)
+ major: Invalid arguments to routine
+ minor: Inappropriate type
+ error #001: (file name) in H5VL_setup_acc_args(): line (number)
+ major: Invalid arguments to routine
+ minor: Inappropriate type
+ error #002: (file name) in H5D__create_api_common(): line (number)
+ major: Dataset
+ minor: Can't set value
+ error #003: (file name) in H5Dcreate2(): line (number)
+ major: Dataset
+ minor: Unable to create file
+ error #004: (file name) in H5Eget_auto(1 or 2)(): line (number)
major: Error API
minor: Can't get value
********* Print error stack in customized way *********
- error #000: (file name) in H5Dcreate2(): line (number)
+ error #000: (file name) in H5VL_vol_object(): line (number)
+ major: Invalid arguments to routine
+ minor: Inappropriate type
+ error #001: (file name) in H5VL_setup_acc_args(): line (number)
major: Invalid arguments to routine
minor: Inappropriate type
+ error #002: (file name) in H5D__create_api_common(): line (number)
+ major: Dataset
+ minor: Can't set value
+ error #003: (file name) in H5Dcreate2(): line (number)
+ major: Dataset
+ minor: Unable to create file
HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
- #000: (file name) line (number) in H5Dcreate2(): invalid location identifier
+ #000: (file name) line (number) in H5Dcreate2(): unable to synchronously create dataset
+ major: Dataset
+ minor: Unable to create file
+ #001: (file name) line (number) in H5D__create_api_common(): can't set object access arguments
+ major: Dataset
+ minor: Can't set value
+ #002: (file name) line (number) in H5VL_setup_acc_args(): invalid location identifier
+ major: Invalid arguments to routine
+ minor: Inappropriate type
+ #003: (file name) line (number) in H5VL_vol_object(): invalid identifier type to function
major: Invalid arguments to routine
minor: Inappropriate type
-
HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
- #000: (file name) line (number) in main(): Error test failed
+ #000: (file name) line (number) in main(): fake error message 2
major: Error API
minor: Unrecognized message
- #001: (file name) line (number) in test_error2(): H5Dwrite shouldn't succeed
+ #001: (file name) line (number) in test_h5epush1(): expected H5Dwrite error
major: Error API
minor: Write failed
- #002: (file name) line (number) in H5Dwrite(): dset_id is not a dataset ID
+ #002: (file name) line (number) in H5Dwrite(): can't synchronously write data
+ major: Dataset
+ minor: Write failed
+ #003: (file name) line (number) in H5D__write_api_common(): dset_id is not a dataset ID
major: Invalid arguments to routine
minor: Inappropriate type
diff --git a/test/testfiles/error_test_1 b/test/testfiles/error_test_1
index f0e4a62d2eb..070869ec594 100644
--- a/test/testfiles/error_test_1
+++ b/test/testfiles/error_test_1
@@ -21,7 +21,10 @@ Error Test-DIAG: Error detected in Error Program (1.0) thread (IDs):
Testing error API based on data I/O
HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
- #000: (file name) line (number) in H5Dwrite(): dset_id is not a dataset ID
+ #000: (file name) line (number) in H5Dwrite(): can't synchronously write data
+ major: Dataset
+ minor: Write failed
+ #001: (file name) line (number) in H5D__write_api_common(): dset_id is not a dataset ID
major: Invalid arguments to routine
minor: Inappropriate type
Error Test-DIAG: Error detected in Error Program (1.0) thread (IDs):
@@ -32,37 +35,43 @@ Error Test-DIAG: Error detected in Error Program (1.0) thread (IDs):
major: Error in IO
minor: Error in H5Dwrite
HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
- #002: (file name) line (number) in H5Dwrite(): dset_id is not a dataset ID
+ #002: (file name) line (number) in H5Dwrite(): can't synchronously write data
+ major: Dataset
+ minor: Write failed
+ #003: (file name) line (number) in H5D__write_api_common(): dset_id is not a dataset ID
major: Invalid arguments to routine
minor: Inappropriate type
Testing error message during data reading when filter isn't registered
HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
- #000: (file name) line (number) in H5Dread(): can't read data
+ #000: (file name) line (number) in H5Dread(): can't synchronously read data
+ major: Dataset
+ minor: Read failed
+ #001: (file name) line (number) in H5D__read_api_common(): can't read data
major: Dataset
minor: Read failed
- #001: (file name) line (number) in H5VL_dataset_read(): dataset read failed
+ #002: (file name) line (number) in H5VL_dataset_read(): dataset read failed
major: Virtual Object Layer
minor: Read failed
- #002: (file name) line (number) in H5VL__dataset_read(): dataset read failed
+ #003: (file name) line (number) in H5VL__dataset_read(): dataset read failed
major: Virtual Object Layer
minor: Read failed
- #003: (file name) line (number) in H5VL__native_dataset_read(): can't read data
+ #004: (file name) line (number) in H5VL__native_dataset_read(): can't read data
major: Dataset
minor: Read failed
- #004: (file name) line (number) in H5D__read(): can't read data
+ #005: (file name) line (number) in H5D__read(): can't read data
major: Dataset
minor: Read failed
- #005: (file name) line (number) in H5D__chunk_read(): unable to read raw data chunk
+ #006: (file name) line (number) in H5D__chunk_read(): unable to read raw data chunk
major: Low-level I/O
minor: Read failed
- #006: (file name) line (number) in H5D__chunk_lock(): data pipeline read failed
+ #007: (file name) line (number) in H5D__chunk_lock(): data pipeline read failed
major: Dataset
minor: Filter operation failed
- #007: (file name) line (number) in H5Z_pipeline(): required filter 'bogus' is not registered
+ #008: (file name) line (number) in H5Z_pipeline(): required filter 'bogus' is not registered
major: Data filters
minor: Read failed
- #008: (file name) line (number) in H5PL_load(): filter plugins disabled
+ #009: (file name) line (number) in H5PL_load(): filter plugins disabled
major: Plugin for dynamically loaded library
minor: Unable to load metadata into cache
diff --git a/test/testfiles/plist_files/dcpl_32be b/test/testfiles/plist_files/dcpl_32be
index c8241a6b3ea..667c67f20f6 100644
Binary files a/test/testfiles/plist_files/dcpl_32be and b/test/testfiles/plist_files/dcpl_32be differ
diff --git a/test/testfiles/plist_files/dcpl_32le b/test/testfiles/plist_files/dcpl_32le
index c8241a6b3ea..667c67f20f6 100644
Binary files a/test/testfiles/plist_files/dcpl_32le and b/test/testfiles/plist_files/dcpl_32le differ
diff --git a/test/testfiles/plist_files/dcpl_64be b/test/testfiles/plist_files/dcpl_64be
index c8241a6b3ea..667c67f20f6 100644
Binary files a/test/testfiles/plist_files/dcpl_64be and b/test/testfiles/plist_files/dcpl_64be differ
diff --git a/test/testfiles/plist_files/dcpl_64le b/test/testfiles/plist_files/dcpl_64le
index c8241a6b3ea..667c67f20f6 100644
Binary files a/test/testfiles/plist_files/dcpl_64le and b/test/testfiles/plist_files/dcpl_64le differ
diff --git a/test/testfiles/plist_files/def_dcpl_32be b/test/testfiles/plist_files/def_dcpl_32be
index 0909391ff9e..01b233c000d 100644
Binary files a/test/testfiles/plist_files/def_dcpl_32be and b/test/testfiles/plist_files/def_dcpl_32be differ
diff --git a/test/testfiles/plist_files/def_dcpl_32le b/test/testfiles/plist_files/def_dcpl_32le
index 0909391ff9e..01b233c000d 100644
Binary files a/test/testfiles/plist_files/def_dcpl_32le and b/test/testfiles/plist_files/def_dcpl_32le differ
diff --git a/test/testfiles/plist_files/def_dcpl_64be b/test/testfiles/plist_files/def_dcpl_64be
index 0909391ff9e..01b233c000d 100644
Binary files a/test/testfiles/plist_files/def_dcpl_64be and b/test/testfiles/plist_files/def_dcpl_64be differ
diff --git a/test/testfiles/plist_files/def_dcpl_64le b/test/testfiles/plist_files/def_dcpl_64le
index 0909391ff9e..01b233c000d 100644
Binary files a/test/testfiles/plist_files/def_dcpl_64le and b/test/testfiles/plist_files/def_dcpl_64le differ
diff --git a/test/testfiles/plist_files/def_dxpl_32be b/test/testfiles/plist_files/def_dxpl_32be
index da29037da03..b13f4568032 100644
Binary files a/test/testfiles/plist_files/def_dxpl_32be and b/test/testfiles/plist_files/def_dxpl_32be differ
diff --git a/test/testfiles/plist_files/def_dxpl_32le b/test/testfiles/plist_files/def_dxpl_32le
index da29037da03..b13f4568032 100644
Binary files a/test/testfiles/plist_files/def_dxpl_32le and b/test/testfiles/plist_files/def_dxpl_32le differ
diff --git a/test/testfiles/plist_files/def_dxpl_64be b/test/testfiles/plist_files/def_dxpl_64be
index da29037da03..b13f4568032 100644
Binary files a/test/testfiles/plist_files/def_dxpl_64be and b/test/testfiles/plist_files/def_dxpl_64be differ
diff --git a/test/testfiles/plist_files/def_dxpl_64le b/test/testfiles/plist_files/def_dxpl_64le
index da29037da03..b13f4568032 100644
Binary files a/test/testfiles/plist_files/def_dxpl_64le and b/test/testfiles/plist_files/def_dxpl_64le differ
diff --git a/test/testfiles/plist_files/def_fapl_32be b/test/testfiles/plist_files/def_fapl_32be
index 6738cda8daa..53ef57271cd 100644
Binary files a/test/testfiles/plist_files/def_fapl_32be and b/test/testfiles/plist_files/def_fapl_32be differ
diff --git a/test/testfiles/plist_files/def_fapl_32le b/test/testfiles/plist_files/def_fapl_32le
index 6738cda8daa..53ef57271cd 100644
Binary files a/test/testfiles/plist_files/def_fapl_32le and b/test/testfiles/plist_files/def_fapl_32le differ
diff --git a/test/testfiles/plist_files/def_fapl_64be b/test/testfiles/plist_files/def_fapl_64be
index 6738cda8daa..53ef57271cd 100644
Binary files a/test/testfiles/plist_files/def_fapl_64be and b/test/testfiles/plist_files/def_fapl_64be differ
diff --git a/test/testfiles/plist_files/def_fapl_64le b/test/testfiles/plist_files/def_fapl_64le
index 6738cda8daa..53ef57271cd 100644
Binary files a/test/testfiles/plist_files/def_fapl_64le and b/test/testfiles/plist_files/def_fapl_64le differ
diff --git a/test/testfiles/plist_files/dxpl_32be b/test/testfiles/plist_files/dxpl_32be
index cac7e5070f9..5ff2ea01f96 100644
Binary files a/test/testfiles/plist_files/dxpl_32be and b/test/testfiles/plist_files/dxpl_32be differ
diff --git a/test/testfiles/plist_files/dxpl_32le b/test/testfiles/plist_files/dxpl_32le
index cac7e5070f9..5ff2ea01f96 100644
Binary files a/test/testfiles/plist_files/dxpl_32le and b/test/testfiles/plist_files/dxpl_32le differ
diff --git a/test/testfiles/plist_files/dxpl_64be b/test/testfiles/plist_files/dxpl_64be
index cac7e5070f9..5ff2ea01f96 100644
Binary files a/test/testfiles/plist_files/dxpl_64be and b/test/testfiles/plist_files/dxpl_64be differ
diff --git a/test/testfiles/plist_files/dxpl_64le b/test/testfiles/plist_files/dxpl_64le
index cac7e5070f9..5ff2ea01f96 100644
Binary files a/test/testfiles/plist_files/dxpl_64le and b/test/testfiles/plist_files/dxpl_64le differ
diff --git a/test/testfiles/plist_files/fapl_32be b/test/testfiles/plist_files/fapl_32be
index 807c04aa82e..d89a44c43a4 100644
Binary files a/test/testfiles/plist_files/fapl_32be and b/test/testfiles/plist_files/fapl_32be differ
diff --git a/test/testfiles/plist_files/fapl_32le b/test/testfiles/plist_files/fapl_32le
index 807c04aa82e..d89a44c43a4 100644
Binary files a/test/testfiles/plist_files/fapl_32le and b/test/testfiles/plist_files/fapl_32le differ
diff --git a/test/testfiles/plist_files/fapl_64be b/test/testfiles/plist_files/fapl_64be
index 807c04aa82e..d89a44c43a4 100644
Binary files a/test/testfiles/plist_files/fapl_64be and b/test/testfiles/plist_files/fapl_64be differ
diff --git a/test/testfiles/plist_files/fapl_64le b/test/testfiles/plist_files/fapl_64le
index 807c04aa82e..d89a44c43a4 100644
Binary files a/test/testfiles/plist_files/fapl_64le and b/test/testfiles/plist_files/fapl_64le differ
diff --git a/test/testfiles/plist_files/lapl_32be b/test/testfiles/plist_files/lapl_32be
index 3db71636315..eee238edb1a 100644
Binary files a/test/testfiles/plist_files/lapl_32be and b/test/testfiles/plist_files/lapl_32be differ
diff --git a/test/testfiles/plist_files/lapl_32le b/test/testfiles/plist_files/lapl_32le
index 3db71636315..eee238edb1a 100644
Binary files a/test/testfiles/plist_files/lapl_32le and b/test/testfiles/plist_files/lapl_32le differ
diff --git a/test/testfiles/plist_files/lapl_64be b/test/testfiles/plist_files/lapl_64be
index 3db71636315..eee238edb1a 100644
Binary files a/test/testfiles/plist_files/lapl_64be and b/test/testfiles/plist_files/lapl_64be differ
diff --git a/test/testfiles/plist_files/lapl_64le b/test/testfiles/plist_files/lapl_64le
index 3db71636315..eee238edb1a 100644
Binary files a/test/testfiles/plist_files/lapl_64le and b/test/testfiles/plist_files/lapl_64le differ
diff --git a/test/tgenprop.c b/test/tgenprop.c
index 7e805e22cde..55e5a9b5cd0 100644
--- a/test/tgenprop.c
+++ b/test/tgenprop.c
@@ -55,7 +55,7 @@ char prop3_def[10] = "Ten chars"; /* Property 3 default value */
#define PROP3_DEF_VALUE (&prop3_def)
#define PROP4_NAME "Property 4"
-double prop4_def = 1.41F; /* Property 4 default value */
+double prop4_def = 1.41; /* Property 4 default value */
#define PROP4_SIZE sizeof(prop4_def)
#define PROP4_DEF_VALUE (&prop4_def)
diff --git a/test/th5s.c b/test/th5s.c
index 30c33962e0d..51216dcef59 100644
--- a/test/th5s.c
+++ b/test/th5s.c
@@ -2575,7 +2575,7 @@ test_h5s_chunk(void)
for (i = 0; i < CHUNK_DATA_NX; i++) {
for (j = 0; j < CHUNK_DATA_NY; j++) {
/* Check if the two values are within 0.001% range. */
- if (!H5_DBL_REL_EQUAL(chunk_data_dbl[i][j], (double)chunk_data_flt[i][j], (double)0.00001F))
+ if (!H5_DBL_REL_EQUAL(chunk_data_dbl[i][j], (double)chunk_data_flt[i][j], 0.00001))
TestErrPrintf("%u: chunk_data_dbl[%d][%d]=%e, chunk_data_flt[%d][%d]=%e\n",
(unsigned)__LINE__, i, j, chunk_data_dbl[i][j], i, j,
(double)chunk_data_flt[i][j]);
diff --git a/test/thread_id.c b/test/thread_id.c
index cdd3418fd09..c7b2b448416 100644
--- a/test/thread_id.c
+++ b/test/thread_id.c
@@ -25,6 +25,8 @@
*/
#include "testhdf5.h"
+#if defined(H5_HAVE_THREADSAFE) && !defined(H5_HAVE_WIN_THREADS)
+
static void my_errx(int, const char *, ...) H5_ATTR_FORMAT(printf, 2, 3);
static void
@@ -40,8 +42,6 @@ my_errx(int code, const char *fmt, ...)
HDexit(code);
}
-#if defined(H5_HAVE_THREADSAFE) && !defined(H5_HAVE_WIN_THREADS)
-
#if defined(H5_HAVE_DARWIN)
typedef struct _pthread_barrierattr {
@@ -73,7 +73,7 @@ pthread_barrier_init(pthread_barrier_t *barrier, const pthread_barrierattr_t *at
if (attr != NULL)
return EINVAL;
- memset(barrier, 0, sizeof(*barrier));
+ HDmemset(barrier, 0, sizeof(*barrier));
barrier->count = count;
@@ -96,7 +96,7 @@ barrier_lock(pthread_barrier_t *barrier)
int rc;
if ((rc = pthread_mutex_lock(&barrier->mtx)) != 0) {
- my_errx(EXIT_FAILURE, "%s: pthread_mutex_lock: %s", __func__, strerror(rc));
+ my_errx(EXIT_FAILURE, "%s: pthread_mutex_lock: %s", __func__, HDstrerror(rc));
}
}
@@ -106,7 +106,7 @@ barrier_unlock(pthread_barrier_t *barrier)
int rc;
if ((rc = pthread_mutex_unlock(&barrier->mtx)) != 0) {
- my_errx(EXIT_FAILURE, "%s: pthread_mutex_unlock: %s", __func__, strerror(rc));
+ my_errx(EXIT_FAILURE, "%s: pthread_mutex_unlock: %s", __func__, HDstrerror(rc));
}
}
@@ -203,16 +203,16 @@ atomic_printf(const char *fmt, ...)
va_list ap;
ssize_t nprinted, nwritten;
- va_start(ap, fmt);
- nprinted = vsnprintf(buf, sizeof(buf), fmt, ap);
- va_end(ap);
+ HDva_start(ap, fmt);
+ nprinted = HDvsnprintf(buf, sizeof(buf), fmt, ap);
+ HDva_end(ap);
if (nprinted == -1)
my_err(EXIT_FAILURE, "%s.%d: vsnprintf", __func__, __LINE__);
else if (nprinted >= (ssize_t)sizeof(buf))
my_errx(EXIT_FAILURE, "%s.%d: vsnprintf overflowed", __func__, __LINE__);
- nwritten = write(STDOUT_FILENO, buf, (size_t)nprinted);
+ nwritten = HDwrite(STDOUT_FILENO, buf, (size_t)nprinted);
if (nwritten < nprinted) {
my_errx(EXIT_FAILURE, "%s.%d: write error or short write", __func__, __LINE__);
}
diff --git a/test/tid.c b/test/tid.c
index fc8c4a65f03..0a45116e490 100644
--- a/test/tid.c
+++ b/test/tid.c
@@ -867,6 +867,509 @@ test_remove_clear_type(void)
return -1;
} /* end test_remove_clear_type() */
+/* Typedef for future objects */
+typedef struct {
+ H5I_type_t obj_type; /* ID type for actual object */
+} future_obj_t;
+
+/* Global (static) future ID object type */
+H5I_type_t future_obj_type_g = H5I_BADID;
+
+/* Callback to free the actual object for future object test */
+static herr_t
+free_actual_object(void *_p, void H5_ATTR_UNUSED **_ctx)
+{
+ int *p = (int *)_p;
+
+ if (7 != *p)
+ return FAIL;
+
+ HDfree(p);
+
+ return SUCCEED;
+}
+
+/* Callback to realize a future object */
+static herr_t
+realize_future_cb(void *_future_obj, hid_t *actual_id)
+{
+ future_obj_t *future_obj = (future_obj_t *)_future_obj; /* Future object */
+ int * actual_obj; /* Pointer to the actual object */
+
+ /* Check for bad future object */
+ if (NULL == future_obj)
+ return FAIL;
+
+ /* Determine type of object to realize */
+ if (H5I_DATASPACE == future_obj->obj_type) {
+ hsize_t dims = 13;
+
+ if ((*actual_id = H5Screate_simple(1, &dims, NULL)) < 0)
+ return FAIL;
+ }
+ else if (H5I_DATATYPE == future_obj->obj_type) {
+ if ((*actual_id = H5Tcopy(H5T_NATIVE_INT)) < 0)
+ return FAIL;
+ }
+ else if (H5I_GENPROP_LST == future_obj->obj_type) {
+ if ((*actual_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
+ return FAIL;
+ }
+ else {
+ /* Create a new object (the 'actual object') of the correct type */
+ if (NULL == (actual_obj = HDmalloc(sizeof(int))))
+ return FAIL;
+ *actual_obj = 7;
+
+ /* Register actual object of the user-defined type */
+ *actual_id = H5Iregister(future_obj->obj_type, actual_obj);
+ CHECK(*actual_id, FAIL, "H5Iregister");
+ if (*actual_id == FAIL)
+ return FAIL;
+ }
+
+ return SUCCEED;
+}
+
+/* Callback to discard a future object */
+static herr_t
+discard_future_cb(void *future_obj)
+{
+ if (NULL == future_obj)
+ return FAIL;
+
+ HDfree(future_obj);
+
+ return SUCCEED;
+}
+
+/* Callback to realize a future object when future objects are NULL*/
+static herr_t
+realize_future_generate_cb(void *_future_obj, hid_t *actual_id)
+{
+ future_obj_t *future_obj = (future_obj_t *)_future_obj; /* Future object */
+ int * actual_obj; /* Pointer to the actual object */
+
+ if (NULL != future_obj)
+ return FAIL;
+ /* Create a new object (the 'actual object') of the correct type */
+ if (NULL == (actual_obj = HDmalloc(sizeof(int))))
+ return FAIL;
+ *actual_obj = 7;
+
+ /* Register actual object without using future object info */
+ *actual_id = H5Iregister(future_obj_type_g, actual_obj);
+ CHECK(*actual_id, FAIL, "H5Iregister");
+ if (*actual_id == FAIL)
+ return FAIL;
+
+ return SUCCEED;
+}
+
+/* Callback to discard a future object when future objects are NULL */
+static herr_t
+discard_future_generate_cb(void *future_obj)
+{
+ if (NULL != future_obj)
+ return FAIL;
+
+ return SUCCEED;
+}
+
+/* Test function */
+static int
+test_future_ids(void)
+{
+ H5I_type_t obj_type; /* New user-defined ID type */
+ hid_t future_id; /* ID for future object */
+ int fake_future_obj; /* "Fake" future object for tests */
+ future_obj_t *future_obj; /* Future object */
+ int * actual_obj; /* Actual object */
+ int * actual_obj2; /* Another actual object */
+ H5I_type_t id_type; /* Type of ID */
+ H5T_class_t type_class; /* Datatype class */
+ herr_t ret; /* Return value */
+
+ /* Register a user-defined type with our custom ID-deleting callback */
+ obj_type = H5Iregister_type((size_t)15, 0, free_actual_object);
+ CHECK(obj_type, H5I_BADID, "H5Iregister_type");
+ if (H5I_BADID == obj_type)
+ goto error;
+
+ /* Test basic error conditions */
+ fake_future_obj = 0;
+ H5E_BEGIN_TRY
+ {
+ future_id = H5Iregister_future(obj_type, &fake_future_obj, NULL, NULL);
+ }
+ H5E_END_TRY
+ VERIFY(future_id, H5I_INVALID_HID, "H5Iregister_future");
+ if (H5I_INVALID_HID != future_id)
+ goto error;
+
+ H5E_BEGIN_TRY
+ {
+ future_id = H5Iregister_future(obj_type, &fake_future_obj, realize_future_cb, NULL);
+ }
+ H5E_END_TRY
+ VERIFY(future_id, H5I_INVALID_HID, "H5Iregister_future");
+ if (H5I_INVALID_HID != future_id)
+ goto error;
+
+ H5E_BEGIN_TRY
+ {
+ future_id = H5Iregister_future(obj_type, &fake_future_obj, NULL, discard_future_cb);
+ }
+ H5E_END_TRY
+ VERIFY(future_id, H5I_INVALID_HID, "H5Iregister_future");
+ if (H5I_INVALID_HID != future_id)
+ goto error;
+
+ H5E_BEGIN_TRY
+ {
+ future_id = H5Iregister_future(H5I_BADID, &fake_future_obj, realize_future_cb, discard_future_cb);
+ }
+ H5E_END_TRY
+ VERIFY(future_id, H5I_INVALID_HID, "H5Iregister_future");
+ if (H5I_INVALID_HID != future_id)
+ goto error;
+
+ /* Test base use-case: create a future object and destroy type without
+ * realizing the future object.
+ */
+ future_obj = HDmalloc(sizeof(future_obj_t));
+ future_obj->obj_type = obj_type;
+ future_id = H5Iregister_future(obj_type, future_obj, realize_future_cb, discard_future_cb);
+ CHECK(future_id, H5I_INVALID_HID, "H5Iregister_future");
+ if (H5I_INVALID_HID == future_id)
+ goto error;
+
+ /* Destroy the type */
+ ret = H5Idestroy_type(obj_type);
+ CHECK(ret, FAIL, "H5Idestroy_type");
+ if (FAIL == ret)
+ goto error;
+
+ /* Re-register a user-defined type with our custom ID-deleting callback */
+ obj_type = H5Iregister_type((size_t)15, 0, free_actual_object);
+ CHECK(obj_type, H5I_BADID, "H5Iregister_type");
+ if (H5I_BADID == obj_type)
+ goto error;
+
+ /* Test base use-case: create a future object and realize the actual object. */
+ future_obj = HDmalloc(sizeof(future_obj_t));
+ future_obj->obj_type = obj_type;
+ future_id = H5Iregister_future(obj_type, future_obj, realize_future_cb, discard_future_cb);
+ CHECK(future_id, H5I_INVALID_HID, "H5Iregister_future");
+ if (H5I_INVALID_HID == future_id)
+ goto error;
+
+ actual_obj = H5Iobject_verify(future_id, obj_type);
+ CHECK_PTR(actual_obj, "H5Iobject_verify");
+ if (NULL == actual_obj)
+ goto error;
+ VERIFY(*actual_obj, 7, "H5Iobject_verify");
+ if (7 != *actual_obj)
+ goto error;
+
+ /* Retrieve the object again and verify that it's the same actual object */
+ actual_obj2 = H5Iobject_verify(future_id, obj_type);
+ CHECK_PTR(actual_obj2, "H5Iobject_verify");
+ if (NULL == actual_obj2)
+ goto error;
+ VERIFY(*actual_obj2, 7, "H5Iobject_verify");
+ if (7 != *actual_obj2)
+ goto error;
+ CHECK_PTR_EQ(actual_obj, actual_obj2, "H5Iobject_verify");
+ if (actual_obj != actual_obj2)
+ goto error;
+
+ /* Destroy the type */
+ ret = H5Idestroy_type(obj_type);
+ CHECK(ret, FAIL, "H5Idestroy_type");
+ if (FAIL == ret)
+ goto error;
+
+ /* Re-register a user-defined type with our custom ID-deleting callback */
+ obj_type = H5Iregister_type((size_t)15, 0, free_actual_object);
+ CHECK(obj_type, H5I_BADID, "H5Iregister_type");
+ if (H5I_BADID == obj_type)
+ goto error;
+
+ /* Set the global future object type */
+ future_obj_type_g = obj_type;
+
+ /* Test "actual object generator" use-case: create a future object with
+ * NULL object pointer, to create new object of predefined type when
+ * future object is realized.
+ */
+ future_id = H5Iregister_future(obj_type, NULL, realize_future_generate_cb, discard_future_generate_cb);
+ CHECK(future_id, H5I_INVALID_HID, "H5Iregister_future");
+ if (H5I_INVALID_HID == future_id)
+ goto error;
+
+ /* Realize the actual object, with will be dynamically allocated within
+ * the 'realize' callback.
+ */
+ actual_obj = H5Iobject_verify(future_id, obj_type);
+ CHECK_PTR(actual_obj, "H5Iobject_verify");
+ if (NULL == actual_obj)
+ goto error;
+ VERIFY(*actual_obj, 7, "H5Iobject_verify");
+ if (7 != *actual_obj)
+ goto error;
+
+ /* Reset the global future object type */
+ future_obj_type_g = H5I_BADID;
+
+ /* Retrieve the object again and verify that it's the same actual object */
+ /* (Will fail if global future object type used) */
+ actual_obj2 = H5Iobject_verify(future_id, obj_type);
+ CHECK_PTR(actual_obj2, "H5Iobject_verify");
+ if (NULL == actual_obj2)
+ goto error;
+ VERIFY(*actual_obj2, 7, "H5Iobject_verify");
+ if (7 != *actual_obj2)
+ goto error;
+ CHECK_PTR_EQ(actual_obj, actual_obj2, "H5Iobject_verify");
+ if (actual_obj != actual_obj2)
+ goto error;
+
+ /* Destroy the type */
+ ret = H5Idestroy_type(obj_type);
+ CHECK(ret, FAIL, "H5Idestroy_type");
+ if (FAIL == ret)
+ goto error;
+
+ /* Test base use-case: create a future object for a pre-defined type */
+ /* (DATASPACE) */
+ future_obj = HDmalloc(sizeof(future_obj_t));
+ future_obj->obj_type = H5I_DATASPACE;
+ future_id = H5Iregister_future(H5I_DATASPACE, future_obj, realize_future_cb, discard_future_cb);
+ CHECK(future_id, H5I_INVALID_HID, "H5Iregister_future");
+ if (H5I_INVALID_HID == future_id)
+ goto error;
+
+ /* (Can't verify the type of the future ID, because the library's current
+ * implementation realizes the object during sanity checks on the ID)
+ */
+
+ /* Close future object for pre-defined type without realizing it */
+ ret = H5Idec_ref(future_id);
+ CHECK(ret, FAIL, "H5Idec_ref");
+ if (FAIL == ret)
+ goto error;
+
+ /* Test base use-case: create a future object for a pre-defined type */
+ future_obj = HDmalloc(sizeof(future_obj_t));
+ future_obj->obj_type = H5I_DATASPACE;
+ future_id = H5Iregister_future(H5I_DATASPACE, future_obj, realize_future_cb, discard_future_cb);
+ CHECK(future_id, H5I_INVALID_HID, "H5Iregister_future");
+ if (H5I_INVALID_HID == future_id)
+ goto error;
+
+ /* Verify that the application believes the future ID is a dataspace */
+ /* (Currently realizes the object "implicitly" during a sanity check) */
+ id_type = H5Iget_type(future_id);
+ CHECK(id_type, H5I_BADID, "H5Iget_type");
+ if (H5I_BADID == id_type)
+ goto error;
+ if (H5I_DATASPACE != id_type)
+ goto error;
+
+ /* Close future object for pre-defined type without realizing it */
+ ret = H5Idec_ref(future_id);
+ CHECK(ret, FAIL, "H5Idec_ref");
+ if (FAIL == ret)
+ goto error;
+
+ /* Test base use-case: create a future object for a pre-defined type */
+ future_obj = HDmalloc(sizeof(future_obj_t));
+ future_obj->obj_type = H5I_DATASPACE;
+ future_id = H5Iregister_future(H5I_DATASPACE, future_obj, realize_future_cb, discard_future_cb);
+ CHECK(future_id, H5I_INVALID_HID, "H5Iregister_future");
+ if (H5I_INVALID_HID == future_id)
+ goto error;
+
+ /* Realize future dataspace by requesting its rank */
+ ret = H5Sget_simple_extent_ndims(future_id);
+ CHECK(ret, FAIL, "H5Sget_simple_extent_ndims");
+ if (FAIL == ret)
+ goto error;
+ if (1 != ret)
+ goto error;
+
+ /* Verify that the application believes the ID is still a dataspace */
+ id_type = H5Iget_type(future_id);
+ CHECK(id_type, H5I_BADID, "H5Iget_type");
+ if (H5I_BADID == id_type)
+ goto error;
+ if (H5I_DATASPACE != id_type)
+ goto error;
+
+ /* Close future object for pre-defined type after realizing it */
+ ret = H5Idec_ref(future_id);
+ CHECK(ret, FAIL, "H5Idec_ref");
+ if (FAIL == ret)
+ goto error;
+
+ /* Test base use-case: create a future object for a pre-defined type */
+ /* (DATATYPE) */
+ future_obj = HDmalloc(sizeof(future_obj_t));
+ future_obj->obj_type = H5I_DATATYPE;
+ future_id = H5Iregister_future(H5I_DATATYPE, future_obj, realize_future_cb, discard_future_cb);
+ CHECK(future_id, H5I_INVALID_HID, "H5Iregister_future");
+ if (H5I_INVALID_HID == future_id)
+ goto error;
+
+ /* (Can't verify the type of the future ID, because the library's current
+ * implementation realizes the object during sanity checks on the ID)
+ */
+
+ /* Close future object for pre-defined type without realizing it */
+ ret = H5Idec_ref(future_id);
+ CHECK(ret, FAIL, "H5Idec_ref");
+ if (FAIL == ret)
+ goto error;
+
+ /* Test base use-case: create a future object for a pre-defined type */
+ future_obj = HDmalloc(sizeof(future_obj_t));
+ future_obj->obj_type = H5I_DATATYPE;
+ future_id = H5Iregister_future(H5I_DATATYPE, future_obj, realize_future_cb, discard_future_cb);
+ CHECK(future_id, H5I_INVALID_HID, "H5Iregister_future");
+ if (H5I_INVALID_HID == future_id)
+ goto error;
+
+ /* Verify that the application believes the future ID is a datatype */
+ /* (Currently realizes the object "implicitly" during a sanity check) */
+ id_type = H5Iget_type(future_id);
+ CHECK(id_type, H5I_BADID, "H5Iget_type");
+ if (H5I_BADID == id_type)
+ goto error;
+ if (H5I_DATATYPE != id_type)
+ goto error;
+
+ /* Close future object for pre-defined type without realizing it */
+ ret = H5Idec_ref(future_id);
+ CHECK(ret, FAIL, "H5Idec_ref");
+ if (FAIL == ret)
+ goto error;
+
+ /* Test base use-case: create a future object for a pre-defined type */
+ future_obj = HDmalloc(sizeof(future_obj_t));
+ future_obj->obj_type = H5I_DATATYPE;
+ future_id = H5Iregister_future(H5I_DATATYPE, future_obj, realize_future_cb, discard_future_cb);
+ CHECK(future_id, H5I_INVALID_HID, "H5Iregister_future");
+ if (H5I_INVALID_HID == future_id)
+ goto error;
+
+ /* Realize future datatype by requesting its class */
+ type_class = H5Tget_class(future_id);
+ CHECK(ret, FAIL, "H5Tget_class");
+ if (FAIL == ret)
+ goto error;
+ if (H5T_INTEGER != type_class)
+ goto error;
+
+ /* Verify that the application believes the ID is still a datatype */
+ id_type = H5Iget_type(future_id);
+ CHECK(id_type, H5I_BADID, "H5Iget_type");
+ if (H5I_BADID == id_type)
+ goto error;
+ if (H5I_DATATYPE != id_type)
+ goto error;
+
+ /* Close future object for pre-defined type after realizing it */
+ ret = H5Idec_ref(future_id);
+ CHECK(ret, FAIL, "H5Idec_ref");
+ if (FAIL == ret)
+ goto error;
+
+ /* Test base use-case: create a future object for a pre-defined type */
+ /* (PROPERTY LIST) */
+ future_obj = HDmalloc(sizeof(future_obj_t));
+ future_obj->obj_type = H5I_GENPROP_LST;
+ future_id = H5Iregister_future(H5I_GENPROP_LST, future_obj, realize_future_cb, discard_future_cb);
+ CHECK(future_id, H5I_INVALID_HID, "H5Iregister_future");
+ if (H5I_INVALID_HID == future_id)
+ goto error;
+
+ /* (Can't verify the type of the future ID, because the library's current
+ * implementation realizes the object during sanity checks on the ID)
+ */
+
+ /* Close future object for pre-defined type without realizing it */
+ ret = H5Idec_ref(future_id);
+ CHECK(ret, FAIL, "H5Idec_ref");
+ if (FAIL == ret)
+ goto error;
+
+ /* Test base use-case: create a future object for a pre-defined type */
+ future_obj = HDmalloc(sizeof(future_obj_t));
+ future_obj->obj_type = H5I_GENPROP_LST;
+ future_id = H5Iregister_future(H5I_GENPROP_LST, future_obj, realize_future_cb, discard_future_cb);
+ CHECK(future_id, H5I_INVALID_HID, "H5Iregister_future");
+ if (H5I_INVALID_HID == future_id)
+ goto error;
+
+ /* Verify that the application believes the future ID is a property list */
+ /* (Currently realizes the object "implicitly" during a sanity check) */
+ id_type = H5Iget_type(future_id);
+ CHECK(id_type, H5I_BADID, "H5Iget_type");
+ if (H5I_BADID == id_type)
+ goto error;
+ if (H5I_GENPROP_LST != id_type)
+ goto error;
+
+ /* Close future object for pre-defined type without realizing it */
+ ret = H5Idec_ref(future_id);
+ CHECK(ret, FAIL, "H5Idec_ref");
+ if (FAIL == ret)
+ goto error;
+
+ /* Test base use-case: create a future object for a pre-defined type */
+ future_obj = HDmalloc(sizeof(future_obj_t));
+ future_obj->obj_type = H5I_GENPROP_LST;
+ future_id = H5Iregister_future(H5I_GENPROP_LST, future_obj, realize_future_cb, discard_future_cb);
+ CHECK(future_id, H5I_INVALID_HID, "H5Iregister_future");
+ if (H5I_INVALID_HID == future_id)
+ goto error;
+
+ /* Realize future property list by verifying its class */
+ ret = H5Pisa_class(future_id, H5P_DATASET_XFER);
+ CHECK(ret, FAIL, "H5Pisa_class");
+ if (FAIL == ret)
+ goto error;
+ if (TRUE != ret)
+ goto error;
+
+ /* Verify that the application believes the ID is still a property list */
+ id_type = H5Iget_type(future_id);
+ CHECK(id_type, H5I_BADID, "H5Iget_type");
+ if (H5I_BADID == id_type)
+ goto error;
+ if (H5I_GENPROP_LST != id_type)
+ goto error;
+
+ /* Close future object for pre-defined type after realizing it */
+ ret = H5Idec_ref(future_id);
+ CHECK(ret, FAIL, "H5Idec_ref");
+ if (FAIL == ret)
+ goto error;
+
+ return 0;
+
+error:
+ /* Cleanup. For simplicity, just destroy the types and ignore errors. */
+ H5E_BEGIN_TRY
+ {
+ H5Idestroy_type(obj_type);
+ }
+ H5E_END_TRY
+
+ return -1;
+} /* end test_future_ids() */
+
void
test_ids(void)
{
@@ -885,4 +1388,6 @@ test_ids(void)
TestErrPrintf("ID type list test failed\n");
if (test_remove_clear_type() < 0)
TestErrPrintf("ID remove during H5Iclear_type test failed\n");
+ if (test_future_ids() < 0)
+ TestErrPrintf("Future ID test failed\n");
}
diff --git a/test/timer.c b/test/timer.c
index 24f3245099f..bb474ca172c 100644
--- a/test/timer.c
+++ b/test/timer.c
@@ -144,7 +144,7 @@ test_timer_system_user(void)
/* The system and user times may not be present on some systems. They
* will be -1.0 if they are not.
*/
- if (timer.initial.system < (double)0.0f || timer.initial.user < (double)0.0f) {
+ if (timer.initial.system < 0.0 || timer.initial.user < 0.0) {
SKIPPED();
HDprintf("NOTE: No suitable way to get system/user times on this platform.\n");
return 0;
@@ -165,7 +165,7 @@ test_timer_system_user(void)
TEST_ERROR;
/* System and user times should be non-negative. */
- if (times.system < (double)0.0f || times.user < (double)0.0f)
+ if (times.system < 0.0 || times.user < 0.0)
TEST_ERROR;
PASSED();
@@ -224,7 +224,7 @@ test_timer_elapsed(void)
TEST_ERROR;
/* Elapsed time should be non-negative. */
- if (times.elapsed < (double)0.0f)
+ if (times.elapsed < 0.0)
TEST_ERROR;
PASSED();
@@ -260,11 +260,11 @@ test_timer_functionality(void)
/* Times should be initialized to zero */
err = H5_timer_get_times(timer, ×);
- if (err < 0 || !H5_DBL_ABS_EQUAL(times.elapsed, (double)0.0f))
+ if (err < 0 || !H5_DBL_ABS_EQUAL(times.elapsed, 0.0))
TEST_ERROR;
err = H5_timer_get_total_times(timer, ×);
- if (err < 0 || !H5_DBL_ABS_EQUAL(times.elapsed, (double)0.0f))
+ if (err < 0 || !H5_DBL_ABS_EQUAL(times.elapsed, 0.0))
TEST_ERROR;
/********************
@@ -289,11 +289,11 @@ test_timer_functionality(void)
/* Times should be positive and non-negative */
err = H5_timer_get_times(timer, ×);
- if (err < 0 || times.elapsed < (double)0.0f)
+ if (err < 0 || times.elapsed < 0.0)
TEST_ERROR;
err = H5_timer_get_total_times(timer, ×);
- if (err < 0 || times.elapsed < (double)0.0f)
+ if (err < 0 || times.elapsed < 0.0)
TEST_ERROR;
/**********************
@@ -306,11 +306,11 @@ test_timer_functionality(void)
TEST_ERROR;
err = H5_timer_get_times(timer, ×);
- if (err < 0 || !H5_DBL_ABS_EQUAL(times.elapsed, (double)0.0f))
+ if (err < 0 || !H5_DBL_ABS_EQUAL(times.elapsed, 0.0))
TEST_ERROR;
err = H5_timer_get_total_times(timer, ×);
- if (err < 0 || !H5_DBL_ABS_EQUAL(times.elapsed, (double)0.0f))
+ if (err < 0 || !H5_DBL_ABS_EQUAL(times.elapsed, 0.0))
TEST_ERROR;
/* Timer state should flip */
@@ -326,12 +326,12 @@ test_timer_functionality(void)
/* Times should be non-negative */
err = H5_timer_get_times(timer, ×);
- if (err < 0 || times.elapsed < (double)0.0f)
+ if (err < 0 || times.elapsed < 0.0)
TEST_ERROR;
prev_etime = times.elapsed;
err = H5_timer_get_total_times(timer, ×);
- if (err < 0 || times.elapsed < (double)0.0f)
+ if (err < 0 || times.elapsed < 0.0)
TEST_ERROR;
prev_total_etime = times.elapsed;
diff --git a/test/tmisc.c b/test/tmisc.c
index b078eed4db8..302da0d4dea 100644
--- a/test/tmisc.c
+++ b/test/tmisc.c
@@ -2521,17 +2521,17 @@ test_misc13(void)
static void
test_misc14(void)
{
- hid_t file_id; /* File ID */
- hid_t fapl; /* File access property list ID */
- hid_t DataSpace; /* Dataspace ID */
- hid_t Dataset1; /* Dataset ID #1 */
- hid_t Dataset2; /* Dataset ID #2 */
- hid_t Dataset3; /* Dataset ID #3 */
- double data1 = 5.0F; /* Data to write for dataset #1 */
- double data2 = 10.0F; /* Data to write for dataset #2 */
- double data3 = 15.0F; /* Data to write for dataset #3 */
- double rdata; /* Data read in */
- herr_t ret; /* Generic return value */
+ hid_t file_id; /* File ID */
+ hid_t fapl; /* File access property list ID */
+ hid_t DataSpace; /* Dataspace ID */
+ hid_t Dataset1; /* Dataset ID #1 */
+ hid_t Dataset2; /* Dataset ID #2 */
+ hid_t Dataset3; /* Dataset ID #3 */
+ double data1 = 5.0; /* Data to write for dataset #1 */
+ double data2 = 10.0; /* Data to write for dataset #2 */
+ double data3 = 15.0; /* Data to write for dataset #3 */
+ double rdata; /* Data read in */
+ herr_t ret; /* Generic return value */
/* Test creating two datasets and deleting the second */
@@ -5905,6 +5905,119 @@ test_misc35(void)
} /* end test_misc35() */
+/* Context to pass to 'atclose' callbacks */
+static int test_misc36_context;
+
+/* 'atclose' callbacks for test_misc36 */
+static void
+test_misc36_cb1(void *_ctx)
+{
+ int * ctx = (int *)_ctx; /* Set up context pointer */
+ hbool_t is_terminating; /* Flag indicating the library is terminating */
+ herr_t ret; /* Return value */
+
+ /* Check whether the library thinks it's terminating */
+ is_terminating = FALSE;
+ ret = H5is_library_terminating(&is_terminating);
+ CHECK(ret, FAIL, "H5is_library_terminating");
+ VERIFY(is_terminating, TRUE, "H5is_library_terminating");
+
+ /* Verify correct ordering for 'atclose' callbacks */
+ if (0 != *ctx)
+ HDabort();
+
+ /* Update context value */
+ *ctx = 1;
+}
+
+static void
+test_misc36_cb2(void *_ctx)
+{
+ int * ctx = (int *)_ctx; /* Set up context pointer */
+ hbool_t is_terminating; /* Flag indicating the library is terminating */
+ herr_t ret; /* Return value */
+
+ /* Check whether the library thinks it's terminating */
+ is_terminating = FALSE;
+ ret = H5is_library_terminating(&is_terminating);
+ CHECK(ret, FAIL, "H5is_library_terminating");
+ VERIFY(is_terminating, TRUE, "H5is_library_terminating");
+
+ /* Verify correct ordering for 'atclose' callbacks */
+ if (1 != *ctx)
+ HDabort();
+
+ /* Update context value */
+ *ctx = 2;
+}
+
+/****************************************************************
+**
+** test_misc36(): Exercise H5atclose and H5is_library_terminating
+**
+****************************************************************/
+static void
+test_misc36(void)
+{
+ hbool_t is_terminating; /* Flag indicating the library is terminating */
+ herr_t ret; /* Return value */
+
+ /* Output message about test being performed */
+ MESSAGE(5, ("H5atclose and H5is_library_terminating API calls"));
+
+ /* Check whether the library thinks it's terminating */
+ is_terminating = TRUE;
+ ret = H5is_library_terminating(&is_terminating);
+ CHECK(ret, FAIL, "H5is_library_terminating");
+ VERIFY(is_terminating, FALSE, "H5is_library_terminating");
+
+ /* Shut the library down */
+ test_misc36_context = 0;
+ H5close();
+
+ /* Check whether the library thinks it's terminating */
+ is_terminating = TRUE;
+ ret = H5is_library_terminating(&is_terminating);
+ CHECK(ret, FAIL, "H5is_library_terminating");
+ VERIFY(is_terminating, FALSE, "H5is_library_terminating");
+
+ /* Check the close context was not changed */
+ VERIFY(test_misc36_context, 0, "H5atclose");
+
+ /* Restart the library */
+ H5open();
+
+ /* Check whether the library thinks it's terminating */
+ is_terminating = TRUE;
+ ret = H5is_library_terminating(&is_terminating);
+ CHECK(ret, FAIL, "H5is_library_terminating");
+ VERIFY(is_terminating, FALSE, "H5is_library_terminating");
+
+ /* Register the 'atclose' callbacks */
+ /* (Note that these will be called in reverse order, which is checked) */
+ ret = H5atclose(&test_misc36_cb2, &test_misc36_context);
+ CHECK(ret, FAIL, "H5atclose");
+ ret = H5atclose(&test_misc36_cb1, &test_misc36_context);
+ CHECK(ret, FAIL, "H5atclose");
+
+ /* Shut the library down */
+ test_misc36_context = 0;
+ H5close();
+
+ /* Check the close context was changed correctly */
+ VERIFY(test_misc36_context, 2, "H5atclose");
+
+ /* Restart the library */
+ H5open();
+
+ /* Close the library again */
+ test_misc36_context = 0;
+ H5close();
+
+ /* Check the close context was not changed */
+ VERIFY(test_misc36_context, 0, "H5atclose");
+} /* end test_misc36() */
+
/****************************************************************
**
** test_misc(): Main misc. test routine.
@@ -5956,6 +6069,7 @@ test_misc(void)
test_misc33(); /* Test to verify that H5HL_offset_into() returns error if offset exceeds heap block */
test_misc34(); /* Test behavior of 0 and NULL in H5MM API calls */
test_misc35(); /* Test behavior of free-list & allocation statistics API calls */
+ test_misc36(); /* Exercise H5atclose and H5is_library_terminating */
} /* test_misc() */
diff --git a/test/trefer.c b/test/trefer.c
index 9ea2a8e141d..9b6c415e4c1 100644
--- a/test/trefer.c
+++ b/test/trefer.c
@@ -21,17 +21,18 @@
#include "testhdf5.h"
-#define FILE_REF_PARAM "trefer_param.h5"
-#define FILE_REF_OBJ "trefer_obj.h5"
-#define FILE_REF_VL_OBJ "trefer_vl_obj.h5"
-#define FILE_REF_REG "trefer_reg.h5"
-#define FILE_REF_REG_1D "trefer_reg_1d.h5"
-#define FILE_REF_OBJ_DEL "trefer_obj_del.h5"
-#define FILE_REF_GRP "trefer_grp.h5"
-#define FILE_REF_ATTR "trefer_attr.h5"
-#define FILE_REF_EXT1 "trefer_ext1.h5"
-#define FILE_REF_EXT2 "trefer_ext2.h5"
-#define FILE_REF_COMPAT "trefer_compat.h5"
+#define FILE_REF_PARAM "trefer_param.h5"
+#define FILE_REF_OBJ "trefer_obj.h5"
+#define FILE_REF_VL_OBJ "trefer_vl_obj.h5"
+#define FILE_REF_CMPND_OBJ "trefer_cmpnd_obj.h5"
+#define FILE_REF_REG "trefer_reg.h5"
+#define FILE_REF_REG_1D "trefer_reg_1d.h5"
+#define FILE_REF_OBJ_DEL "trefer_obj_del.h5"
+#define FILE_REF_GRP "trefer_grp.h5"
+#define FILE_REF_ATTR "trefer_attr.h5"
+#define FILE_REF_EXT1 "trefer_ext1.h5"
+#define FILE_REF_EXT2 "trefer_ext2.h5"
+#define FILE_REF_COMPAT "trefer_compat.h5"
/* 1-D dataset with fixed dimensions */
#define SPACE1_RANK 1
@@ -56,6 +57,15 @@ typedef struct s1_t {
float c;
} s1_t;
+/* Compound datatype with reference */
+typedef struct s2_t {
+ H5R_ref_t ref0; /* reference */
+ H5R_ref_t ref1; /* reference */
+ H5R_ref_t ref2; /* reference */
+ H5R_ref_t ref3; /* reference */
+ unsigned int dim_idx; /* dimension index of the dataset */
+} s2_t;
+
#define GROUPNAME "/group"
#define GROUPNAME2 "group2"
#define GROUPNAME3 "group3"
@@ -556,7 +566,7 @@ test_reference_vlen_obj(void)
hsize_t vl_dims[] = {1};
hid_t dapl_id; /* Dataset access property list */
H5R_ref_t *wbuf, /* buffer to write to disk */
- *rbuf; /* buffer read from disk */
+ *rbuf = NULL; /* buffer read from disk */
unsigned * ibuf, *obuf;
unsigned i, j; /* Counters */
H5O_type_t obj_type; /* Object type */
@@ -568,7 +578,6 @@ test_reference_vlen_obj(void)
/* Allocate write & read buffers */
wbuf = HDcalloc(sizeof(H5R_ref_t), SPACE1_DIM1);
- rbuf = HDcalloc(sizeof(H5R_ref_t), SPACE1_DIM1);
ibuf = HDcalloc(sizeof(unsigned), SPACE1_DIM1);
obuf = HDcalloc(sizeof(unsigned), SPACE1_DIM1);
@@ -803,6 +812,295 @@ test_reference_vlen_obj(void)
HDfree(obuf);
} /* test_reference_vlen_obj() */
+/****************************************************************
+**
+** test_reference_cmpnd_obj(): Test basic H5R (reference) object reference
+** within a compound type.
+** Tests references to various kinds of objects
+**
+****************************************************************/
+static void
+test_reference_cmpnd_obj(void)
+{
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dataset, /* Dataset ID */
+ dset2; /* Dereferenced dataset ID */
+ hid_t group; /* Group ID */
+ hid_t sid1; /* Dataspace ID */
+ hid_t tid1; /* Datatype ID */
+ hsize_t dims1[] = {SPACE1_DIM1};
+ hsize_t cmpnd_dims[] = {1};
+ hid_t dapl_id; /* Dataset access property list */
+ unsigned * ibuf, *obuf;
+ unsigned i; /* Counter */
+ H5O_type_t obj_type; /* Object type */
+ herr_t ret; /* Generic return value */
+ s2_t cmpnd_wbuf, cmpnd_rbuf;
+
+ /* Output message about test being performed */
+ MESSAGE(5, ("Testing Object Reference Functions within compound type\n"));
+
+ /* Allocate write & read buffers */
+ ibuf = HDcalloc(sizeof(unsigned), SPACE1_DIM1);
+ obuf = HDcalloc(sizeof(unsigned), SPACE1_DIM1);
+
+ for (i = 0; i < SPACE1_DIM1; i++)
+ obuf[i] = i * 3;
+
+ /* Create file */
+ fid1 = H5Fcreate(FILE_REF_CMPND_OBJ, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(fid1, H5I_INVALID_HID, "H5Fcreate");
+
+ /* Create dataspace for datasets */
+ sid1 = H5Screate_simple(SPACE1_RANK, dims1, NULL);
+ CHECK(sid1, H5I_INVALID_HID, "H5Screate_simple");
+
+ /* Create dataset access property list */
+ dapl_id = H5Pcreate(H5P_DATASET_ACCESS);
+ CHECK(dapl_id, H5I_INVALID_HID, "H5Pcreate");
+
+ /* Create a group */
+ group = H5Gcreate2(fid1, "Group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(group, H5I_INVALID_HID, "H5Gcreate2");
+
+ /* Create a dataset (inside Group1) */
+ dataset = H5Dcreate2(group, "Dataset1", H5T_NATIVE_UINT, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(dataset, H5I_INVALID_HID, "H5Dcreate2");
+
+ /* Write selection to disk */
+ ret = H5Dwrite(dataset, H5T_NATIVE_UINT, H5S_ALL, H5S_ALL, H5P_DEFAULT, obuf);
+ CHECK(ret, FAIL, "H5Dwrite");
+
+ /* Close Dataset */
+ ret = H5Dclose(dataset);
+ CHECK(ret, FAIL, "H5Dclose");
+
+ /* Create another dataset (inside Group1) */
+ dataset = H5Dcreate2(group, "Dataset2", H5T_NATIVE_UCHAR, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(dataset, FAIL, "H5Dcreate2");
+
+ /* Close Dataset */
+ ret = H5Dclose(dataset);
+ CHECK(ret, FAIL, "H5Dclose");
+
+ /* Close disk dataspace */
+ ret = H5Sclose(sid1);
+ CHECK(ret, FAIL, "H5Sclose");
+
+ /* Create a datatype to refer to */
+ tid1 = H5Tcreate(H5T_COMPOUND, sizeof(s1_t));
+ CHECK(tid1, H5I_INVALID_HID, "H5Tcreate");
+
+ /* Insert fields */
+ ret = H5Tinsert(tid1, "a", HOFFSET(s1_t, a), H5T_NATIVE_INT);
+ CHECK(ret, FAIL, "H5Tinsert");
+
+ ret = H5Tinsert(tid1, "b", HOFFSET(s1_t, b), H5T_NATIVE_INT);
+ CHECK(ret, FAIL, "H5Tinsert");
+
+ ret = H5Tinsert(tid1, "c", HOFFSET(s1_t, c), H5T_NATIVE_FLOAT);
+ CHECK(ret, FAIL, "H5Tinsert");
+
+ /* Save datatype for later */
+ ret = H5Tcommit2(group, "Datatype1", tid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(ret, FAIL, "H5Tcommit2");
+
+ /* Close datatype */
+ ret = H5Tclose(tid1);
+ CHECK(ret, FAIL, "H5Tclose");
+
+ /* Close group */
+ ret = H5Gclose(group);
+ CHECK(ret, FAIL, "H5Gclose");
+
+ /* Create compound type */
+ tid1 = H5Tcreate(H5T_COMPOUND, sizeof(s2_t));
+ CHECK(tid1, H5I_INVALID_HID, "H5Tcreate");
+
+ /* Insert fields */
+ ret = H5Tinsert(tid1, "ref0", HOFFSET(s2_t, ref0), H5T_STD_REF);
+ CHECK(ret, FAIL, "H5Tinsert");
+
+ ret = H5Tinsert(tid1, "ref1", HOFFSET(s2_t, ref1), H5T_STD_REF);
+ CHECK(ret, FAIL, "H5Tinsert");
+
+ ret = H5Tinsert(tid1, "ref2", HOFFSET(s2_t, ref2), H5T_STD_REF);
+ CHECK(ret, FAIL, "H5Tinsert");
+
+ ret = H5Tinsert(tid1, "ref3", HOFFSET(s2_t, ref3), H5T_STD_REF);
+ CHECK(ret, FAIL, "H5Tinsert");
+
+ ret = H5Tinsert(tid1, "dim_idx", HOFFSET(s2_t, dim_idx), H5T_NATIVE_INT);
+ CHECK(ret, FAIL, "H5Tinsert");
+
+ /* Create dataspace for datasets */
+ sid1 = H5Screate_simple(SPACE1_RANK, cmpnd_dims, NULL);
+ CHECK(sid1, H5I_INVALID_HID, "H5Screate_simple");
+
+ /* Create a dataset */
+ dataset = H5Dcreate2(fid1, "Dataset3", tid1, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(dataset, H5I_INVALID_HID, "H5Dcreate2");
+
+ /* Reset buffer for writing */
+ HDmemset(&cmpnd_wbuf, 0, sizeof(cmpnd_wbuf));
+
+ /* Create reference to dataset */
+ ret = H5Rcreate_object(fid1, "/Group1/Dataset1", H5P_DEFAULT, &cmpnd_wbuf.ref0);
+ CHECK(ret, FAIL, "H5Rcreate_object");
+ ret = H5Rget_obj_type3(&cmpnd_wbuf.ref0, H5P_DEFAULT, &obj_type);
+ CHECK(ret, FAIL, "H5Rget_obj_type3");
+ VERIFY(obj_type, H5O_TYPE_DATASET, "H5Rget_obj_type3");
+
+ /* Create reference to dataset */
+ ret = H5Rcreate_object(fid1, "/Group1/Dataset2", H5P_DEFAULT, &cmpnd_wbuf.ref1);
+ CHECK(ret, FAIL, "H5Rcreate_object");
+ ret = H5Rget_obj_type3(&cmpnd_wbuf.ref1, H5P_DEFAULT, &obj_type);
+ CHECK(ret, FAIL, "H5Rget_obj_type3");
+ VERIFY(obj_type, H5O_TYPE_DATASET, "H5Rget_obj_type3");
+
+ /* Create reference to group */
+ ret = H5Rcreate_object(fid1, "/Group1", H5P_DEFAULT, &cmpnd_wbuf.ref2);
+ CHECK(ret, FAIL, "H5Rcreate_object");
+ ret = H5Rget_obj_type3(&cmpnd_wbuf.ref2, H5P_DEFAULT, &obj_type);
+ CHECK(ret, FAIL, "H5Rget_obj_type3");
+ VERIFY(obj_type, H5O_TYPE_GROUP, "H5Rget_obj_type3");
+
+ /* Create reference to named datatype */
+ ret = H5Rcreate_object(fid1, "/Group1/Datatype1", H5P_DEFAULT, &cmpnd_wbuf.ref3);
+ CHECK(ret, FAIL, "H5Rcreate_object");
+ ret = H5Rget_obj_type3(&cmpnd_wbuf.ref3, H5P_DEFAULT, &obj_type);
+ CHECK(ret, FAIL, "H5Rget_obj_type3");
+ VERIFY(obj_type, H5O_TYPE_NAMED_DATATYPE, "H5Rget_obj_type3");
+
+ /* Store dimensions */
+ cmpnd_wbuf.dim_idx = SPACE1_DIM1;
+
+ /* Write selection to disk */
+ ret = H5Dwrite(dataset, tid1, H5S_ALL, H5S_ALL, H5P_DEFAULT, &cmpnd_wbuf);
+ CHECK(ret, FAIL, "H5Dwrite");
+
+ /* Close disk dataspace */
+ ret = H5Sclose(sid1);
+ CHECK(ret, FAIL, "H5Sclose");
+
+ /* Close Dataset */
+ ret = H5Dclose(dataset);
+ CHECK(ret, FAIL, "H5Dclose");
+
+ /* Close datatype */
+ ret = H5Tclose(tid1);
+ CHECK(ret, FAIL, "H5Tclose");
+
+ /* Close file */
+ ret = H5Fclose(fid1);
+ CHECK(ret, FAIL, "H5Fclose");
+
+ /* Re-open the file */
+ fid1 = H5Fopen(FILE_REF_CMPND_OBJ, H5F_ACC_RDWR, H5P_DEFAULT);
+ CHECK(fid1, H5I_INVALID_HID, "H5Fopen");
+
+ /* Open the dataset */
+ dataset = H5Dopen2(fid1, "/Dataset3", H5P_DEFAULT);
+ CHECK(dataset, H5I_INVALID_HID, "H5Dopen2");
+
+ tid1 = H5Dget_type(dataset);
+ CHECK(tid1, H5I_INVALID_HID, "H5Dget_type");
+
+ /* Read selection from disk */
+ ret = H5Dread(dataset, tid1, H5S_ALL, H5S_ALL, H5P_DEFAULT, &cmpnd_rbuf);
+ CHECK(ret, FAIL, "H5Dread");
+
+ VERIFY(cmpnd_rbuf.dim_idx, SPACE1_DIM1, "H5Dread");
+
+ /* Close datatype */
+ ret = H5Tclose(tid1);
+ CHECK(ret, FAIL, "H5Tclose");
+
+ /* Open dataset object */
+ dset2 = H5Ropen_object(&cmpnd_rbuf.ref0, H5P_DEFAULT, dapl_id);
+ CHECK(dset2, H5I_INVALID_HID, "H5Ropen_object");
+
+ /* Check information in referenced dataset */
+ sid1 = H5Dget_space(dset2);
+ CHECK(sid1, H5I_INVALID_HID, "H5Dget_space");
+
+ ret = (int)H5Sget_simple_extent_npoints(sid1);
+ VERIFY(ret, SPACE1_DIM1, "H5Sget_simple_extent_npoints");
+
+ /* Read from disk */
+ ret = H5Dread(dset2, H5T_NATIVE_UINT, H5S_ALL, H5S_ALL, H5P_DEFAULT, ibuf);
+ CHECK(ret, FAIL, "H5Dread");
+
+ for (i = 0; i < SPACE1_DIM1; i++)
+ VERIFY(ibuf[i], i * 3, "Data");
+
+ /* Close dereferenced Dataset */
+ ret = H5Dclose(dset2);
+ CHECK(ret, FAIL, "H5Dclose");
+
+ /* Open group object. GAPL isn't supported yet. But it's harmless to pass in */
+ group = H5Ropen_object(&cmpnd_rbuf.ref2, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(group, H5I_INVALID_HID, "H5Ropen_object");
+
+ /* Close group */
+ ret = H5Gclose(group);
+ CHECK(ret, FAIL, "H5Gclose");
+
+ /* Open datatype object. TAPL isn't supported yet. But it's harmless to pass in */
+ tid1 = H5Ropen_object(&cmpnd_rbuf.ref3, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(tid1, H5I_INVALID_HID, "H5Ropen_object");
+
+ /* Verify correct datatype */
+ {
+ H5T_class_t tclass;
+
+ tclass = H5Tget_class(tid1);
+ VERIFY(tclass, H5T_COMPOUND, "H5Tget_class");
+
+ ret = H5Tget_nmembers(tid1);
+ VERIFY(ret, 3, "H5Tget_nmembers");
+ }
+
+ /* Close datatype */
+ ret = H5Tclose(tid1);
+ CHECK(ret, FAIL, "H5Tclose");
+
+ /* Close Dataset */
+ ret = H5Dclose(dataset);
+ CHECK(ret, FAIL, "H5Dclose");
+
+ /* Close dataset access property list */
+ ret = H5Pclose(dapl_id);
+ CHECK(ret, FAIL, "H5Pclose");
+
+ /* Close file */
+ ret = H5Fclose(fid1);
+ CHECK(ret, FAIL, "H5Fclose");
+
+ /* Destroy references */
+ ret = H5Rdestroy(&cmpnd_wbuf.ref0);
+ CHECK(ret, FAIL, "H5Rdestroy");
+ ret = H5Rdestroy(&cmpnd_wbuf.ref1);
+ CHECK(ret, FAIL, "H5Rdestroy");
+ ret = H5Rdestroy(&cmpnd_wbuf.ref2);
+ CHECK(ret, FAIL, "H5Rdestroy");
+ ret = H5Rdestroy(&cmpnd_wbuf.ref3);
+ CHECK(ret, FAIL, "H5Rdestroy");
+
+ ret = H5Rdestroy(&cmpnd_rbuf.ref0);
+ CHECK(ret, FAIL, "H5Rdestroy");
+ ret = H5Rdestroy(&cmpnd_rbuf.ref1);
+ CHECK(ret, FAIL, "H5Rdestroy");
+ ret = H5Rdestroy(&cmpnd_rbuf.ref2);
+ CHECK(ret, FAIL, "H5Rdestroy");
+ ret = H5Rdestroy(&cmpnd_rbuf.ref3);
+ CHECK(ret, FAIL, "H5Rdestroy");
+
+ /* Free memory buffers */
+ HDfree(ibuf);
+ HDfree(obuf);
+} /* test_reference_cmpnd_obj() */
+
/****************************************************************
**
** test_reference_region(): Test basic H5R (reference) object reference code.
@@ -832,11 +1130,11 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
hsize_t * coords; /* Coordinate buffer */
hsize_t low[SPACE2_RANK]; /* Selection bounds */
hsize_t high[SPACE2_RANK]; /* Selection bounds */
- H5R_ref_t *wbuf, /* buffer to write to disk */
- *rbuf; /* buffer read from disk */
+ H5R_ref_t *wbuf = NULL, /* buffer to write to disk */
+ *rbuf = NULL; /* buffer read from disk */
H5R_ref_t nvrbuf[3] = {{{{0}}}, {{{101}}}, {{{255}}}}; /* buffer with non-valid refs */
- uint8_t * dwbuf, /* Buffer for writing numeric data to disk */
- *drbuf; /* Buffer for reading numeric data from disk */
+ uint8_t * dwbuf = NULL, /* Buffer for writing numeric data to disk */
+ *drbuf = NULL; /* Buffer for reading numeric data from disk */
uint8_t * tu8; /* Temporary pointer to uint8 data */
H5O_type_t obj_type; /* Type of object */
int i, j; /* Counters */
@@ -1255,13 +1553,14 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
ret = H5Rdestroy(&rbuf[j]);
CHECK(ret, FAIL, "H5Rdestroy");
}
-
- /* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
- HDfree(dwbuf);
- HDfree(drbuf);
}
+
+ /* Free memory buffers */
+ HDfree(wbuf);
+ HDfree(rbuf);
+ HDfree(dwbuf);
+ HDfree(drbuf);
+
} /* test_reference_region() */
/****************************************************************
@@ -1294,10 +1593,10 @@ test_reference_region_1D(H5F_libver_t libver_low, H5F_libver_t libver_high)
hsize_t * coords; /* Coordinate buffer */
hsize_t low[SPACE3_RANK]; /* Selection bounds */
hsize_t high[SPACE3_RANK]; /* Selection bounds */
- H5R_ref_t *wbuf, /* buffer to write to disk */
- *rbuf; /* buffer read from disk */
- uint8_t *dwbuf, /* Buffer for writing numeric data to disk */
- *drbuf; /* Buffer for reading numeric data from disk */
+ H5R_ref_t *wbuf = NULL, /* buffer to write to disk */
+ *rbuf = NULL; /* buffer read from disk */
+ uint8_t *dwbuf = NULL, /* Buffer for writing numeric data to disk */
+ *drbuf = NULL; /* Buffer for reading numeric data from disk */
uint8_t * tu8; /* Temporary pointer to uint8 data */
H5O_type_t obj_type; /* Object type */
int i; /* Counter */
@@ -1595,13 +1894,14 @@ test_reference_region_1D(H5F_libver_t libver_low, H5F_libver_t libver_high)
ret = H5Rdestroy(&rbuf[i]);
CHECK(ret, FAIL, "H5Rdestroy");
}
-
- /* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
- HDfree(dwbuf);
- HDfree(drbuf);
}
+
+ /* Free memory buffers */
+ HDfree(wbuf);
+ HDfree(rbuf);
+ HDfree(dwbuf);
+ HDfree(drbuf);
+
} /* test_reference_region_1D() */
/****************************************************************
@@ -2438,10 +2738,10 @@ test_reference_compat_conv(void)
hsize_t count[SPACE2_RANK]; /* Element count of hyperslab */
hsize_t block[SPACE2_RANK]; /* Block size of hyperslab */
hsize_t coord1[POINT1_NPOINTS][SPACE2_RANK]; /* Coordinates for point selection */
- hobj_ref_t * wbuf_obj; /* Buffer to write to disk */
- H5R_ref_t * rbuf_obj; /* Buffer read from disk */
- hdset_reg_ref_t *wbuf_reg; /* Buffer to write to disk */
- H5R_ref_t * rbuf_reg; /* Buffer read from disk */
+ hobj_ref_t * wbuf_obj = NULL; /* Buffer to write to disk */
+ H5R_ref_t * rbuf_obj = NULL; /* Buffer read from disk */
+ hdset_reg_ref_t *wbuf_reg = NULL; /* Buffer to write to disk */
+ H5R_ref_t * rbuf_reg = NULL; /* Buffer read from disk */
H5O_type_t obj_type; /* Object type */
herr_t ret; /* Generic return value */
unsigned int i; /* Counter */
@@ -3157,9 +3457,10 @@ test_reference(void)
/* Output message about test being performed */
MESSAGE(5, ("Testing References\n"));
- test_reference_params(); /* Test for correct parameter checking */
- test_reference_obj(); /* Test basic H5R object reference code */
- test_reference_vlen_obj(); /* Test reference within vlen */
+ test_reference_params(); /* Test for correct parameter checking */
+ test_reference_obj(); /* Test basic H5R object reference code */
+ test_reference_vlen_obj(); /* Test reference within vlen */
+ test_reference_cmpnd_obj(); /* Test reference within compound type */
/* Loop through all the combinations of low/high version bounds */
for (low = H5F_LIBVER_EARLIEST; low < H5F_LIBVER_NBOUNDS; low++) {
@@ -3205,6 +3506,7 @@ cleanup_reference(void)
HDremove(FILE_REF_PARAM);
HDremove(FILE_REF_OBJ);
HDremove(FILE_REF_VL_OBJ);
+ HDremove(FILE_REF_CMPND_OBJ);
HDremove(FILE_REF_REG);
HDremove(FILE_REF_REG_1D);
HDremove(FILE_REF_OBJ_DEL);
diff --git a/test/trefer_deprec.c b/test/trefer_deprec.c
index 098593353fc..24371ef0a9e 100644
--- a/test/trefer_deprec.c
+++ b/test/trefer_deprec.c
@@ -1421,9 +1421,9 @@ test_reference_group(void)
/* Create bottom dataset */
did = H5Dcreate2(gid, DSETNAME2, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- assert(did > 0);
+ HDassert(did > 0);
ret = H5Dclose(did);
- assert(ret >= 0);
+ HDassert(ret >= 0);
ret = H5Gclose(gid);
CHECK(ret, FAIL, "H5Gclose");
diff --git a/test/ttsafe_error.c b/test/ttsafe_error.c
index 0f7d6f68951..d30ed481897 100644
--- a/test/ttsafe_error.c
+++ b/test/ttsafe_error.c
@@ -38,7 +38,7 @@
/* Having a common dataset name is an error */
#define DATASETNAME "commonname"
-#define EXPECTED_ERROR_DEPTH 10
+#define EXPECTED_ERROR_DEPTH 11
#define WRITE_NUMBER 37
/* Typedefs */
@@ -72,34 +72,37 @@ tts_error(void)
/* Must initialize these at runtime */
expected_g[0].maj_num = H5E_DATASET;
- expected_g[0].min_num = H5E_CANTINIT;
+ expected_g[0].min_num = H5E_CANTCREATE;
- expected_g[1].maj_num = H5E_VOL;
+ expected_g[1].maj_num = H5E_DATASET;
expected_g[1].min_num = H5E_CANTCREATE;
expected_g[2].maj_num = H5E_VOL;
expected_g[2].min_num = H5E_CANTCREATE;
- expected_g[3].maj_num = H5E_DATASET;
- expected_g[3].min_num = H5E_CANTINIT;
+ expected_g[3].maj_num = H5E_VOL;
+ expected_g[3].min_num = H5E_CANTCREATE;
expected_g[4].maj_num = H5E_DATASET;
expected_g[4].min_num = H5E_CANTINIT;
- expected_g[5].maj_num = H5E_LINK;
+ expected_g[5].maj_num = H5E_DATASET;
expected_g[5].min_num = H5E_CANTINIT;
expected_g[6].maj_num = H5E_LINK;
- expected_g[6].min_num = H5E_CANTINSERT;
+ expected_g[6].min_num = H5E_CANTINIT;
- expected_g[7].maj_num = H5E_SYM;
- expected_g[7].min_num = H5E_NOTFOUND;
+ expected_g[7].maj_num = H5E_LINK;
+ expected_g[7].min_num = H5E_CANTINSERT;
expected_g[8].maj_num = H5E_SYM;
- expected_g[8].min_num = H5E_CALLBACK;
+ expected_g[8].min_num = H5E_NOTFOUND;
- expected_g[9].maj_num = H5E_LINK;
- expected_g[9].min_num = H5E_EXISTS;
+ expected_g[9].maj_num = H5E_SYM;
+ expected_g[9].min_num = H5E_CALLBACK;
+
+ expected_g[10].maj_num = H5E_LINK;
+ expected_g[10].min_num = H5E_EXISTS;
/* set up mutex for global count of errors */
H5TS_mutex_init(&error_mutex_g);
@@ -134,7 +137,8 @@ tts_error(void)
if (error_flag_g) {
TestErrPrintf(
"At least one thread reported a value that was different from the expected value\n");
- HDprintf("(Update this test if the error stack changed!)\n");
+ HDprintf(
+ "(Update the expected_g[] array in tts_error for this test if the error stack changed!)\n");
}
if (error_count_g != NUM_THREAD - 1)
@@ -241,7 +245,18 @@ walk_error_callback(unsigned n, const H5E_error2_t *err_desc, void H5_ATTR_UNUSE
return SUCCEED;
}
+ /* Unexpected error stack entry, print some info and set flag */
+ HDfprintf(stderr, "Unexpected error stack entry!\n");
+ HDfprintf(stderr, "Stack entry: %d\n", n);
+ HDfprintf(stderr,
+ "Actual: maj_num = %" PRIxHID ", min_num = %" PRIxHID
+ ", line = %u, func = '%s', file = '%s', desc = '%s'\n",
+ err_desc->maj_num, err_desc->min_num, err_desc->line, err_desc->func_name, err_desc->file_name,
+ err_desc->desc);
+ HDfprintf(stderr, "Expected: maj_num = %" PRIxHID ", min_num = %" PRIxHID "\n", expected_g[n].maj_num,
+ expected_g[n].min_num);
error_flag_g = -1;
+
return SUCCEED;
}
diff --git a/test/vds.c b/test/vds.c
index 56973f8ea4b..88ac4ebce8f 100644
--- a/test/vds.c
+++ b/test/vds.c
@@ -33,11 +33,57 @@ const char *FILENAME[] = {"vds_virt_0", "vds_virt_1", "vds_src_0", "vds_src_1",
"vds_dapl", "vds_virt_2", "vds_virt_3", "vds_src_2", "vds_src_3",
"vds%%_src2", "vds_dapl2", NULL};
+/* Define to enable verbose test output */
+/* #define VDS_TEST_VERBOSE 1 */
+
+#ifdef VDS_TEST_VERBOSE
+
+/* For verbose output just use standard error printing */
+#define TESTING_2_SUPPRESSED(WHAT) TESTING_2(WHAT)
+#define PASSED_SUPPRESSED() PASSED()
+#define TEST_ERROR_SUPPRESSED TEST_ERROR
+
+/* Print config directly to output */
+#define PRINT_CONFIG(...) \
+ { \
+ HDprintf("Config: " __VA_ARGS__); \
+ HDputs(""); \
+ }
+
+#else /* VDS_TEST_VERBOSE */
+
+/* Global strings for error output */
+char vds_config_str_g[128] = "";
+char vds_test_str_g[128] = "";
+
+/* Replacement for TESTING_2 for non-verbose-output */
+#define TESTING_2_SUPPRESSED(WHAT) \
+ { \
+ HDsnprintf(vds_test_str_g, sizeof(vds_test_str_g), WHAT); \
+ }
+
+/* Suppress output from PASSED() */
+#define PASSED_SUPPRESSED()
+
+/* Replacement for TEST_ERROR for non-verbose output */
+#define TEST_ERROR_SUPPRESSED \
+ { \
+ printf("Failed config: %s\nFailed test: %s\n", vds_config_str_g, vds_test_str_g); \
+ TEST_ERROR \
+ }
+
+/* Replacement for HDprintf for printing configuration for non-verbose output */
+#define PRINT_CONFIG(...) HDsnprintf(vds_config_str_g, sizeof(vds_config_str_g), __VA_ARGS__);
+
+#endif /* VDS_TEST_VERBOSE */
+
/* I/O test config flags */
#define TEST_IO_CLOSE_SRC 0x01u
#define TEST_IO_DIFFERENT_FILE 0x02u
#define TEST_IO_REOPEN_VIRT 0x04u
-#define TEST_IO_NTESTS 0x08u
+#define TEST_IO_FCLOSE_SEMI 0x08u
+#define TEST_IO_FCLOSE_STRONG 0x10u
+#define TEST_IO_NTESTS 0x20u
#define LIST_DOUBLE_SIZE (H5D_VIRTUAL_DEF_LIST_SIZE + 1)
@@ -488,22 +534,22 @@ test_api(test_api_config_t config, hid_t fapl, H5F_libver_t low)
switch (config) {
case TEST_API_BASIC:
- TESTING("virtual dataset API functions")
+ TESTING_2("virtual dataset API functions")
break;
case TEST_API_COPY_PLIST:
- TESTING("virtual dataset API functions with copied plists")
+ TESTING_2("virtual dataset API functions with copied plists")
break;
case TEST_API_ENCDEC_PLIST:
- TESTING("virtual dataset API functions with encoded and decoded plists")
+ TESTING_2("virtual dataset API functions with encoded and decoded plists")
break;
case TEST_API_CREATE_DSET:
- TESTING("virtual dataset create")
+ TESTING_2("virtual dataset create")
break;
case TEST_API_REOPEN_DSET:
- TESTING("virtual dataset create with reopened dataset")
+ TESTING_2("virtual dataset create with reopened dataset")
break;
case TEST_API_REOPEN_FILE:
- TESTING("virtual dataset create with reopened file")
+ TESTING_2("virtual dataset create with reopened file")
break;
case TEST_API_NTESTS:
default:
@@ -1121,7 +1167,7 @@ test_api(test_api_config_t config, hid_t fapl, H5F_libver_t low)
*-------------------------------------------------------------------------
*/
static int
-test_vds_prefix_first(unsigned config, hid_t fapl)
+test_vds_prefix_first(unsigned config, hid_t vds_fapl, hid_t src_fapl)
{
char * srcfilename = NULL;
char * srcfilename_map = NULL;
@@ -1145,97 +1191,97 @@ test_vds_prefix_first(unsigned config, hid_t fapl)
int i, j;
char buffer[1024]; /* buffer to read vds_prefix */
- TESTING("basic virtual dataset I/O via H5Pset_vds_prefix(): all selection")
+ TESTING_2_SUPPRESSED("basic virtual dataset I/O via H5Pset_vds_prefix(): all selection")
if ((srcfilename = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
- TEST_ERROR;
+ TEST_ERROR_SUPPRESSED;
if ((srcfilename_map = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
- TEST_ERROR;
+ TEST_ERROR_SUPPRESSED;
if ((vfilename = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
- TEST_ERROR;
+ TEST_ERROR_SUPPRESSED;
if ((srcfilenamepct = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
- TEST_ERROR;
+ TEST_ERROR_SUPPRESSED;
if ((srcfilenamepct_map = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
- TEST_ERROR;
+ TEST_ERROR_SUPPRESSED;
- h5_fixname(FILENAME[0], fapl, vfilename, FILENAME_BUF_SIZE);
- h5_fixname(FILENAME[8], fapl, srcfilename, FILENAME_BUF_SIZE);
- h5_fixname_printf(FILENAME[8], fapl, srcfilename_map, FILENAME_BUF_SIZE);
- h5_fixname(FILENAME[10], fapl, srcfilenamepct, FILENAME_BUF_SIZE);
- h5_fixname_printf(srcfilenamepct_map_orig, fapl, srcfilenamepct_map, FILENAME_BUF_SIZE);
+ h5_fixname(FILENAME[0], vds_fapl, vfilename, FILENAME_BUF_SIZE);
+ h5_fixname(FILENAME[8], src_fapl, srcfilename, FILENAME_BUF_SIZE);
+ h5_fixname_printf(FILENAME[8], src_fapl, srcfilename_map, FILENAME_BUF_SIZE);
+ h5_fixname(FILENAME[10], src_fapl, srcfilenamepct, FILENAME_BUF_SIZE);
+ h5_fixname_printf(srcfilenamepct_map_orig, src_fapl, srcfilenamepct_map, FILENAME_BUF_SIZE);
/* create tmp directory and get current working directory path */
if (HDmkdir(TMPDIR, (mode_t)0755) < 0 && errno != EEXIST)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create DCPL */
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Set fill value */
if (H5Pset_fill_value(dcpl, H5T_NATIVE_INT, &fill) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Initialize VDS prefix items */
if ((dapl = H5Pcreate(H5P_DATASET_ACCESS)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual_prefix(dapl, TMPDIR) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pget_virtual_prefix(dapl, buffer, sizeof(buffer)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (HDstrcmp(buffer, TMPDIR) != 0)
FAIL_PUTS_ERROR("vds prefix not set correctly");
/* Create source dataspace */
if ((srcspace[0] = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataspace */
if ((vspace[0] = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select all (should not be necessary, but just to be sure) */
if (H5Sselect_all(srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sselect_all(vspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Add virtual layout mapping */
if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset",
srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual file */
- if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create source file if requested */
if (config & TEST_IO_DIFFERENT_FILE) {
if (NULL == HDgetcwd(buffer, 1024))
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (HDchdir(TMPDIR) < 0)
- TEST_ERROR
- if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
+ if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if (HDchdir(buffer) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else {
srcfile[0] = vfile;
if (H5Iinc_ref(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Create source dataset */
if ((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataset */
if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Populate write buffer */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
@@ -1244,17 +1290,17 @@ test_vds_prefix_first(unsigned config, hid_t fapl)
/* Write data directly to source dataset */
if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close srcdset and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
}
@@ -1262,27 +1308,27 @@ test_vds_prefix_first(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Read data through virtual dataset */
HDmemset(rbuf[0], 0, sizeof(rbuf));
if (H5Dread(vdset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) {
for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
if (rbuf[i][j] != buf[i][j]) {
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
}
@@ -1293,59 +1339,59 @@ test_vds_prefix_first(unsigned config, hid_t fapl)
/* Write data through virtual dataset */
if (H5Dwrite(vdset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Reopen srcdset and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (config & TEST_IO_DIFFERENT_FILE) {
if (NULL == HDgetcwd(buffer, 1024))
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (HDchdir(TMPDIR) < 0)
- TEST_ERROR
- if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
+ if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if (HDchdir(buffer) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
if ((srcdset[0] = H5Dopen2(srcfile[0], "src_dset", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Read data directly from source dataset */
HDmemset(rbuf[0], 0, sizeof(rbuf));
if (H5Dread(srcdset[0], H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
if (rbuf[i][j] != buf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close */
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
if (H5Sclose(srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcspace[0] = -1;
if (H5Sclose(vspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[0] = -1;
if (H5Pclose(dapl) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
dapl = -1;
if (H5Pclose(dcpl) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
dcpl = -1;
HDfree(srcfilename);
@@ -1354,7 +1400,7 @@ test_vds_prefix_first(unsigned config, hid_t fapl)
HDfree(srcfilenamepct);
HDfree(srcfilenamepct_map);
- PASSED();
+ PASSED_SUPPRESSED();
return 0;
error:
@@ -1377,7 +1423,7 @@ test_vds_prefix_first(unsigned config, hid_t fapl)
H5E_END_TRY;
if (HDsetenv("HDF5_VDS_PREFIX", "", 1) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
HDfree(srcfilename);
HDfree(srcfilename_map);
@@ -1399,7 +1445,7 @@ test_vds_prefix_first(unsigned config, hid_t fapl)
*-------------------------------------------------------------------------
*/
static int
-test_basic_io(unsigned config, hid_t fapl)
+test_basic_io(unsigned config, hid_t vds_fapl, hid_t src_fapl)
{
char * srcfilename = NULL;
char * srcfilename_map = NULL;
@@ -1432,81 +1478,81 @@ test_basic_io(unsigned config, hid_t fapl)
herr_t ret; /* Generic return value */
int i, j, u, v;
- TESTING("basic virtual dataset I/O")
+ TESTING_2_SUPPRESSED("basic virtual dataset I/O")
if ((srcfilename = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
- TEST_ERROR;
+ TEST_ERROR_SUPPRESSED;
if ((srcfilename_map = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
- TEST_ERROR;
+ TEST_ERROR_SUPPRESSED;
if ((vfilename = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
- TEST_ERROR;
+ TEST_ERROR_SUPPRESSED;
if ((vfilename2 = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
- TEST_ERROR;
+ TEST_ERROR_SUPPRESSED;
if ((srcfilenamepct = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
- TEST_ERROR;
+ TEST_ERROR_SUPPRESSED;
if ((srcfilenamepct_map = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
- TEST_ERROR;
+ TEST_ERROR_SUPPRESSED;
- h5_fixname(FILENAME[0], fapl, vfilename, FILENAME_BUF_SIZE);
- h5_fixname(FILENAME[1], fapl, vfilename2, FILENAME_BUF_SIZE);
- h5_fixname(FILENAME[2], fapl, srcfilename, FILENAME_BUF_SIZE);
- h5_fixname_printf(FILENAME[2], fapl, srcfilename_map, FILENAME_BUF_SIZE);
- h5_fixname(FILENAME[4], fapl, srcfilenamepct, FILENAME_BUF_SIZE);
- h5_fixname_printf(srcfilenamepct_map_orig, fapl, srcfilenamepct_map, FILENAME_BUF_SIZE);
+ h5_fixname(FILENAME[0], vds_fapl, vfilename, FILENAME_BUF_SIZE);
+ h5_fixname(FILENAME[1], vds_fapl, vfilename2, FILENAME_BUF_SIZE);
+ h5_fixname(FILENAME[2], src_fapl, srcfilename, FILENAME_BUF_SIZE);
+ h5_fixname_printf(FILENAME[2], src_fapl, srcfilename_map, FILENAME_BUF_SIZE);
+ h5_fixname(FILENAME[4], src_fapl, srcfilenamepct, FILENAME_BUF_SIZE);
+ h5_fixname_printf(srcfilenamepct_map_orig, src_fapl, srcfilenamepct_map, FILENAME_BUF_SIZE);
/* Create DCPL */
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Set fill value */
if (H5Pset_fill_value(dcpl, H5T_NATIVE_INT, &fill) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/*
* Test 1: All - all selection
*/
/* Create source dataspace */
if ((srcspace[0] = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataspace */
if ((vspace[0] = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select all (should not be necessary, but just to be sure) */
if (H5Sselect_all(srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sselect_all(vspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Add virtual layout mapping */
if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset",
srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual file */
- if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create source file if requested */
if (config & TEST_IO_DIFFERENT_FILE) {
- if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
else {
srcfile[0] = vfile;
if (H5Iinc_ref(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Create source dataset */
if ((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataset */
if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Populate write buffer */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
@@ -1515,17 +1561,17 @@ test_basic_io(unsigned config, hid_t fapl)
/* Write data directly to source dataset */
if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close srcdset and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
}
@@ -1533,27 +1579,27 @@ test_basic_io(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Read data through virtual dataset */
HDmemset(rbuf[0], 0, sizeof(rbuf));
if (H5Dread(vdset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
if (rbuf[i][j] != buf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Adjust write buffer */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
@@ -1562,46 +1608,46 @@ test_basic_io(unsigned config, hid_t fapl)
/* Write data through virtual dataset */
if (H5Dwrite(vdset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Reopen srcdset and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (config & TEST_IO_DIFFERENT_FILE)
- if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((srcdset[0] = H5Dopen2(srcfile[0], "src_dset", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Read data directly from source dataset */
HDmemset(rbuf[0], 0, sizeof(rbuf));
if (H5Dread(srcdset[0], H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
if (rbuf[i][j] != buf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close */
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
if (H5Sclose(srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcspace[0] = -1;
if (H5Sclose(vspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[0] = -1;
/*
@@ -1610,70 +1656,70 @@ test_basic_io(unsigned config, hid_t fapl)
*/
/* Clear virtual layout in DCPL */
if (H5Pset_layout(dcpl, H5D_VIRTUAL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataspaces */
if ((vspace[0] = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((vspace[1] = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create source dataspace */
dims[1] = 13;
if ((srcspace[0] = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select all in source space (should not be necessary, but just to be sure)
*/
if (H5Sselect_all(srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select hyperslabs in virtual spaces */
start[0] = 0;
start[1] = 0;
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[1] = 13;
if (H5Sselect_hyperslab(vspace[1], H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Add virtual layout mappings */
if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".",
"%%src_dset1", srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".",
"src_dset2%%", srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Reset dims */
dims[1] = 26;
/* Create virtual file */
- if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create source file if requested */
if (config & TEST_IO_DIFFERENT_FILE) {
- if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
else {
srcfile[0] = vfile;
if (H5Iinc_ref(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Create source datasets */
if ((srcdset[0] = H5Dcreate2(srcfile[0], "%src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset2%", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataset */
if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Populate write buffer */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
@@ -1682,22 +1728,22 @@ test_basic_io(unsigned config, hid_t fapl)
/* Write data directly to source datasets */
if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, vspace[0], H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, vspace[1], H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close srcdsets and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
}
@@ -1705,27 +1751,27 @@ test_basic_io(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Read data through virtual dataset */
HDmemset(rbuf[0], 0, sizeof(rbuf));
if (H5Dread(vdset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
if (rbuf[i][j] != buf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Adjust write buffer */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
@@ -1734,40 +1780,40 @@ test_basic_io(unsigned config, hid_t fapl)
/* Write data through virtual dataset */
if (H5Dwrite(vdset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Reopen srcdsets and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (config & TEST_IO_DIFFERENT_FILE)
- if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((srcdset[0] = H5Dopen2(srcfile[0], "%src_dset1", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2%", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Read data directly from source datasets */
HDmemset(rbuf[0], 0, sizeof(rbuf));
if (H5Dread(srcdset[0], H5T_NATIVE_INT, vspace[0], H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dread(srcdset[1], H5T_NATIVE_INT, vspace[1], H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
if (rbuf[i][j] != buf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Test H5Ocopy() to same file */
/* Copy virtual dataset */
if (H5Ocopy(vfile, "v_dset", vfile, "v_dset2", H5P_DEFAULT, H5P_DEFAULT) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close v_dset */
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
/* Adjust write buffer */
@@ -1777,22 +1823,22 @@ test_basic_io(unsigned config, hid_t fapl)
/* Write data directly to source datasets */
if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, vspace[0], H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, vspace[1], H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close srcdsets and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
}
@@ -1800,36 +1846,36 @@ test_basic_io(unsigned config, hid_t fapl)
/* Reopen virtual file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
/* Open v_dset2 */
if ((vdset = H5Dopen2(vfile, "v_dset2", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through copied virtual dataset */
HDmemset(rbuf[0], 0, sizeof(rbuf));
if (H5Dread(vdset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
if (rbuf[i][j] != buf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Reopen srcdsets and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (config & TEST_IO_DIFFERENT_FILE)
- if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((srcdset[0] = H5Dopen2(srcfile[0], "%src_dset1", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2%", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Only copy to a different file if the source datasets are in a different
@@ -1837,16 +1883,16 @@ test_basic_io(unsigned config, hid_t fapl)
if (config & TEST_IO_DIFFERENT_FILE) {
/* Close v_dset2 */
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
/* Create file to copy virtual dataset to */
- if ((vfile2 = H5Fcreate(vfilename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((vfile2 = H5Fcreate(vfilename2, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Copy virtual dataset */
if (H5Ocopy(vfile, "v_dset", vfile2, "v_dset3", H5P_DEFAULT, H5P_DEFAULT) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Adjust write buffer */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
@@ -1855,22 +1901,22 @@ test_basic_io(unsigned config, hid_t fapl)
/* Write data directly to source datasets */
if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, vspace[0], H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, vspace[1], H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close srcdsets and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
}
@@ -1878,68 +1924,66 @@ test_basic_io(unsigned config, hid_t fapl)
/* Reopen copied virtual file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Fclose(vfile2) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile2 = -1;
- if ((vfile2 = H5Fopen(vfilename2, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile2 = H5Fopen(vfilename2, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
/* Open v_dset3 */
if ((vdset = H5Dopen2(vfile2, "v_dset3", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through copied virtual dataset */
HDmemset(rbuf[0], 0, sizeof(rbuf));
if (H5Dread(vdset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
if (rbuf[i][j] != buf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Reopen srcdsets and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (config & TEST_IO_DIFFERENT_FILE)
- if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((srcdset[0] = H5Dopen2(srcfile[0], "%src_dset1", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2%", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
-
- /* Close copied virtual file */
- if (H5Fclose(vfile2) < 0)
- TEST_ERROR
- vfile2 = -1;
}
/* Close */
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
+ if (vfile2 >= 0 && H5Fclose(vfile2) < 0)
+ TEST_ERROR_SUPPRESSED
+ vfile2 = -1;
if (H5Sclose(srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcspace[0] = -1;
if (H5Sclose(vspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[0] = -1;
if (H5Sclose(vspace[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[1] = -1;
/*
@@ -1947,71 +1991,71 @@ test_basic_io(unsigned config, hid_t fapl)
*/
/* Clear virtual layout in DCPL */
if (H5Pset_layout(dcpl, H5D_VIRTUAL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataspaces */
if ((vspace[0] = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create source dataspace */
dims[1] = 13;
if ((srcspace[0] = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select all in source space (should not be necessary, but just to be sure)
*/
if (H5Sselect_all(srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select hyperslabs in virtual spaces */
start[0] = 0;
start[1] = 3;
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Add virtual layout mappings */
offset[1] = -3;
if (H5Soffset_simple(vspace[0], offset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".",
"%%src_dset1", srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
offset[1] = 10;
if (H5Soffset_simple(vspace[0], offset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".",
"src_dset2%%", srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Reset dims */
dims[1] = 26;
/* Create virtual file */
- if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create source file if requested */
if (config & TEST_IO_DIFFERENT_FILE) {
- if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
else {
srcfile[0] = vfile;
if (H5Iinc_ref(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Create source datasets */
if ((srcdset[0] = H5Dcreate2(srcfile[0], "%src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset2%", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataset */
if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Populate write buffer */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
@@ -2021,27 +2065,27 @@ test_basic_io(unsigned config, hid_t fapl)
/* Write data directly to source datasets */
offset[1] = -3;
if (H5Soffset_simple(vspace[0], offset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, vspace[0], H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
offset[1] = 10;
if (H5Soffset_simple(vspace[0], offset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, vspace[0], H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close srcdsets and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
}
@@ -2049,27 +2093,27 @@ test_basic_io(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Read data through virtual dataset */
HDmemset(rbuf[0], 0, sizeof(rbuf));
if (H5Dread(vdset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
if (rbuf[i][j] != buf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Adjust write buffer */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
@@ -2078,59 +2122,59 @@ test_basic_io(unsigned config, hid_t fapl)
/* Write data through virtual dataset */
if (H5Dwrite(vdset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Reopen srcdsets and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (config & TEST_IO_DIFFERENT_FILE)
- if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((srcdset[0] = H5Dopen2(srcfile[0], "%src_dset1", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2%", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Read data directly from source datasets */
HDmemset(rbuf[0], 0, sizeof(rbuf));
offset[1] = -3;
if (H5Soffset_simple(vspace[0], offset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dread(srcdset[0], H5T_NATIVE_INT, vspace[0], H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
offset[1] = 10;
if (H5Soffset_simple(vspace[0], offset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dread(srcdset[1], H5T_NATIVE_INT, vspace[0], H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
if (rbuf[i][j] != buf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close */
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
if (H5Sclose(srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcspace[0] = -1;
if (H5Sclose(vspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[0] = -1;
/*
@@ -2139,70 +2183,70 @@ test_basic_io(unsigned config, hid_t fapl)
*/
/* Clear virtual layout in DCPL */
if (H5Pset_layout(dcpl, H5D_VIRTUAL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataspaces */
if ((vspace[0] = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((vspace[1] = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create source dataspace */
dims[1] = 13;
if ((srcspace[0] = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select all in source space (should not be necessary, but just to be sure)
*/
if (H5Sselect_all(srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select hyperslabs in virtual spaces */
start[0] = 0;
start[1] = 0;
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[1] = 13;
if (H5Sselect_hyperslab(vspace[1], H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Add virtual layout mappings */
if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilenamepct_map : ".",
"src_dset1", srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilenamepct_map : ".",
"src_dset2", srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Reset dims */
dims[1] = 26;
/* Create virtual file */
- if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create source file if requested */
if (config & TEST_IO_DIFFERENT_FILE) {
- if ((srcfile[0] = H5Fcreate(srcfilenamepct, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fcreate(srcfilenamepct, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
else {
srcfile[0] = vfile;
if (H5Iinc_ref(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Create source datasets */
if ((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset2", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataset */
if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Populate write buffer */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
@@ -2211,22 +2255,22 @@ test_basic_io(unsigned config, hid_t fapl)
/* Write data directly to source datasets */
if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, vspace[0], H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, vspace[1], H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close srcdsets and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
}
@@ -2234,38 +2278,38 @@ test_basic_io(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Read first source dataset through virtual dataset */
HDmemset(rbuf[0], 0, sizeof(rbuf));
if (H5Dread(vdset, H5T_NATIVE_INT, vspace[0], vspace[0], H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
if (rbuf[i][j] != (j < (int)(sizeof(buf[0]) / sizeof(buf[0][0]) / 2) ? buf[i][j] : 0))
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read second source dataset through virtual dataset */
HDmemset(rbuf[0], 0, sizeof(rbuf));
if (H5Dread(vdset, H5T_NATIVE_INT, vspace[1], vspace[1], H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
if (rbuf[i][j] != (j < (int)(sizeof(buf[0]) / sizeof(buf[0][0]) / 2) ? 0 : buf[i][j]))
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Adjust write buffer */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
@@ -2274,7 +2318,7 @@ test_basic_io(unsigned config, hid_t fapl)
/* Write first source dataset through virtual dataset */
if (H5Dwrite(vdset, H5T_NATIVE_INT, vspace[0], vspace[0], H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Adjust write buffer */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
@@ -2283,25 +2327,25 @@ test_basic_io(unsigned config, hid_t fapl)
/* Write second source dataset through virtual dataset */
if (H5Dwrite(vdset, H5T_NATIVE_INT, vspace[1], vspace[1], H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Reopen srcdsets and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (config & TEST_IO_DIFFERENT_FILE)
- if ((srcfile[0] = H5Fopen(srcfilenamepct, H5F_ACC_RDONLY, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fopen(srcfilenamepct, H5F_ACC_RDONLY, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((srcdset[0] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Read data directly from source datasets */
HDmemset(rbuf[0], 0, sizeof(rbuf));
if (H5Dread(srcdset[0], H5T_NATIVE_INT, vspace[0], H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dread(srcdset[1], H5T_NATIVE_INT, vspace[1], H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
@@ -2309,32 +2353,32 @@ test_basic_io(unsigned config, hid_t fapl)
if (rbuf[i][j] != (j < (int)(sizeof(buf[0]) / sizeof(buf[0][0]) / 2)
? (buf[i][j] - (int)(sizeof(buf) / sizeof(buf[0][0])))
: buf[i][j]))
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close */
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
if (H5Sclose(srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcspace[0] = -1;
if (H5Sclose(vspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[0] = -1;
if (H5Sclose(vspace[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[1] = -1;
/*
@@ -2342,19 +2386,19 @@ test_basic_io(unsigned config, hid_t fapl)
*/
/* Clear virtual layout in DCPL */
if (H5Pset_layout(dcpl, H5D_VIRTUAL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataspaces */
if ((vspace[0] = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((vspace[1] = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create source dataspaces */
if ((srcspace[0] = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcspace[1] = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select hyperslabs in source space */
start[0] = 0;
@@ -2362,10 +2406,10 @@ test_basic_io(unsigned config, hid_t fapl)
count[0] = 10;
count[1] = 13;
if (H5Sselect_hyperslab(srcspace[0], H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[1] = 13;
if (H5Sselect_hyperslab(srcspace[1], H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select hyperslabs in virtual spaces */
start[0] = 0;
@@ -2373,45 +2417,45 @@ test_basic_io(unsigned config, hid_t fapl)
count[0] = 5;
count[1] = 26;
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[0] = 5;
if (H5Sselect_hyperslab(vspace[1], H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Add virtual layout mappings */
if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset1",
srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset2",
srcspace[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual file */
- if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create source file if requested */
if (config & TEST_IO_DIFFERENT_FILE) {
- if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
else {
srcfile[0] = vfile;
if (H5Iinc_ref(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Create source datasets */
if ((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset2", H5T_NATIVE_INT, srcspace[1], H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataset */
if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Populate write buffer */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
@@ -2421,7 +2465,7 @@ test_basic_io(unsigned config, hid_t fapl)
/* Write data directly to source datasets */
/* Write first dataset */
if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update evbuf */
for (i = 0; i < 5; i++) {
@@ -2438,7 +2482,7 @@ test_basic_io(unsigned config, hid_t fapl)
/* Write second dataset */
if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update evbuf */
for (i = 0; i < 5; i++) {
@@ -2451,15 +2495,15 @@ test_basic_io(unsigned config, hid_t fapl)
/* Close srcdsets and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
}
@@ -2467,15 +2511,15 @@ test_basic_io(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Read data through virtual dataset by hyperslab */
@@ -2484,7 +2528,7 @@ test_basic_io(unsigned config, hid_t fapl)
/* Read first slice */
if (H5Dread(vdset, H5T_NATIVE_INT, vspace[0], srcspace[0], H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 5; i++) {
@@ -2496,7 +2540,7 @@ test_basic_io(unsigned config, hid_t fapl)
/* Read second slice */
if (H5Dread(vdset, H5T_NATIVE_INT, vspace[1], srcspace[1], H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 5; i++) {
@@ -2510,7 +2554,7 @@ test_basic_io(unsigned config, hid_t fapl)
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Adjust write buffer */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
@@ -2520,7 +2564,7 @@ test_basic_io(unsigned config, hid_t fapl)
/* Write data through virtual dataset */
/* Write first slice */
if (H5Dwrite(vdset, H5T_NATIVE_INT, vspace[0], srcspace[0], H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update evbuf */
for (i = 0; i < 5; i++) {
@@ -2537,7 +2581,7 @@ test_basic_io(unsigned config, hid_t fapl)
/* Write second slice */
if (H5Dwrite(vdset, H5T_NATIVE_INT, vspace[1], srcspace[1], H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update evbuf */
for (i = 0; i < 5; i++) {
@@ -2550,12 +2594,12 @@ test_basic_io(unsigned config, hid_t fapl)
/* Reopen srcdsets and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (config & TEST_IO_DIFFERENT_FILE)
- if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((srcdset[0] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Read data directly from source datasets */
@@ -2564,7 +2608,7 @@ test_basic_io(unsigned config, hid_t fapl)
/* Read first dataset */
if (H5Dread(srcdset[0], H5T_NATIVE_INT, srcspace[0], srcspace[0], H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 5; i++) {
@@ -2576,7 +2620,7 @@ test_basic_io(unsigned config, hid_t fapl)
/* Read second dataset */
if (H5Dread(srcdset[1], H5T_NATIVE_INT, srcspace[1], srcspace[1], H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 5; i++) {
@@ -2590,35 +2634,35 @@ test_basic_io(unsigned config, hid_t fapl)
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close */
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
if (H5Sclose(srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcspace[0] = -1;
if (H5Sclose(srcspace[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcspace[1] = -1;
if (H5Sclose(vspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[0] = -1;
if (H5Sclose(vspace[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[1] = -1;
/*
@@ -2627,25 +2671,25 @@ test_basic_io(unsigned config, hid_t fapl)
*/
/* Clear virtual layout in DCPL */
if (H5Pset_layout(dcpl, H5D_VIRTUAL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create memory dataspace */
if ((memspace = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataspaces */
dims[1] = 52;
if ((vspace[0] = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((vspace[1] = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create source dataspace and file space for second operation (srcspace[1])
*/
if ((srcspace[0] = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcspace[1] = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Reset dims */
dims[1] = 26;
@@ -2661,10 +2705,10 @@ test_basic_io(unsigned config, hid_t fapl)
block[0] = 10;
block[1] = 1;
if (H5Sselect_hyperslab(srcspace[0], H5S_SELECT_SET, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[1] = 1;
if (H5Sselect_hyperslab(srcspace[1], H5S_SELECT_SET, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select hyperslabs (checkerboard) in virtual spaces */
start[0] = 0;
@@ -2676,53 +2720,53 @@ test_basic_io(unsigned config, hid_t fapl)
block[0] = 1;
block[1] = 1;
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[0] = 1;
start[1] = 1;
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_OR, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[0] = 0;
if (H5Sselect_hyperslab(vspace[1], H5S_SELECT_SET, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[0] = 1;
start[1] = 0;
if (H5Sselect_hyperslab(vspace[1], H5S_SELECT_OR, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Add virtual layout mappings */
if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset1",
srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset2",
srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual file */
- if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create source file if requested */
if (config & TEST_IO_DIFFERENT_FILE) {
- if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
else {
srcfile[0] = vfile;
if (H5Iinc_ref(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Create source datasets */
if ((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset2", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataset */
if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Populate write buffer */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
@@ -2732,7 +2776,7 @@ test_basic_io(unsigned config, hid_t fapl)
/* Write data directly to source datasets */
/* Write first dataset */
if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, srcspace[0], H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 10; i += 2)
@@ -2746,7 +2790,7 @@ test_basic_io(unsigned config, hid_t fapl)
/* Write second dataset */
if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, srcspace[0], H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 1; i < 10; i += 2)
@@ -2756,15 +2800,15 @@ test_basic_io(unsigned config, hid_t fapl)
/* Close srcdsets and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
}
@@ -2772,15 +2816,15 @@ test_basic_io(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Read data through virtual dataset by hyperslab */
@@ -2789,17 +2833,17 @@ test_basic_io(unsigned config, hid_t fapl)
/* Read first stripe pattern */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, srcspace[0], H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read second stripe pattern */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, srcspace[1], H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 10; i += 2)
@@ -2812,7 +2856,7 @@ test_basic_io(unsigned config, hid_t fapl)
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Adjust write buffer */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
@@ -2822,7 +2866,7 @@ test_basic_io(unsigned config, hid_t fapl)
/* Write data through virtual dataset */
/* Write first slice */
if (H5Dwrite(vdset, H5T_NATIVE_INT, memspace, srcspace[0], H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 10; i += 2)
@@ -2836,7 +2880,7 @@ test_basic_io(unsigned config, hid_t fapl)
/* Write second slice */
if (H5Dwrite(vdset, H5T_NATIVE_INT, memspace, srcspace[1], H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 1; i < 10; i += 2)
@@ -2846,12 +2890,12 @@ test_basic_io(unsigned config, hid_t fapl)
/* Reopen srcdsets and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (config & TEST_IO_DIFFERENT_FILE)
- if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((srcdset[0] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Read data directly from source datasets */
@@ -2860,13 +2904,13 @@ test_basic_io(unsigned config, hid_t fapl)
/* Read first dataset */
if (H5Dread(srcdset[0], H5T_NATIVE_INT, memspace, srcspace[0], H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 10; i += 2)
@@ -2877,44 +2921,44 @@ test_basic_io(unsigned config, hid_t fapl)
/* Read second dataset */
if (H5Dread(srcdset[1], H5T_NATIVE_INT, memspace, srcspace[0], H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close */
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
if (H5Sclose(srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcspace[0] = -1;
if (H5Sclose(srcspace[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcspace[1] = -1;
if (H5Sclose(vspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[0] = -1;
if (H5Sclose(vspace[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[1] = -1;
if (H5Sclose(memspace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
memspace = -1;
/*
@@ -2923,11 +2967,11 @@ test_basic_io(unsigned config, hid_t fapl)
*/
/* Clear virtual layout in DCPL */
if (H5Pset_layout(dcpl, H5D_VIRTUAL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create memory dataspace */
if ((memspace = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataspaces */
dims[0] = 3;
@@ -2935,18 +2979,18 @@ test_basic_io(unsigned config, hid_t fapl)
dims[2] = 3;
dims[3] = 3;
if ((vspace[0] = H5Screate_simple(4, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((vspace[1] = H5Screate_simple(4, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create source dataspaces */
dims[0] = 2;
dims[1] = 4;
dims[2] = 4;
if ((srcspace[0] = H5Screate_simple(3, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcspace[1] = H5Screate_simple(3, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Reset dims */
dims[0] = 10;
@@ -2966,10 +3010,10 @@ test_basic_io(unsigned config, hid_t fapl)
block[1] = 1;
block[2] = 4;
if (H5Sselect_hyperslab(srcspace[0], H5S_SELECT_SET, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[1] = 1;
if (H5Sselect_hyperslab(srcspace[1], H5S_SELECT_SET, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select hyperslabs (corners) in first virtual space */
start[0] = 0;
@@ -2989,7 +3033,7 @@ test_basic_io(unsigned config, hid_t fapl)
block[2] = 1;
block[3] = 1;
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select hyperslabs ("+" pattern) in second virtual space */
start[0] = 1;
@@ -3009,61 +3053,61 @@ test_basic_io(unsigned config, hid_t fapl)
block[2] = 1;
block[3] = 1;
if (H5Sselect_hyperslab(vspace[1], H5S_SELECT_SET, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[1] = 0;
start[2] = 1;
count[1] = 2;
count[2] = 1;
if (H5Sselect_hyperslab(vspace[1], H5S_SELECT_OR, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[0] = 0;
start[1] = 1;
count[0] = 2;
count[1] = 1;
if (H5Sselect_hyperslab(vspace[1], H5S_SELECT_OR, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[0] = 1;
count[0] = 1;
if (H5Sselect_hyperslab(vspace[1], H5S_SELECT_OR, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[1] = 0;
start[3] = 1;
count[1] = 2;
count[3] = 1;
if (H5Sselect_hyperslab(vspace[1], H5S_SELECT_OR, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Add virtual layout mappings */
if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset1",
srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset1",
srcspace[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual file */
- if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create source file if requested */
if (config & TEST_IO_DIFFERENT_FILE) {
- if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
else {
srcfile[0] = vfile;
if (H5Iinc_ref(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Create source dataset */
if ((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataset */
if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Populate write buffer */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
@@ -3076,21 +3120,21 @@ test_basic_io(unsigned config, hid_t fapl)
count[0] = 2;
count[1] = 16;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Write data directly to source dataset */
if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close srcdset and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
}
@@ -3098,15 +3142,15 @@ test_basic_io(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Read data through virtual dataset */
@@ -3119,7 +3163,7 @@ test_basic_io(unsigned config, hid_t fapl)
count[0] = 9;
count[1] = 3;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset by hyperslab */
/* Reset rbuf */
@@ -3135,11 +3179,11 @@ test_basic_io(unsigned config, hid_t fapl)
count[2] = 1;
count[3] = 3;
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read first stripe pattern */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, vspace[0], H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
HDmemset(erbuf, 0, sizeof(erbuf));
@@ -3161,7 +3205,7 @@ test_basic_io(unsigned config, hid_t fapl)
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Reset rbuf */
HDmemset(rbuf[0], 0, sizeof(rbuf));
@@ -3176,7 +3220,7 @@ test_basic_io(unsigned config, hid_t fapl)
count[2] = 1;
count[3] = 3;
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select hyperslab in memory space */
start[0] = 0;
@@ -3184,11 +3228,11 @@ test_basic_io(unsigned config, hid_t fapl)
count[0] = 9;
count[1] = 3;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read second stripe pattern */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, vspace[0], H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 9; i++)
@@ -3212,10 +3256,10 @@ test_basic_io(unsigned config, hid_t fapl)
for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
if ((j >= 3) && (j < 6)) {
if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Reset rbuf */
HDmemset(rbuf[0], 0, sizeof(rbuf));
@@ -3230,7 +3274,7 @@ test_basic_io(unsigned config, hid_t fapl)
count[2] = 1;
count[3] = 3;
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select hyperslab in memory space */
start[0] = 0;
@@ -3238,11 +3282,11 @@ test_basic_io(unsigned config, hid_t fapl)
count[0] = 9;
count[1] = 3;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read third stripe pattern */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, vspace[0], H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 9; i++)
@@ -3264,10 +3308,10 @@ test_basic_io(unsigned config, hid_t fapl)
for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
if ((j >= 6) && (j < 9)) {
if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Now read entire VDS */
/* Set memory space extent to 9x9, select all in order to reach part of the
@@ -3275,19 +3319,19 @@ test_basic_io(unsigned config, hid_t fapl)
dims[0] = 9;
dims[1] = 9;
if (H5Sset_extent_simple(memspace, 2, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sselect_all(memspace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read third stripe pattern */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf99[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)(sizeof(rbuf99) / sizeof(rbuf99[0])); i++)
for (j = 0; j < (int)(sizeof(rbuf99[0]) / sizeof(rbuf99[0][0])); j++)
if (rbuf99[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Adjust write buffer */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
@@ -3309,7 +3353,7 @@ test_basic_io(unsigned config, hid_t fapl)
count[2] = 1;
count[3] = 2;
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, stride, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[0] = 1;
start[1] = 1;
start[2] = 0;
@@ -3323,24 +3367,24 @@ test_basic_io(unsigned config, hid_t fapl)
count[2] = 1;
count[3] = 2;
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_OR, start, stride, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Reset extent of memspace, select hyperslab */
dims[0] = 10;
dims[1] = 26;
if (H5Sset_extent_simple(memspace, 2, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[0] = 0;
start[1] = 0;
count[0] = 1;
count[1] = 10;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Write data through virtual dataset by hyperslab */
/* Write first stripe pattern */
if (H5Dwrite(vdset, H5T_NATIVE_INT, memspace, vspace[0], H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
HDmemset(erbuf, 0, sizeof(erbuf));
@@ -3374,7 +3418,7 @@ test_basic_io(unsigned config, hid_t fapl)
count[2] = 1;
count[3] = 2;
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, stride, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[0] = 1;
start[1] = 0;
start[2] = 1;
@@ -3388,7 +3432,7 @@ test_basic_io(unsigned config, hid_t fapl)
count[2] = 1;
count[3] = 3;
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_OR, start, stride, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select hyperslab in memory space */
start[0] = 0;
@@ -3396,11 +3440,11 @@ test_basic_io(unsigned config, hid_t fapl)
count[0] = 1;
count[1] = 12;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Write second slice */
if (H5Dwrite(vdset, H5T_NATIVE_INT, memspace, vspace[0], H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
erbuf[0][4] = buf[0][0];
@@ -3435,7 +3479,7 @@ test_basic_io(unsigned config, hid_t fapl)
count[2] = 1;
count[3] = 2;
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, stride, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[0] = 1;
start[1] = 1;
start[2] = 2;
@@ -3449,7 +3493,7 @@ test_basic_io(unsigned config, hid_t fapl)
count[2] = 1;
count[3] = 2;
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_OR, start, stride, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select hyperslab in memory space */
start[0] = 0;
@@ -3457,11 +3501,11 @@ test_basic_io(unsigned config, hid_t fapl)
count[0] = 1;
count[1] = 10;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Write third slice */
if (H5Dwrite(vdset, H5T_NATIVE_INT, memspace, vspace[0], H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
erbuf[0][2] = buf[0][0];
@@ -3478,10 +3522,10 @@ test_basic_io(unsigned config, hid_t fapl)
/* Reopen srcdset and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (config & TEST_IO_DIFFERENT_FILE)
- if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((srcdset[0] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Read data directly from source dataset */
@@ -3491,61 +3535,61 @@ test_basic_io(unsigned config, hid_t fapl)
count[0] = 2;
count[1] = 16;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Reset rbuf */
HDmemset(rbuf[0], 0, sizeof(rbuf));
/* Read dataset */
if (H5Dread(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Now try writing to whole VDS (should fail due to unmapped elements) */
count[0] = 9;
count[1] = 9;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
H5E_BEGIN_TRY
{
ret = H5Dwrite(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]);
}
H5E_END_TRY
if (ret >= 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close */
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
if (H5Sclose(srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcspace[0] = -1;
if (H5Sclose(srcspace[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcspace[1] = -1;
if (H5Sclose(vspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[0] = -1;
if (H5Sclose(vspace[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[1] = -1;
if (H5Sclose(memspace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
memspace = -1;
/*
@@ -3554,77 +3598,77 @@ test_basic_io(unsigned config, hid_t fapl)
*/
/* Clear virtual layout in DCPL */
if (H5Pset_layout(dcpl, H5D_VIRTUAL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create memory dataspace */
if ((memspace = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataspaces */
dims[0] = 8;
dims[1] = 15;
if ((vspace[0] = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((vspace[1] = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create source dataspace */
dims[0] = 4;
if ((srcspace[0] = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select all in source space (should not be necessary, but just to be sure)
*/
if (H5Sselect_all(srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select hyperslabs in virtual spaces */
start[0] = 0;
start[1] = 0;
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[0] = 4;
if (H5Sselect_hyperslab(vspace[1], H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Add virtual layout mappings */
if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset1",
srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset2",
srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Reset dims */
dims[0] = 10;
dims[1] = 26;
/* Create virtual file */
- if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create source file if requested */
if (config & TEST_IO_DIFFERENT_FILE) {
- if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
else {
srcfile[0] = vfile;
if (H5Iinc_ref(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Create source datasets */
if ((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset2", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataset */
if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Reset erbuf */
HDmemset(erbuf[0], 0, sizeof(rbuf));
@@ -3640,11 +3684,11 @@ test_basic_io(unsigned config, hid_t fapl)
count[0] = 4;
count[1] = 15;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Write data directly to first source dataset */
if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
u = 0;
@@ -3662,11 +3706,11 @@ test_basic_io(unsigned config, hid_t fapl)
/* Select hyperslab in memory */
start[0] = 4;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Write data directly to second source dataset */
if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 4; i < 6; i++)
@@ -3682,28 +3726,28 @@ test_basic_io(unsigned config, hid_t fapl)
/* Close srcdsets and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Select hyperslab in memory */
@@ -3716,7 +3760,7 @@ test_basic_io(unsigned config, hid_t fapl)
block[0] = 1;
block[1] = 1;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select hyperslab in file */
start[0] = 2;
@@ -3724,48 +3768,48 @@ test_basic_io(unsigned config, hid_t fapl)
count[0] = 4;
count[1] = 15;
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
HDmemset(rbuf[0], 0, sizeof(rbuf));
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, vspace[0], H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close */
if (!(config & TEST_IO_CLOSE_SRC)) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
if (H5Sclose(srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcspace[0] = -1;
if (H5Sclose(vspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[0] = -1;
if (H5Sclose(vspace[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[1] = -1;
if (H5Sclose(memspace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
memspace = -1;
/*
@@ -3774,90 +3818,90 @@ test_basic_io(unsigned config, hid_t fapl)
*/
/* Clear virtual layout in DCPL */
if (H5Pset_layout(dcpl, H5D_VIRTUAL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create memory dataspace */
dims[1] = 13;
dims[2] = 2;
if ((memspace = H5Screate_simple(3, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataspaces */
dims[0] = 6;
dims[1] = 10;
if ((vspace[0] = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((vspace[1] = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((vspace[2] = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create source dataspace */
dims[0] = 2;
if ((srcspace[0] = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select all in source space (should not be necessary, but just to be sure)
*/
if (H5Sselect_all(srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select hyperslabs in virtual spaces */
start[0] = 0;
start[1] = 0;
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[0] = 2;
if (H5Sselect_hyperslab(vspace[1], H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[0] = 4;
if (H5Sselect_hyperslab(vspace[2], H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Add virtual layout mappings */
if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset1",
srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset2",
srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual(dcpl, vspace[2], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset3",
srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Reset dims */
dims[0] = 10;
dims[1] = 26;
/* Create virtual file */
- if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create source file if requested */
if (config & TEST_IO_DIFFERENT_FILE) {
- if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
else {
srcfile[0] = vfile;
if (H5Iinc_ref(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Create source datasets */
if ((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset2", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdset[2] = H5Dcreate2(srcfile[0], "src_dset3", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataset */
if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Reset erbuf */
HDmemset(erbuf[0], 0, sizeof(rbuf));
@@ -3875,11 +3919,11 @@ test_basic_io(unsigned config, hid_t fapl)
count[1] = 5;
count[2] = 2;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Write data directly to first source dataset */
if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
u = 0;
@@ -3898,11 +3942,11 @@ test_basic_io(unsigned config, hid_t fapl)
/* Select hyperslab in memory */
start[0] = 2;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Write data directly to second source dataset */
if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 2; i < 4; i++)
@@ -3919,11 +3963,11 @@ test_basic_io(unsigned config, hid_t fapl)
/* Select hyperslab in memory */
start[0] = 4;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Write data directly to third source dataset */
if (H5Dwrite(srcdset[2], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 4; i < 6; i++)
@@ -3940,31 +3984,31 @@ test_basic_io(unsigned config, hid_t fapl)
/* Close srcdsets and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (H5Dclose(srcdset[2]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[2] = -1;
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Select hyperslab in memory */
@@ -3981,54 +4025,54 @@ test_basic_io(unsigned config, hid_t fapl)
block[1] = 3;
block[2] = 2;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
HDmemset(rbuf[0], 0, sizeof(rbuf));
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close */
if (!(config & TEST_IO_CLOSE_SRC)) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (H5Dclose(srcdset[2]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[2] = -1;
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
if (H5Sclose(srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcspace[0] = -1;
if (H5Sclose(vspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[0] = -1;
if (H5Sclose(vspace[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[1] = -1;
if (H5Sclose(vspace[2]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[2] = -1;
if (H5Sclose(memspace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
memspace = -1;
/*
@@ -4037,30 +4081,30 @@ test_basic_io(unsigned config, hid_t fapl)
*/
/* Clear virtual layout in DCPL */
if (H5Pset_layout(dcpl, H5D_VIRTUAL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create memory dataspace */
if ((memspace = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataspaces */
dims[0] = 10;
dims[1] = 9;
dims[2] = 6;
if ((vspace[0] = H5Screate_simple(3, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((vspace[1] = H5Screate_simple(3, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create source dataspace */
dims[1] = 12;
if ((srcspace[0] = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select all in source space (should not be necessary, but just to be sure)
*/
if (H5Sselect_all(srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select hyperslabs in virtual spaces */
start[0] = 0;
@@ -4076,49 +4120,49 @@ test_basic_io(unsigned config, hid_t fapl)
block[1] = 1;
block[2] = 1;
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[2] = 1;
if (H5Sselect_hyperslab(vspace[1], H5S_SELECT_SET, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Add virtual layout mappings */
if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset1",
srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset2",
srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Reset dims */
dims[0] = 10;
dims[1] = 26;
/* Create virtual file */
- if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create source file if requested */
if (config & TEST_IO_DIFFERENT_FILE) {
- if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
else {
srcfile[0] = vfile;
if (H5Iinc_ref(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Create source datasets */
if ((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset2", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataset */
if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Initialize erbuf */
HDmemset(erbuf[0], 0, sizeof(rbuf));
@@ -4139,11 +4183,11 @@ test_basic_io(unsigned config, hid_t fapl)
count[0] = 10;
count[1] = 12;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Write data directly to first source dataset */
if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
u = 0;
@@ -4164,11 +4208,11 @@ test_basic_io(unsigned config, hid_t fapl)
/* Select hyperslab in memory */
start[1] = 8;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Write data directly to second source dataset */
if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
u = 0;
@@ -4189,28 +4233,28 @@ test_basic_io(unsigned config, hid_t fapl)
/* Close srcdsets and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Select hyperslab in memory */
@@ -4223,7 +4267,7 @@ test_basic_io(unsigned config, hid_t fapl)
block[0] = 10;
block[1] = 2;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select hyperslab in file */
start[0] = 0;
@@ -4233,53 +4277,53 @@ test_basic_io(unsigned config, hid_t fapl)
count[1] = 4;
count[2] = 2;
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
HDmemset(rbuf[0], 0, sizeof(rbuf));
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, vspace[0], H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
for (j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close */
if (!(config & TEST_IO_CLOSE_SRC)) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
if (H5Sclose(srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcspace[0] = -1;
if (H5Sclose(vspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[0] = -1;
if (H5Sclose(vspace[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[1] = -1;
if (H5Sclose(memspace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
memspace = -1;
/* Close */
if (H5Pclose(dcpl) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
dcpl = -1;
HDfree(srcfilename);
@@ -4289,7 +4333,7 @@ test_basic_io(unsigned config, hid_t fapl)
HDfree(srcfilenamepct);
HDfree(srcfilenamepct_map);
- PASSED();
+ PASSED_SUPPRESSED();
return 0;
error:
@@ -4331,7 +4375,7 @@ test_basic_io(unsigned config, hid_t fapl)
*-------------------------------------------------------------------------
*/
static int
-test_unlim(unsigned config, hid_t fapl)
+test_unlim(unsigned config, hid_t vds_fapl, hid_t src_fapl)
{
char srcfilename[FILENAME_BUF_SIZE];
char srcfilename_map[FILENAME_BUF_SIZE];
@@ -4362,52 +4406,52 @@ test_unlim(unsigned config, hid_t fapl)
H5D_vds_view_t virtual_view; /* Virtual view property */
int i, j;
- TESTING("virtual dataset I/O with unlimited selections")
+ TESTING_2_SUPPRESSED("virtual dataset I/O with unlimited selections")
- h5_fixname(FILENAME[0], fapl, vfilename, sizeof vfilename);
- h5_fixname(FILENAME[2], fapl, srcfilename, sizeof srcfilename);
- h5_fixname_printf(FILENAME[2], fapl, srcfilename_map, sizeof srcfilename_map);
+ h5_fixname(FILENAME[0], vds_fapl, vfilename, sizeof vfilename);
+ h5_fixname(FILENAME[2], src_fapl, srcfilename, sizeof srcfilename);
+ h5_fixname_printf(FILENAME[2], src_fapl, srcfilename_map, sizeof srcfilename_map);
/* Create DCPLs */
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Set fill value */
if (H5Pset_fill_value(dcpl, H5T_NATIVE_INT, &fill) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Set chunk dimensions */
if (H5Pset_chunk(srcdcpl, 2, cdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create DAPL */
if ((dapl = H5Pcreate(H5P_DATASET_ACCESS)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create memory space */
if ((memspace = H5Screate_simple(2, mdims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/*
* Test 1: 2 Source datasets, single unlimited hyperslab virtual mappings
*/
/* Clear virtual layout in DCPL */
if (H5Pset_layout(dcpl, H5D_VIRTUAL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataspaces */
if ((vspace[0] = H5Screate_simple(2, dims, mdims)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((vspace[1] = H5Screate_simple(2, dims, mdims)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create source dataspace */
dims[0] = 5;
mdims[0] = 5;
if ((srcspace[0] = H5Screate_simple(2, dims, mdims)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
mdims[0] = 10;
/* Select hyperslab in source space */
@@ -4416,49 +4460,49 @@ test_unlim(unsigned config, hid_t fapl)
count[0] = 5;
count[1] = H5S_UNLIMITED;
if (H5Sselect_hyperslab(srcspace[0], H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select hyperslabs in virtual spaces */
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[0] = 5;
if (H5Sselect_hyperslab(vspace[1], H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Add virtual layout mappings */
if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset1",
srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset2",
srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual file */
- if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create source file if requested */
if (config & TEST_IO_DIFFERENT_FILE) {
- if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
else {
srcfile[0] = vfile;
if (H5Iinc_ref(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Create source datasets */
if ((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, srcdcpl,
H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset2", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, srcdcpl,
H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataset */
if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Populate write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -4475,11 +4519,11 @@ test_unlim(unsigned config, hid_t fapl)
start[0] = 0;
count[1] = 10;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Write first dataset */
if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 5; i++)
@@ -4493,7 +4537,7 @@ test_unlim(unsigned config, hid_t fapl)
/* Write second dataset */
if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 5; i++)
@@ -4503,15 +4547,15 @@ test_unlim(unsigned config, hid_t fapl)
/* Close srcdsets and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
}
@@ -4519,40 +4563,40 @@ test_unlim(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -4561,74 +4605,74 @@ test_unlim(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
start[0] = 0;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Test H5Pget_virtual_view() */
if (H5Pget_virtual_view(dapl, &virtual_view) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (virtual_view != H5D_VDS_LAST_AVAILABLE)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file
* as well if config option specified */
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual_view(dapl, H5D_VDS_FIRST_MISSING) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Test H5Pget_virtual_view() */
if (H5Pget_virtual_view(dapl, &virtual_view) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (virtual_view != H5D_VDS_FIRST_MISSING)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -4636,33 +4680,33 @@ test_unlim(unsigned config, hid_t fapl)
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Reopen srcdset[0] and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (config & TEST_IO_DIFFERENT_FILE)
- if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((srcdset[0] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Extend srcdset[0] */
dims[0] = 5;
dims[1] = 15;
if (H5Dset_extent(srcdset[0], dims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Adjust write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -4672,26 +4716,26 @@ test_unlim(unsigned config, hid_t fapl)
/* Write to new area of srcdset */
count[1] = 5;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((filespace = H5Dget_space(srcdset[0])) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[1] = 10;
if (H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close srcdset[0] and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
}
@@ -4699,42 +4743,42 @@ test_unlim(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions. Note that since we are using
* H5D_VDS_FIRST_MISSING and we only extended one source dataset the
* dimensions will not have changed. */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -4743,38 +4787,38 @@ test_unlim(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
start[1] = 0;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Close VDS and reopen with view set to H5D_VDS_LAST_AVAILABLE, reopen file
* as well if config option specified */
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual_view(dapl, H5D_VDS_LAST_AVAILABLE) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf to reflect new data that is now visible due to the change to
* H5D_VDS_LAST_AVAILABLE */
@@ -4784,27 +4828,27 @@ test_unlim(unsigned config, hid_t fapl)
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 15)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -4813,37 +4857,37 @@ test_unlim(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
start[1] = 0;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Reopen srcdset[1] and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (config & TEST_IO_DIFFERENT_FILE)
- if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Extend srcdset[1] */
dims[0] = 5;
dims[1] = 20;
if (H5Dset_extent(srcdset[1], dims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Adjust write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -4853,16 +4897,16 @@ test_unlim(unsigned config, hid_t fapl)
/* Write to new area of srcdset */
count[1] = 10;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((filespace = H5Dget_space(srcdset[1])) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[1] = 10;
if (H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 5; i++)
@@ -4872,12 +4916,12 @@ test_unlim(unsigned config, hid_t fapl)
/* Close srcdset[1] and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
}
@@ -4885,40 +4929,40 @@ test_unlim(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -4927,17 +4971,17 @@ test_unlim(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
start[1] = 0;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++)
if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Now just read middle 2 rows */
HDmemset(rbuf[0], 0, sizeof(rbuf));
@@ -4945,9 +4989,9 @@ test_unlim(unsigned config, hid_t fapl)
count[0] = 2;
count[1] = 20;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, memspace, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data - algorithmically check for only 2 middle rows being
* read so we don't have to wipe out erbuf and then restore it afterwards */
@@ -4955,24 +4999,24 @@ test_unlim(unsigned config, hid_t fapl)
for (j = 0; j < (int)mdims[1]; j++)
if ((i == 4) || (i == 5)) {
if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Now test reopening virtual dataset without calling H5Dget_space, if
* REOPEN_VIRT flag set */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -4982,23 +5026,23 @@ test_unlim(unsigned config, hid_t fapl)
start[0] = 0;
start[1] = 0;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++)
if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Now try setting extent manually */
/* Shrink to 18 */
dims[1] = 18;
if (H5Dset_extent(vdset, dims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -5008,27 +5052,27 @@ test_unlim(unsigned config, hid_t fapl)
start[0] = 0;
start[1] = 0;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Shrink to 15 */
dims[1] = 15;
if (H5Dset_extent(vdset, dims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -5038,63 +5082,63 @@ test_unlim(unsigned config, hid_t fapl)
start[0] = 0;
start[1] = 0;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
}
/* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file
* as well if config option specified */
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual_view(dapl, H5D_VDS_FIRST_MISSING) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 15)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -5104,36 +5148,36 @@ test_unlim(unsigned config, hid_t fapl)
start[0] = 0;
start[1] = 0;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Now test reopening virtual dataset without calling H5Dget_space, if
* REOPEN_VIRT flag set */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -5142,28 +5186,28 @@ test_unlim(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
start[1] = 0;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Now try setting extent manually */
/* Grow to 18 */
dims[1] = 18;
if (H5Dset_extent(vdset, dims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -5173,27 +5217,27 @@ test_unlim(unsigned config, hid_t fapl)
start[0] = 0;
start[1] = 0;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Grow to 20 */
dims[1] = 20;
if (H5Dset_extent(vdset, dims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -5203,50 +5247,50 @@ test_unlim(unsigned config, hid_t fapl)
start[0] = 0;
start[1] = 0;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++)
if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Close */
if (!(config & TEST_IO_CLOSE_SRC)) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
else if (!(config & TEST_IO_DIFFERENT_FILE)) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
if (H5Sclose(srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcspace[0] = -1;
if (H5Sclose(vspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[0] = -1;
if (H5Sclose(vspace[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[1] = -1;
/*
@@ -5254,21 +5298,21 @@ test_unlim(unsigned config, hid_t fapl)
*/
/* Clear virtual layout in DCPL */
if (H5Pset_layout(dcpl, H5D_VIRTUAL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataspaces */
dims[0] = 10;
dims[1] = 10;
if ((vspace[0] = H5Screate_simple(2, dims, mdims)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((vspace[1] = H5Screate_simple(2, dims, mdims)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create source dataspace */
dims[1] = 5;
mdims[1] = 10;
if ((srcspace[0] = H5Screate_simple(2, dims, mdims)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
mdims[1] = 20;
/* Select hyperslab in source space */
@@ -5277,7 +5321,7 @@ test_unlim(unsigned config, hid_t fapl)
count[0] = 10;
count[1] = H5S_UNLIMITED;
if (H5Sselect_hyperslab(srcspace[0], H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select hyperslabs in virtual spaces */
stride[0] = 1;
@@ -5287,46 +5331,46 @@ test_unlim(unsigned config, hid_t fapl)
block[0] = 10;
block[1] = 1;
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[1] = 1;
if (H5Sselect_hyperslab(vspace[1], H5S_SELECT_SET, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[1] = 0;
/* Add virtual layout mappings */
if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset1",
srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset2",
srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual file */
- if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create source file if requested */
if (config & TEST_IO_DIFFERENT_FILE) {
- if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
else {
srcfile[0] = vfile;
if (H5Iinc_ref(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Create source datasets */
if ((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, srcdcpl,
H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset2", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, srcdcpl,
H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataset */
if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Populate write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -5343,11 +5387,11 @@ test_unlim(unsigned config, hid_t fapl)
count[0] = 10;
count[1] = 5;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Write first dataset */
if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 10; i++)
@@ -5361,7 +5405,7 @@ test_unlim(unsigned config, hid_t fapl)
/* Write second dataset */
if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 10; i++)
@@ -5371,15 +5415,15 @@ test_unlim(unsigned config, hid_t fapl)
/* Close srcdsets and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
}
@@ -5387,40 +5431,40 @@ test_unlim(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -5428,62 +5472,62 @@ test_unlim(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file
* as well if config option specified */
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual_view(dapl, H5D_VDS_FIRST_MISSING) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -5491,32 +5535,32 @@ test_unlim(unsigned config, hid_t fapl)
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Reopen srcdset[0] and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (config & TEST_IO_DIFFERENT_FILE)
- if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((srcdset[0] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Extend srcdset[0] */
dims[1] = 7;
if (H5Dset_extent(srcdset[0], dims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Adjust write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -5526,17 +5570,17 @@ test_unlim(unsigned config, hid_t fapl)
/* Write to new area of srcdset */
count[1] = 2;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((filespace = H5Dget_space(srcdset[0])) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[1] = 5;
if (H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[1] = 0;
if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf to reflect only new data that is now visible under
* H5D_VDS_FIRST_MISSING (first slice) */
@@ -5546,12 +5590,12 @@ test_unlim(unsigned config, hid_t fapl)
/* Close srcdset[0] and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
}
@@ -5559,42 +5603,42 @@ test_unlim(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions. Note that since we are using
* H5D_VDS_FIRST_MISSING and we only extended one source dataset the
* dimension will only have changed to add one more slice. */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 11)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -5602,38 +5646,38 @@ test_unlim(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Close VDS and reopen with view set to H5D_VDS_LAST_AVAILABLE, reopen file
* as well if config option specified */
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual_view(dapl, H5D_VDS_LAST_AVAILABLE) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf to reflect new data that is now visible due to the change to
* H5D_VDS_LAST_AVAILABLE (second new slice) */
@@ -5642,27 +5686,27 @@ test_unlim(unsigned config, hid_t fapl)
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 13)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -5670,36 +5714,36 @@ test_unlim(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Reopen srcdset[1] and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (config & TEST_IO_DIFFERENT_FILE)
- if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Extend srcdset[1] */
dims[1] = 10;
if (H5Dset_extent(srcdset[1], dims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Adjust write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -5709,17 +5753,17 @@ test_unlim(unsigned config, hid_t fapl)
/* Write to new area of srcdset */
count[1] = 5;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((filespace = H5Dget_space(srcdset[1])) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[1] = 5;
if (H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[1] = 0;
if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 10; i++)
@@ -5729,12 +5773,12 @@ test_unlim(unsigned config, hid_t fapl)
/* Close srcdset[1] and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
}
@@ -5742,40 +5786,40 @@ test_unlim(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -5783,17 +5827,17 @@ test_unlim(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++)
if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Now just read middle 2 rows */
HDmemset(rbuf[0], 0, sizeof(rbuf));
@@ -5801,10 +5845,10 @@ test_unlim(unsigned config, hid_t fapl)
count[0] = 2;
count[1] = 20;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[0] = 0;
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, memspace, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data - algorithmically check for only 2 middle rows being
* read so we don't have to wipe out erbuf and then restore it afterwards */
@@ -5812,26 +5856,26 @@ test_unlim(unsigned config, hid_t fapl)
for (j = 0; j < (int)mdims[1]; j++)
if ((i == 4) || (i == 5)) {
if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file
* as well if config option specified */
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual_view(dapl, H5D_VDS_FIRST_MISSING) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf to reflect new data that is no longer visible due to the
* change to H5D_VDS_FIRST_MISSING */
@@ -5841,27 +5885,27 @@ test_unlim(unsigned config, hid_t fapl)
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 14)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -5869,54 +5913,54 @@ test_unlim(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Close */
if (!(config & TEST_IO_CLOSE_SRC)) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
else if (!(config & TEST_IO_DIFFERENT_FILE)) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
if (H5Sclose(srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcspace[0] = -1;
if (H5Sclose(vspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[0] = -1;
if (H5Sclose(vspace[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[1] = -1;
/*
@@ -5924,31 +5968,31 @@ test_unlim(unsigned config, hid_t fapl)
*/
/* Clear virtual layout in DCPL */
if (H5Pset_layout(dcpl, H5D_VIRTUAL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataspaces */
dims[0] = 10;
dims[1] = 10;
if ((vspace[0] = H5Screate_simple(2, dims, mdims)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((vspace[1] = H5Screate_simple(2, dims, mdims)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((vspace[2] = H5Screate_simple(2, dims, mdims)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create source dataspaces */
dims[1] = 4;
mdims[1] = 8;
if ((srcspace[0] = H5Screate_simple(2, dims, mdims)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
dims[1] = 4;
mdims[1] = 6;
if ((srcspace[1] = H5Screate_simple(2, dims, mdims)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
dims[1] = 2;
mdims[1] = 6;
if ((srcspace[2] = H5Screate_simple(2, dims, mdims)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
mdims[1] = 20;
/* Select hyperslab in source spaces */
@@ -5957,11 +6001,11 @@ test_unlim(unsigned config, hid_t fapl)
count[0] = 10;
count[1] = H5S_UNLIMITED;
if (H5Sselect_hyperslab(srcspace[0], H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sselect_hyperslab(srcspace[1], H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sselect_hyperslab(srcspace[2], H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select hyperslabs in virtual spaces */
stride[0] = 1;
@@ -5971,55 +6015,55 @@ test_unlim(unsigned config, hid_t fapl)
block[0] = 10;
block[1] = 2;
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[1] = 2;
if (H5Sselect_hyperslab(vspace[1], H5S_SELECT_SET, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[1] = 4;
if (H5Sselect_hyperslab(vspace[2], H5S_SELECT_SET, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[1] = 0;
/* Add virtual layout mappings */
if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset1",
srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset2",
srcspace[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual(dcpl, vspace[2], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset3",
srcspace[2]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual file */
- if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create source file if requested */
if (config & TEST_IO_DIFFERENT_FILE) {
- if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
else {
srcfile[0] = vfile;
if (H5Iinc_ref(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Create source datasets */
if ((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, srcdcpl,
H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset2", H5T_NATIVE_INT, srcspace[1], H5P_DEFAULT, srcdcpl,
H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdset[2] = H5Dcreate2(srcfile[0], "src_dset3", H5T_NATIVE_INT, srcspace[2], H5P_DEFAULT, srcdcpl,
H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataset */
if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Populate write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -6036,11 +6080,11 @@ test_unlim(unsigned config, hid_t fapl)
count[0] = 10;
count[1] = 4;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Write first dataset */
if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 10; i++)
@@ -6056,7 +6100,7 @@ test_unlim(unsigned config, hid_t fapl)
/* Write second dataset */
if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 10; i++)
@@ -6074,11 +6118,11 @@ test_unlim(unsigned config, hid_t fapl)
count[0] = 10;
count[1] = 2;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Write third dataset */
if (H5Dwrite(srcdset[2], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 10; i++) {
@@ -6089,18 +6133,18 @@ test_unlim(unsigned config, hid_t fapl)
/* Close srcdsets and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (H5Dclose(srcdset[2]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[2] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
}
@@ -6108,40 +6152,40 @@ test_unlim(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -6149,62 +6193,62 @@ test_unlim(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file
* as well if config option specified */
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual_view(dapl, H5D_VDS_FIRST_MISSING) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -6212,32 +6256,32 @@ test_unlim(unsigned config, hid_t fapl)
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Reopen srcdset[0] and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (config & TEST_IO_DIFFERENT_FILE)
- if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((srcdset[0] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Extend srcdset[0] */
dims[1] = 7;
if (H5Dset_extent(srcdset[0], dims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Adjust write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -6247,27 +6291,27 @@ test_unlim(unsigned config, hid_t fapl)
/* Write to new area of srcdset */
count[1] = 3;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((filespace = H5Dget_space(srcdset[0])) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[1] = 4;
if (H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[1] = 0;
if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close srcdset[0] and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
}
@@ -6275,41 +6319,41 @@ test_unlim(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions. Note that since we are using
* H5D_VDS_FIRST_MISSING the size will not have changed. */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -6317,38 +6361,38 @@ test_unlim(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Close VDS and reopen with view set to H5D_VDS_LAST_AVAILABLE, reopen file
* as well if config option specified */
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual_view(dapl, H5D_VDS_LAST_AVAILABLE) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf to reflect new data that is now visible due to the change to
* H5D_VDS_LAST_AVAILABLE */
@@ -6360,27 +6404,27 @@ test_unlim(unsigned config, hid_t fapl)
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 19)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -6388,36 +6432,36 @@ test_unlim(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Reopen srcdset[2] and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (config & TEST_IO_DIFFERENT_FILE)
- if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((srcdset[2] = H5Dopen2(srcfile[0], "src_dset3", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Extend srcdset[2] */
dims[1] = 5;
if (H5Dset_extent(srcdset[2], dims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Adjust write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -6427,17 +6471,17 @@ test_unlim(unsigned config, hid_t fapl)
/* Write to new area of srcdset */
count[1] = 3;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((filespace = H5Dget_space(srcdset[2])) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[1] = 2;
if (H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[1] = 0;
if (H5Dwrite(srcdset[2], H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 10; i++) {
@@ -6449,12 +6493,12 @@ test_unlim(unsigned config, hid_t fapl)
/* Close srcdset[2] and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[2]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[2] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
}
@@ -6462,41 +6506,41 @@ test_unlim(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions. Note that the dimensions will not have
* changed. */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 19)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -6504,62 +6548,62 @@ test_unlim(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file
* as well if config option specified */
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual_view(dapl, H5D_VDS_FIRST_MISSING) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 14)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -6567,36 +6611,36 @@ test_unlim(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Reopen srcdset[1] and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (config & TEST_IO_DIFFERENT_FILE)
- if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Extend srcdset[1] */
dims[1] = 6;
if (H5Dset_extent(srcdset[1], dims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Adjust write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -6606,17 +6650,17 @@ test_unlim(unsigned config, hid_t fapl)
/* Write to new area of srcdset */
count[1] = 2;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((filespace = H5Dget_space(srcdset[1])) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[1] = 4;
if (H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[1] = 0;
if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 10; i++) {
@@ -6627,12 +6671,12 @@ test_unlim(unsigned config, hid_t fapl)
/* Close srcdset[1] and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
}
@@ -6640,40 +6684,40 @@ test_unlim(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 17)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -6681,58 +6725,58 @@ test_unlim(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Close VDS and reopen with view set to H5D_VDS_LAST_AVAILABLE, reopen file
* as well if config option specified */
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual_view(dapl, H5D_VDS_LAST_AVAILABLE) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 19)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -6740,21 +6784,21 @@ test_unlim(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Now just read middle 2 rows */
@@ -6763,16 +6807,16 @@ test_unlim(unsigned config, hid_t fapl)
count[0] = 2;
count[1] = 19;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[0] = 0;
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data - algorithmically check for only 2 middle rows being
* read */
@@ -6780,55 +6824,55 @@ test_unlim(unsigned config, hid_t fapl)
for (j = 0; j < (int)mdims[1]; j++)
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if ((i == 4) || (i == 5)) {
if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close */
if (!(config & TEST_IO_CLOSE_SRC)) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (H5Dclose(srcdset[2]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[2] = -1;
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
else if (!(config & TEST_IO_DIFFERENT_FILE)) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
if (H5Sclose(srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcspace[0] = -1;
if (H5Sclose(srcspace[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcspace[1] = -1;
if (H5Sclose(srcspace[2]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcspace[2] = -1;
if (H5Sclose(vspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[0] = -1;
if (H5Sclose(vspace[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[1] = -1;
/*
@@ -6836,23 +6880,23 @@ test_unlim(unsigned config, hid_t fapl)
*/
/* Clear virtual layout in DCPL */
if (H5Pset_layout(dcpl, H5D_VIRTUAL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataspaces */
if ((vspace[0] = H5Screate_simple(2, dims, mdims)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((vspace[1] = H5Screate_simple(2, dims, mdims)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create source dataspaces */
dims[0] = 5;
dims[1] = 0;
mdims[0] = 5;
if ((srcspace[0] = H5Screate_simple(2, dims, mdims)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
dims[1] = 5;
if ((srcspace[1] = H5Screate_simple(2, dims, mdims)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
mdims[0] = 10;
/* Select hyperslab in source spaces */
@@ -6861,53 +6905,53 @@ test_unlim(unsigned config, hid_t fapl)
count[0] = 5;
count[1] = H5S_UNLIMITED;
if (H5Sselect_hyperslab(srcspace[0], H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sselect_hyperslab(srcspace[1], H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select hyperslabs in virtual spaces */
start[1] = 10;
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[0] = 5;
start[1] = 0;
if (H5Sselect_hyperslab(vspace[1], H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Add virtual layout mappings */
if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset1",
srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset2",
srcspace[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual file */
- if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create source file if requested */
if (config & TEST_IO_DIFFERENT_FILE) {
- if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
else {
srcfile[0] = vfile;
if (H5Iinc_ref(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Create source datasets */
if ((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, srcdcpl,
H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset2", H5T_NATIVE_INT, srcspace[1], H5P_DEFAULT, srcdcpl,
H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataset */
if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Populate write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -6926,11 +6970,11 @@ test_unlim(unsigned config, hid_t fapl)
count[0] = 5;
count[1] = 5;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Write second dataset */
if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 5; i++)
@@ -6940,15 +6984,15 @@ test_unlim(unsigned config, hid_t fapl)
/* Close srcdsets and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
}
@@ -6956,40 +7000,40 @@ test_unlim(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 5)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -6999,62 +7043,62 @@ test_unlim(unsigned config, hid_t fapl)
start[0] = 0;
start[1] = 0;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file
* as well if config option specified */
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual_view(dapl, H5D_VDS_FIRST_MISSING) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 5)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -7062,33 +7106,33 @@ test_unlim(unsigned config, hid_t fapl)
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Reopen srcdset[0] and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (config & TEST_IO_DIFFERENT_FILE)
- if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((srcdset[0] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Extend srcdset[0] */
dims[0] = 5;
dims[1] = 5;
if (H5Dset_extent(srcdset[0], dims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Adjust write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -7101,9 +7145,9 @@ test_unlim(unsigned config, hid_t fapl)
count[0] = 5;
count[1] = 5;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 5; i++)
@@ -7113,12 +7157,12 @@ test_unlim(unsigned config, hid_t fapl)
/* Close srcdset[0] and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
}
@@ -7126,40 +7170,40 @@ test_unlim(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 5)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -7169,62 +7213,62 @@ test_unlim(unsigned config, hid_t fapl)
start[0] = 0;
start[1] = 0;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Close VDS and reopen with view set to H5D_VDS_LAST_AVAILABLE, reopen file
* as well if config option specified */
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual_view(dapl, H5D_VDS_LAST_AVAILABLE) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 15)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -7234,74 +7278,74 @@ test_unlim(unsigned config, hid_t fapl)
start[0] = 0;
start[1] = 0;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Close */
if (!(config & TEST_IO_CLOSE_SRC)) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
else if (!(config & TEST_IO_DIFFERENT_FILE)) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
if (H5Sclose(srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcspace[0] = -1;
if (H5Sclose(srcspace[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcspace[1] = -1;
if (H5Sclose(vspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[0] = -1;
if (H5Sclose(vspace[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[1] = -1;
/* Close */
if (H5Pclose(dcpl) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
dcpl = -1;
if (H5Pclose(srcdcpl) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
dcpl = -1;
if (H5Pclose(dapl) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
dapl = -1;
if (H5Sclose(memspace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
memspace = -1;
- PASSED();
+ PASSED_SUPPRESSED();
return 0;
error:
@@ -7339,7 +7383,7 @@ test_unlim(unsigned config, hid_t fapl)
*-------------------------------------------------------------------------
*/
static int
-test_printf(unsigned config, hid_t fapl)
+test_printf(unsigned config, hid_t vds_fapl, hid_t src_fapl)
{
char * srcfilename = NULL;
char * srcfilename_map = NULL;
@@ -7375,65 +7419,65 @@ test_printf(unsigned config, hid_t fapl)
hsize_t gap_size; /* Gap size property */
int i, j;
- TESTING("virtual dataset I/O with printf source")
+ TESTING_2_SUPPRESSED("virtual dataset I/O with printf source")
if ((srcfilename = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
- TEST_ERROR;
+ TEST_ERROR_SUPPRESSED;
if ((srcfilename_map = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
- TEST_ERROR;
+ TEST_ERROR_SUPPRESSED;
if ((srcfilename2 = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
- TEST_ERROR;
+ TEST_ERROR_SUPPRESSED;
if ((srcfilename2_map = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
- TEST_ERROR;
+ TEST_ERROR_SUPPRESSED;
if ((vfilename = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
- TEST_ERROR;
+ TEST_ERROR_SUPPRESSED;
if ((printf_srcfilename_map = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
- TEST_ERROR;
+ TEST_ERROR_SUPPRESSED;
if ((srcfilenamepct = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
- TEST_ERROR;
+ TEST_ERROR_SUPPRESSED;
if ((srcfilenamepct_map = (char *)HDcalloc(FILENAME_BUF_SIZE, sizeof(char))) == NULL)
- TEST_ERROR;
+ TEST_ERROR_SUPPRESSED;
- h5_fixname(FILENAME[0], fapl, vfilename, FILENAME_BUF_SIZE);
- h5_fixname(FILENAME[2], fapl, srcfilename, FILENAME_BUF_SIZE);
- h5_fixname_printf(FILENAME[2], fapl, srcfilename_map, FILENAME_BUF_SIZE);
- h5_fixname(FILENAME[3], fapl, srcfilename2, FILENAME_BUF_SIZE);
- h5_fixname_printf(FILENAME[2], fapl, srcfilename2_map, FILENAME_BUF_SIZE);
- h5_fixname_printf(printf_srcfilename_map_orig, fapl, printf_srcfilename_map, FILENAME_BUF_SIZE);
- h5_fixname(FILENAME[4], fapl, srcfilenamepct, FILENAME_BUF_SIZE);
- h5_fixname_printf(srcfilenamepct_map_orig, fapl, srcfilenamepct_map, FILENAME_BUF_SIZE);
+ h5_fixname(FILENAME[0], vds_fapl, vfilename, FILENAME_BUF_SIZE);
+ h5_fixname(FILENAME[2], src_fapl, srcfilename, FILENAME_BUF_SIZE);
+ h5_fixname_printf(FILENAME[2], src_fapl, srcfilename_map, FILENAME_BUF_SIZE);
+ h5_fixname(FILENAME[3], src_fapl, srcfilename2, FILENAME_BUF_SIZE);
+ h5_fixname_printf(FILENAME[2], src_fapl, srcfilename2_map, FILENAME_BUF_SIZE);
+ h5_fixname_printf(printf_srcfilename_map_orig, src_fapl, printf_srcfilename_map, FILENAME_BUF_SIZE);
+ h5_fixname(FILENAME[4], src_fapl, srcfilenamepct, FILENAME_BUF_SIZE);
+ h5_fixname_printf(srcfilenamepct_map_orig, src_fapl, srcfilenamepct_map, FILENAME_BUF_SIZE);
/* Create DCPL */
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Set fill value */
if (H5Pset_fill_value(dcpl, H5T_NATIVE_INT, &fill) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create DAPL */
if ((dapl = H5Pcreate(H5P_DATASET_ACCESS)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create memory space */
if ((memspace = H5Screate_simple(2, mdims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/*
* Test 1: 1 Source dataset mapping, 10x5 blocks
*/
/* Clear virtual layout in DCPL */
if (H5Pset_layout(dcpl, H5D_VIRTUAL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataspace */
if ((vspace[0] = H5Screate_simple(2, dims, mdims)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create source dataspace */
dims[1] = 5;
if ((srcspace = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select hyperslabs in virtual space */
stride[0] = 1;
@@ -7443,91 +7487,91 @@ test_printf(unsigned config, hid_t fapl)
block[0] = 10;
block[1] = 5;
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Add virtual layout mapping */
if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset%b",
srcspace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual file */
- if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create source file if requested */
if (config & TEST_IO_DIFFERENT_FILE) {
- if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
else {
srcfile[0] = vfile;
if (H5Iinc_ref(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Create virtual dataset */
if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC)
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Reopen srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC)
if (config & TEST_IO_DIFFERENT_FILE)
- if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create 2 source datasets */
if ((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset0", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Populate write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -7541,9 +7585,9 @@ test_printf(unsigned config, hid_t fapl)
/* Write to srcdset[0] */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 10; i++)
@@ -7557,7 +7601,7 @@ test_printf(unsigned config, hid_t fapl)
/* Write to srcdset[1] */
if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 10; i++)
@@ -7567,15 +7611,15 @@ test_printf(unsigned config, hid_t fapl)
/* Close srcdsets and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
}
@@ -7583,40 +7627,40 @@ test_printf(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -7624,32 +7668,32 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Reopen srcfile if config option specified */
if ((config & TEST_IO_CLOSE_SRC) && (config & TEST_IO_DIFFERENT_FILE))
- if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create 3rd source dataset */
if ((srcdset[2] = H5Dcreate2(srcfile[0], "src_dset2", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Adjust write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -7658,9 +7702,9 @@ test_printf(unsigned config, hid_t fapl)
/* Write to srcdset[2] */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dwrite(srcdset[2], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 10; i++)
@@ -7670,12 +7714,12 @@ test_printf(unsigned config, hid_t fapl)
/* Close srcdset[2] and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[2]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[2] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
}
@@ -7683,36 +7727,36 @@ test_printf(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 15)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -7720,21 +7764,21 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Now try with different selections */
@@ -7746,25 +7790,25 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select hyperslab in file space */
if (H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if ((j < (int)start[1]) || (j >= (int)(start[1] + count[1]))) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
}
start[1] = 0;
@@ -7772,11 +7816,11 @@ test_printf(unsigned config, hid_t fapl)
/* Now try writing through VDS */
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select hyperslab in file space */
if (H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Adjust write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -7785,83 +7829,83 @@ test_printf(unsigned config, hid_t fapl)
/* Write data through VDS */
if (H5Dwrite(vdset, H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Reopen srcdsets and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (config & TEST_IO_DIFFERENT_FILE)
- if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((srcdset[0] = H5Dopen2(srcfile[0], "src_dset0", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdset[1] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdset[2] = H5Dopen2(srcfile[0], "src_dset2", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Read srcdset[0] */
count[0] = 10;
count[1] = 5;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dread(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < 10; i++)
for (j = 0; j < 5; j++)
if (rbuf[i][j] != buf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read srcdset[1] */
if (H5Dread(srcdset[1], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < 10; i++)
for (j = 0; j < 5; j++)
if (rbuf[i][j] != buf[i][j + 5])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read srcdset[2] */
if (H5Dread(srcdset[2], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < 10; i++)
for (j = 0; j < 5; j++)
if (rbuf[i][j] != buf[i][j + 10])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close */
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (H5Dclose(srcdset[2]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[2] = -1;
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
if (H5Sclose(srcspace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcspace = -1;
if (H5Sclose(vspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[0] = -1;
/*
@@ -7870,16 +7914,16 @@ test_printf(unsigned config, hid_t fapl)
*/
/* Clear virtual layout in DCPL */
if (H5Pset_layout(dcpl, H5D_VIRTUAL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataspaces */
if ((vspace[0] = H5Screate_simple(2, dims, mdims)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create source dataspace */
dims[1] = 1;
if ((srcspace = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select hyperslabs in virtual space */
stride[0] = 1;
@@ -7889,104 +7933,104 @@ test_printf(unsigned config, hid_t fapl)
block[0] = 10;
block[1] = 1;
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Add virtual layout mapping */
if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilenamepct_map : ".",
"src_dset%b", srcspace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual file */
- if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create source file if requested */
if (config & TEST_IO_DIFFERENT_FILE) {
- if ((srcfile[0] = H5Fcreate(srcfilenamepct, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fcreate(srcfilenamepct, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
else {
srcfile[0] = vfile;
if (H5Iinc_ref(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Create virtual dataset */
if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC)
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Reopen srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC)
if (config & TEST_IO_DIFFERENT_FILE)
- if ((srcfile[0] = H5Fopen(srcfilenamepct, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fopen(srcfilenamepct, H5F_ACC_RDWR, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create source datasets in a pattern with increasing gaps:
* XX-X--X---X----X */
if ((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset0", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdset[2] = H5Dcreate2(srcfile[0], "src_dset3", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdset[3] = H5Dcreate2(srcfile[0], "src_dset6", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdset[4] = H5Dcreate2(srcfile[0], "src_dset10", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdset[5] = H5Dcreate2(srcfile[0], "src_dset15", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Populate write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -8000,9 +8044,9 @@ test_printf(unsigned config, hid_t fapl)
/* Write to srcdset[0] */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 10; i++)
@@ -8015,7 +8059,7 @@ test_printf(unsigned config, hid_t fapl)
/* Write to srcdset[1] */
if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 10; i++)
@@ -8028,7 +8072,7 @@ test_printf(unsigned config, hid_t fapl)
/* Write to srcdset[2] */
if (H5Dwrite(srcdset[2], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 10; i++)
@@ -8041,7 +8085,7 @@ test_printf(unsigned config, hid_t fapl)
/* Write to srcdset[3] */
if (H5Dwrite(srcdset[3], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 10; i++)
@@ -8054,7 +8098,7 @@ test_printf(unsigned config, hid_t fapl)
/* Write to srcdset[4] */
if (H5Dwrite(srcdset[4], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 10; i++)
@@ -8067,7 +8111,7 @@ test_printf(unsigned config, hid_t fapl)
/* Write to srcdset[5] */
if (H5Dwrite(srcdset[5], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 10; i++)
@@ -8077,13 +8121,13 @@ test_printf(unsigned config, hid_t fapl)
if (config & TEST_IO_CLOSE_SRC) {
for (i = 0; i < 6; i++) {
if (H5Dclose(srcdset[i]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[i] = -1;
}
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
}
@@ -8091,40 +8135,40 @@ test_printf(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -8132,74 +8176,74 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Test H5Pget_virtual_printf_gap() */
if (H5Pget_virtual_printf_gap(dapl, &gap_size) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (gap_size != (hsize_t)0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close VDS and reopen with printf gap set to 1, reopen file as well if
* config option specified */
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual_printf_gap(dapl, (hsize_t)1) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Test H5Pget_virtual_printf_gap() */
if (H5Pget_virtual_printf_gap(dapl, &gap_size) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (gap_size != (hsize_t)1)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 4)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -8207,68 +8251,68 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Close VDS and reopen with printf gap set to 2, reopen file as well if
* config option specified */
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual_printf_gap(dapl, (hsize_t)2) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Test H5Pget_virtual_printf_gap() */
if (H5Pget_virtual_printf_gap(dapl, &gap_size) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (gap_size != (hsize_t)2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 7)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -8276,68 +8320,68 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Close VDS and reopen with printf gap set to 3, reopen file as well if
* config option specified */
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual_printf_gap(dapl, (hsize_t)3) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Test H5Pget_virtual_printf_gap() */
if (H5Pget_virtual_printf_gap(dapl, &gap_size) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (gap_size != (hsize_t)3)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 11)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -8345,68 +8389,68 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Close VDS and reopen with printf gap set to 4, reopen file as well if
* config option specified */
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual_printf_gap(dapl, (hsize_t)4) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Test H5Pget_virtual_printf_gap() */
if (H5Pget_virtual_printf_gap(dapl, &gap_size) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (gap_size != (hsize_t)4)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 16)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -8414,62 +8458,62 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file
* as well if config option specified */
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual_view(dapl, H5D_VDS_FIRST_MISSING) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -8477,56 +8521,56 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Reset dapl */
if (H5Pset_virtual_printf_gap(dapl, (hsize_t)0) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual_view(dapl, H5D_VDS_LAST_AVAILABLE) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close */
if (!(config & TEST_IO_CLOSE_SRC)) {
for (i = 0; i < 6; i++) {
if (H5Dclose(srcdset[i]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[i] = -1;
}
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
else if (!(config & TEST_IO_DIFFERENT_FILE)) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
if (H5Sclose(srcspace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcspace = -1;
if (H5Sclose(vspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[0] = -1;
/* Next 2 tests are always run with a different source file, so only run if
@@ -8537,21 +8581,21 @@ test_printf(unsigned config, hid_t fapl)
* Test 3: 1 Source dataset mapping, 10x5 blocks, printf source file
*/
/* Clean up files so the source files do not exist yet */
- H5Iinc_ref(fapl); /* Prevent FAPL from being closed */
- h5_clean_files(FILENAME, fapl);
+ H5Iinc_ref(vds_fapl); /* Prevent FAPL from being closed */
+ h5_clean_files(FILENAME, vds_fapl);
/* Clear virtual layout in DCPL */
if (H5Pset_layout(dcpl, H5D_VIRTUAL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataspaces */
if ((vspace[0] = H5Screate_simple(2, dims, mdims)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create source dataspace */
dims[1] = 5;
if ((srcspace = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select hyperslabs in virtual space */
stride[0] = 1;
@@ -8561,66 +8605,66 @@ test_printf(unsigned config, hid_t fapl)
block[0] = 10;
block[1] = 5;
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Add virtual layout mapping */
if (H5Pset_virtual(dcpl, vspace[0], printf_srcfilename_map, "src_dset", srcspace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual file */
- if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataset */
if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create 2 source files, one source dataset */
- if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset", H5T_NATIVE_INT, srcspace, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
- if ((srcfile[1] = H5Fcreate(srcfilename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
+ if ((srcfile[1] = H5Fcreate(srcfilename2, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Populate write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -8634,9 +8678,9 @@ test_printf(unsigned config, hid_t fapl)
/* Write to srcdset[0] */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 10; i++)
@@ -8646,53 +8690,53 @@ test_printf(unsigned config, hid_t fapl)
/* Close srcdset and srcfiles if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
if (H5Fclose(srcfile[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[1] = -1;
}
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 5)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -8700,32 +8744,32 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Reopen srcfile[1] if config option specified */
if (config & TEST_IO_CLOSE_SRC)
- if ((srcfile[1] = H5Fopen(srcfilename2, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[1] = H5Fopen(srcfilename2, H5F_ACC_RDWR, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create 2nd source dataset */
if ((srcdset[1] = H5Dcreate2(srcfile[1], "src_dset", H5T_NATIVE_INT, srcspace, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Adjust write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -8734,9 +8778,9 @@ test_printf(unsigned config, hid_t fapl)
/* Write to srcdset[1] */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 10; i++)
@@ -8746,50 +8790,50 @@ test_printf(unsigned config, hid_t fapl)
/* Close srcdset[1] and srcfile[1] if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (H5Fclose(srcfile[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[1] = -1;
}
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -8797,49 +8841,49 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Close */
if (!(config & TEST_IO_CLOSE_SRC)) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
if (H5Fclose(srcfile[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[1] = -1;
}
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
if (H5Sclose(srcspace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcspace = -1;
if (H5Sclose(vspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[0] = -1;
/*
@@ -8847,21 +8891,21 @@ test_printf(unsigned config, hid_t fapl)
* source dset, extra %%s in source dataset name
*/
/* Clean up files so the source files do not exist yet */
- H5Iinc_ref(fapl); /* Prevent FAPL from being closed */
- h5_clean_files(FILENAME, fapl);
+ H5Iinc_ref(vds_fapl); /* Prevent FAPL from being closed */
+ h5_clean_files(FILENAME, vds_fapl);
/* Clear virtual layout in DCPL */
if (H5Pset_layout(dcpl, H5D_VIRTUAL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataspaces */
if ((vspace[0] = H5Screate_simple(2, dims, mdims)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create source dataspace */
dims[1] = 5;
if ((srcspace = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select hyperslabs in virtual space */
stride[0] = 1;
@@ -8871,66 +8915,66 @@ test_printf(unsigned config, hid_t fapl)
block[0] = 10;
block[1] = 5;
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Add virtual layout mapping */
if (H5Pset_virtual(dcpl, vspace[0], printf_srcfilename_map, "%%src%%_dset%%%b", srcspace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual file */
- if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataset */
if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create 2 source files, one source dataset */
- if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((srcdset[0] = H5Dcreate2(srcfile[0], "%src%_dset%0", H5T_NATIVE_INT, srcspace, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
- if ((srcfile[1] = H5Fcreate(srcfilename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
+ if ((srcfile[1] = H5Fcreate(srcfilename2, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Populate write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -8944,9 +8988,9 @@ test_printf(unsigned config, hid_t fapl)
/* Write to srcdset[0] */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 10; i++)
@@ -8956,53 +9000,53 @@ test_printf(unsigned config, hid_t fapl)
/* Close srcdset and srcfiles if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
if (H5Fclose(srcfile[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[1] = -1;
}
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 5)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -9010,32 +9054,32 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Reopen srcfile[1] if config option specified */
if (config & TEST_IO_CLOSE_SRC)
- if ((srcfile[1] = H5Fopen(srcfilename2, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[1] = H5Fopen(srcfilename2, H5F_ACC_RDWR, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create 2nd source dataset */
if ((srcdset[1] = H5Dcreate2(srcfile[1], "%src%_dset%1", H5T_NATIVE_INT, srcspace, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Adjust write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -9044,9 +9088,9 @@ test_printf(unsigned config, hid_t fapl)
/* Write to srcdset[1] */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 10; i++)
@@ -9056,50 +9100,50 @@ test_printf(unsigned config, hid_t fapl)
/* Close srcdset[1] and srcfile[1] if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (H5Fclose(srcfile[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[1] = -1;
}
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -9107,49 +9151,49 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Close */
if (!(config & TEST_IO_CLOSE_SRC)) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
if (H5Fclose(srcfile[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[1] = -1;
}
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
if (H5Sclose(srcspace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcspace = -1;
if (H5Sclose(vspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[0] = -1;
}
@@ -9159,26 +9203,26 @@ test_printf(unsigned config, hid_t fapl)
*/
/* Clear virtual layout in DCPL */
if (H5Pset_layout(dcpl, H5D_VIRTUAL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataspaces */
dims[0] = 10;
dims[1] = 10;
if ((vspace[0] = H5Screate_simple(2, dims, mdims)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((vspace[1] = H5Screate_simple(2, dims, mdims)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create source dataspace (2 elements wide) */
dims[1] = 2;
if ((srcspace = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select hyperslab in source space */
count[0] = 10;
count[1] = 1;
if (H5Sselect_hyperslab(srcspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select hyperslabs in virtual spaces */
stride[0] = 1;
@@ -9188,98 +9232,98 @@ test_printf(unsigned config, hid_t fapl)
block[0] = 10;
block[1] = 1;
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[1] = 1;
if (H5Sselect_hyperslab(vspace[1], H5S_SELECT_SET, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[1] = 0;
/* Add virtual layout mappings */
if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".",
"%bsrc_dset_a%b%%", srcspace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".",
"src_dset_b%b%%%%", srcspace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual file */
- if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create source file if requested */
if (config & TEST_IO_DIFFERENT_FILE) {
- if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
else {
srcfile[0] = vfile;
if (H5Iinc_ref(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Create virtual dataset */
if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC)
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Reopen srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC)
if (config & TEST_IO_DIFFERENT_FILE)
- if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create 2 source datasets */
if ((srcdset[0] = H5Dcreate2(srcfile[0], "0src_dset_a0%", H5T_NATIVE_INT, srcspace, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset_b0%%", H5T_NATIVE_INT, srcspace, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Populate write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -9295,9 +9339,9 @@ test_printf(unsigned config, hid_t fapl)
block[0] = 10;
block[1] = 2;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 10; i++)
@@ -9310,7 +9354,7 @@ test_printf(unsigned config, hid_t fapl)
/* Write to srcdset[1] */
if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 10; i++)
@@ -9319,15 +9363,15 @@ test_printf(unsigned config, hid_t fapl)
/* Close srcdsets and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
}
@@ -9335,40 +9379,40 @@ test_printf(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -9376,32 +9420,32 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Reopen srcfile if config option specified */
if ((config & TEST_IO_CLOSE_SRC) && (config & TEST_IO_DIFFERENT_FILE))
- if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create 3rd source dataset */
if ((srcdset[2] = H5Dcreate2(srcfile[0], "src_dset_b1%%", H5T_NATIVE_INT, srcspace, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Adjust write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -9410,9 +9454,9 @@ test_printf(unsigned config, hid_t fapl)
/* Write to srcdset[2] */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dwrite(srcdset[2], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 10; i++)
@@ -9421,12 +9465,12 @@ test_printf(unsigned config, hid_t fapl)
/* Close srcdset[2] and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[2]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[2] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
}
@@ -9434,40 +9478,40 @@ test_printf(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 4)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -9475,63 +9519,63 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file
* as well if config option specified */
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual_view(dapl, H5D_VDS_FIRST_MISSING) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions. Make sure that the 4th slice is no longer
* visible due to the change to H5D_VDS_FIRST_MISSING. */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -9539,32 +9583,32 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Reopen srcfile if config option specified */
if ((config & TEST_IO_CLOSE_SRC) && (config & TEST_IO_DIFFERENT_FILE))
- if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create 4th source dataset */
if ((srcdset[3] = H5Dcreate2(srcfile[0], "2src_dset_a2%", H5T_NATIVE_INT, srcspace, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Adjust write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -9573,9 +9617,9 @@ test_printf(unsigned config, hid_t fapl)
/* Write to srcdset[3] */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dwrite(srcdset[3], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 10; i++)
@@ -9584,12 +9628,12 @@ test_printf(unsigned config, hid_t fapl)
/* Close srcdset[3] and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[3]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[3] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
}
@@ -9597,40 +9641,40 @@ test_printf(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -9638,63 +9682,63 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Close VDS and reopen with view set to H5D_VDS_LAST_AVAILABLE, reopen file
* as well if config option specified */
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual_view(dapl, H5D_VDS_LAST_AVAILABLE) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions. Make sure that the 4th slice is now visible
* due to the change to H5D_VDS_LAST_AVAILABLE. */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 4)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -9702,63 +9746,63 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Close VDS and reopen with printf_gap set to 1, reopen file as well if
* config option specified */
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual_printf_gap(dapl, (hsize_t)1) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions. Make sure that the 6th slice is now visible
* due to the change to printf_gap. */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 5)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -9766,59 +9810,59 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Reset dapl */
if (H5Pset_virtual_printf_gap(dapl, (hsize_t)0) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual_view(dapl, H5D_VDS_LAST_AVAILABLE) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close */
if (!(config & TEST_IO_CLOSE_SRC)) {
for (i = 0; i < 4; i++) {
if (H5Dclose(srcdset[i]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[i] = -1;
}
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
else if (!(config & TEST_IO_DIFFERENT_FILE)) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
if (H5Sclose(srcspace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcspace = -1;
if (H5Sclose(vspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[0] = -1;
if (H5Sclose(vspace[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[1] = -1;
/*
@@ -9826,25 +9870,25 @@ test_printf(unsigned config, hid_t fapl)
*/
/* Clear virtual layout in DCPL */
if (H5Pset_layout(dcpl, H5D_VIRTUAL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataspaces */
dims[0] = 10;
dims[1] = 10;
if ((vspace[0] = H5Screate_simple(2, dims, mdims)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((vspace[1] = H5Screate_simple(2, dims, mdims)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create source dataspace (1 dimensional) */
dims[0] = 50;
if ((srcspace = H5Screate_simple(1, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select hyperslab in source space */
count[0] = 25;
if (H5Sselect_hyperslab(srcspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select hyperslabs in virtual spaces */
stride[0] = 1;
@@ -9854,103 +9898,103 @@ test_printf(unsigned config, hid_t fapl)
block[0] = 5;
block[1] = 5;
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[0] = 5;
stride[1] = 10;
block[1] = 10;
if (H5Sselect_hyperslab(vspace[1], H5S_SELECT_SET, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[0] = 0;
/* Add virtual layout mappings (select ALL in source space for second
* mapping) */
if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".",
"src_dset_a%b", srcspace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sselect_all(srcspace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".",
"src_dset_b%b", srcspace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual file */
- if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create source file if requested */
if (config & TEST_IO_DIFFERENT_FILE) {
- if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
else {
srcfile[0] = vfile;
if (H5Iinc_ref(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Create virtual dataset */
if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC)
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Reopen srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC)
if (config & TEST_IO_DIFFERENT_FILE)
- if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create 2 source datasets */
if ((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset_a0", H5T_NATIVE_INT, srcspace, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdset[1] = H5Dcreate2(srcfile[0], "src_dset_b0", H5T_NATIVE_INT, srcspace, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Populate write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -9966,12 +10010,12 @@ test_printf(unsigned config, hid_t fapl)
block[0] = 5;
block[1] = 5;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
count[0] = 25;
if (H5Sselect_hyperslab(srcspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, srcspace, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 5; i++)
@@ -9986,11 +10030,11 @@ test_printf(unsigned config, hid_t fapl)
/* Write to srcdset[1] */
block[1] = 10;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sselect_all(srcspace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, srcspace, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 5; i++)
@@ -10000,15 +10044,15 @@ test_printf(unsigned config, hid_t fapl)
/* Close srcdsets and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
}
@@ -10016,40 +10060,40 @@ test_printf(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -10057,63 +10101,63 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file
* as well if config option specified */
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual_view(dapl, H5D_VDS_FIRST_MISSING) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions. Make sure that the 4th slice is no longer
* visible due to the change to H5D_VDS_FIRST_MISSING. */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 5)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -10121,32 +10165,32 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Reopen srcfile if config option specified */
if ((config & TEST_IO_CLOSE_SRC) && (config & TEST_IO_DIFFERENT_FILE))
- if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create 3rd source dataset */
if ((srcdset[2] = H5Dcreate2(srcfile[0], "src_dset_a1", H5T_NATIVE_INT, srcspace, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Adjust write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -10156,11 +10200,11 @@ test_printf(unsigned config, hid_t fapl)
/* Write to srcdset[2] */
block[1] = 5;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sselect_hyperslab(srcspace, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dwrite(srcdset[2], H5T_NATIVE_INT, memspace, srcspace, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 5; i++)
@@ -10170,12 +10214,12 @@ test_printf(unsigned config, hid_t fapl)
/* Close srcdset[2] and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[2]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[2] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
}
@@ -10183,40 +10227,40 @@ test_printf(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -10224,62 +10268,62 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Close VDS and reopen with view set to H5D_VDS_LAST_AVAILABLE, reopen file
* as well if config option specified */
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual_view(dapl, H5D_VDS_LAST_AVAILABLE) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions. There should be no change. */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -10287,32 +10331,32 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Reopen srcfile if config option specified */
if ((config & TEST_IO_CLOSE_SRC) && (config & TEST_IO_DIFFERENT_FILE))
- if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create 4th source dataset */
if ((srcdset[3] = H5Dcreate2(srcfile[0], "src_dset_a2", H5T_NATIVE_INT, srcspace, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Adjust write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -10321,9 +10365,9 @@ test_printf(unsigned config, hid_t fapl)
/* Write to srcdset[3] */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dwrite(srcdset[3], H5T_NATIVE_INT, memspace, srcspace, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 5; i++)
@@ -10333,12 +10377,12 @@ test_printf(unsigned config, hid_t fapl)
/* Close srcdset[3] and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[3]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[3] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
}
@@ -10346,40 +10390,40 @@ test_printf(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 15)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -10387,36 +10431,36 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Now test reopening virtual dataset without calling H5Dget_space, if
* REOPEN_VIRT flag set */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -10424,28 +10468,28 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Now try setting extent manually */
/* Shrink to 12 */
dims[1] = 12;
if (H5Dset_extent(vdset, dims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -10453,27 +10497,27 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Shrink to 10 */
dims[1] = 12;
if (H5Dset_extent(vdset, dims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -10481,63 +10525,63 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
}
/* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file
* as well if config option specified */
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual_view(dapl, H5D_VDS_FIRST_MISSING) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -10545,36 +10589,36 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Now test reopening virtual dataset without calling H5Dget_space, if
* REOPEN_VIRT flag set */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -10582,28 +10626,28 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Now try setting extent manually */
/* Grow to 12 */
dims[1] = 12;
if (H5Dset_extent(vdset, dims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -10611,27 +10655,27 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Grow to 15 */
dims[1] = 15;
if (H5Dset_extent(vdset, dims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -10639,58 +10683,58 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
}
/* Reset dapl */
if (H5Pset_virtual_view(dapl, H5D_VDS_LAST_AVAILABLE) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close */
if (!(config & TEST_IO_CLOSE_SRC)) {
for (i = 0; i < 4; i++) {
if (H5Dclose(srcdset[i]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[i] = -1;
}
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
else if (!(config & TEST_IO_DIFFERENT_FILE)) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
if (H5Sclose(srcspace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcspace = -1;
if (H5Sclose(vspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[0] = -1;
if (H5Sclose(vspace[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[1] = -1;
/*
@@ -10699,16 +10743,16 @@ test_printf(unsigned config, hid_t fapl)
*/
/* Clear virtual layout in DCPL */
if (H5Pset_layout(dcpl, H5D_VIRTUAL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual dataspaces */
if ((vspace[0] = H5Screate_simple(2, dims, mdims)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create source dataspace */
dims[1] = 1;
if ((srcspace = H5Screate_simple(2, dims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Select hyperslabs in virtual space */
stride[0] = 1;
@@ -10718,88 +10762,88 @@ test_printf(unsigned config, hid_t fapl)
block[0] = 10;
block[1] = 1;
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Add virtual layout mapping */
if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilenamepct_map : ".",
"src_dset%b", srcspace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual file */
- if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create source file if requested */
if (config & TEST_IO_DIFFERENT_FILE) {
- if ((srcfile[0] = H5Fcreate(srcfilenamepct, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fcreate(srcfilenamepct, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
else {
srcfile[0] = vfile;
if (H5Iinc_ref(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Create virtual dataset */
if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC)
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Reopen srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC)
if (config & TEST_IO_DIFFERENT_FILE)
- if ((srcfile[0] = H5Fopen(srcfilenamepct, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile[0] = H5Fopen(srcfilenamepct, H5F_ACC_RDWR, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create 1 source dataset */
if ((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset0", H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Populate write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -10813,9 +10857,9 @@ test_printf(unsigned config, hid_t fapl)
/* Write to srcdset[0] */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 10; i++)
@@ -10824,12 +10868,12 @@ test_printf(unsigned config, hid_t fapl)
/* Close srcdset[0] and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
}
@@ -10837,40 +10881,40 @@ test_printf(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 1)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -10878,62 +10922,62 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Close VDS and reopen with printf gap set to 127, reopen file as well if
* config option specified */
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual_printf_gap(dapl, (hsize_t)127) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
if ((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 1)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 20)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -10941,63 +10985,63 @@ test_printf(unsigned config, hid_t fapl)
/* Select hyperslab in memory space */
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Reset dapl */
if (H5Pset_virtual_printf_gap(dapl, (hsize_t)0) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close */
if (!(config & TEST_IO_CLOSE_SRC)) {
if (H5Dclose(srcdset[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[0] = -1;
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
else if (!(config & TEST_IO_DIFFERENT_FILE)) {
if (H5Fclose(srcfile[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile[0] = -1;
}
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
if (H5Sclose(srcspace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcspace = -1;
if (H5Sclose(vspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[0] = -1;
/* Close */
if (H5Pclose(dcpl) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
dcpl = -1;
if (H5Pclose(dapl) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
dapl = -1;
if (H5Sclose(memspace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
memspace = -1;
HDfree(srcfilename);
@@ -11009,7 +11053,7 @@ test_printf(unsigned config, hid_t fapl)
HDfree(srcfilenamepct);
HDfree(srcfilenamepct_map);
- PASSED();
+ PASSED_SUPPRESSED();
return 0;
error:
@@ -11054,7 +11098,7 @@ test_printf(unsigned config, hid_t fapl)
*-------------------------------------------------------------------------
*/
static int
-test_all(unsigned config, hid_t fapl)
+test_all(unsigned config, hid_t vds_fapl, hid_t src_fapl)
{
char vfilename[FILENAME_BUF_SIZE];
char srcfilename[FILENAME_BUF_SIZE];
@@ -11083,52 +11127,52 @@ test_all(unsigned config, hid_t fapl)
int fill = -1; /* Fill value */
int i, j;
- TESTING("virtual dataset I/O with mixed selection types")
+ TESTING_2_SUPPRESSED("virtual dataset I/O with mixed selection types")
- h5_fixname(FILENAME[0], fapl, vfilename, sizeof vfilename);
- h5_fixname(FILENAME[2], fapl, srcfilename, sizeof srcfilename);
- h5_fixname_printf(FILENAME[2], fapl, srcfilename_map, sizeof srcfilename_map);
+ h5_fixname(FILENAME[0], vds_fapl, vfilename, sizeof vfilename);
+ h5_fixname(FILENAME[2], src_fapl, srcfilename, sizeof srcfilename);
+ h5_fixname_printf(FILENAME[2], src_fapl, srcfilename_map, sizeof srcfilename_map);
/* Create DCPLs */
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcdcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Set fill value */
if (H5Pset_fill_value(dcpl, H5T_NATIVE_INT, &fill) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Set chunk dimensions */
if (H5Pset_chunk(srcdcpl, 2, cdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create memory space */
if ((memspace = H5Screate_simple(2, mdims, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Clear virtual layout in DCPL */
if (H5Pset_layout(dcpl, H5D_VIRTUAL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create fixed mapping */
if ((vspace[0] = H5Screate_simple(2, dims, mdims)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[0] = 3;
start[1] = 3;
count[0] = 3;
count[1] = 3;
if (H5Sselect_hyperslab(vspace[0], H5S_SELECT_SET, start, NULL, count, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcspace[0] = H5Screate_simple(2, count, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".",
"src_dset_fixed", srcspace[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create unlimited mapping */
if ((vspace[1] = H5Screate_simple(2, dims, mdims)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[0] = 3;
start[1] = 0;
count[0] = 1;
@@ -11136,21 +11180,21 @@ test_all(unsigned config, hid_t fapl)
block[0] = H5S_UNLIMITED;
block[1] = 3;
if (H5Sselect_hyperslab(vspace[1], H5S_SELECT_SET, start, NULL, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
dims[0] = 0;
dims[1] = 3;
if ((srcspace[1] = H5Screate_simple(2, dims, block)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[0] = 0;
if (H5Sselect_hyperslab(srcspace[1], H5S_SELECT_SET, start, NULL, block, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual(dcpl, vspace[1], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".",
"src_dset_unlim", srcspace[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create printf mapping */
if ((vspace[2] = H5Screate_simple(2, dims, mdims)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[0] = 0;
start[1] = 2;
stride[0] = 1;
@@ -11160,93 +11204,93 @@ test_all(unsigned config, hid_t fapl)
block[0] = 3;
block[1] = 2;
if (H5Sselect_hyperslab(vspace[2], H5S_SELECT_SET, start, stride, count, block) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((srcspace[2] = H5Screate_simple(2, block, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Pset_virtual(dcpl, vspace[2], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".",
"src_dset_printf_%b", srcspace[2]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create virtual file */
- if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create source file if requested */
if (config & TEST_IO_DIFFERENT_FILE) {
- if ((srcfile = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
}
else {
srcfile = vfile;
if (H5Iinc_ref(srcfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Create virtual dataset */
if ((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC)
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile = -1;
}
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 6)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 6)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Reopen srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC)
if (config & TEST_IO_DIFFERENT_FILE)
- if ((srcfile = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create fixed source dataset */
if ((srcdset[0] = H5Dcreate2(srcfile, "src_dset_fixed", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, srcdcpl,
H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Create unlimited source_dataset */
if ((srcdset[1] = H5Dcreate2(srcfile, "src_dset_unlim", H5T_NATIVE_INT, srcspace[1], H5P_DEFAULT, srcdcpl,
H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Populate write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -11264,9 +11308,9 @@ test_all(unsigned config, hid_t fapl)
block[0] = 3;
block[1] = 3;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 3; i++)
@@ -11277,13 +11321,13 @@ test_all(unsigned config, hid_t fapl)
if (config & TEST_IO_CLOSE_SRC) {
for (i = 0; i < 2; i++) {
if (H5Dclose(srcdset[i]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[i] = -1;
}
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile = -1;
}
}
@@ -11291,40 +11335,40 @@ test_all(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 6)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 6)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -11334,37 +11378,37 @@ test_all(unsigned config, hid_t fapl)
start[0] = 0;
start[1] = 0;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if ((i >= (int)dims[0]) || (j >= (int)dims[1])) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Reopen srcdset[1] and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (config & TEST_IO_DIFFERENT_FILE)
- if ((srcfile = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((srcdset[1] = H5Dopen2(srcfile, "src_dset_unlim", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Extend srcdset[1] */
dims[0] = 2;
dims[1] = 3;
if (H5Dset_extent(srcdset[1], dims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Adjust write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -11375,9 +11419,9 @@ test_all(unsigned config, hid_t fapl)
start[0] = 0;
start[1] = 0;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 2; i++)
@@ -11387,11 +11431,11 @@ test_all(unsigned config, hid_t fapl)
/* Close srcdset[1] and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile = -1;
}
}
@@ -11399,40 +11443,40 @@ test_all(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 6)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 6)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -11442,32 +11486,32 @@ test_all(unsigned config, hid_t fapl)
start[0] = 0;
start[1] = 0;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if ((i >= (int)dims[0]) || (j >= (int)dims[1])) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Reopen srcfile if config option specified */
if ((config & TEST_IO_CLOSE_SRC) && (config & TEST_IO_DIFFERENT_FILE))
- if ((srcfile = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create first printf source dataset */
if ((srcdset[2] = H5Dcreate2(srcfile, "src_dset_printf_0", H5T_NATIVE_INT, srcspace[2], H5P_DEFAULT,
srcdcpl, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Adjust write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -11480,9 +11524,9 @@ test_all(unsigned config, hid_t fapl)
block[0] = 3;
block[1] = 2;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dwrite(srcdset[2], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 3; i++)
@@ -11492,11 +11536,11 @@ test_all(unsigned config, hid_t fapl)
/* Close srcdset[2] srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[2]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[2] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile = -1;
}
}
@@ -11504,40 +11548,40 @@ test_all(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 6)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 6)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -11547,37 +11591,37 @@ test_all(unsigned config, hid_t fapl)
start[0] = 0;
start[1] = 0;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if ((i >= (int)dims[0]) || (j >= (int)dims[1])) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Reopen srcdset[1] and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (config & TEST_IO_DIFFERENT_FILE)
- if ((srcfile = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((srcdset[1] = H5Dopen2(srcfile, "src_dset_unlim", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Extend srcdset[1] */
dims[0] = 3;
dims[1] = 3;
if (H5Dset_extent(srcdset[1], dims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Adjust write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -11590,17 +11634,17 @@ test_all(unsigned config, hid_t fapl)
block[0] = 1;
block[1] = 3;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((filespace = H5Dget_space(srcdset[1])) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[0] = 2;
start[1] = 0;
if (H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, NULL, block, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 3; i++)
@@ -11609,11 +11653,11 @@ test_all(unsigned config, hid_t fapl)
/* Close srcdset[1] and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile = -1;
}
}
@@ -11621,40 +11665,40 @@ test_all(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 6)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 6)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -11664,32 +11708,32 @@ test_all(unsigned config, hid_t fapl)
start[0] = 0;
start[1] = 0;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if ((i >= (int)dims[0]) || (j >= (int)dims[1])) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Reopen srcfile if config option specified */
if ((config & TEST_IO_CLOSE_SRC) && (config & TEST_IO_DIFFERENT_FILE))
- if ((srcfile = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create second printf source dataset, this time without using srcdcpl */
if ((srcdset[3] = H5Dcreate2(srcfile, "src_dset_printf_1", H5T_NATIVE_INT, srcspace[2], H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Adjust write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -11702,9 +11746,9 @@ test_all(unsigned config, hid_t fapl)
block[0] = 3;
block[1] = 2;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dwrite(srcdset[3], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 3; i++)
@@ -11714,11 +11758,11 @@ test_all(unsigned config, hid_t fapl)
/* Close srcdset[3] srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[3]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[3] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile = -1;
}
}
@@ -11726,40 +11770,40 @@ test_all(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 6)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 7)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -11769,37 +11813,37 @@ test_all(unsigned config, hid_t fapl)
start[0] = 0;
start[1] = 0;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if ((i >= (int)dims[0]) || (j >= (int)dims[1])) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Reopen srcdset[1] and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (config & TEST_IO_DIFFERENT_FILE)
- if ((srcfile = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((srcdset[1] = H5Dopen2(srcfile, "src_dset_unlim", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Extend srcdset[1] */
dims[0] = 7;
dims[1] = 3;
if (H5Dset_extent(srcdset[1], dims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Adjust write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -11812,17 +11856,17 @@ test_all(unsigned config, hid_t fapl)
block[0] = 4;
block[1] = 3;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if ((filespace = H5Dget_space(srcdset[1])) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
start[0] = 3;
start[1] = 0;
if (H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, NULL, block, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dwrite(srcdset[1], H5T_NATIVE_INT, memspace, filespace, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 4; i++)
@@ -11832,11 +11876,11 @@ test_all(unsigned config, hid_t fapl)
/* Close srcdset[1] and srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[1]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[1] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile = -1;
}
}
@@ -11844,40 +11888,40 @@ test_all(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 7)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -11887,32 +11931,32 @@ test_all(unsigned config, hid_t fapl)
start[0] = 0;
start[1] = 0;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++) {
if (j >= (int)dims[1]) {
if (rbuf[i][j] != 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
else if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Reopen srcfile if config option specified */
if ((config & TEST_IO_CLOSE_SRC) && (config & TEST_IO_DIFFERENT_FILE))
- if ((srcfile = H5Fopen(srcfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((srcfile = H5Fopen(srcfilename, H5F_ACC_RDWR, src_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
/* Create third printf source dataset */
if ((srcdset[4] = H5Dcreate2(srcfile, "src_dset_printf_2", H5T_NATIVE_INT, srcspace[2], H5P_DEFAULT,
srcdcpl, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Adjust write buffer */
for (i = 0; i < (int)mdims[0]; i++)
@@ -11925,9 +11969,9 @@ test_all(unsigned config, hid_t fapl)
block[0] = 3;
block[1] = 2;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, block, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Dwrite(srcdset[4], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Update erbuf */
for (i = 0; i < 3; i++)
@@ -11937,11 +11981,11 @@ test_all(unsigned config, hid_t fapl)
/* Close srcdset[4] srcfile if config option specified */
if (config & TEST_IO_CLOSE_SRC) {
if (H5Dclose(srcdset[4]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[4] = -1;
if (config & TEST_IO_DIFFERENT_FILE) {
if (H5Fclose(srcfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile = -1;
}
}
@@ -11949,40 +11993,40 @@ test_all(unsigned config, hid_t fapl)
/* Reopen virtual dataset and file if config option specified */
if (config & TEST_IO_REOPEN_VIRT) {
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
- if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ if ((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, vds_fapl)) < 0)
+ TEST_ERROR_SUPPRESSED
if ((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
}
/* Get VDS space */
if ((filespace = H5Dget_space(vdset)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Get VDS space dimensions */
if ((ndims = H5Sget_simple_extent_ndims(filespace)) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (ndims != 2)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (H5Sget_simple_extent_dims(filespace, dims, mdims) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (dims[1] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[0] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
if (mdims[1] != 10)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close filespace */
if (H5Sclose(filespace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -11992,61 +12036,61 @@ test_all(unsigned config, hid_t fapl)
start[0] = 0;
start[1] = 0;
if (H5Sselect_hyperslab(memspace, H5S_SELECT_SET, start, NULL, dims, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Read data */
if (H5Dread(vdset, H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Verify read data */
for (i = 0; i < (int)mdims[0]; i++)
for (j = 0; j < (int)mdims[1]; j++)
if (rbuf[i][j] != erbuf[i][j])
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
/* Close */
if (!(config & TEST_IO_CLOSE_SRC)) {
for (i = 0; i < 5; i++) {
if (H5Dclose(srcdset[i]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdset[i] = -1;
}
if (H5Fclose(srcfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile = -1;
}
else if (!(config & TEST_IO_DIFFERENT_FILE)) {
if (H5Fclose(srcfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcfile = -1;
}
if (H5Dclose(vdset) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vdset = -1;
if (H5Fclose(vfile) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vfile = -1;
for (i = 0; i < (int)(sizeof(srcspace) / sizeof(srcspace[0])); i++) {
if (H5Sclose(srcspace[i]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcspace[i] = -1;
}
for (i = 0; i < (int)(sizeof(vspace) / sizeof(vspace[0])); i++) {
if (H5Sclose(vspace[i]) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
vspace[i] = -1;
}
if (H5Pclose(dcpl) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
dcpl = -1;
if (H5Pclose(srcdcpl) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
srcdcpl = -1;
if (H5Sclose(memspace) < 0)
- TEST_ERROR
+ TEST_ERROR_SUPPRESSED
memspace = -1;
- PASSED();
+ PASSED_SUPPRESSED();
return 0;
error:
@@ -12101,7 +12145,7 @@ test_dapl_values(hid_t fapl_id)
hsize_t gap_size; /* gap size from dapl */
char filename[1024]; /* file names */
- TESTING("H5Dget_access_plist() returns dapl w/ correct values");
+ TESTING_2("H5Dget_access_plist() returns dapl w/ correct values");
/* Create the file */
h5_fixname(FILENAME[5], fapl_id, filename, sizeof(filename));
@@ -12240,7 +12284,8 @@ main(void)
{
char filename[FILENAME_BUF_SIZE];
hid_t fapl;
- hid_t my_fapl = -1; /* File access property list */
+ hid_t vds_fapl = -1; /* File access property list */
+ hid_t src_fapl = -1; /* File access property list */
int test_api_config;
unsigned bit_config;
H5F_libver_t low, high; /* Low and high bounds */
@@ -12252,16 +12297,21 @@ main(void)
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
- /* Set to use the latest file format */
- if ((my_fapl = H5Pcopy(fapl)) < 0)
+ /* Create FAPLs for VDS and source files */
+ if ((vds_fapl = H5Pcopy(fapl)) < 0)
+ TEST_ERROR
+ if ((src_fapl = H5Pcopy(fapl)) < 0)
TEST_ERROR
/* Loop through all the combinations of low/high version bounds */
for (low = H5F_LIBVER_EARLIEST; low < H5F_LIBVER_NBOUNDS; low++) {
for (high = H5F_LIBVER_EARLIEST; high < H5F_LIBVER_NBOUNDS; high++) {
- char msg[80]; /* Message for file version bounds */
+ char msg[128]; /* Message for file version bounds */
const char *low_string; /* The low bound string */
const char *high_string; /* The high bound string */
+#ifndef VDS_TEST_VERBOSE
+ int tmp_nerrors;
+#endif /* VDS_TEST_VERBOSE */
/* Invalid combinations, just continue */
if (high == H5F_LIBVER_EARLIEST || high < low)
@@ -12272,39 +12322,83 @@ main(void)
continue;
/* Set the low/high version bounds */
- if (H5Pset_libver_bounds(my_fapl, low, high) < 0)
+ if (H5Pset_libver_bounds(vds_fapl, low, high) < 0)
+ TEST_ERROR
+ if (H5Pset_libver_bounds(src_fapl, low, high) < 0)
TEST_ERROR
/* Display testing info */
low_string = h5_get_version_string(low);
high_string = h5_get_version_string(high);
- HDsprintf(msg, "Testing virtual dataset with file version bounds: (%s, %s):", low_string,
- high_string);
+ HDsnprintf(msg, sizeof(msg),
+ "Testing virtual dataset I/O with file version bounds: (%s, %s):", low_string,
+ high_string);
HDputs(msg);
for (test_api_config = (int)TEST_API_BASIC; test_api_config < (int)TEST_API_NTESTS;
test_api_config++)
- nerrors += test_api((test_api_config_t)test_api_config, my_fapl, low);
+ nerrors += test_api((test_api_config_t)test_api_config, vds_fapl, low);
+
+ TESTING_2("Virtual dataset I/O")
+#ifdef VDS_TEST_VERBOSE
+ HDputs("");
+#else /* VDS_TEST_VERBOSE */
+ tmp_nerrors = nerrors;
+#endif /* VDS_TEST_VERBOSE */
+
for (bit_config = 0; bit_config < TEST_IO_NTESTS; bit_config++) {
- HDprintf("Config: %s%s%s\n", bit_config & TEST_IO_CLOSE_SRC ? "closed source dataset, " : "",
- bit_config & TEST_IO_DIFFERENT_FILE ? "different source file" : "same source file",
- bit_config & TEST_IO_REOPEN_VIRT ? ", reopen virtual file" : "");
- nerrors += test_basic_io(bit_config, my_fapl);
- nerrors += test_vds_prefix_first(bit_config, my_fapl);
- nerrors += test_unlim(bit_config, my_fapl);
- nerrors += test_printf(bit_config, my_fapl);
- nerrors += test_all(bit_config, my_fapl);
+ /* Skip invalid configurations */
+ if ((bit_config & TEST_IO_FCLOSE_SEMI) && (bit_config & TEST_IO_FCLOSE_STRONG))
+ continue;
+
+ /* Print message */
+ PRINT_CONFIG(
+ "%s%s%s, %s file close degree",
+ bit_config & TEST_IO_CLOSE_SRC ? "closed source dataset, " : "",
+ bit_config & TEST_IO_DIFFERENT_FILE ? "different source file" : "same source file",
+ bit_config & TEST_IO_REOPEN_VIRT ? ", reopen virtual file" : "",
+ bit_config & TEST_IO_FCLOSE_SEMI
+ ? "H5F_CLOSE_SEMI"
+ : (bit_config & TEST_IO_FCLOSE_STRONG ? "H5F_CLOSE_STRONG" : "H5F_CLOSE_WEAK"));
+
+ /* Set file close degree */
+ if (bit_config & TEST_IO_FCLOSE_SEMI) {
+ if (H5Pset_fclose_degree(vds_fapl, H5F_CLOSE_SEMI) < 0)
+ TEST_ERROR
+ }
+ else if (bit_config & TEST_IO_FCLOSE_STRONG) {
+ if (H5Pset_fclose_degree(vds_fapl, H5F_CLOSE_STRONG) < 0)
+ TEST_ERROR
+ }
+ else {
+ if (H5Pset_fclose_degree(vds_fapl, H5F_CLOSE_WEAK) < 0)
+ TEST_ERROR
+ }
+
+ /* Run tests */
+ nerrors += test_basic_io(bit_config, vds_fapl, src_fapl);
+ nerrors += test_vds_prefix_first(bit_config, vds_fapl, src_fapl);
+ nerrors += test_unlim(bit_config, vds_fapl, src_fapl);
+ nerrors += test_printf(bit_config, vds_fapl, src_fapl);
+ nerrors += test_all(bit_config, vds_fapl, src_fapl);
}
- nerrors += test_dapl_values(my_fapl);
+#ifndef VDS_TEST_VERBOSE
+ if (tmp_nerrors == nerrors)
+ PASSED();
+#endif /* VDS_TEST_VERBOSE */
+
+ nerrors += test_dapl_values(vds_fapl);
/* Verify symbol table messages are cached */
- nerrors += (h5_verify_cached_stabs(FILENAME, my_fapl) < 0 ? 1 : 0);
+ nerrors += (h5_verify_cached_stabs(FILENAME, vds_fapl) < 0 ? 1 : 0);
} /* end for high */
} /* end for low */
- if (H5Pclose(my_fapl) < 0)
+ if (H5Pclose(vds_fapl) < 0)
+ TEST_ERROR
+ if (H5Pclose(src_fapl) < 0)
TEST_ERROR
if (nerrors)
diff --git a/test/vol.c b/test/vol.c
index c7d007e77cd..d97524388c4 100644
--- a/test/vol.c
+++ b/test/vol.c
@@ -18,6 +18,7 @@
* other mechanisms.
*/
+/* Headers needed */
#include "h5test.h"
/* Filename */
@@ -41,9 +42,10 @@ const char *FILENAME[] = {"native_vol_test", NULL};
* functionality.
*/
static const H5VL_class_t fake_vol_g = {
- 0, /* version */
+ H5VL_VERSION, /* VOL class struct version */
FAKE_VOL_VALUE, /* value */
FAKE_VOL_NAME, /* name */
+ 0, /* connector version */
0, /* capability flags */
NULL, /* initialize */
NULL, /* terminate */
@@ -90,7 +92,7 @@ static const H5VL_class_t fake_vol_g = {
/* datatype_cls */
NULL, /* commit */
NULL, /* open */
- NULL, /* get_size */
+ NULL, /* get */
NULL, /* specific */
NULL, /* optional */
NULL /* close */
@@ -173,13 +175,14 @@ static const H5VL_class_t fake_vol_g = {
static herr_t
test_vol_registration(void)
{
- hid_t native_id = H5I_INVALID_HID;
- hid_t lapl_id = H5I_INVALID_HID;
- hid_t vipl_id = H5I_INVALID_HID;
- herr_t ret = SUCCEED;
- htri_t is_registered = FAIL;
- hid_t vol_id = H5I_INVALID_HID;
- hid_t vol_id2 = H5I_INVALID_HID;
+ hid_t native_id = H5I_INVALID_HID;
+ hid_t lapl_id = H5I_INVALID_HID;
+ hid_t vipl_id = H5I_INVALID_HID;
+ herr_t ret = SUCCEED;
+ htri_t is_registered = FAIL;
+ hid_t vol_id = H5I_INVALID_HID;
+ hid_t vol_id2 = H5I_INVALID_HID;
+ H5VL_class_t *bad_fake_vol_class = NULL;
TESTING("VOL registration");
@@ -206,6 +209,21 @@ test_vol_registration(void)
if (H5Pclose(lapl_id) < 0)
TEST_ERROR;
+ /* Test registering a VOL connector with an incompatible version # */
+ if (NULL == (bad_fake_vol_class = HDmalloc(sizeof(H5VL_class_t))))
+ TEST_ERROR;
+ HDmemcpy(bad_fake_vol_class, &fake_vol_g, sizeof(H5VL_class_t));
+ bad_fake_vol_class->version = H5VL_VERSION + 1;
+ H5E_BEGIN_TRY
+ {
+ vol_id = H5VLregister_connector(bad_fake_vol_class, H5P_DEFAULT);
+ }
+ H5E_END_TRY;
+ if (H5I_INVALID_HID != vol_id)
+ FAIL_PUTS_ERROR("should not be able to register a connector with an incompatible version #");
+ HDfree(bad_fake_vol_class);
+ bad_fake_vol_class = NULL;
+
/* Load a VOL interface
* The vipl_id does nothing without a VOL that needs it, but we do need to
* test creating a property list of that class and passing it along as a
@@ -282,6 +300,10 @@ test_vol_registration(void)
H5Pclose(vipl_id);
}
H5E_END_TRY;
+
+ if (bad_fake_vol_class)
+ HDfree(bad_fake_vol_class);
+
return FAIL;
} /* end test_vol_registration() */
diff --git a/testpar/t_prop.c b/testpar/t_prop.c
index 92c8bc056a3..a3f1859f051 100644
--- a/testpar/t_prop.c
+++ b/testpar/t_prop.c
@@ -98,10 +98,10 @@ test_plist_ed(void)
int mpi_size, mpi_rank, recv_proc;
hsize_t chunk_size = 16384; /* chunk size */
- double fill = 2.7f; /* Fill value */
+ double fill = 2.7; /* Fill value */
size_t nslots = 521 * 2;
size_t nbytes = 1048576 * 10;
- double w0 = 0.5f;
+ double w0 = 0.5;
unsigned max_compact;
unsigned min_dense;
hsize_t max_size[1]; /*data space maximum size */
@@ -114,26 +114,26 @@ test_plist_ed(void)
TRUE,
FALSE,
(2 * 2048 * 1024),
- 0.3f,
+ 0.3,
(64 * 1024 * 1024),
(4 * 1024 * 1024),
60000,
H5C_incr__threshold,
- 0.8f,
- 3.0f,
+ 0.8,
+ 3.0,
TRUE,
(8 * 1024 * 1024),
H5C_flash_incr__add_space,
- 2.0f,
- 0.25f,
+ 2.0,
+ 0.25,
H5C_decr__age_out_with_threshold,
- 0.997f,
- 0.8f,
+ 0.997,
+ 0.8,
TRUE,
(3 * 1024 * 1024),
3,
FALSE,
- 0.2f,
+ 0.2,
(256 * 2048),
H5AC__DEFAULT_METADATA_WRITE_STRATEGY};
diff --git a/testpar/testphdf5.c b/testpar/testphdf5.c
index 0beb6d7267a..1ead1b826ae 100644
--- a/testpar/testphdf5.c
+++ b/testpar/testphdf5.c
@@ -466,6 +466,8 @@ main(int argc, char **argv)
AddTest("edpl", test_plist_ed, NULL, "encode/decode Property Lists", NULL);
+ AddTest("extlink", external_links, NULL, "test external links", NULL);
+
if ((mpi_size < 2) && MAINPROCESS) {
HDprintf("File Image Ops daisy chain test needs at least 2 processes.\n");
HDprintf("File Image Ops daisy chain test will be skipped \n");
diff --git a/tools/lib/h5diff.c b/tools/lib/h5diff.c
index 57cfaf2d248..0ad319edf80 100644
--- a/tools/lib/h5diff.c
+++ b/tools/lib/h5diff.c
@@ -461,7 +461,7 @@ build_match_list(const char *objname1, trav_info_t *info1, const char *objname2,
done:
*table_out = table;
- H5TOOLS_ENDDEBUG("");
+ H5TOOLS_ENDDEBUG(" ");
}
/*-------------------------------------------------------------------------
@@ -493,7 +493,7 @@ trav_grp_symlinks(const char *path, const H5L_info2_t *linfo, void *udata)
const char * ext_path;
herr_t ret_value = SUCCEED;
- H5TOOLS_START_DEBUG("");
+ H5TOOLS_START_DEBUG(" ");
/* init linkinfo struct */
HDmemset(&lnk_info, 0, sizeof(h5tool_link_info_t));
@@ -577,7 +577,7 @@ trav_grp_symlinks(const char *path, const H5L_info2_t *linfo, void *udata)
done:
if (lnk_info.trg_path)
HDfree(lnk_info.trg_path);
- H5TOOLS_ENDDEBUG("");
+ H5TOOLS_ENDDEBUG(" ");
return ret_value;
}
@@ -627,7 +627,7 @@ h5diff(const char *fname1, const char *fname2, const char *objname1, const char
trav_table_t *match_list = NULL;
diff_err_t ret_value = H5DIFF_NO_ERR;
- H5TOOLS_START_DEBUG("");
+ H5TOOLS_START_DEBUG(" ");
/* init filenames */
HDmemset(filenames, 0, MAX_FILENAME * 2);
/* init link info struct */
diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c
index 945f3a06e45..43ded12bb42 100644
--- a/tools/lib/h5diff_array.c
+++ b/tools/lib/h5diff_array.c
@@ -27,7 +27,7 @@
#define F_FORMAT "%-15g %-15g %-15g\n"
#if H5_SIZEOF_LONG_DOUBLE != 0
-#define LD_FORMAT "%-15Lf %-15Lf %-15Lf\n"
+#define LD_FORMAT "%-15Lg %-15Lg %-15Lg\n"
#endif
#define I_FORMAT "%-15d %-15d %-15d\n"
@@ -42,7 +42,7 @@
#define F_FORMAT_P "%-15.10g %-15.10g %-15.10g %-14.10g\n"
#if H5_SIZEOF_LONG_DOUBLE != 0
-#define LD_FORMAT_P "%-15.10Lf %-15.10Lf %-15.10Lf %-14.10Lf\n"
+#define LD_FORMAT_P "%-15.10Lg %-15.10Lg %-15.10Lg %-14.10Lg\n"
#endif
#define I_FORMAT_P "%-15d %-15d %-15d %-14f\n"
@@ -59,7 +59,7 @@
#define F_FORMAT_P_NOTCOMP "%-15.10g %-15.10g %-15.10g not comparable\n"
#if H5_SIZEOF_LONG_DOUBLE != 0
-#define LD_FORMAT_P_NOTCOMP "%-15.10Lf %-15.10Lf %-15.10Lf not comparable\n"
+#define LD_FORMAT_P_NOTCOMP "%-15.10Lg %-15.10Lg %-15.10Lg not comparable\n"
#endif
#define I_FORMAT_P_NOTCOMP "%-15d %-15d %-15d not comparable\n"
@@ -225,7 +225,7 @@ diff_array(void *_mem1, void *_mem2, diff_opt_t *opts, hid_t container1_id, hid_
mcomp_t members;
H5T_class_t type_class;
- H5TOOLS_START_DEBUG(" - rank:%d hs_nelmts:%ld errstat:%d", opts->rank, opts->hs_nelmts, opts->err_stat);
+ H5TOOLS_START_DEBUG(" - rank:%d hs_nelmts:%lld errstat:%d", opts->rank, opts->hs_nelmts, opts->err_stat);
opts->print_header = 1; /* enable print header */
/* get the size. */
@@ -411,7 +411,7 @@ diff_array(void *_mem1, void *_mem2, diff_opt_t *opts, hid_t container1_id, hid_
HDmemset(&members, 0, sizeof(mcomp_t));
get_member_types(opts->m_tid, &members);
for (i = 0; i < opts->hs_nelmts; i++) {
- H5TOOLS_DEBUG("opts->pos[%ld]:%ld - nelmts:%ld", i, opts->pos[i], opts->hs_nelmts);
+ H5TOOLS_DEBUG("opts->pos[%lld]:%lld - nelmts:%lld", i, opts->pos[i], opts->hs_nelmts);
nfound += diff_datum(mem1 + i * size, mem2 + i * size, i, opts, container1_id, container2_id,
&members);
if (opts->count_bool && nfound >= opts->count)
@@ -419,7 +419,7 @@ diff_array(void *_mem1, void *_mem2, diff_opt_t *opts, hid_t container1_id, hid_
} /* i */
close_member_types(&members);
} /* switch */
- H5TOOLS_ENDDEBUG(":%d - errstat:%d", nfound, opts->err_stat);
+ H5TOOLS_ENDDEBUG(":%lld - errstat:%d", nfound, opts->err_stat);
return nfound;
}
@@ -472,12 +472,10 @@ diff_datum(void *_mem1, void *_mem2, hsize_t elemtno, diff_opt_t *opts, hid_t co
size_t size = 0;
hbool_t iszero1;
hbool_t iszero2;
- hsize_t nfound = 0; /* differences found */
- double per;
- hbool_t both_zero;
+ hsize_t nfound = 0; /* differences found */
diff_err_t ret_value = opts->err_stat;
- H5TOOLS_START_DEBUG("ph:%d elemtno:%d - errstat:%d", opts->print_header, elemtno, opts->err_stat);
+ H5TOOLS_START_DEBUG("ph:%d elemtno:%lld - errstat:%d", opts->print_header, elemtno, opts->err_stat);
type_size = H5Tget_size(opts->m_tid);
type_class = H5Tget_class(opts->m_tid);
@@ -595,8 +593,8 @@ diff_datum(void *_mem1, void *_mem2, hsize_t elemtno, diff_opt_t *opts, hid_t co
* of length of strings.
* For now mimic the previous way.
*/
- H5TOOLS_DEBUG("string size:%d", size1);
- H5TOOLS_DEBUG("string size:%d", size2);
+ H5TOOLS_DEBUG("string size:%ld", size1);
+ H5TOOLS_DEBUG("string size:%ld", size2);
if (size1 != size2) {
H5TOOLS_DEBUG("string sizes difference");
nfound++;
@@ -727,7 +725,7 @@ diff_datum(void *_mem1, void *_mem2, hsize_t elemtno, diff_opt_t *opts, hid_t co
H5TOOLS_DEBUG("H5T_ARRAY ph=%d", opts->print_header);
arr_opts = *opts;
- H5TOOLS_DEBUG("Check opts: hs_nelmts:%ld to %ld rank:%d to %ld", opts->hs_nelmts,
+ H5TOOLS_DEBUG("Check opts: hs_nelmts:%lld to %lld rank:%d to %d", opts->hs_nelmts,
arr_opts.hs_nelmts, opts->rank, arr_opts.rank);
/* get the array's base datatype for each element */
arr_opts.m_tid = H5Tget_super(opts->m_tid);
@@ -1076,7 +1074,7 @@ diff_datum(void *_mem1, void *_mem2, hsize_t elemtno, diff_opt_t *opts, hid_t co
H5TOOLS_INFO("H5Rdestroy H5R_OBJECT1 failed");
if (H5Rdestroy(ref1_buf) < 0)
H5TOOLS_INFO("H5Rdestroy H5R_OBJECT1 failed");
- H5TOOLS_DEBUG("H5T_REFERENCE - H5T_STD_REF complete nfound:%d - errstat:%d", nfound,
+ H5TOOLS_DEBUG("H5T_REFERENCE - H5T_STD_REF complete nfound:%lld - errstat:%d", nfound,
ref_opts.err_stat);
}
/*-------------------------------------------------------------------------
@@ -1288,7 +1286,7 @@ diff_datum(void *_mem1, void *_mem2, hsize_t elemtno, diff_opt_t *opts, hid_t co
done:
opts->err_stat = opts->err_stat | ret_value;
- H5TOOLS_ENDDEBUG(":%d - errstat:%d", nfound, opts->err_stat);
+ H5TOOLS_ENDDEBUG(":%lld - errstat:%d", nfound, opts->err_stat);
return nfound;
}
@@ -1380,7 +1378,7 @@ diff_region(hid_t obj1_id, hid_t obj2_id, hid_t region1_id, hid_t region2_id, di
hsize_t nfound_p = 0; /* point differences found */
hsize_t ret_value = 0;
- H5TOOLS_START_DEBUG("");
+ H5TOOLS_START_DEBUG(" ");
ndims1 = H5Sget_simple_extent_ndims(region1_id);
ndims2 = H5Sget_simple_extent_ndims(region2_id);
@@ -1399,8 +1397,8 @@ diff_region(hid_t obj1_id, hid_t obj2_id, hid_t region1_id, hid_t region2_id, di
npoints2 = H5Sget_select_elem_npoints(region2_id);
}
H5E_END_TRY;
- H5TOOLS_DEBUG("blocks: 1=%ld-2=%ld", nblocks1, nblocks2);
- H5TOOLS_DEBUG("points: 1=%ld-2=%ld", npoints1, npoints2);
+ H5TOOLS_DEBUG("blocks: 1=%lld-2=%lld", nblocks1, nblocks2);
+ H5TOOLS_DEBUG("points: 1=%lld-2=%lld", npoints1, npoints2);
if (nblocks1 != nblocks2 || npoints1 != npoints2 || ndims1 != ndims2) {
opts->not_cmp = 1;
@@ -1563,7 +1561,7 @@ diff_region(hid_t obj1_id, hid_t obj2_id, hid_t region1_id, hid_t region2_id, di
ret_value = nfound_p + nfound_b;
done:
- H5TOOLS_ENDDEBUG(" with diffs:%d", ret_value);
+ H5TOOLS_ENDDEBUG(" with diffs:%lld", ret_value);
return ret_value;
}
@@ -1600,7 +1598,7 @@ character_compare(char *mem1, char *mem2, hsize_t elemtno, size_t u, diff_opt_t
}
nfound++;
}
- H5TOOLS_ENDDEBUG(": %d", nfound);
+ H5TOOLS_ENDDEBUG(": %lld", nfound);
return nfound;
}
@@ -1671,7 +1669,7 @@ character_compare_opt(unsigned char *mem1, unsigned char *mem2, hsize_t elemtno,
nfound++;
}
- H5TOOLS_ENDDEBUG(": %d zero:%d", nfound, both_zero);
+ H5TOOLS_ENDDEBUG(": %lld zero:%d", nfound, both_zero);
return nfound;
}
@@ -1852,7 +1850,7 @@ diff_float_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, d
}
}
- H5TOOLS_ENDDEBUG(": %d zero:%d", nfound, both_zero);
+ H5TOOLS_ENDDEBUG(": %lld zero:%d", nfound, both_zero);
return nfound;
}
@@ -2023,7 +2021,7 @@ diff_double_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx,
nfound++;
}
}
- H5TOOLS_ENDDEBUG(":%d - errstat:%d", nfound, opts->err_stat);
+ H5TOOLS_ENDDEBUG(":%lld - errstat:%d", nfound, opts->err_stat);
return nfound;
}
@@ -2198,7 +2196,7 @@ diff_ldouble_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx,
nfound++;
}
- H5TOOLS_ENDDEBUG(":%d - errstat:%d", nfound, opts->err_stat);
+ H5TOOLS_ENDDEBUG(":%lld - errstat:%d", nfound, opts->err_stat);
return nfound;
}
@@ -2287,7 +2285,7 @@ diff_schar_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, d
nfound++;
}
- H5TOOLS_ENDDEBUG(":%d - errstat:%d", nfound, opts->err_stat);
+ H5TOOLS_ENDDEBUG(":%lld - errstat:%d", nfound, opts->err_stat);
return nfound;
}
@@ -2375,7 +2373,7 @@ diff_uchar_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, d
nfound++;
}
- H5TOOLS_ENDDEBUG(":%d - errstat:%d", nfound, opts->err_stat);
+ H5TOOLS_ENDDEBUG(":%lld - errstat:%d", nfound, opts->err_stat);
return nfound;
}
@@ -2463,7 +2461,7 @@ diff_short_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, d
nfound++;
}
- H5TOOLS_ENDDEBUG(":%d - errstat:%d", nfound, opts->err_stat);
+ H5TOOLS_ENDDEBUG(":%lld - errstat:%d", nfound, opts->err_stat);
return nfound;
}
@@ -2555,7 +2553,7 @@ diff_ushort_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx,
nfound++;
}
- H5TOOLS_ENDDEBUG(":%d - errstat:%d", nfound, opts->err_stat);
+ H5TOOLS_ENDDEBUG(":%lld - errstat:%d", nfound, opts->err_stat);
return nfound;
}
@@ -2643,7 +2641,7 @@ diff_int_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, dif
nfound++;
}
- H5TOOLS_ENDDEBUG(":%d - errstat:%d", nfound, opts->err_stat);
+ H5TOOLS_ENDDEBUG(":%lld - errstat:%d", nfound, opts->err_stat);
return nfound;
}
@@ -2731,7 +2729,7 @@ diff_uint_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, di
nfound++;
}
- H5TOOLS_ENDDEBUG(":%d - errstat:%d", nfound, opts->err_stat);
+ H5TOOLS_ENDDEBUG(":%lld - errstat:%d", nfound, opts->err_stat);
return nfound;
}
@@ -2819,7 +2817,7 @@ diff_long_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, di
nfound++;
}
- H5TOOLS_ENDDEBUG(":%d - errstat:%d", nfound, opts->err_stat);
+ H5TOOLS_ENDDEBUG(":%lld - errstat:%d", nfound, opts->err_stat);
return nfound;
}
@@ -2909,7 +2907,7 @@ diff_ulong_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, d
nfound++;
}
- H5TOOLS_ENDDEBUG(":%d - errstat:%d", nfound, opts->err_stat);
+ H5TOOLS_ENDDEBUG(":%lld - errstat:%d", nfound, opts->err_stat);
return nfound;
}
@@ -3002,7 +3000,7 @@ diff_llong_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, d
}
}
- H5TOOLS_ENDDEBUG(":%d - errstat:%d", nfound, opts->err_stat);
+ H5TOOLS_ENDDEBUG(":%lld - errstat:%d", nfound, opts->err_stat);
return nfound;
}
@@ -3102,7 +3100,7 @@ diff_ullong_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx,
}
}
- H5TOOLS_ENDDEBUG(": %d zero:%d", nfound, both_zero);
+ H5TOOLS_ENDDEBUG(": %lld zero:%d", nfound, both_zero);
return nfound;
}
@@ -3121,7 +3119,7 @@ ull2float(unsigned long long ull_value, float *f_value)
size_t dst_size;
int ret_value = 0;
- H5TOOLS_START_DEBUG("");
+ H5TOOLS_START_DEBUG(" ");
if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
H5TOOLS_GOTO_ERROR(FAIL, "H5Pcreate failed");
@@ -3148,7 +3146,7 @@ ull2float(unsigned long long ull_value, float *f_value)
if (buf)
HDfree(buf);
- H5TOOLS_ENDDEBUG("");
+ H5TOOLS_ENDDEBUG(" ");
return ret_value;
}
@@ -3350,79 +3348,87 @@ print_header(diff_opt_t *opts)
static void
print_pos(diff_opt_t *opts, hsize_t idx, size_t u)
{
- int i, j;
-
- H5TOOLS_START_DEBUG(" -- idx:%ld", idx);
+ H5TOOLS_START_DEBUG(" -- idx:%lld", idx);
if (print_data(opts)) {
+ hsize_t curr_pos = idx;
/* print header */
if (opts->print_header == 1) {
opts->print_header = 0;
-
print_header(opts);
} /* end print header */
H5TOOLS_DEBUG("rank=%d", opts->rank);
if (opts->rank > 0) {
- hsize_t curr_pos = idx;
-
parallel_print("[ ");
- H5TOOLS_DEBUG("do calc_acc_pos[%ld] nelmts:%d - errstat:%d", i, opts->hs_nelmts, opts->err_stat);
-
+ H5TOOLS_DEBUG("do calc_acc_pos[%lld] nelmts:%lld - errstat:%d", idx, opts->hs_nelmts,
+ opts->err_stat);
if (opts->sset[0] != NULL) {
/* Subsetting is used - calculate total position */
- hsize_t elmnt_cnt = 1;
- hsize_t dim_cnt = 0; /* previous dim size */
- hsize_t str_cnt = 0; /* previous dim stride */
- hsize_t curr_idx = idx; /* calculated running position */
- hsize_t str_idx = 0;
- hsize_t blk_idx = 0;
- hsize_t cnt_idx = 0;
- hsize_t hs_idx = 0;
- j = opts->rank - 1;
- do {
- cnt_idx = opts->sset[0]->count.data[j]; /* Count value for current dim */
- H5TOOLS_DEBUG("... sset loop:%d with curr_pos:%ld (curr_idx:%ld) - count:%ld", j,
- curr_pos, curr_idx, cnt_idx);
- blk_idx = opts->sset[0]->block.data[j]; /* Block value for current dim */
- H5TOOLS_DEBUG("... sset loop:%d with curr_pos:%ld (curr_idx:%ld) - block:%ld", j,
- curr_pos, curr_idx, blk_idx);
- hs_idx = cnt_idx * blk_idx; /* hyperslab area value for current dim */
- H5TOOLS_DEBUG("... sset loop:%d with curr_pos:%ld (curr_idx:%ld) - hs:%ld", j, curr_pos,
- curr_idx, hs_idx);
- str_idx = opts->sset[0]->stride.data[j]; /* Stride value for current dim */
- H5TOOLS_DEBUG("... sset loop:%d with curr_pos:%ld (curr_idx:%ld) - stride:%ld", j,
- curr_pos, curr_idx, str_idx);
- elmnt_cnt *= opts->dims[j]; /* Total number of elements in dimension */
- H5TOOLS_DEBUG("... sset loop:%d with elmnt_cnt:%ld", j, elmnt_cnt);
- if (str_idx > blk_idx)
- curr_idx += dim_cnt * (str_idx - blk_idx); /* */
- else if (curr_idx >= hs_idx)
- curr_idx += dim_cnt * str_cnt;
- H5TOOLS_DEBUG("... sset loop:%d with idx:%ld (curr_idx:%ld) - stride:%ld", j, idx,
- curr_idx, str_idx);
- dim_cnt = elmnt_cnt; /* */
- if (str_idx > blk_idx)
- str_cnt = str_idx - blk_idx; /* */
- else
- str_cnt = str_idx; /* */
- H5TOOLS_DEBUG("... sset loop:%d with dim_cnt:%ld - str_cnt:%ld", j, dim_cnt, str_cnt);
- j--;
- } while (curr_idx >= elmnt_cnt && j >= 0);
- curr_pos = curr_idx; /* New current position */
- H5TOOLS_DEBUG("pos loop:%d,%d with elmnt_cnt:%ld - curr_pos:%ld", i, j, elmnt_cnt, curr_pos);
- } /* if (opts->sset[0] != NULL) */
+ hsize_t curr_idx = 0; /* current pos in the selection space for each dimension */
+
+ curr_pos = 0; /* current position in full space */
+ if (curr_idx < idx) {
+ int j;
+ hsize_t count;
+ hsize_t block;
+ hsize_t stride;
+ hsize_t tmp = 0;
+ hsize_t k0 = 0; /* whole location beyond current dimension */
+ hsize_t k1 = 0; /* partial location within dimension */
+ hsize_t dim_size = 0; /* previous dim size */
+ hsize_t prev_dim_size = 0; /* previous dim size */
+ hsize_t total_dim_size = 1; /* current dim size */
+ hsize_t prev_total_dim_size = 1; /* current dim size */
+
+ prev_dim_size = 1;
+ total_dim_size = 1;
+ curr_idx = idx;
+ /* begin with fastest changing dimension */
+ for (int i = 0; i < opts->rank; i++) {
+ j = opts->rank - i - 1;
+ prev_total_dim_size *= prev_dim_size;
+ dim_size = opts->dims[j];
+ H5TOOLS_DEBUG("j=%d, dim_size=%lld, prev_dim_size=%lld, total_dim_size=%lld, "
+ "prev_total_dim_size=%lld",
+ j, dim_size, prev_dim_size, total_dim_size, prev_total_dim_size);
+ count = opts->sset[0]->count.data[j];
+ block = opts->sset[0]->block.data[j];
+ stride = opts->sset[0]->stride.data[j];
+ H5TOOLS_DEBUG("stride=%lld, count=%lld, block=%lld", stride, count, block);
+ tmp = count * block;
+ k0 = curr_idx / tmp;
+ k1 = curr_idx % tmp;
+ curr_pos += k1 * stride * prev_total_dim_size;
+ H5TOOLS_DEBUG("curr_idx=%lld, k0=%lld, k1=%lld, curr_pos=%lld", curr_idx, k0, k1,
+ curr_pos);
+ if (k0 > 0)
+ curr_idx = k0 * total_dim_size;
+ H5TOOLS_DEBUG("curr_idx=%lld, tmp=%lld", curr_idx, tmp);
+ total_dim_size *= dim_size;
+ /* if last calculation exists within in current dimension */
+ if (k0 == 0)
+ break;
+ H5TOOLS_DEBUG("j=%d, curr_pos=%lld", j, curr_pos);
+ prev_dim_size = dim_size;
+ }
+ /* check if there is a final calculation needed for slowest changing dimension */
+ if (k0 > 0)
+ curr_pos += k0 * stride * prev_total_dim_size;
+ H5TOOLS_DEBUG("4:curr_idx=%lld, curr_pos=%lld", curr_idx, curr_pos);
+ }
+ }
/*
* Calculate the number of elements represented by a unit change in a
* certain index position.
*/
calc_acc_pos((unsigned)opts->rank, curr_pos, opts->acc, opts->pos);
- for (i = 0; i < opts->rank; i++) {
- H5TOOLS_DEBUG("pos loop:%d with opts->pos=%ld opts->sm_pos=%ld", i, opts->pos[i],
+ for (int i = 0; i < opts->rank; i++) {
+ H5TOOLS_DEBUG("pos loop:%d with opts->pos=%lld opts->sm_pos=%lld", i, opts->pos[i],
opts->sm_pos[i]);
opts->pos[i] += (unsigned long)opts->sm_pos[i];
- H5TOOLS_DEBUG("pos loop:%d with opts->pos=%ld", i, opts->pos[i]);
+ H5TOOLS_DEBUG("pos loop:%d with opts->pos=%lld", i, opts->pos[i]);
parallel_print(HSIZE_T_FORMAT, (unsigned long long)opts->pos[i]);
parallel_print(" ");
}
@@ -3441,7 +3447,7 @@ print_pos(diff_opt_t *opts, hsize_t idx, size_t u)
parallel_print(SPACES);
}
- H5TOOLS_ENDDEBUG("");
+ H5TOOLS_ENDDEBUG(" ");
}
/*-------------------------------------------------------------------------
@@ -3523,8 +3529,6 @@ get_member_types(hid_t tid, mcomp_t *members)
get_member_types(members->ids[u], members->m[u]);
}
}
-
- return;
}
/*-------------------------------------------------------------------------
diff --git a/tools/lib/h5diff_dset.c b/tools/lib/h5diff_dset.c
index b0726ec15b7..e6872f0c08f 100644
--- a/tools/lib/h5diff_dset.c
+++ b/tools/lib/h5diff_dset.c
@@ -961,7 +961,7 @@ diff_can_type(hid_t f_tid1, hid_t f_tid2, int rank1, int rank2, hsize_t *dims1,
int i;
int ret_value = 1;
- H5TOOLS_START_DEBUG("");
+ H5TOOLS_START_DEBUG(" ");
/*-------------------------------------------------------------------------
* check for the same class
*-------------------------------------------------------------------------
diff --git a/tools/lib/h5diff_util.c b/tools/lib/h5diff_util.c
index 3e248027f62..e487a12fad9 100644
--- a/tools/lib/h5diff_util.c
+++ b/tools/lib/h5diff_util.c
@@ -339,7 +339,7 @@ match_up_memsize(hid_t f_tid1_id, hid_t f_tid2_id, hid_t *m_tid1, hid_t *m_tid2,
{
herr_t ret_value = SUCCEED;
- H5TOOLS_START_DEBUG("");
+ H5TOOLS_START_DEBUG(" ");
if ((*m_size1) != (*m_size2)) {
if ((*m_size1) < (*m_size2)) {
H5Tclose(*m_tid1);
@@ -362,6 +362,6 @@ match_up_memsize(hid_t f_tid1_id, hid_t f_tid2_id, hid_t *m_tid1, hid_t *m_tid2,
H5TOOLS_GOTO_ERROR(FAIL, "native type sizes do not compare");
done:
- H5TOOLS_ENDDEBUG("");
+ H5TOOLS_ENDDEBUG(" ");
return ret_value;
}
diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c
index 3f955054cd2..5e609415550 100644
--- a/tools/lib/h5tools.c
+++ b/tools/lib/h5tools.c
@@ -1189,7 +1189,7 @@ h5tools_simple_prefix(FILE *stream, const h5tool_format_t *info, h5tools_context
if (!ctx->need_prefix)
return;
- H5TOOLS_START_DEBUG("");
+ H5TOOLS_START_DEBUG(" ");
HDmemset(&prefix, 0, sizeof(h5tools_str_t));
HDmemset(&str, 0, sizeof(h5tools_str_t));
@@ -1258,7 +1258,7 @@ h5tools_simple_prefix(FILE *stream, const h5tool_format_t *info, h5tools_context
h5tools_str_close(&prefix);
h5tools_str_close(&str);
- H5TOOLS_ENDDEBUG("");
+ H5TOOLS_ENDDEBUG(" ");
}
/*-------------------------------------------------------------------------
@@ -1504,7 +1504,7 @@ h5tools_render_element(FILE *stream, const h5tool_format_t *info, h5tools_contex
ctx->prev_multiline = multiline;
- H5TOOLS_ENDDEBUG("");
+ H5TOOLS_ENDDEBUG(" ");
return dimension_break;
}
@@ -1545,7 +1545,7 @@ h5tools_render_region_element(FILE *stream, const h5tool_format_t *info, h5tools
int secnum; /* section sequence number */
int multiline; /* datum was multiline */
- H5TOOLS_START_DEBUG("");
+ H5TOOLS_START_DEBUG(" ");
H5TOOLS_DEBUG("elmt_counter=%ld - local_elmt_counter=%ld", elmt_counter, local_elmt_counter);
s = h5tools_str_fmt(buffer, (size_t)0, "%s");
@@ -1658,7 +1658,7 @@ h5tools_render_region_element(FILE *stream, const h5tool_format_t *info, h5tools
ctx->prev_multiline = multiline;
- H5TOOLS_ENDDEBUG("");
+ H5TOOLS_ENDDEBUG(" ");
return dimension_break;
}
@@ -1677,7 +1677,7 @@ init_acc_pos(unsigned ndims, const hsize_t *dims, hsize_t *acc, hsize_t *pos, hs
int i;
unsigned j;
- H5TOOLS_START_DEBUG("");
+ H5TOOLS_START_DEBUG(" ");
for (i = 0; (unsigned)i < ndims; i++)
p_min_idx[i] = 0;
@@ -1692,7 +1692,7 @@ init_acc_pos(unsigned ndims, const hsize_t *dims, hsize_t *acc, hsize_t *pos, hs
pos[j] = 0;
}
- H5TOOLS_ENDDEBUG("");
+ H5TOOLS_ENDDEBUG(" ");
}
/*-------------------------------------------------------------------------
@@ -1710,7 +1710,7 @@ calc_acc_pos(unsigned ndims, hsize_t elmtno, const hsize_t *acc, hsize_t *pos)
int i;
hsize_t curr_pos = elmtno;
- H5TOOLS_START_DEBUG("");
+ H5TOOLS_START_DEBUG(" ");
if (ndims > 0) {
for (i = 0; i < (int)ndims; i++) {
@@ -1725,7 +1725,7 @@ calc_acc_pos(unsigned ndims, hsize_t elmtno, const hsize_t *acc, hsize_t *pos)
}
}
- H5TOOLS_ENDDEBUG("");
+ H5TOOLS_ENDDEBUG(" ");
return curr_pos;
}
@@ -1749,7 +1749,7 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t
hbool_t past_catch = FALSE;
int ret_value = 0;
- H5TOOLS_START_DEBUG("");
+ H5TOOLS_START_DEBUG(" ");
if ((size = H5Tget_size(tid)) == 0)
H5TOOLS_THROW((-1), "H5Tget_size failed");
@@ -1841,7 +1841,7 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t
} break;
case H5T_ARRAY: {
int k, ndims;
- hsize_t dims[H5S_MAX_RANK], temp_nelmts, nelmts;
+ hsize_t dims[H5S_MAX_RANK], temp_nelmts, nelmts = 0;
hid_t memb = H5I_INVALID_HID;
H5TOOLS_DEBUG("H5T_ARRAY");
@@ -1959,7 +1959,7 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t
} /* end switch */
CATCH
- H5TOOLS_ENDDEBUG("");
+ H5TOOLS_ENDDEBUG(" ");
return ret_value;
}
@@ -1992,7 +1992,7 @@ render_bin_output_region_data_blocks(hid_t region_id, FILE *stream, hid_t contai
hid_t sid1 = H5I_INVALID_HID;
int ret_value = -1;
- H5TOOLS_START_DEBUG("");
+ H5TOOLS_START_DEBUG(" ");
/* Get the dataspace of the dataset */
if ((sid1 = H5Dget_space(region_id)) < 0)
H5TOOLS_THROW((-1), "H5Dget_space failed");
@@ -2058,7 +2058,7 @@ done:;
if (H5Sclose(sid1) < 0)
H5TOOLS_ERROR((-1), "H5Sclose failed");
- H5TOOLS_ENDDEBUG("");
+ H5TOOLS_ENDDEBUG(" ");
return ret_value;
}
@@ -2086,7 +2086,7 @@ render_bin_output_region_blocks(hid_t region_space, hid_t region_id, FILE *strea
hbool_t past_catch = FALSE;
hbool_t ret_value = TRUE;
- H5TOOLS_START_DEBUG("");
+ H5TOOLS_START_DEBUG(" ");
if ((snblocks = H5Sget_select_hyper_nblocks(region_space)) <= 0)
H5TOOLS_THROW(FALSE, "H5Sget_select_hyper_nblocks failed");
nblocks = (hsize_t)snblocks;
@@ -2122,7 +2122,7 @@ render_bin_output_region_blocks(hid_t region_space, hid_t region_id, FILE *strea
H5_LEAVE(TRUE)
CATCH
- H5TOOLS_ENDDEBUG("");
+ H5TOOLS_ENDDEBUG(" ");
return ret_value;
}
@@ -2153,7 +2153,7 @@ render_bin_output_region_data_points(hid_t region_space, hid_t region_id, FILE *
void * region_buf = NULL;
int ret_value = 0;
- H5TOOLS_START_DEBUG("");
+ H5TOOLS_START_DEBUG(" ");
if ((type_size = H5Tget_size(type_id)) == 0)
H5TOOLS_GOTO_ERROR((-1), "H5Tget_size failed");
@@ -2183,7 +2183,7 @@ render_bin_output_region_data_points(hid_t region_space, hid_t region_id, FILE *
if (H5Sclose(mem_space) < 0)
H5TOOLS_ERROR((-1), "H5Sclose failed");
- H5TOOLS_ENDDEBUG("");
+ H5TOOLS_ENDDEBUG(" ");
return ret_value;
}
@@ -2209,7 +2209,7 @@ render_bin_output_region_points(hid_t region_space, hid_t region_id, FILE *strea
hbool_t past_catch = FALSE;
hbool_t ret_value = TRUE;
- H5TOOLS_START_DEBUG("");
+ H5TOOLS_START_DEBUG(" ");
if ((snpoints = H5Sget_select_elem_npoints(region_space)) <= 0)
H5TOOLS_THROW(FALSE, "H5Sget_select_elem_npoints failed");
npoints = (hsize_t)snpoints;
@@ -2236,7 +2236,7 @@ render_bin_output_region_points(hid_t region_space, hid_t region_id, FILE *strea
H5_LEAVE(ret_value)
CATCH
- H5TOOLS_ENDDEBUG("");
+ H5TOOLS_ENDDEBUG(" ");
return ret_value;
}
diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c
index 190325fca50..cb4f9d2a4e5 100644
--- a/tools/lib/h5tools_dump.c
+++ b/tools/lib/h5tools_dump.c
@@ -465,7 +465,7 @@ h5tools_dump_region_attribute(hid_t region_id, FILE *stream, const h5tool_format
CATCH
- H5TOOLS_ENDDEBUG("");
+ H5TOOLS_ENDDEBUG(" ");
return ret_value;
}
@@ -522,7 +522,7 @@ h5tools_print_region_data_blocks(hid_t region_id, FILE *stream, const h5tool_for
HDmemset(&ctx, 0, sizeof(ctx));
- H5TOOLS_START_DEBUG("");
+ H5TOOLS_START_DEBUG(" ");
if ((type_size = H5Tget_size(type_id)) == 0)
H5TOOLS_THROW(FAIL, "H5Tget_size failed");
@@ -642,7 +642,7 @@ h5tools_print_region_data_blocks(hid_t region_id, FILE *stream, const h5tool_for
if (H5Sclose(sid1) < 0)
H5TOOLS_ERROR(FAIL, "H5Sclose failed");
CATCH
- H5TOOLS_ENDDEBUG("");
+ H5TOOLS_ENDDEBUG(" ");
return ret_value;
}
@@ -696,7 +696,7 @@ h5tools_dump_region_data_blocks(hid_t region_space, hid_t region_id, FILE *strea
HDassert(ctx);
HDassert(buffer);
- H5TOOLS_START_DEBUG("");
+ H5TOOLS_START_DEBUG(" ");
outputformat = *info;
outputformat.idx_fmt = "";
outputformat.idx_n_fmt = "";
@@ -865,7 +865,7 @@ h5tools_dump_region_data_blocks(hid_t region_space, hid_t region_id, FILE *strea
CATCH
- H5TOOLS_ENDDEBUG("");
+ H5TOOLS_ENDDEBUG(" ");
return ret_value;
}
@@ -915,7 +915,7 @@ h5tools_print_region_data_points(hid_t region_space, hid_t region_id, FILE *stre
HDassert(ptdata);
HDassert(ndims > 0);
- H5TOOLS_START_DEBUG("");
+ H5TOOLS_START_DEBUG(" ");
HDmemset(&ctx, 0, sizeof(ctx));
/* Allocate space for the dimension array */
@@ -1001,7 +1001,7 @@ h5tools_print_region_data_points(hid_t region_space, hid_t region_id, FILE *stre
if (H5Sclose(mem_space) < 0)
H5TOOLS_ERROR((-1), "H5Sclose failed");
- H5TOOLS_ENDDEBUG("");
+ H5TOOLS_ENDDEBUG(" ");
return ret_value;
}
@@ -1053,7 +1053,7 @@ h5tools_dump_region_data_points(hid_t region_space, hid_t region_id, FILE *strea
HDassert(ctx);
HDassert(buffer);
- H5TOOLS_START_DEBUG("");
+ H5TOOLS_START_DEBUG(" ");
outputformat = *info;
outputformat.idx_fmt = "";
outputformat.idx_n_fmt = "";
@@ -1217,7 +1217,7 @@ h5tools_dump_region_data_points(hid_t region_space, hid_t region_id, FILE *strea
H5_LEAVE(dimension_break)
CATCH
- H5TOOLS_ENDDEBUG("");
+ H5TOOLS_ENDDEBUG(" ");
return ret_value;
}
@@ -1284,7 +1284,7 @@ h5tools_print_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_c
unsigned int vl_data = 0; /* contains VL datatypes */
herr_t ret_value = SUCCEED;
- H5TOOLS_START_DEBUG("");
+ H5TOOLS_START_DEBUG(" ");
if ((size_t)ctx->ndims > NELMTS(sm_size))
H5TOOLS_THROW(FAIL, "ndims and sm_size comparision failed");
@@ -1398,7 +1398,7 @@ h5tools_print_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_c
if (sm_buf)
HDfree(sm_buf);
- H5TOOLS_ENDDEBUG("");
+ H5TOOLS_ENDDEBUG(" ");
return ret_value;
}
@@ -1583,7 +1583,7 @@ h5tools_dump_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_co
hbool_t past_catch = FALSE;
herr_t ret_value = SUCCEED;
- H5TOOLS_START_DEBUG("");
+ H5TOOLS_START_DEBUG(" ");
if ((f_space = H5Dget_space(dset)) < 0)
H5TOOLS_THROW(FAIL, "H5Dget_space failed");
@@ -1607,7 +1607,7 @@ h5tools_dump_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_co
if (f_space >= 0 && H5Sclose(f_space) < 0)
H5TOOLS_THROW(FAIL, "H5Sclose failed");
- H5TOOLS_ENDDEBUG("");
+ H5TOOLS_ENDDEBUG(" ");
return ret_value;
}
@@ -1660,7 +1660,7 @@ h5tools_dump_simple_dset(FILE *stream, const h5tool_format_t *info, h5tools_cont
unsigned int vl_data = 0; /* contains VL datatypes */
int ret_value = 0;
- H5TOOLS_START_DEBUG("");
+ H5TOOLS_START_DEBUG(" ");
if (H5I_INVALID_HID == (f_space = H5Dget_space(dset)))
H5TOOLS_GOTO_ERROR((-1), "H5Dget_space failed");
@@ -1795,7 +1795,7 @@ h5tools_dump_simple_dset(FILE *stream, const h5tool_format_t *info, h5tools_cont
if (f_space >= 0 && H5Sclose(f_space) < 0)
H5TOOLS_ERROR((-1), "H5Sclose failed");
CATCH
- H5TOOLS_ENDDEBUG("");
+ H5TOOLS_ENDDEBUG(" ");
return ret_value;
}
@@ -1826,7 +1826,7 @@ h5tools_dump_simple_mem(FILE *stream, const h5tool_format_t *info, h5tools_conte
/* VL data special information */
unsigned int vl_data = 0; /* contains VL datatypes */
- H5TOOLS_START_DEBUG("");
+ H5TOOLS_START_DEBUG(" ");
if (H5I_INVALID_HID == (f_space = H5Aget_space(attr_id)))
H5TOOLS_GOTO_ERROR((-1), "H5Dget_space failed");
@@ -1885,7 +1885,7 @@ h5tools_dump_simple_mem(FILE *stream, const h5tool_format_t *info, h5tools_conte
if (f_space >= 0 && H5Sclose(f_space) < 0)
H5TOOLS_ERROR((-1), "H5Sclose failed");
CATCH
- H5TOOLS_ENDDEBUG("");
+ H5TOOLS_ENDDEBUG(" ");
return ret_value;
}
@@ -1917,7 +1917,7 @@ h5tools_dump_dset(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
h5tool_format_t info_dflt;
int ret_value = 0;
- H5TOOLS_START_DEBUG("");
+ H5TOOLS_START_DEBUG(" ");
/* Use default values */
if (!stream)
stream = rawoutstream;
@@ -1969,7 +1969,7 @@ h5tools_dump_dset(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
if (f_space > 0)
H5Sclose(f_space);
- H5TOOLS_ENDDEBUG("");
+ H5TOOLS_ENDDEBUG(" ");
return ret_value;
}
@@ -1993,7 +1993,7 @@ h5tools_dump_mem(FILE *stream, const h5tool_format_t *info, h5tools_context_t *c
h5tool_format_t info_dflt;
int ret_value = 0;
- H5TOOLS_START_DEBUG("");
+ H5TOOLS_START_DEBUG(" ");
/* Use default values */
if (!stream)
stream = rawoutstream;
@@ -2039,7 +2039,7 @@ h5tools_dump_mem(FILE *stream, const h5tool_format_t *info, h5tools_context_t *c
if (f_space > 0)
H5Sclose(f_space);
- H5TOOLS_ENDDEBUG("");
+ H5TOOLS_ENDDEBUG(" ");
return ret_value;
}
@@ -2082,7 +2082,7 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_
const char *order_s = NULL; /* byte order string */
int ret_value = 0;
- H5TOOLS_START_DEBUG("");
+ H5TOOLS_START_DEBUG(" ");
if ((type_class = H5Tget_class(type)) < 0)
H5TOOLS_THROW((-1), "H5Tget_class failed");
if (object_search && H5Tcommitted(type) > 0) {
@@ -2197,9 +2197,10 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_
else
sign_s = " unknown-sign";
- /* print size, order, and sign */
- h5tools_str_append(buffer, "%lu-bit%s%s integer", (unsigned long)(8 * H5Tget_size(type)),
- order_s, sign_s);
+ /* print size, order, sign, and precision */
+ h5tools_str_append(buffer, "%lu-bit%s%s integer %lu-bit precision",
+ (unsigned long)(8 * H5Tget_size(type)), order_s, sign_s,
+ H5Tget_precision(type));
}
break;
@@ -2220,10 +2221,6 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_
h5tools_str_append(buffer, "H5T_NATIVE_FLOAT");
else if (H5Tequal(type, H5T_NATIVE_DOUBLE) == TRUE)
h5tools_str_append(buffer, "H5T_NATIVE_DOUBLE");
-#if H5_SIZEOF_LONG_DOUBLE != 0
- else if (H5Tequal(type, H5T_NATIVE_LDOUBLE) == TRUE)
- h5tools_str_append(buffer, "H5T_NATIVE_LDOUBLE");
-#endif
else {
/* print what the library knows */
/* byte order */
@@ -2241,9 +2238,9 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_
else
order_s = "";
- /* print size and byte order */
- h5tools_str_append(buffer, "%lu-bit%s floating-point", (unsigned long)(8 * H5Tget_size(type)),
- order_s);
+ /* print size. byte order, and precision */
+ h5tools_str_append(buffer, "%lu-bit%s floating-point %lu-bit precision",
+ (unsigned long)(8 * H5Tget_size(type)), order_s, H5Tget_precision(type));
}
break;
@@ -2644,7 +2641,7 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_
}
CATCH
- H5TOOLS_ENDDEBUG("");
+ H5TOOLS_ENDDEBUG(" ");
return ret_value;
}
@@ -2670,7 +2667,7 @@ h5tools_print_dataspace(h5tools_str_t *buffer, hid_t space)
int i;
int ret_value = 0;
- H5TOOLS_START_DEBUG("");
+ H5TOOLS_START_DEBUG(" ");
if ((ndims = H5Sget_simple_extent_dims(space, size, maxsize)) < 0)
H5TOOLS_THROW((-1), "H5Sget_simple_extent_dims failed");
@@ -2724,7 +2721,7 @@ h5tools_print_dataspace(h5tools_str_t *buffer, hid_t space)
} /* end switch */
CATCH
- H5TOOLS_ENDDEBUG("");
+ H5TOOLS_ENDDEBUG(" ");
return ret_value;
}
@@ -2759,7 +2756,7 @@ h5tools_print_enum(FILE *stream, h5tools_str_t *buffer, const h5tool_format_t *i
hbool_t past_catch = FALSE;
int ret_value = 0;
- H5TOOLS_START_DEBUG("");
+ H5TOOLS_START_DEBUG(" ");
if (info->line_ncols > 0)
ncols = info->line_ncols;
@@ -2871,7 +2868,7 @@ h5tools_print_enum(FILE *stream, h5tools_str_t *buffer, const h5tool_format_t *i
if (0 == nmembs)
h5tools_str_append(buffer, "\n");
- H5TOOLS_ENDDEBUG("");
+ H5TOOLS_ENDDEBUG(" ");
return ret_value;
}
@@ -3301,8 +3298,8 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
(hsize_t)0);
}
else {
- haddr_t ioffset;
- hbool_t supported = FALSE;
+ haddr_t ioffset;
+ uint64_t supported = 0;
/* NORMAL FILE */
@@ -3325,7 +3322,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
*/
H5VLquery_optional(dset_id, H5VL_SUBCLS_DATASET, H5VL_NATIVE_DATASET_GET_OFFSET, &supported);
- if (supported) {
+ if (supported & H5VL_OPT_QUERY_SUPPORTED) {
ctx->need_prefix = TRUE;
@@ -3780,12 +3777,12 @@ h5tools_dump_comment(FILE *stream, const h5tool_format_t *info, h5tools_context_
* instead of the current stripmine position i; this is necessary
* to print the array indices
*/
- hbool_t supported = FALSE;
+ uint64_t supported = 0;
/* Check if comments are supported and return if not */
H5VLquery_optional(obj_id, H5VL_SUBCLS_OBJECT, H5VL_NATIVE_OBJECT_GET_COMMENT, &supported);
- if (!supported)
+ if (!(supported & H5VL_OPT_QUERY_SUPPORTED))
return;
/* setup */
@@ -4072,7 +4069,7 @@ h5tools_dump_reference(FILE *stream, const h5tool_format_t *info, h5tools_contex
h5tools_str_t buffer; /* string into which to render */
h5tools_context_t datactx; /* print context */
- H5TOOLS_START_DEBUG("");
+ H5TOOLS_START_DEBUG(" ");
datactx = *ctx; /* print context */
/* Assume entire data space to be printed */
@@ -4279,7 +4276,7 @@ h5tools_dump_reference(FILE *stream, const h5tool_format_t *info, h5tools_contex
h5tools_str_close(&buffer);
- H5TOOLS_ENDDEBUG("");
+ H5TOOLS_ENDDEBUG(" ");
}
/*-------------------------------------------------------------------------
@@ -4496,5 +4493,5 @@ h5tools_dump_data(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
}
h5tools_str_close(&buffer);
- H5TOOLS_ENDDEBUG("");
+ H5TOOLS_ENDDEBUG(" ");
}
diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c
index 8973b2dba2f..5fcaee63aa4 100644
--- a/tools/lib/h5tools_str.c
+++ b/tools/lib/h5tools_str.c
@@ -287,7 +287,7 @@ h5tools_str_prefix(h5tools_str_t *str /*in,out*/, const h5tool_format_t *info, h
{
size_t i = 0;
- H5TOOLS_START_DEBUG("");
+ H5TOOLS_START_DEBUG(" ");
H5TOOLS_DEBUG("elmtno=%ld, ctx->ndims=%d", elmtno, ctx->ndims);
h5tools_str_reset(str);
@@ -306,7 +306,7 @@ h5tools_str_prefix(h5tools_str_t *str /*in,out*/, const h5tool_format_t *info, h
h5tools_str_append(str, OPT(info->idx_n_fmt, HSIZE_T_FORMAT), (hsize_t)elmtno);
H5TOOLS_DEBUG("str=%s", str->s);
- H5TOOLS_ENDDEBUG("");
+ H5TOOLS_ENDDEBUG(" ");
/* Add prefix and suffix to the index */
return h5tools_str_fmt(str, (size_t)0, OPT(info->idx_fmt, "%s: "));
@@ -327,7 +327,7 @@ h5tools_str_region_prefix(h5tools_str_t *str /*in,out*/, const h5tool_format_t *
{
size_t i = 0;
- H5TOOLS_START_DEBUG("");
+ H5TOOLS_START_DEBUG(" ");
H5TOOLS_DEBUG("elmtno=%ld, ctx->ndims=%d", elmtno, ctx->ndims);
h5tools_str_reset(str);
@@ -347,7 +347,7 @@ h5tools_str_region_prefix(h5tools_str_t *str /*in,out*/, const h5tool_format_t *
h5tools_str_append(str, OPT(info->idx_n_fmt, HSIZE_T_FORMAT), (hsize_t)0);
H5TOOLS_DEBUG("str=%s", str->s);
- H5TOOLS_ENDDEBUG("");
+ H5TOOLS_ENDDEBUG(" ");
/* Add prefix and suffix to the index */
return h5tools_str_fmt(str, (size_t)0, OPT(info->idx_fmt, "%s: "));
@@ -657,7 +657,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
H5T_class_t type_class;
char * ret_value = NULL;
- H5TOOLS_START_DEBUG("");
+ H5TOOLS_START_DEBUG(" ");
/* Build default formats for long long types */
if (!fmt_llong[0]) {
HDsnprintf(fmt_llong, sizeof(fmt_llong), "%%%sd", H5_PRINTF_LL_WIDTH);
@@ -711,9 +711,18 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
long double templdouble;
HDmemcpy(&templdouble, vp, sizeof(long double));
- h5tools_str_append(str, OPT(info->fmt_double, "%Lf"), templdouble);
+ h5tools_str_append(str, "%Lg", templdouble);
#endif
}
+ else {
+ size_t i;
+
+ for (i = 0; i < nsize; i++) {
+ if (i)
+ h5tools_str_append(str, ":");
+ h5tools_str_append(str, OPT(info->fmt_raw, "%02x"), ucp_vp[i]);
+ }
+ }
break;
case H5T_STRING: {
@@ -1330,7 +1339,7 @@ h5tools_str_sprint_reference(h5tools_str_t *str, H5R_ref_t *ref_vp)
{
ssize_t buf_size;
- H5TOOLS_START_DEBUG("");
+ H5TOOLS_START_DEBUG(" ");
h5tools_str_append(str, " \"");
buf_size = H5Rget_file_name(ref_vp, NULL, 0);
@@ -1372,7 +1381,7 @@ h5tools_str_sprint_reference(h5tools_str_t *str, H5R_ref_t *ref_vp)
}
h5tools_str_append(str, "\"");
- H5TOOLS_ENDDEBUG("");
+ H5TOOLS_ENDDEBUG(" ");
}
/*-------------------------------------------------------------------------
diff --git a/tools/lib/h5tools_utils.c b/tools/lib/h5tools_utils.c
index 18f5a62dfa6..6aec6b8e03f 100644
--- a/tools/lib/h5tools_utils.c
+++ b/tools/lib/h5tools_utils.c
@@ -194,44 +194,48 @@ get_option(int argc, const char **argv, const char *opts, const struct long_opti
if (sp == 1 && argv[opt_ind][0] == '-' && argv[opt_ind][1] == '-') {
/* long command line option */
- const char *arg = &argv[opt_ind][2];
- int i;
+ int i;
+ const char ch = '=';
+ char * arg = HDstrdup(&argv[opt_ind][2]);
+ size_t arg_len = 0;
+
+ opt_arg = strchr(&argv[opt_ind][2], ch);
+ arg_len = HDstrlen(&argv[opt_ind][2]);
+ if (opt_arg) {
+ arg_len -= HDstrlen(opt_arg);
+ opt_arg++; /* skip the equal sign */
+ }
+ arg[arg_len] = 0;
for (i = 0; l_opts && l_opts[i].name; i++) {
- size_t len = HDstrlen(l_opts[i].name);
-
- if (HDstrncmp(arg, l_opts[i].name, len) == 0) {
+ if (HDstrcmp(arg, l_opts[i].name) == 0) {
/* we've found a matching long command line flag */
opt_opt = l_opts[i].shortval;
if (l_opts[i].has_arg != no_arg) {
- if (arg[len] == '=') {
- opt_arg = &arg[len + 1];
- }
- else if (l_opts[i].has_arg != optional_arg) {
- if (opt_ind < (argc - 1))
- if (argv[opt_ind + 1][0] != '-')
- opt_arg = argv[++opt_ind];
- }
- else if (l_opts[i].has_arg == require_arg) {
- if (opt_err)
- HDfprintf(rawerrorstream, "%s: option required for \"--%s\" flag\n", argv[0],
- arg);
-
- opt_opt = '?';
+ if (opt_arg == NULL) {
+ if (l_opts[i].has_arg != optional_arg) {
+ if (opt_ind < (argc - 1))
+ if (argv[opt_ind + 1][0] != '-')
+ opt_arg = argv[++opt_ind];
+ }
+ else if (l_opts[i].has_arg == require_arg) {
+ if (opt_err)
+ HDfprintf(rawerrorstream, "%s: option required for \"--%s\" flag\n", argv[0],
+ arg);
+
+ opt_opt = '?';
+ }
}
- else
- opt_arg = NULL;
}
else {
- if (arg[len] == '=') {
+ if (opt_arg) {
if (opt_err)
HDfprintf(rawerrorstream, "%s: no option required for \"%s\" flag\n", argv[0],
arg);
opt_opt = '?';
}
- opt_arg = NULL;
}
break;
}
@@ -247,6 +251,8 @@ get_option(int argc, const char **argv, const char *opts, const struct long_opti
opt_ind++;
sp = 1;
+
+ HDfree(arg);
}
else {
register char *cp; /* pointer into current token */
diff --git a/tools/src/h5diff/h5diff_common.c b/tools/src/h5diff/h5diff_common.c
index b0e0cde49f3..1b8182406a7 100644
--- a/tools/src/h5diff/h5diff_common.c
+++ b/tools/src/h5diff/h5diff_common.c
@@ -25,7 +25,7 @@ static int check_d_input(const char *);
* Command-line options: The user can specify short or long-named
* parameters.
*/
-static const char * s_opts = "hVrv:qn:d:p:NcelxE:A:S";
+static const char * s_opts = "hVrv*qn:d:p:NcelxE:A:S";
static struct long_options l_opts[] = {{"help", no_arg, 'h'},
{"version", no_arg, 'V'},
{"report", no_arg, 'r'},
@@ -138,7 +138,7 @@ parse_hsize_list(const char *h_list, subset_d *d)
}
d->data = p_list;
d->len = size_count;
- H5TOOLS_ENDDEBUG("");
+ H5TOOLS_ENDDEBUG(" ");
}
/*-------------------------------------------------------------------------
@@ -187,7 +187,7 @@ parse_subset_params(const char *dset)
parse_hsize_list(brace, &s->block);
}
- H5TOOLS_ENDDEBUG("");
+ H5TOOLS_ENDDEBUG(" ");
return s;
}
@@ -208,7 +208,7 @@ parse_command_line(int argc, const char *argv[], const char **fname1, const char
struct exclude_path_list *exclude_head, *exclude_prev, *exclude_node;
struct exclude_path_list *exclude_attr_head, *exclude_attr_prev, *exclude_attr_node;
- H5TOOLS_START_DEBUG("");
+ H5TOOLS_START_DEBUG(" ");
/* process the command-line */
HDmemset(opts, 0, sizeof(diff_opt_t));
@@ -251,33 +251,27 @@ parse_command_line(int argc, const char *argv[], const char **fname1, const char
case 'v':
opts->mode_verbose = 1;
- /* This for loop is for handling style like
- * -v, -v1, --verbose, --verbose=1.
- */
for (i = 1; i < argc; i++) {
/*
- * short opt
+ * special check for short opt
*/
- if (!strcmp(argv[i], "-v")) { /* no arg */
- opt_ind--;
+ if (!strcmp(argv[i], "-v")) {
+ if (opt_arg != NULL)
+ opt_ind--;
opts->mode_verbose_level = 0;
break;
}
else if (!strncmp(argv[i], "-v", (size_t)2)) {
+ if (opt_arg != NULL)
+ opt_ind--;
opts->mode_verbose_level = atoi(&argv[i][2]);
break;
}
-
- /*
- * long opt
- */
- if (!strcmp(argv[i], "--verbose")) { /* no arg */
- opts->mode_verbose_level = 0;
- break;
- }
- else if (!strncmp(argv[i], "--verbose", (size_t)9) && argv[i][9] == '=') {
- opts->mode_verbose_level = atoi(&argv[i][10]);
- break;
+ else {
+ if (opt_arg != NULL)
+ opts->mode_verbose_level = HDatoi(opt_arg);
+ else
+ opts->mode_verbose_level = 0;
}
}
break;
@@ -381,7 +375,7 @@ parse_command_line(int argc, const char *argv[], const char **fname1, const char
opts->percent = HDatof(opt_arg);
/* -p 0 is the same as default */
- if (H5_DBL_ABS_EQUAL(opts->percent, (double)0.0F))
+ if (H5_DBL_ABS_EQUAL(opts->percent, 0.0))
opts->percent_bool = 0;
break;
@@ -481,13 +475,14 @@ parse_command_line(int argc, const char *argv[], const char **fname1, const char
H5TOOLS_DEBUG("objname2 = %s", *objname2);
/*
- * TRILABS-227 is complete except for an issue with printing indices
+ * TRILABS_227 is complete except for an issue with printing indices
* the following calls will enable subsetting
+ */
opts->sset[0] = parse_subset_params(*objname1);
opts->sset[1] = parse_subset_params(*objname2);
- */
- H5TOOLS_ENDDEBUG("");
+
+ H5TOOLS_ENDDEBUG(" ");
}
/*-------------------------------------------------------------------------
@@ -821,21 +816,29 @@ usage(void)
PRINTVALSTREAM(rawoutstream, " symbolic links are compared.).\n");
PRINTVALSTREAM(rawoutstream, "\n");
/*
- * TRILABS-227 is complete except for an issue with printing indices
+ * TRILABS_227 is complete except for an issue with printing indices
* the following will be needed for subsetting
+ */
PRINTVALSTREAM(rawoutstream, " Subsetting options:\n");
- PRINTVALSTREAM(rawoutstream, " Subsetting is available by using the fcompact form of subsetting, as
- follows:\n"); PRINTVALSTREAM(rawoutstream, " obj1 /foo/mydataset[START;STRIDE;COUNT;BLOCK]\n");
- PRINTVALSTREAM(rawoutstream, " It is not required to use all parameters, but until the last parameter
- value used,\n"); PRINTVALSTREAM(rawoutstream, " all of the semicolons (;) are required, even when a
- parameter value is not specified. Example:\n"); PRINTVALSTREAM(rawoutstream, " obj1
- /foo/mydataset[START;;COUNT;BLOCK]\n"); PRINTVALSTREAM(rawoutstream, " obj1 /foo/mydataset[START]\n");
- PRINTVALSTREAM(rawoutstream, " The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1
- in\n"); PRINTVALSTREAM(rawoutstream, " each dimension. START is optional and will default to 0 in each
- dimension.\n"); PRINTVALSTREAM(rawoutstream, " Each of START, STRIDE, COUNT, and BLOCK must be a
- comma-separated list of integers with\n"); PRINTVALSTREAM(rawoutstream, " one integer for each dimension
- of the dataset.\n"); PRINTVALSTREAM(rawoutstream, "\n");
- */
+ PRINTVALSTREAM(rawoutstream,
+ " Subsetting is available by using the fcompact form of subsetting, as follows:\n");
+ PRINTVALSTREAM(rawoutstream, " obj1 /foo/mydataset[START;STRIDE;COUNT;BLOCK]\n");
+ PRINTVALSTREAM(rawoutstream,
+ " It is not required to use all parameters, but until the last parameter value used,\n");
+ PRINTVALSTREAM(
+ rawoutstream,
+ " all of the semicolons (;) are required, even when a parameter value is not specified. Example:\n");
+ PRINTVALSTREAM(rawoutstream, " obj1 /foo/mydataset[START;;COUNT;BLOCK]\n");
+ PRINTVALSTREAM(rawoutstream, " obj1 /foo/mydataset[START]\n");
+ PRINTVALSTREAM(rawoutstream,
+ " The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in\n");
+ PRINTVALSTREAM(rawoutstream,
+ " each dimension. START is optional and will default to 0 in each dimension.\n");
+ PRINTVALSTREAM(
+ rawoutstream,
+ " Each of START, STRIDE, COUNT, and BLOCK must be a comma-separated list of integers with\n");
+ PRINTVALSTREAM(rawoutstream, " one integer for each dimension of the dataset.\n");
+ PRINTVALSTREAM(rawoutstream, "\n");
PRINTVALSTREAM(rawoutstream, " Exit code:\n");
PRINTVALSTREAM(rawoutstream, " 0 if no differences, 1 if differences found, 2 if error\n");
PRINTVALSTREAM(rawoutstream, "\n");
diff --git a/tools/src/h5diff/h5diff_common.h b/tools/src/h5diff/h5diff_common.h
index 6594478c1d8..83f4255dfb8 100644
--- a/tools/src/h5diff/h5diff_common.h
+++ b/tools/src/h5diff/h5diff_common.h
@@ -11,8 +11,8 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#ifndef H5DIFFCOMMON_H__
-#define H5DIFFCOMMON_H__
+#ifndef H5DIFFCOMMON_H
+#define H5DIFFCOMMON_H
#include "h5tools.h"
/* Name of tool */
@@ -32,4 +32,4 @@ void print_info(diff_opt_t *opts);
}
#endif
-#endif /* H5DIFFCOMMON_H__ */
+#endif /* H5DIFFCOMMON_H */
diff --git a/tools/src/h5diff/h5diff_main.c b/tools/src/h5diff/h5diff_main.c
index 6ba8988ec1c..a8359530815 100644
--- a/tools/src/h5diff/h5diff_main.c
+++ b/tools/src/h5diff/h5diff_main.c
@@ -25,7 +25,7 @@
* Return: An exit status of 0 means no differences were found, 1 means some
* differences were found.
*
- * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+ * Programmer: Pedro Vicente
*
* Date: May 9, 2003
*
diff --git a/tools/src/h5diff/ph5diff_main.c b/tools/src/h5diff/ph5diff_main.c
index 60e6dab0fd1..ec78e49fcb2 100644
--- a/tools/src/h5diff/ph5diff_main.c
+++ b/tools/src/h5diff/ph5diff_main.c
@@ -31,7 +31,7 @@ static void ph5diff_worker(int);
* Return: An exit status of 0 means no differences were found, 1 means some
* differences were found.
*
- * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+ * Programmer: Pedro Vicente
*
* Date: May 9, 2003
*
diff --git a/tools/src/h5dump/h5dump.c b/tools/src/h5dump/h5dump.c
index 03730c6406e..9f526da49be 100644
--- a/tools/src/h5dump/h5dump.c
+++ b/tools/src/h5dump/h5dump.c
@@ -31,7 +31,7 @@ static h5tools_vol_info_t vol_info_g;
/* Default "anonymous" S3 configuration */
static H5FD_ros3_fapl_t ros3_fa_g = {
1, /* Structure Version */
- false, /* Authenticate? */
+ FALSE, /* Authenticate? */
"", /* AWS Region */
"", /* Access Key ID */
"", /* Secret Access Key */
@@ -80,39 +80,8 @@ struct handler_t {
*/
/* The following initialization makes use of C language concatenating */
/* "xxx" "yyy" into "xxxyyy". */
-static const char * s_opts = "hn*peyBHirVa:c:d:f:g:k:l:t:w:xD:uX:o*b*F:s:S:A*q:z:m:RE*CM:O*N:vG:";
-static struct long_options l_opts[] = {{"help", no_arg, 'h'},
- {"hel", no_arg, 'h'},
- {"contents", optional_arg, 'n'},
- {"properties", no_arg, 'p'},
- {"superblock", no_arg, 'B'},
- {"boot-block", no_arg, 'B'},
- {"boot-bloc", no_arg, 'B'},
- {"boot-blo", no_arg, 'B'},
- {"boot-bl", no_arg, 'B'},
- {"boot-b", no_arg, 'B'},
- {"boot", no_arg, 'B'},
- {"boo", no_arg, 'B'},
- {"bo", no_arg, 'B'},
- {"header", no_arg, 'H'},
- {"heade", no_arg, 'H'},
- {"head", no_arg, 'H'},
- {"hea", no_arg, 'H'},
- {"object-ids", no_arg, 'i'},
- {"object-id", no_arg, 'i'},
- {"object-i", no_arg, 'i'},
- {"object", no_arg, 'i'},
- {"objec", no_arg, 'i'},
- {"obje", no_arg, 'i'},
- {"obj", no_arg, 'i'},
- {"ob", no_arg, 'i'},
- {"version", no_arg, 'V'},
- {"versio", no_arg, 'V'},
- {"versi", no_arg, 'V'},
- {"vers", no_arg, 'V'},
- {"ver", no_arg, 'V'},
- {"ve", no_arg, 'V'},
- {"attribute", require_arg, 'a'},
+static const char * s_opts = "a:b*c:d:ef:g:hik:l:m:n*o*pq:rs:t:uvw:xyz:A*BCD:E*F:G:HM:N:O*RS:VX:";
+static struct long_options l_opts[] = {{"attribute", require_arg, 'a'},
{"attribut", require_arg, 'a'},
{"attribu", require_arg, 'a'},
{"attrib", require_arg, 'a'},
@@ -120,10 +89,7 @@ static struct long_options l_opts[] = {{"help", no_arg, 'h'},
{"attr", require_arg, 'a'},
{"att", require_arg, 'a'},
{"at", require_arg, 'a'},
- {"block", require_arg, 'k'},
- {"bloc", require_arg, 'k'},
- {"blo", require_arg, 'k'},
- {"bl", require_arg, 'k'},
+ {"binary", optional_arg, 'b'},
{"count", require_arg, 'c'},
{"coun", require_arg, 'c'},
{"cou", require_arg, 'c'},
@@ -131,10 +97,7 @@ static struct long_options l_opts[] = {{"help", no_arg, 'h'},
{"dataset", require_arg, 'd'},
{"datase", require_arg, 'd'},
{"datas", require_arg, 'd'},
- {"datatype", require_arg, 't'},
- {"datatyp", require_arg, 't'},
- {"dataty", require_arg, 't'},
- {"datat", require_arg, 't'},
+ {"escape", no_arg, 'e'},
{"filedriver", require_arg, 'f'},
{"filedrive", require_arg, 'f'},
{"filedriv", require_arg, 'f'},
@@ -148,24 +111,44 @@ static struct long_options l_opts[] = {{"help", no_arg, 'h'},
{"grou", require_arg, 'g'},
{"gro", require_arg, 'g'},
{"gr", require_arg, 'g'},
- {"output", optional_arg, 'o'},
- {"outpu", optional_arg, 'o'},
- {"outp", optional_arg, 'o'},
- {"out", optional_arg, 'o'},
- {"ou", optional_arg, 'o'},
+ {"help", no_arg, 'h'},
+ {"hel", no_arg, 'h'},
+ {"object-ids", no_arg, 'i'},
+ {"object-id", no_arg, 'i'},
+ {"object-i", no_arg, 'i'},
+ {"object", no_arg, 'i'},
+ {"objec", no_arg, 'i'},
+ {"obje", no_arg, 'i'},
+ {"obj", no_arg, 'i'},
+ {"ob", no_arg, 'i'},
+ {"block", require_arg, 'k'},
+ {"bloc", require_arg, 'k'},
+ {"blo", require_arg, 'k'},
+ {"bl", require_arg, 'k'},
{"soft-link", require_arg, 'l'},
{"soft-lin", require_arg, 'l'},
{"soft-li", require_arg, 'l'},
{"soft-l", require_arg, 'l'},
{"soft", require_arg, 'l'},
{"sof", require_arg, 'l'},
+ {"format", require_arg, 'm'},
+ {"contents", optional_arg, 'n'},
+ {"output", optional_arg, 'o'},
+ {"outpu", optional_arg, 'o'},
+ {"outp", optional_arg, 'o'},
+ {"out", optional_arg, 'o'},
+ {"ou", optional_arg, 'o'},
+ {"properties", no_arg, 'p'},
+ {"sort_by", require_arg, 'q'},
+ {"string", no_arg, 'r'},
+ {"strin", no_arg, 'r'},
{"start", require_arg, 's'},
{"star", require_arg, 's'},
{"sta", require_arg, 's'},
- {"stride", require_arg, 'S'},
- {"strid", require_arg, 'S'},
- {"string", no_arg, 'r'},
- {"strin", no_arg, 'r'},
+ {"datatype", require_arg, 't'},
+ {"datatyp", require_arg, 't'},
+ {"dataty", require_arg, 't'},
+ {"datat", require_arg, 't'},
{"use-dtd", no_arg, 'u'},
{"use-dt", no_arg, 'u'},
{"use-d", no_arg, 'u'},
@@ -173,33 +156,50 @@ static struct long_options l_opts[] = {{"help", no_arg, 'h'},
{"use", no_arg, 'u'},
{"us", no_arg, 'u'},
{"u", no_arg, 'u'},
+ {"vds-view-first-missing", no_arg, 'v'},
{"width", require_arg, 'w'},
{"widt", require_arg, 'w'},
{"wid", require_arg, 'w'},
{"wi", require_arg, 'w'},
- {"xml-dtd", require_arg, 'D'},
- {"xml-dt", require_arg, 'D'},
- {"xml-d", require_arg, 'D'},
- {"xml-ns", require_arg, 'X'},
- {"xml-n", require_arg, 'X'},
{"xml", no_arg, 'x'},
{"xm", no_arg, 'x'},
- {"onlyattr", optional_arg, 'A'},
- {"escape", no_arg, 'e'},
{"noindex", no_arg, 'y'},
- {"binary", optional_arg, 'b'},
- {"form", require_arg, 'F'},
- {"sort_by", require_arg, 'q'},
{"sort_order", require_arg, 'z'},
- {"format", require_arg, 'm'},
- {"region", no_arg, 'R'},
+ {"onlyattr", optional_arg, 'A'},
+ {"superblock", no_arg, 'B'},
+ {"boot-block", no_arg, 'B'},
+ {"boot-bloc", no_arg, 'B'},
+ {"boot-blo", no_arg, 'B'},
+ {"boot-bl", no_arg, 'B'},
+ {"boot-b", no_arg, 'B'},
+ {"boot", no_arg, 'B'},
+ {"boo", no_arg, 'B'},
+ {"bo", no_arg, 'B'},
+ {"no-compact-subset", no_arg, 'C'},
+ {"xml-dtd", require_arg, 'D'},
+ {"xml-dt", require_arg, 'D'},
+ {"xml-d", require_arg, 'D'},
{"enable-error-stack", optional_arg, 'E'},
+ {"form", require_arg, 'F'},
+ {"vds-gap-size", require_arg, 'G'},
+ {"header", no_arg, 'H'},
+ {"heade", no_arg, 'H'},
+ {"head", no_arg, 'H'},
+ {"hea", no_arg, 'H'},
{"packed-bits", require_arg, 'M'},
- {"no-compact-subset", no_arg, 'C'},
- {"ddl", optional_arg, 'O'},
{"any_path", require_arg, 'N'},
- {"vds-view-first-missing", no_arg, 'v'},
- {"vds-gap-size", require_arg, 'G'},
+ {"ddl", optional_arg, 'O'},
+ {"region", no_arg, 'R'},
+ {"stride", require_arg, 'S'},
+ {"strid", require_arg, 'S'},
+ {"version", no_arg, 'V'},
+ {"versio", no_arg, 'V'},
+ {"versi", no_arg, 'V'},
+ {"vers", no_arg, 'V'},
+ {"ver", no_arg, 'V'},
+ {"ve", no_arg, 'V'},
+ {"xml-ns", require_arg, 'X'},
+ {"xml-n", require_arg, 'X'},
{"s3-cred", require_arg, '$'},
{"hdfs-attrs", require_arg, '#'},
{"vol-value", require_arg, '1'},
@@ -256,7 +256,7 @@ usage(const char *prog)
" :: \"(,,)\"\n");
PRINTVALSTREAM(rawoutstream,
" If absent or -> \"(,,)\", no authentication.\n");
- PRINTVALSTREAM(rawoutstream, " Has no effect is filedriver is not `ros3'.\n");
+ PRINTVALSTREAM(rawoutstream, " Has no effect if filedriver is not \"ros3\".\n");
PRINTVALSTREAM(rawoutstream,
" --hdfs-attrs= Supply configuration information for HDFS file access.\n");
PRINTVALSTREAM(rawoutstream, " For use with \"--filedriver=hdfs\"\n");
@@ -338,7 +338,7 @@ usage(const char *prog)
PRINTVALSTREAM(rawoutstream, " -X S, --xml-ns=S (XML Schema) Use qualified names n the XML\n");
PRINTVALSTREAM(rawoutstream, " \":\": no namespace, default: \"hdf5:\"\n");
PRINTVALSTREAM(rawoutstream,
- " E.g., to dump a file called `-f', use h5dump -- -f\n");
+ " E.g., to dump a file called \"-f\", use h5dump -- -f\n");
PRINTVALSTREAM(rawoutstream, "\n");
PRINTVALSTREAM(rawoutstream, "--------------- Subsetting Options ---------------\n");
PRINTVALSTREAM(rawoutstream, " Subsetting is available by using the following options with a dataset\n");
@@ -1132,7 +1132,7 @@ parse_command_line(int argc, const char *argv[])
case 'M':
if (!last_was_dset) {
- error_msg("option `-%c' can only be used after --dataset option\n", opt);
+ error_msg("option \"-%c\" can only be used after --dataset option\n", opt);
goto error;
}
if (parse_mask_list(opt_arg) != SUCCEED) {
@@ -1205,7 +1205,7 @@ parse_command_line(int argc, const char *argv[])
struct subset_t *s;
if (!last_was_dset) {
- error_msg("option `-%c' can only be used after --dataset option\n", opt);
+ error_msg("option \"-%c\" can only be used after --dataset option\n", opt);
goto error;
}
@@ -1529,7 +1529,7 @@ main(int argc, const char *argv[])
}
}
else {
- if (useschema_g && HDstrcmp(xmlnsprefix, "")) {
+ if (useschema_g && HDstrcmp(xmlnsprefix, "") != 0) {
error_msg(
"Cannot set Schema URL for a qualified namespace--use -X or -U option with -D \n");
h5tools_setstatus(EXIT_FAILURE);
diff --git a/tools/src/h5dump/h5dump_ddl.c b/tools/src/h5dump/h5dump_ddl.c
index 80e8088cd42..2a69ca62f07 100644
--- a/tools/src/h5dump/h5dump_ddl.c
+++ b/tools/src/h5dump/h5dump_ddl.c
@@ -1154,7 +1154,7 @@ dump_fcpl(hid_t fid)
unsigned sym_ik; /* symbol table B-tree internal 'K' value */
unsigned istore_ik; /* indexed storage B-tree internal 'K' value */
- hbool_t supported = FALSE;
+ uint64_t supported = 0;
/* Dumping the information here only makes sense for the native
* VOL connector. The only VOL call here is H5Fget_info(), so we'll
@@ -1163,7 +1163,7 @@ dump_fcpl(hid_t fid)
*/
H5VLquery_optional(fid, H5VL_SUBCLS_FILE, H5VL_NATIVE_FILE_GET_INFO, &supported);
- if (!supported)
+ if (!(supported & H5VL_OPT_QUERY_SUPPORTED))
return;
fcpl = H5Fget_create_plist(fid);
diff --git a/tools/src/h5import/h5import.c b/tools/src/h5import/h5import.c
index 53360e9b4d2..2a65591a61d 100644
--- a/tools/src/h5import/h5import.c
+++ b/tools/src/h5import/h5import.c
@@ -946,7 +946,7 @@ readFloatData(FILE *strm, struct Input *in)
*
* Return: 0, ok, -1 no
*
- * Programmer: Pedro Vicente, pvn@hdfgroup.org
+ * Programmer: Pedro Vicente
*
* Date: July, 26, 2007
*
@@ -1570,7 +1570,7 @@ processConfigurationFile(char *infile, struct Input *in)
#ifdef H5DEBUGIMPORT
HDprintf("h5dump DATATYPE STRING STRSIZE %s found\n", temp);
#endif
- if (HDstrcmp("H5T_VARIABLE;", temp)) {
+ if (HDstrcmp("H5T_VARIABLE;", temp) != 0) {
char *more = temp;
ival = (int)HDstrtol(more, &more, 10);
if (getInputSize(in, ival) == -1) {
@@ -1896,7 +1896,7 @@ processConfigurationFile(char *infile, struct Input *in)
HDprintf("h5dump STORAGE_LAYOUT CHUNKED SIZE %d found\n", ival);
#endif
}
- while (HDstrcmp("}", temp)) {
+ while (HDstrcmp("}", temp) != 0) {
if (fscanf(strm, "%254s", temp) != 1) { /* end bracket */
(void)HDfprintf(stderr, "%s", err18);
goto error;
@@ -2536,7 +2536,7 @@ parsePathInfo(struct path_info *path, char *temp)
token = HDstrtok(temp, delimiter);
if (HDstrlen(token) >= MAX_PATH_NAME_LENGTH) {
- (void)HDfprintf(stderr, err1);
+ (void)HDfprintf(stderr, "%s", err1);
return (-1);
}
HDstrcpy(path->group[i++], token);
@@ -2546,7 +2546,7 @@ parsePathInfo(struct path_info *path, char *temp)
if (token == NULL)
break;
if (HDstrlen(token) >= MAX_PATH_NAME_LENGTH) {
- (void)HDfprintf(stderr, err1);
+ (void)HDfprintf(stderr, "%s", err1);
return (-1);
}
HDstrcpy(path->group[i++], token);
@@ -5097,7 +5097,6 @@ help(char *name)
(void)HDfprintf(stdout, "\t data-set will be compressed using GZIP and a compression level \n");
(void)HDfprintf(stdout, "\t of 7.\n");
(void)HDfprintf(stdout, "\t The dataset will be stored at \"/Second-set\"\n\n");
- return;
}
void
@@ -5107,5 +5106,4 @@ usage(char *name)
(void)HDfprintf(stdout, "\t%s -c[onfig] \
[ -c[config] ...] -o[utfile] \n\n",
name);
- return;
}
diff --git a/tools/src/h5ls/h5ls.c b/tools/src/h5ls/h5ls.c
index 1ce6ee82c1b..bffd12ba898 100644
--- a/tools/src/h5ls/h5ls.c
+++ b/tools/src/h5ls/h5ls.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Monday, March 23, 1998
*/
@@ -432,11 +432,6 @@ print_native_type(h5tools_str_t *buffer, hid_t type, int ind)
else if (H5Tequal(type, H5T_NATIVE_DOUBLE) == TRUE) {
h5tools_str_append(buffer, "native double");
}
-#if H5_SIZEOF_LONG_DOUBLE != 0
- else if (H5Tequal(type, H5T_NATIVE_LDOUBLE) == TRUE) {
- h5tools_str_append(buffer, "native long double");
- }
-#endif
else if (H5Tequal(type, H5T_NATIVE_INT8) == TRUE) {
h5tools_str_append(buffer, "native int8_t");
}
@@ -969,7 +964,7 @@ print_enum_type(h5tools_str_t *buffer, hid_t type, int ind)
/*On SGI Altix(cobalt), wrong values were printed out with "value+i*dst_size"
*strangely, unless use another pointer "copy".*/
copy = value + i * dst_size;
- h5tools_str_append(buffer, "%" H5_PRINTF_LL_WIDTH "d", *((long long *)((void *)copy)));
+ h5tools_str_append(buffer, "%lld", *((long long *)((void *)copy)));
}
}
@@ -1324,7 +1319,7 @@ dump_dataset_values(hid_t dset)
h5tool_format_t * info = &ls_dataformat;
H5R_ref_t * ref_buf = NULL;
- H5TOOLS_START_DEBUG("");
+ H5TOOLS_START_DEBUG(" ");
f_type = H5Dget_type(dset);
space = H5Dget_space(dset);
@@ -1467,7 +1462,7 @@ dump_dataset_values(hid_t dset)
PRINTVALSTREAM(rawoutstream, "\n");
- H5TOOLS_ENDDEBUG("");
+ H5TOOLS_ENDDEBUG(" ");
}
/*-------------------------------------------------------------------------
@@ -1495,7 +1490,7 @@ dump_attribute_values(hid_t attr)
h5tool_format_t * info = &ls_dataformat;
H5R_ref_t * ref_buf = NULL;
- H5TOOLS_START_DEBUG("");
+ H5TOOLS_START_DEBUG(" ");
f_type = H5Aget_type(attr);
space = H5Aget_space(attr);
@@ -1643,7 +1638,7 @@ dump_attribute_values(hid_t attr)
PRINTVALSTREAM(rawoutstream, "\n");
- H5TOOLS_ENDDEBUG("");
+ H5TOOLS_ENDDEBUG(" ");
}
/*-------------------------------------------------------------------------
@@ -1672,7 +1667,7 @@ list_attr(hid_t obj, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *ain
h5tools_context_t ctx; /* print context */
h5tool_format_t * info = &ls_dataformat;
- H5TOOLS_START_DEBUG("");
+ H5TOOLS_START_DEBUG(" ");
HDmemset(&ctx, 0, sizeof(ctx));
HDmemset(&buffer, 0, sizeof(h5tools_str_t));
@@ -1751,7 +1746,7 @@ list_attr(hid_t obj, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *ain
H5TOOLS_DEBUG("Attribute open failed");
h5tools_str_close(&buffer);
}
- H5TOOLS_ENDDEBUG("");
+ H5TOOLS_ENDDEBUG(" ");
return 0;
}
@@ -1914,10 +1909,9 @@ dataset_list2(hid_t dset, const char H5_ATTR_UNUSED *name)
print_string(&buffer, f_name, TRUE);
}
else {
- h5tools_str_append(&buffer,
- " #%03d %10" H5_PRINTF_LL_WIDTH
- "u %10" H5_PRINTF_LL_WIDTH "u %10" H5_PRINTF_LL_WIDTH "u ",
- i, total, (hsize_t)f_offset, f_size);
+ h5tools_str_append(
+ &buffer, " #%03d %10" PRIuHSIZE " %10" PRIuHSIZE " %10" PRIuHSIZE " ",
+ i, total, (hsize_t)f_offset, f_size);
print_string(&buffer, f_name, TRUE);
}
h5tools_str_append(&buffer, "\n");
@@ -1995,7 +1989,7 @@ dataset_list2(hid_t dset, const char H5_ATTR_UNUSED *name)
HSIZE_T_FORMAT " logical byte%s, " HSIZE_T_FORMAT " allocated byte%s",
total, 1 == total ? "" : "s", used, 1 == used ? "" : "s");
if (used > 0) {
- utilization = ((double)total * (double)100.0f) / (double)used;
+ utilization = ((double)total * 100.0) / (double)used;
h5tools_str_append(&buffer, ", %1.2f%% utilization", utilization);
}
}
@@ -2100,7 +2094,7 @@ list_obj(const char *name, const H5O_info2_t *oinfo, const char *first_seen, voi
h5tools_context_t ctx; /* print context */
h5tool_format_t * info = &ls_dataformat;
- H5TOOLS_START_DEBUG("");
+ H5TOOLS_START_DEBUG(" ");
HDmemset(&ctx, 0, sizeof(ctx));
HDmemset(&buffer, 0, sizeof(h5tools_str_t));
@@ -2164,11 +2158,11 @@ list_obj(const char *name, const H5O_info2_t *oinfo, const char *first_seen, voi
/* Show detailed information about the object, beginning with information
* which is common to all objects. */
if (verbose_g > 0) {
- size_t buf_size = 0;
- char * comment = NULL;
- char * obj_tok_str = NULL;
- ssize_t cmt_bufsize = -1;
- hbool_t supported = FALSE;
+ size_t buf_size = 0;
+ char * comment = NULL;
+ char * obj_tok_str = NULL;
+ ssize_t cmt_bufsize = -1;
+ uint64_t supported = 0;
/* Display attributes */
H5TOOLS_DEBUG("Display attributes");
@@ -2207,7 +2201,7 @@ list_obj(const char *name, const H5O_info2_t *oinfo, const char *first_seen, voi
/* Only emit comments if the VOL connector supports that */
H5VLquery_optional(obj_id, H5VL_SUBCLS_OBJECT, H5VL_NATIVE_OBJECT_GET_COMMENT, &supported);
- if (supported) {
+ if (supported & H5VL_OPT_QUERY_SUPPORTED) {
/* Object comment */
cmt_bufsize = H5Oget_comment(obj_id, comment, buf_size);
@@ -2254,7 +2248,7 @@ list_obj(const char *name, const H5O_info2_t *oinfo, const char *first_seen, voi
}
h5tools_str_close(&buffer);
- H5TOOLS_ENDDEBUG("");
+ H5TOOLS_ENDDEBUG(" ");
return 0;
} /* end list_obj() */
@@ -2655,7 +2649,7 @@ int
main(int argc, const char *argv[])
{
hid_t file_id = H5I_INVALID_HID;
- char * fname = NULL, *oname = NULL, *x;
+ char * fname = NULL, *oname = NULL, *x = NULL;
const char * s = NULL;
char * rest;
int argno, times;
@@ -2672,7 +2666,7 @@ main(int argc, const char *argv[])
/* Default "anonymous" S3 configuration */
H5FD_ros3_fapl_t ros3_fa = {
1, /* Structure Version */
- false, /* Authenticate? */
+ FALSE, /* Authenticate? */
"", /* AWS Region */
"", /* Access Key ID */
"", /* Secret Access Key */
@@ -3124,7 +3118,7 @@ main(int argc, const char *argv[])
symlink_list.objs = NULL;
/* Check for root group as object name */
- if (HDstrcmp(oname, root_name)) {
+ if (HDstrcmp(oname, root_name) != 0) {
/* Check the type of link given */
if (H5Lget_info2(file_id, oname, &li, H5P_DEFAULT) < 0) {
hsize_t curr_pos = 0; /* total data element position */
diff --git a/tools/src/h5repack/h5repack.c b/tools/src/h5repack/h5repack.c
index f84f64d7d05..7cad36bfe8e 100644
--- a/tools/src/h5repack/h5repack.c
+++ b/tools/src/h5repack/h5repack.c
@@ -225,9 +225,9 @@ hid_t
copy_named_datatype(hid_t type_in, hid_t fidout, named_dt_t **named_dt_head_p, trav_table_t *travt,
pack_opt_t *options)
{
- named_dt_t *dt = *named_dt_head_p; /* Stack pointer */
- named_dt_t *dt_ret = NULL; /* Datatype to return */
- H5O_info2_t oinfo; /* Object info of input dtype */
+ named_dt_t *dt = NULL; /* Stack pointer */
+ named_dt_t *dt_ret = NULL; /* Datatype to return */
+ H5O_info2_t oinfo; /* Object info of input dtype */
int token_cmp;
hid_t ret_value = H5I_INVALID_HID;
@@ -235,15 +235,13 @@ copy_named_datatype(hid_t type_in, hid_t fidout, named_dt_t **named_dt_head_p, t
H5TOOLS_GOTO_ERROR(H5I_INVALID_HID, "H5Oget_info failed");
if (*named_dt_head_p) {
- if (H5Otoken_cmp(type_in, &dt->obj_token, &oinfo.token, &token_cmp) < 0)
- H5TOOLS_GOTO_ERROR(H5I_INVALID_HID, "failed to compare object tokens");
-
- /* Stack already exists, search for the datatype */
- while (dt && token_cmp) {
- dt = dt->next;
-
+ /* Search the stack for the datatype. */
+ for (dt = *named_dt_head_p; dt != NULL; dt = dt->next) {
if (H5Otoken_cmp(type_in, &dt->obj_token, &oinfo.token, &token_cmp) < 0)
H5TOOLS_GOTO_ERROR(H5I_INVALID_HID, "failed to compare object tokens");
+
+ if (token_cmp == 0)
+ break; // found it!
}
dt_ret = dt;
@@ -718,7 +716,7 @@ check_options(pack_opt_t *options)
}
if (options->ublock_filename == NULL && options->ublock_size != 0)
- H5TOOLS_GOTO_ERROR((-1), "file name missing for user block", options->ublock_filename);
+ H5TOOLS_GOTO_ERROR((-1), "file name missing for user block");
/*------------------------------------------------------------------------
* Verify alignment options; threshold is zero default but alignment not
diff --git a/tools/src/h5repack/h5repack.h b/tools/src/h5repack/h5repack.h
index 0dcc59071fa..74525f4ef36 100644
--- a/tools/src/h5repack/h5repack.h
+++ b/tools/src/h5repack/h5repack.h
@@ -98,17 +98,19 @@ typedef struct {
/* all the above, ready to go to the hrepack call */
typedef struct {
- pack_opttbl_t *op_tbl; /*table with all -c and -f options */
- int all_layout; /*apply the layout to all objects */
- int all_filter; /*apply the filter to all objects */
+ pack_opttbl_t *op_tbl; /* table with all -c and -f options */
+ int all_layout; /* apply the layout to all objects */
+ int all_filter; /* apply the filter to all objects */
filter_info_t filter_g[H5_REPACK_MAX_NFILTERS]; /*global filter array for the ALL case */
- int n_filter_g; /*number of global filters */
- chunk_info_t chunk_g; /*global chunk INFO for the ALL case */
- H5D_layout_t layout_g; /*global layout information for the ALL case */
- int verbose; /*verbose mode */
- hsize_t min_comp; /*minimum size to compress, in bytes */
- int use_native; /*use a native type in write */
- hbool_t latest; /*pack file with the latest file format */
+ int n_filter_g; /* number of global filters */
+ chunk_info_t chunk_g; /* global chunk INFO for the ALL case */
+ H5D_layout_t layout_g; /* global layout information for the ALL case */
+ int verbose; /* verbose mode */
+ hbool_t merge; /* Merge external file. */
+ hbool_t prune; /* Don't follow external file. */
+ hsize_t min_comp; /* minimum size to compress, in bytes */
+ int use_native; /* use a native type in write */
+ hbool_t latest; /* pack file with the latest file format */
H5F_libver_t low_bound; /* The file's low bound as in H5Fset_libver_bounds() */
H5F_libver_t high_bound; /* The file's high bound as in H5Fset_libver_bounds() */
hid_t fin_fapl; /* FAPL to use for opening the input file */
@@ -193,13 +195,13 @@ void init_packobject(pack_info_t *obj);
*-------------------------------------------------------------------------
*/
-int apply_filters(const char *name, /* object name from traverse list */
- int rank, /* rank of dataset */
- hsize_t * dims, /* dimensions of dataset */
- size_t msize, /* size of type */
- hid_t dcpl_id, /* dataset creation property list */
- pack_opt_t *options, /* repack options */
- int * has_filter); /* (OUT) object NAME has a filter */
+int apply_filters(const char * name, /* object name from traverse list */
+ int rank, /* rank of dataset */
+ const hsize_t *dims, /* dimensions of dataset */
+ size_t msize, /* size of type */
+ hid_t dcpl_id, /* dataset creation property list */
+ pack_opt_t * options, /* repack options */
+ int * has_filter); /* (OUT) object NAME has a filter */
/*-------------------------------------------------------------------------
* options table
diff --git a/tools/src/h5repack/h5repack_copy.c b/tools/src/h5repack/h5repack_copy.c
index 55fb56698c7..536de69bdeb 100644
--- a/tools/src/h5repack/h5repack_copy.c
+++ b/tools/src/h5repack/h5repack_copy.c
@@ -37,7 +37,7 @@
* local functions
*-------------------------------------------------------------------------
*/
-static int get_hyperslab(hid_t dcpl_id, int rank_dset, hsize_t dims_dset[], size_t size_datum,
+static int get_hyperslab(hid_t dcpl_id, int rank_dset, const hsize_t dims_dset[], size_t size_datum,
hsize_t dims_hslab[], hsize_t *hslab_nbytes_p);
static void print_dataset_info(hid_t dcpl_id, char *objname, double per, int pr);
static int do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *options);
@@ -431,8 +431,8 @@ copy_objects(const char *fnamein, const char *fnameout, pack_opt_t *options)
*-----------------------------------------*/
int
-get_hyperslab(hid_t dcpl_id, int rank_dset, hsize_t dims_dset[], size_t size_datum, hsize_t dims_hslab[],
- hsize_t *hslab_nbytes_p)
+get_hyperslab(hid_t dcpl_id, int rank_dset, const hsize_t dims_dset[], size_t size_datum,
+ hsize_t dims_hslab[], hsize_t *hslab_nbytes_p)
{
int k;
H5D_layout_t dset_layout;
@@ -624,6 +624,8 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
hid_t f_space_id = H5I_INVALID_HID; /* file space ID */
hid_t ftype_id = H5I_INVALID_HID; /* file type ID */
hid_t wtype_id = H5I_INVALID_HID; /* read/write type ID */
+ hid_t ocpl_id = H5I_INVALID_HID; /* property to pass copy options */
+ hid_t lcpl_id = H5I_INVALID_HID; /* link creation property list */
named_dt_t * named_dt_head = NULL; /* Pointer to the stack of named datatypes copied */
size_t msize; /* size of type */
hsize_t nelmts; /* number of elements in dataset */
@@ -640,6 +642,7 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
int req_filter; /* there was a request for a filter */
int req_obj_layout = 0; /* request layout to current object */
unsigned crt_order_flags; /* group creation order flag */
+ h5tool_link_info_t linkinfo;
unsigned i;
unsigned u;
int ifil;
@@ -649,6 +652,9 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
hsize_t size_dset;
int ret_value = 0;
+ /* init linkinfo struct */
+ HDmemset(&linkinfo, 0, sizeof(h5tool_link_info_t));
+
/*-------------------------------------------------------------------------
* copy the supplied object list
*-------------------------------------------------------------------------
@@ -1190,26 +1196,25 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
*-------------------------------------------------------------------------
*/
else {
- hid_t pid = H5I_INVALID_HID;
-
/* create property to pass copy options */
- if ((pid = H5Pcreate(H5P_OBJECT_COPY)) < 0)
+ if ((ocpl_id = H5Pcreate(H5P_OBJECT_COPY)) < 0)
H5TOOLS_GOTO_ERROR((-1), "H5Pcreate failed");
/* set options for object copy */
- if (H5Pset_copy_object(pid, H5O_COPY_WITHOUT_ATTR_FLAG) < 0)
+ if (H5Pset_copy_object(ocpl_id, H5O_COPY_WITHOUT_ATTR_FLAG) < 0)
H5TOOLS_GOTO_ERROR((-1), "H5Pset_copy_object failed");
if (H5Ocopy(fidin, /* Source file or group identifier */
travt->objs[i].name, /* Name of the source object to be copied */
fidout, /* Destination file or group identifier */
travt->objs[i].name, /* Name of the destination object */
- pid, /* Properties which apply to the copy */
+ ocpl_id, /* Properties which apply to the copy */
H5P_DEFAULT) < 0) /* Properties which apply to the new hard link */
H5TOOLS_GOTO_ERROR((-1), "H5Ocopy failed");
- if (H5Pclose(pid) < 0)
+ if (H5Pclose(ocpl_id) < 0)
H5TOOLS_GOTO_ERROR((-1), "H5Pclose failed");
+ ocpl_id = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
* Copy attrs manually
@@ -1282,12 +1287,64 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
if (options->verbose)
HDprintf(FORMAT_OBJ, "link", travt->objs[i].name);
- if (H5Lcopy(fidin, travt->objs[i].name, fidout, travt->objs[i].name, H5P_DEFAULT,
- H5P_DEFAULT) < 0)
- H5TOOLS_GOTO_ERROR((-1), "H5Lcopy failed");
+ /* Check -X option. */
+ if (options->merge) {
+ if (H5tools_get_symlink_info(fidin, travt->objs[i].name, &linkinfo, 1) == 0) {
+ /* dangling link */
+ if (options->prune) {
+ HDprintf("Pruned %s.\n", travt->objs[i].name);
+ }
+ else {
+ if (H5Lcopy(fidin, travt->objs[i].name, fidout, travt->objs[i].name,
+ H5P_DEFAULT, H5P_DEFAULT) < 0)
+ H5TOOLS_GOTO_ERROR((-1), "H5Lcopy failed");
+ }
+ }
+ else {
+ /* valid link */
+ /* create property to pass copy options */
+ if ((ocpl_id = H5Pcreate(H5P_OBJECT_COPY)) < 0)
+ H5TOOLS_GOTO_ERROR((-1), "H5Pcreate create property failed");
+
+ /* set options for object copy */
+ if (H5Pset_copy_object(ocpl_id, H5O_COPY_EXPAND_EXT_LINK_FLAG) < 0)
+ H5TOOLS_GOTO_ERROR((-1), "H5Pset_copy_object failed");
+
+ /* Create link creation property list */
+ if ((lcpl_id = H5Pcreate(H5P_LINK_CREATE)) < 0) {
+ H5TOOLS_GOTO_ERROR((-1), "H5Pcreate link creation property failed");
+ }
+
+ /* Set flag for intermediate group creation */
+ if (H5Pset_create_intermediate_group(lcpl_id, TRUE) < 0)
+ H5TOOLS_GOTO_ERROR((-1), "H5Pset_create_intermediate_group failed");
+
+ if (H5Ocopy(fidin, travt->objs[i].name, fidout, travt->objs[i].name, ocpl_id,
+ lcpl_id) < 0)
+ H5TOOLS_GOTO_ERROR((-1), "H5Ocopy failed");
+
+ if (H5Pclose(lcpl_id) < 0)
+ H5TOOLS_GOTO_ERROR((-1), "H5Pclose failed");
+
+ if (H5Pclose(ocpl_id) < 0)
+ H5TOOLS_GOTO_ERROR((-1), "H5Pclose failed");
+ }
- if (options->verbose)
- HDprintf(FORMAT_OBJ, "link", travt->objs[i].name);
+ /* free link info path */
+ if (linkinfo.trg_path)
+ HDfree(linkinfo.trg_path);
+ linkinfo.trg_path = NULL;
+ } /* options->merge */
+ else {
+ if (options->prune) {
+ HDprintf("Pruned %s.\n", travt->objs[i].name);
+ }
+ else {
+ if (H5Lcopy(fidin, travt->objs[i].name, fidout, travt->objs[i].name, H5P_DEFAULT,
+ H5P_DEFAULT) < 0)
+ H5TOOLS_GOTO_ERROR((-1), "H5Lcopy failed");
+ }
+ }
break;
default:
@@ -1304,17 +1361,24 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
if (named_datatype_free(&named_dt_head, 0) < 0)
H5TOOLS_ERROR((-1), "named_datatype_free failed");
}
- else
+ else {
H5E_BEGIN_TRY
{
named_datatype_free(&named_dt_head, 1);
}
- H5E_END_TRY;
+ H5E_END_TRY;
+ }
+
+ /* free link info path */
+ if (linkinfo.trg_path)
+ HDfree(linkinfo.trg_path);
H5E_BEGIN_TRY
{
H5Gclose(grp_in);
H5Gclose(grp_out);
+ H5Pclose(lcpl_id);
+ H5Pclose(ocpl_id);
H5Pclose(dcpl_in);
H5Pclose(gcpl_in);
H5Pclose(gcpl_out);
diff --git a/tools/src/h5repack/h5repack_filters.c b/tools/src/h5repack/h5repack_filters.c
index 66fdf451287..32476ceb3bc 100644
--- a/tools/src/h5repack/h5repack_filters.c
+++ b/tools/src/h5repack/h5repack_filters.c
@@ -236,13 +236,13 @@ aux_assign_obj(const char * name, /* object name from traverse list */
*/
int
-apply_filters(const char *name, /* object name from traverse list */
- int rank, /* rank of dataset */
- hsize_t * dims, /* dimensions of dataset */
- size_t msize, /* size of type */
- hid_t dcpl_id, /* dataset creation property list */
- pack_opt_t *options, /* repack options */
- int * has_filter) /* (OUT) object NAME has a filter */
+apply_filters(const char * name, /* object name from traverse list */
+ int rank, /* rank of dataset */
+ const hsize_t *dims, /* dimensions of dataset */
+ size_t msize, /* size of type */
+ hid_t dcpl_id, /* dataset creation property list */
+ pack_opt_t * options, /* repack options */
+ int * has_filter) /* (OUT) object NAME has a filter */
{
int nfilters; /* number of filters in DCPL */
hsize_t chsize[64]; /* chunk size in elements */
diff --git a/tools/src/h5repack/h5repack_main.c b/tools/src/h5repack/h5repack_main.c
index 7e1ad966736..1f1b8213ed0 100644
--- a/tools/src/h5repack/h5repack_main.c
+++ b/tools/src/h5repack/h5repack_main.c
@@ -31,35 +31,37 @@ const char *outfile = NULL;
* Command-line options: The user can specify short or long-named
* parameters.
*/
-static const char * s_opts = "hVvf:l:m:e:nLj:k:c:d:s:u:b:M:t:a:i:o:S:P:T:G:q:z:E";
-static struct long_options l_opts[] = {{"help", no_arg, 'h'},
- {"version", no_arg, 'V'},
- {"verbose", no_arg, 'v'},
+static const char * s_opts = "a:b:c:d:e:f:hi:j:k:l:m:no:q:s:t:u:vz:EG:LM:P:S:T:VXW1:2:3:4:5:6:";
+static struct long_options l_opts[] = {{"alignment", require_arg, 'a'},
+ {"block", require_arg, 'b'},
+ {"compact", require_arg, 'c'},
+ {"indexed", require_arg, 'd'},
+ {"file", require_arg, 'e'},
{"filter", require_arg, 'f'},
+ {"help", no_arg, 'h'},
+ {"infile", require_arg, 'i'}, /* for backward compability */
+ {"low", require_arg, 'j'},
+ {"high", require_arg, 'k'},
{"layout", require_arg, 'l'},
{"minimum", require_arg, 'm'},
- {"file", require_arg, 'e'},
{"native", no_arg, 'n'},
- {"latest", no_arg, 'L'},
- {"low", require_arg, 'j'},
- {"high", require_arg, 'k'},
- {"compact", require_arg, 'c'},
- {"indexed", require_arg, 'd'},
+ {"outfile", require_arg, 'o'}, /* for backward compability */
+ {"sort_by", require_arg, 'q'},
{"ssize", require_arg, 's'},
+ {"threshold", require_arg, 't'},
{"ublock", require_arg, 'u'},
- {"block", require_arg, 'b'},
+ {"verbose", no_arg, 'v'},
+ {"sort_order", require_arg, 'z'},
+ {"enable-error-stack", no_arg, 'E'},
+ {"fs_pagesize", require_arg, 'G'},
+ {"latest", no_arg, 'L'},
{"metadata_block_size", require_arg, 'M'},
- {"threshold", require_arg, 't'},
- {"alignment", require_arg, 'a'},
- {"infile", require_arg, 'i'}, /* for backward compability */
- {"outfile", require_arg, 'o'}, /* for backward compability */
- {"fs_strategy", require_arg, 'S'},
{"fs_persist", require_arg, 'P'},
+ {"fs_strategy", require_arg, 'S'},
{"fs_threshold", require_arg, 'T'},
- {"fs_pagesize", require_arg, 'G'},
- {"sort_by", require_arg, 'q'},
- {"sort_order", require_arg, 'z'},
- {"enable-error-stack", no_arg, 'E'},
+ {"version", no_arg, 'V'},
+ {"merge", no_arg, 'X'},
+ {"prune", no_arg, 'W'},
{"src-vol-value", require_arg, '1'},
{"src-vol-name", require_arg, '2'},
{"src-vol-info", require_arg, '3'},
@@ -122,6 +124,12 @@ usage(const char *prog)
" --high=BOUND The high bound for library release versions to use\n");
PRINTVALSTREAM(rawoutstream, " when creating objects in the file\n");
PRINTVALSTREAM(rawoutstream, " (default is H5F_LIBVER_LATEST)\n");
+ PRINTVALSTREAM(rawoutstream,
+ " --merge Follow external soft link recursively and merge data\n");
+ PRINTVALSTREAM(rawoutstream,
+ " --prune Do not follow external soft links and remove link\n");
+ PRINTVALSTREAM(rawoutstream,
+ " --merge --prune Follow external link, merge data and remove dangling link\n");
PRINTVALSTREAM(rawoutstream, " -c L1, --compact=L1 Maximum number of links in header messages\n");
PRINTVALSTREAM(rawoutstream,
" -d L2, --indexed=L2 Minimum number of links in the indexed format\n");
@@ -254,6 +262,7 @@ usage(const char *prog)
PRINTVALSTREAM(rawoutstream,
" Required values: filter_number, filter_flag, cd_value_count, value1\n");
PRINTVALSTREAM(rawoutstream, " Optional values: value2 to valueN\n");
+ PRINTVALSTREAM(rawoutstream, " filter_flag: 1 is OPTIONAL or 0 is MANDATORY\n");
PRINTVALSTREAM(rawoutstream, " NONE (no parameter)\n");
PRINTVALSTREAM(rawoutstream, "\n");
PRINTVALSTREAM(rawoutstream, " LAYT - is a string with the format:\n");
@@ -358,7 +367,7 @@ read_info(const char *filename, pack_opt_t *options)
break;
/* Info indicator must be for layout or filter */
- if (HDstrcmp(stype, "-l") && HDstrcmp(stype, "-f")) {
+ if (HDstrcmp(stype, "-l") != 0 && HDstrcmp(stype, "-f") != 0) {
error_msg("bad file format for %s", filename);
h5tools_setstatus(EXIT_FAILURE);
ret_value = EXIT_FAILURE;
@@ -588,6 +597,14 @@ parse_command_line(int argc, const char **argv, pack_opt_t *options)
options->high_bound = bound;
break;
+ case 'X':
+ options->merge = TRUE;
+ break;
+
+ case 'W':
+ options->prune = TRUE;
+ break;
+
case 'c':
options->grp_compact = HDatoi(opt_arg);
if (options->grp_compact > 0)
diff --git a/tools/src/h5repack/h5repack_opttable.c b/tools/src/h5repack/h5repack_opttable.c
index 2fd39fd75b0..167506fa0ab 100644
--- a/tools/src/h5repack/h5repack_opttable.c
+++ b/tools/src/h5repack/h5repack_opttable.c
@@ -339,7 +339,7 @@ options_get_object(const char *path, pack_opttbl_t *table)
for (i = 0; i < table->nelems; i++) {
/* make full path (start with "/") to compare correctly */
- if (HDstrncmp(table->objs[i].path, "/", 1)) {
+ if (HDstrncmp(table->objs[i].path, "/", 1) != 0) {
HDstrcpy(tbl_path, "/");
HDstrcat(tbl_path, table->objs[i].path);
}
diff --git a/tools/src/h5repack/h5repack_parse.c b/tools/src/h5repack/h5repack_parse.c
index 1bfed8bbc4f..1c06caecef9 100644
--- a/tools/src/h5repack/h5repack_parse.c
+++ b/tools/src/h5repack/h5repack_parse.c
@@ -478,7 +478,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
* Example:
* "AA,B,CDE:CHUNK=10X10"
*
- * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+ * Programmer: Pedro Vicente
*
* Date: December 30, 2003
*
diff --git a/tools/src/h5repack/h5repack_verify.c b/tools/src/h5repack/h5repack_verify.c
index cc5501d3d07..0542d03fa6d 100644
--- a/tools/src/h5repack/h5repack_verify.c
+++ b/tools/src/h5repack/h5repack_verify.c
@@ -378,9 +378,11 @@ h5repack_cmp_pl(const char *fname1, hid_t fname1_fapl, const char *fname2, hid_t
*-------------------------------------------------------------------------
*/
/* Open the files */
- if ((fid1 = h5tools_fopen(fname1, H5F_ACC_RDONLY, fname1_fapl, TRUE, NULL, 0)) < 0)
+ if ((fid1 = h5tools_fopen(fname1, H5F_ACC_RDONLY, fname1_fapl,
+ (fname1_fapl == H5P_DEFAULT) ? FALSE : TRUE, NULL, 0)) < 0)
H5TOOLS_GOTO_ERROR((-1), "h5tools_fopen failed <%s>: %s", fname1, H5FOPENERROR);
- if ((fid2 = h5tools_fopen(fname2, H5F_ACC_RDONLY, fname2_fapl, TRUE, NULL, 0)) < 0)
+ if ((fid2 = h5tools_fopen(fname2, H5F_ACC_RDONLY, fname2_fapl,
+ (fname2_fapl == H5P_DEFAULT) ? FALSE : TRUE, NULL, 0)) < 0)
H5TOOLS_GOTO_ERROR((-1), "h5tools_fopen failed <%s>: %s", fname2, H5FOPENERROR);
/*-------------------------------------------------------------------------
diff --git a/tools/src/h5stat/h5stat.c b/tools/src/h5stat/h5stat.c
index 62f07349af5..61f336545e5 100644
--- a/tools/src/h5stat/h5stat.c
+++ b/tools/src/h5stat/h5stat.c
@@ -1609,7 +1609,7 @@ print_storage_summary(const iter_t *iter)
{
hsize_t total_meta = 0;
hsize_t unaccount = 0;
- double percent = 0.0f;
+ double percent = 0.0;
HDfprintf(stdout, "File space management strategy: %s\n", FS_STRATEGY_NAME[iter->fs_strategy]);
HDfprintf(stdout, "File space page size: %" PRIuHSIZE " bytes\n", iter->fsp_size);
@@ -1624,7 +1624,7 @@ print_storage_summary(const iter_t *iter)
HDfprintf(stdout, " File metadata: %" PRIuHSIZE " bytes\n", total_meta);
HDfprintf(stdout, " Raw data: %" PRIuHSIZE " bytes\n", iter->dset_storage_size);
- percent = ((double)iter->free_space / (double)iter->filesize) * (double)100.0f;
+ percent = ((double)iter->free_space / (double)iter->filesize) * 100.0;
HDfprintf(stdout, " Amount/Percent of tracked free space: %" PRIuHSIZE " bytes/%3.1f%%\n",
iter->free_space, percent);
diff --git a/tools/src/misc/h5debug.c b/tools/src/misc/h5debug.c
index 454981d1013..72f47cbbe34 100644
--- a/tools/src/misc/h5debug.c
+++ b/tools/src/misc/h5debug.c
@@ -626,7 +626,7 @@ main(int argc, char *argv[])
* Debug shared message master table.
*/
- status = H5SM_table_debug(f, addr, stdout, 0, VCOL, (unsigned)UFAIL, (unsigned)UFAIL);
+ status = H5SM_table_debug(f, addr, stdout, 0, VCOL, UINT_MAX, UINT_MAX);
}
else if (!HDmemcmp(sig, H5SM_LIST_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
diff --git a/tools/test/h5copy/dynlib_copy.c b/tools/test/h5copy/dynlib_copy.c
index 57de3bc15a8..b954a222f2e 100644
--- a/tools/test/h5copy/dynlib_copy.c
+++ b/tools/test/h5copy/dynlib_copy.c
@@ -25,13 +25,13 @@ static size_t H5Z_filter_dynlibud(unsigned int flags, size_t cd_nelmts, const un
/* This message derives from H5Z */
const H5Z_class2_t H5Z_DYNLIBUD[1] = {{
- H5Z_CLASS_T_VERS, /* H5Z_class_t version */
- H5Z_FILTER_DYNLIBUD, /* Filter id number */
- 1, 1, /* Encoding and decoding enabled */
- "dynlibud", /* Filter name for debugging */
- NULL, /* The "can apply" callback */
- NULL, /* The "set local" callback */
- (H5Z_func_t)H5Z_filter_dynlibud, /* The actual filter function */
+ H5Z_CLASS_T_VERS, /* H5Z_class_t version */
+ H5Z_FILTER_DYNLIBUD, /* Filter id number */
+ 1, 1, /* Encoding and decoding enabled */
+ "dynlibud", /* Filter name for debugging */
+ NULL, /* The "can apply" callback */
+ NULL, /* The "set local" callback */
+ H5Z_filter_dynlibud, /* The actual filter function */
}};
H5PL_type_t
@@ -70,7 +70,7 @@ H5Z_filter_dynlibud(unsigned int flags, size_t cd_nelmts, const unsigned int *cd
return (0);
/* Assignment to eliminate unused parameter warning. */
- cd_values = cd_values;
+ (void)cd_values;
if (flags & H5Z_FLAG_REVERSE) { /*read*/
/* Subtract the original value with MULTIPLIER */
diff --git a/tools/test/h5diff/CMakeTests.cmake b/tools/test/h5diff/CMakeTests.cmake
index 5d944b052b7..9c27076499a 100644
--- a/tools/test/h5diff/CMakeTests.cmake
+++ b/tools/test/h5diff/CMakeTests.cmake
@@ -293,6 +293,7 @@
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_80.txt
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_800.txt
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_801.txt
+ ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_830.txt
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_90.txt
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_8625.txt
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_8639.txt
@@ -919,6 +920,8 @@
h5diff_800.out.err
h5diff_801.out
h5diff_801.out.err
+ h5diff_830.out
+ h5diff_830.out.err
h5diff_8625.out
h5diff_8625.out.err
h5diff_8639.out
@@ -1543,6 +1546,11 @@ ADD_H5_TEST (h5diff_646 1 -v --use-system-epsilon -p 0.05 ${FILE1} ${FILE2} /g1/
ADD_H5_TEST (h5diff_800 1 -v ${FILE7} ${FILE8} /g1/array /g1/array)
ADD_H5_TEST (h5diff_801 1 -v ${FILE7} ${FILE8A} /g1/array /g1/array)
+# ##############################################################################
+# # dataset subsets
+# ##############################################################################
+ADD_H5_TEST (h5diff_830 1 --enable-error-stack -v ${FILE7} ${FILE8} /g1/array3D[0,0,0;2,2,1;2,2,2;] /g1/array3D[0,0,0;2,2,1;2,2,2;])
+
# ##############################################################################
# # VDS tests
# ##############################################################################
diff --git a/tools/test/h5diff/dynlib_diff.c b/tools/test/h5diff/dynlib_diff.c
index 4568ca17981..433522de1f1 100644
--- a/tools/test/h5diff/dynlib_diff.c
+++ b/tools/test/h5diff/dynlib_diff.c
@@ -25,13 +25,13 @@ static size_t H5Z_filter_dynlibud(unsigned int flags, size_t cd_nelmts, const un
/* This message derives from H5Z */
const H5Z_class2_t H5Z_DYNLIBUD[1] = {{
- H5Z_CLASS_T_VERS, /* H5Z_class_t version */
- H5Z_FILTER_DYNLIBUD, /* Filter id number */
- 1, 1, /* Encoding and decoding enabled */
- "dynlibud", /* Filter name for debugging */
- NULL, /* The "can apply" callback */
- NULL, /* The "set local" callback */
- (H5Z_func_t)H5Z_filter_dynlibud, /* The actual filter function */
+ H5Z_CLASS_T_VERS, /* H5Z_class_t version */
+ H5Z_FILTER_DYNLIBUD, /* Filter id number */
+ 1, 1, /* Encoding and decoding enabled */
+ "dynlibud", /* Filter name for debugging */
+ NULL, /* The "can apply" callback */
+ NULL, /* The "set local" callback */
+ H5Z_filter_dynlibud, /* The actual filter function */
}};
H5PL_type_t
@@ -70,7 +70,7 @@ H5Z_filter_dynlibud(unsigned int flags, size_t cd_nelmts, const unsigned int *cd
return (0);
/* Assignment to eliminate unused parameter warning. */
- cd_values = cd_values;
+ (void)cd_values;
if (flags & H5Z_FLAG_REVERSE) { /*read*/
/* Subtract the original value with MULTIPLIER */
diff --git a/tools/test/h5diff/h5diffgentest.c b/tools/test/h5diff/h5diffgentest.c
index 698bd744fd3..f03254e8b90 100644
--- a/tools/test/h5diff/h5diffgentest.c
+++ b/tools/test/h5diff/h5diffgentest.c
@@ -31,7 +31,7 @@ size_t H5TOOLS_MALLOCSIZE = (128 * 1024 * 1024);
*
* Purpose: generate files for h5diff testing
*
- * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+ * Programmer: Pedro Vicente
*
* Date: November 12, 2003
*
@@ -465,15 +465,15 @@ test_basic(const char *fname1, const char *fname2, const char *fname3)
float data15[6];
float data16[6];
- data15[0] = (float)HDsqrt(-1.0F);
+ data15[0] = (float)HDsqrt(-1.0);
data15[1] = 1.0F;
- data15[2] = (float)HDsqrt(-1.0F);
+ data15[2] = (float)HDsqrt(-1.0);
data15[3] = 1.0F;
data15[4] = 1.0F;
data15[5] = 1.0F;
- data16[0] = (float)HDsqrt(-1.0F);
- data16[1] = (float)HDsqrt(-1.0F);
+ data16[0] = (float)HDsqrt(-1.0);
+ data16[1] = (float)HDsqrt(-1.0);
data16[2] = 1.0F;
data16[3] = 1.0F;
data16[4] = 1.0F;
@@ -492,19 +492,19 @@ test_basic(const char *fname1, const char *fname2, const char *fname3)
double data17[6];
double data18[6];
- data17[0] = HDsqrt(-1.0F);
- data17[1] = 1.0F;
- data17[2] = HDsqrt(-1.0F);
- data17[3] = 1.0F;
- data17[4] = 1.0F;
- data17[5] = 1.0F;
+ data17[0] = HDsqrt(-1.0);
+ data17[1] = 1.0;
+ data17[2] = HDsqrt(-1.0);
+ data17[3] = 1.0;
+ data17[4] = 1.0;
+ data17[5] = 1.0;
- data18[0] = HDsqrt(-1.0F);
- data18[1] = HDsqrt(-10000.0F);
- data18[2] = 1.0F;
- data18[3] = 1.0F;
- data18[4] = 1.0F;
- data18[5] = 1.0F;
+ data18[0] = HDsqrt(-1.0);
+ data18[1] = HDsqrt(-10000.0);
+ data18[2] = 1.0;
+ data18[3] = 1.0;
+ data18[4] = 1.0;
+ data18[5] = 1.0;
write_dset(gid1, 1, dims1, "fp17", H5T_NATIVE_DOUBLE, data17);
write_dset(gid1, 1, dims1, "fp18", H5T_NATIVE_DOUBLE, data18);
@@ -519,11 +519,11 @@ test_basic(const char *fname1, const char *fname2, const char *fname3)
float data19[6];
double data20[6];
- data19[0] = data19[1] = data19[2] = (float)HDlog(0.0F);
- data19[3] = data19[4] = data19[5] = (float)-HDlog(0.0F);
+ data19[0] = data19[1] = data19[2] = (float)HDlog(0.0);
+ data19[3] = data19[4] = data19[5] = (float)-HDlog(0.0);
- data20[0] = data20[1] = data20[2] = HDlog(0.0F);
- data20[3] = data20[4] = data20[5] = -HDlog(0.0F);
+ data20[0] = data20[1] = data20[2] = HDlog(0.0);
+ data20[3] = data20[4] = data20[5] = -HDlog(0.0);
write_dset(gid1, 1, dims1, "fp19", H5T_NATIVE_FLOAT, data19);
write_dset(gid1, 1, dims1, "fp19_COPY", H5T_NATIVE_FLOAT, data19);
@@ -547,13 +547,13 @@ test_basic(const char *fname1, const char *fname2, const char *fname3)
size_t type_size;
hid_t tid;
- buf1[0].d = HDsqrt(-1.0F);
- buf1[0].f = (float)HDsqrt(-1.0F);
- buf2[0].d = HDsqrt(-1.0F);
- buf2[0].f = (float)HDsqrt(-1.0F);
+ buf1[0].d = HDsqrt(-1.0);
+ buf1[0].f = (float)HDsqrt(-1.0);
+ buf2[0].d = HDsqrt(-1.0);
+ buf2[0].f = (float)HDsqrt(-1.0);
- buf1[1].d = HDsqrt(-1.0F);
- buf1[1].f = (float)HDsqrt(-1.0F);
+ buf1[1].d = HDsqrt(-1.0);
+ buf1[1].f = (float)HDsqrt(-1.0);
buf2[1].d = 0.0F;
buf2[1].f = 0.0F;
@@ -5009,8 +5009,6 @@ test_objs_nocomparables(const char *fname1, const char *fname2)
H5Tclose(tid2);
}
H5E_END_TRY;
-
- return;
}
static hid_t
@@ -8017,7 +8015,6 @@ test_double_epsilon(const char *fname1, const char *fname2)
{
hid_t fid1 = H5I_INVALID_HID, fid2 = H5I_INVALID_HID;
hsize_t dims1[2] = {4, 7};
- hsize_t dims2[2] = {4, 7};
double wdata[4][7];
int i, j;
@@ -8059,8 +8056,6 @@ test_double_epsilon(const char *fname1, const char *fname2)
H5Fclose(fid2);
}
H5E_END_TRY;
-
- return;
}
/*-------------------------------------------------------------------------
diff --git a/tools/test/h5diff/testfiles/h5diff_10.txt b/tools/test/h5diff/testfiles/h5diff_10.txt
index b5ff01a17dc..3631db7ef2a 100644
--- a/tools/test/h5diff/testfiles/h5diff_10.txt
+++ b/tools/test/h5diff/testfiles/h5diff_10.txt
@@ -143,6 +143,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
(The option --follow-symlinks overrides the default behavior when
symbolic links are compared.).
+ Subsetting options:
+ Subsetting is available by using the fcompact form of subsetting, as follows:
+ obj1 /foo/mydataset[START;STRIDE;COUNT;BLOCK]
+ It is not required to use all parameters, but until the last parameter value used,
+ all of the semicolons (;) are required, even when a parameter value is not specified. Example:
+ obj1 /foo/mydataset[START;;COUNT;BLOCK]
+ obj1 /foo/mydataset[START]
+ The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in
+ each dimension. START is optional and will default to 0 in each dimension.
+ Each of START, STRIDE, COUNT, and BLOCK must be a comma-separated list of integers with
+ one integer for each dimension of the dataset.
+
Exit code:
0 if no differences, 1 if differences found, 2 if error
diff --git a/tools/test/h5diff/testfiles/h5diff_600.txt b/tools/test/h5diff/testfiles/h5diff_600.txt
index f52d8cca464..8a4ce6d501e 100644
--- a/tools/test/h5diff/testfiles/h5diff_600.txt
+++ b/tools/test/h5diff/testfiles/h5diff_600.txt
@@ -143,6 +143,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
(The option --follow-symlinks overrides the default behavior when
symbolic links are compared.).
+ Subsetting options:
+ Subsetting is available by using the fcompact form of subsetting, as follows:
+ obj1 /foo/mydataset[START;STRIDE;COUNT;BLOCK]
+ It is not required to use all parameters, but until the last parameter value used,
+ all of the semicolons (;) are required, even when a parameter value is not specified. Example:
+ obj1 /foo/mydataset[START;;COUNT;BLOCK]
+ obj1 /foo/mydataset[START]
+ The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in
+ each dimension. START is optional and will default to 0 in each dimension.
+ Each of START, STRIDE, COUNT, and BLOCK must be a comma-separated list of integers with
+ one integer for each dimension of the dataset.
+
Exit code:
0 if no differences, 1 if differences found, 2 if error
diff --git a/tools/test/h5diff/testfiles/h5diff_603.txt b/tools/test/h5diff/testfiles/h5diff_603.txt
index 84111b3cd2d..d4c73365ddd 100644
--- a/tools/test/h5diff/testfiles/h5diff_603.txt
+++ b/tools/test/h5diff/testfiles/h5diff_603.txt
@@ -144,6 +144,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
(The option --follow-symlinks overrides the default behavior when
symbolic links are compared.).
+ Subsetting options:
+ Subsetting is available by using the fcompact form of subsetting, as follows:
+ obj1 /foo/mydataset[START;STRIDE;COUNT;BLOCK]
+ It is not required to use all parameters, but until the last parameter value used,
+ all of the semicolons (;) are required, even when a parameter value is not specified. Example:
+ obj1 /foo/mydataset[START;;COUNT;BLOCK]
+ obj1 /foo/mydataset[START]
+ The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in
+ each dimension. START is optional and will default to 0 in each dimension.
+ Each of START, STRIDE, COUNT, and BLOCK must be a comma-separated list of integers with
+ one integer for each dimension of the dataset.
+
Exit code:
0 if no differences, 1 if differences found, 2 if error
diff --git a/tools/test/h5diff/testfiles/h5diff_606.txt b/tools/test/h5diff/testfiles/h5diff_606.txt
index d915d36a7be..3123587b097 100644
--- a/tools/test/h5diff/testfiles/h5diff_606.txt
+++ b/tools/test/h5diff/testfiles/h5diff_606.txt
@@ -144,6 +144,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
(The option --follow-symlinks overrides the default behavior when
symbolic links are compared.).
+ Subsetting options:
+ Subsetting is available by using the fcompact form of subsetting, as follows:
+ obj1 /foo/mydataset[START;STRIDE;COUNT;BLOCK]
+ It is not required to use all parameters, but until the last parameter value used,
+ all of the semicolons (;) are required, even when a parameter value is not specified. Example:
+ obj1 /foo/mydataset[START;;COUNT;BLOCK]
+ obj1 /foo/mydataset[START]
+ The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in
+ each dimension. START is optional and will default to 0 in each dimension.
+ Each of START, STRIDE, COUNT, and BLOCK must be a comma-separated list of integers with
+ one integer for each dimension of the dataset.
+
Exit code:
0 if no differences, 1 if differences found, 2 if error
diff --git a/tools/test/h5diff/testfiles/h5diff_612.txt b/tools/test/h5diff/testfiles/h5diff_612.txt
index 1ef8cdf4873..ce2d88740f9 100644
--- a/tools/test/h5diff/testfiles/h5diff_612.txt
+++ b/tools/test/h5diff/testfiles/h5diff_612.txt
@@ -144,6 +144,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
(The option --follow-symlinks overrides the default behavior when
symbolic links are compared.).
+ Subsetting options:
+ Subsetting is available by using the fcompact form of subsetting, as follows:
+ obj1 /foo/mydataset[START;STRIDE;COUNT;BLOCK]
+ It is not required to use all parameters, but until the last parameter value used,
+ all of the semicolons (;) are required, even when a parameter value is not specified. Example:
+ obj1 /foo/mydataset[START;;COUNT;BLOCK]
+ obj1 /foo/mydataset[START]
+ The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in
+ each dimension. START is optional and will default to 0 in each dimension.
+ Each of START, STRIDE, COUNT, and BLOCK must be a comma-separated list of integers with
+ one integer for each dimension of the dataset.
+
Exit code:
0 if no differences, 1 if differences found, 2 if error
diff --git a/tools/test/h5diff/testfiles/h5diff_615.txt b/tools/test/h5diff/testfiles/h5diff_615.txt
index 881362e3f8f..61fd0369e09 100644
--- a/tools/test/h5diff/testfiles/h5diff_615.txt
+++ b/tools/test/h5diff/testfiles/h5diff_615.txt
@@ -144,6 +144,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
(The option --follow-symlinks overrides the default behavior when
symbolic links are compared.).
+ Subsetting options:
+ Subsetting is available by using the fcompact form of subsetting, as follows:
+ obj1 /foo/mydataset[START;STRIDE;COUNT;BLOCK]
+ It is not required to use all parameters, but until the last parameter value used,
+ all of the semicolons (;) are required, even when a parameter value is not specified. Example:
+ obj1 /foo/mydataset[START;;COUNT;BLOCK]
+ obj1 /foo/mydataset[START]
+ The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in
+ each dimension. START is optional and will default to 0 in each dimension.
+ Each of START, STRIDE, COUNT, and BLOCK must be a comma-separated list of integers with
+ one integer for each dimension of the dataset.
+
Exit code:
0 if no differences, 1 if differences found, 2 if error
diff --git a/tools/test/h5diff/testfiles/h5diff_621.txt b/tools/test/h5diff/testfiles/h5diff_621.txt
index ba39a994752..dc8655d8bc5 100644
--- a/tools/test/h5diff/testfiles/h5diff_621.txt
+++ b/tools/test/h5diff/testfiles/h5diff_621.txt
@@ -144,6 +144,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
(The option --follow-symlinks overrides the default behavior when
symbolic links are compared.).
+ Subsetting options:
+ Subsetting is available by using the fcompact form of subsetting, as follows:
+ obj1 /foo/mydataset[START;STRIDE;COUNT;BLOCK]
+ It is not required to use all parameters, but until the last parameter value used,
+ all of the semicolons (;) are required, even when a parameter value is not specified. Example:
+ obj1 /foo/mydataset[START;;COUNT;BLOCK]
+ obj1 /foo/mydataset[START]
+ The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in
+ each dimension. START is optional and will default to 0 in each dimension.
+ Each of START, STRIDE, COUNT, and BLOCK must be a comma-separated list of integers with
+ one integer for each dimension of the dataset.
+
Exit code:
0 if no differences, 1 if differences found, 2 if error
diff --git a/tools/test/h5diff/testfiles/h5diff_622.txt b/tools/test/h5diff/testfiles/h5diff_622.txt
index 70421fc0cd0..f20ffbe1f9b 100644
--- a/tools/test/h5diff/testfiles/h5diff_622.txt
+++ b/tools/test/h5diff/testfiles/h5diff_622.txt
@@ -144,6 +144,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
(The option --follow-symlinks overrides the default behavior when
symbolic links are compared.).
+ Subsetting options:
+ Subsetting is available by using the fcompact form of subsetting, as follows:
+ obj1 /foo/mydataset[START;STRIDE;COUNT;BLOCK]
+ It is not required to use all parameters, but until the last parameter value used,
+ all of the semicolons (;) are required, even when a parameter value is not specified. Example:
+ obj1 /foo/mydataset[START;;COUNT;BLOCK]
+ obj1 /foo/mydataset[START]
+ The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in
+ each dimension. START is optional and will default to 0 in each dimension.
+ Each of START, STRIDE, COUNT, and BLOCK must be a comma-separated list of integers with
+ one integer for each dimension of the dataset.
+
Exit code:
0 if no differences, 1 if differences found, 2 if error
diff --git a/tools/test/h5diff/testfiles/h5diff_623.txt b/tools/test/h5diff/testfiles/h5diff_623.txt
index 0d74268196d..f73d20217b1 100644
--- a/tools/test/h5diff/testfiles/h5diff_623.txt
+++ b/tools/test/h5diff/testfiles/h5diff_623.txt
@@ -144,6 +144,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
(The option --follow-symlinks overrides the default behavior when
symbolic links are compared.).
+ Subsetting options:
+ Subsetting is available by using the fcompact form of subsetting, as follows:
+ obj1 /foo/mydataset[START;STRIDE;COUNT;BLOCK]
+ It is not required to use all parameters, but until the last parameter value used,
+ all of the semicolons (;) are required, even when a parameter value is not specified. Example:
+ obj1 /foo/mydataset[START;;COUNT;BLOCK]
+ obj1 /foo/mydataset[START]
+ The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in
+ each dimension. START is optional and will default to 0 in each dimension.
+ Each of START, STRIDE, COUNT, and BLOCK must be a comma-separated list of integers with
+ one integer for each dimension of the dataset.
+
Exit code:
0 if no differences, 1 if differences found, 2 if error
diff --git a/tools/test/h5diff/testfiles/h5diff_624.txt b/tools/test/h5diff/testfiles/h5diff_624.txt
index cb8b8b4c7cc..903b7380bb7 100644
--- a/tools/test/h5diff/testfiles/h5diff_624.txt
+++ b/tools/test/h5diff/testfiles/h5diff_624.txt
@@ -144,6 +144,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
(The option --follow-symlinks overrides the default behavior when
symbolic links are compared.).
+ Subsetting options:
+ Subsetting is available by using the fcompact form of subsetting, as follows:
+ obj1 /foo/mydataset[START;STRIDE;COUNT;BLOCK]
+ It is not required to use all parameters, but until the last parameter value used,
+ all of the semicolons (;) are required, even when a parameter value is not specified. Example:
+ obj1 /foo/mydataset[START;;COUNT;BLOCK]
+ obj1 /foo/mydataset[START]
+ The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in
+ each dimension. START is optional and will default to 0 in each dimension.
+ Each of START, STRIDE, COUNT, and BLOCK must be a comma-separated list of integers with
+ one integer for each dimension of the dataset.
+
Exit code:
0 if no differences, 1 if differences found, 2 if error
diff --git a/tools/test/h5diff/testfiles/h5diff_830.txt b/tools/test/h5diff/testfiles/h5diff_830.txt
new file mode 100644
index 00000000000..8f00d8bbbfe
--- /dev/null
+++ b/tools/test/h5diff/testfiles/h5diff_830.txt
@@ -0,0 +1,30 @@
+dataset: and
+size: [4x3x2] [4x3x2]
+position array3D array3D difference
+------------------------------------------------------------
+[ 0 0 0 ] 1 0 1
+[ 0 0 0 ] 2 0 2
+[ 0 0 0 ] 3 0 3
+[ 0 0 1 ] 4 0 4
+[ 0 0 1 ] 5 0 5
+[ 0 0 1 ] 6 0 6
+[ 0 2 0 ] 13 0 13
+[ 0 2 0 ] 14 0 14
+[ 0 2 0 ] 15 0 15
+[ 0 2 1 ] 16 0 16
+[ 0 2 1 ] 17 0 17
+[ 0 2 1 ] 18 0 18
+[ 2 0 0 ] 37 0 37
+[ 2 0 0 ] 38 0 38
+[ 2 0 0 ] 39 0 39
+[ 2 0 1 ] 40 0 40
+[ 2 0 1 ] 41 0 41
+[ 2 0 1 ] 42 0 42
+[ 2 2 0 ] 49 0 49
+[ 2 2 0 ] 50 0 50
+[ 2 2 0 ] 51 0 51
+[ 2 2 1 ] 52 0 52
+[ 2 2 1 ] 53 0 53
+[ 2 2 1 ] 54 0 54
+24 differences found
+EXIT CODE: 1
diff --git a/tools/test/h5diff/testh5diff.sh.in b/tools/test/h5diff/testh5diff.sh.in
index c8f8ed24d3e..bd27dd0ef9b 100644
--- a/tools/test/h5diff/testh5diff.sh.in
+++ b/tools/test/h5diff/testh5diff.sh.in
@@ -354,6 +354,7 @@ $SRC_H5DIFF_TESTFILES/h5diff_710.txt
$SRC_H5DIFF_TESTFILES/h5diff_80.txt
$SRC_H5DIFF_TESTFILES/h5diff_800.txt
$SRC_H5DIFF_TESTFILES/h5diff_801.txt
+$SRC_H5DIFF_TESTFILES/h5diff_830.txt
$SRC_H5DIFF_TESTFILES/h5diff_90.txt
$SRC_H5DIFF_TESTFILES/h5diff_8625.txt
$SRC_H5DIFF_TESTFILES/h5diff_8639.txt
@@ -1204,7 +1205,7 @@ TOOLTEST h5diff_801.txt -v h5diff_dset1.h5 h5diff_dset3.h5 /g1/array /g1/array
# ##############################################################################
# # dataset subsets
# ##############################################################################
-#TRILABS_227 TOOLTEST h5diff_830.txt --enable-error-stack -v h5diff_dset1.h5 h5diff_dset2.h5 /g1/array3D[0,0,0;2,2,1;2,2,2;] /g1/array3D[0,0,0;2,2,1;2,2,2;]
+#TOOLTEST h5diff_830.txt --enable-error-stack -v h5diff_dset1.h5 h5diff_dset2.h5 "/g1/array3D[0,0,0;2,2,1;2,2,2;]" "/g1/array3D[0,0,0;2,2,1;2,2,2;]"
# ##############################################################################
# VDS tests
diff --git a/tools/test/h5dump/CMakeTests.cmake b/tools/test/h5dump/CMakeTests.cmake
index 0d8563efa71..a8984defe8b 100644
--- a/tools/test/h5dump/CMakeTests.cmake
+++ b/tools/test/h5dump/CMakeTests.cmake
@@ -101,6 +101,8 @@
${HDF5_TOOLS_DIR}/testfiles/tfamily.ddl
${HDF5_TOOLS_DIR}/testfiles/tfill.ddl
${HDF5_TOOLS_DIR}/testfiles/tfletcher32.ddl
+ #${HDF5_TOOLS_DIR}/testfiles/tfloatsattrs.ddl #native
+ #${HDF5_TOOLS_DIR}/testfiles/tfloatsattrs.wddl #special for windows
${HDF5_TOOLS_DIR}/testfiles/tfpformat.ddl
${HDF5_TOOLS_DIR}/testfiles/tgroup-1.ddl
${HDF5_TOOLS_DIR}/testfiles/tgroup-2.ddl
@@ -127,7 +129,8 @@
${HDF5_TOOLS_DIR}/testfiles/tintsattrs.ddl
${HDF5_TOOLS_DIR}/testfiles/tintsnodata.ddl
${HDF5_TOOLS_DIR}/testfiles/tlarge_objname.ddl
- #${HDF5_TOOLS_DIR}/testfiles/tldouble.ddl
+ ${HDF5_TOOLS_DIR}/testfiles/tldouble.ddl
+ ${HDF5_TOOLS_DIR}/testfiles/tldouble_scalar.ddl
${HDF5_TOOLS_DIR}/testfiles/tlonglinks.ddl
${HDF5_TOOLS_DIR}/testfiles/tloop-1.ddl
${HDF5_TOOLS_DIR}/testfiles/tmulti.ddl
@@ -282,6 +285,7 @@
${HDF5_TOOLS_DIR}/testfiles/tfcontents1.h5
${HDF5_TOOLS_DIR}/testfiles/tfcontents2.h5
${HDF5_TOOLS_DIR}/testfiles/tfilters.h5
+ ${HDF5_TOOLS_DIR}/testfiles/tfloatsattrs.h5
${HDF5_TOOLS_DIR}/testfiles/tfpformat.h5
${HDF5_TOOLS_DIR}/testfiles/tfvalues.h5
${HDF5_TOOLS_DIR}/testfiles/tgroup.h5
@@ -293,7 +297,8 @@
${HDF5_TOOLS_DIR}/testfiles/tintsattrs.h5
${HDF5_TOOLS_DIR}/testfiles/tintsnodata.h5
${HDF5_TOOLS_DIR}/testfiles/tlarge_objname.h5
- #${HDF5_TOOLS_DIR}/testfiles/tldouble.h5
+ ${HDF5_TOOLS_DIR}/testfiles/tldouble.h5
+ ${HDF5_TOOLS_DIR}/testfiles/tldouble_scalar.h5
${HDF5_TOOLS_DIR}/testfiles/tlonglinks.h5
${HDF5_TOOLS_DIR}/testfiles/tloop.h5
${HDF5_TOOLS_DIR}/testfiles/tmulti-b.h5
@@ -331,6 +336,8 @@
${HDF5_TOOLS_DIR}/testfiles/tvlstr.h5
${HDF5_TOOLS_DIR}/testfiles/tvms.h5
${HDF5_TOOLS_DIR}/testfiles/t128bit_float.h5
+ ${HDF5_TOOLS_DIR}/testfiles/tCVE_2018_11206_fill_old.h5
+ ${HDF5_TOOLS_DIR}/testfiles/tCVE_2018_11206_fill_new.h5
${HDF5_TOOLS_DIR}/testfiles/zerodim.h5
#STD_REF_OBJ files
${HDF5_TOOLS_DIR}/testfiles/trefer_attr.h5
@@ -409,8 +416,10 @@
configure_file(${HDF5_TOOLS_DIR}/testfiles/tbinregR.exp ${PROJECT_BINARY_DIR}/testfiles/std/tbinregR.exp NEWLINE_STYLE CRLF)
#file (READ ${HDF5_TOOLS_DIR}/testfiles/tbinregR.exp TEST_STREAM)
#file (WRITE ${PROJECT_BINARY_DIR}/testfiles/std/tbinregR.exp "${TEST_STREAM}")
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/tfloatsattrs.wddl" "${PROJECT_BINARY_DIR}/testfiles/std/tfloatsattrs.ddl" "h5dump_std_files")
else ()
HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/tbinregR.exp" "${PROJECT_BINARY_DIR}/testfiles/std/tbinregR.exp" "h5dump_std_files")
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/tfloatsattrs.ddl" "${PROJECT_BINARY_DIR}/testfiles/std/tfloatsattrs.ddl" "h5dump_std_files")
endif ()
add_custom_target(h5dump_std_files ALL COMMENT "Copying files needed by h5dump_std tests" DEPENDS ${h5dump_std_files_list})
@@ -1085,7 +1094,9 @@
ADD_H5_TEST (zerodim 0 --enable-error-stack zerodim.h5)
# test for long double (some systems do not have long double)
- #ADD_H5_TEST (tldouble 0 --enable-error-stack tldouble.h5)
+ ADD_H5_TEST (tfloatsattrs 0 -p --enable-error-stack tfloatsattrs.h5)
+ ADD_H5_TEST (tldouble 0 --enable-error-stack tldouble.h5)
+ ADD_H5_TEST (tldouble_scalar 0 -p --enable-error-stack tldouble_scalar.h5)
# test for vms
ADD_H5_TEST (tvms 0 --enable-error-stack tvms.h5)
@@ -1170,7 +1181,11 @@
ADD_H5_TEST (err_attr_dspace 1 err_attr_dspace.h5)
# test to verify HDFFV-9407: long double full precision
- ADD_H5_GREP_TEST (t128bit_float 1 "1.123456789012345" -m %.35Lf t128bit_float.h5)
+# ADD_H5_GREP_TEST (t128bit_float 1 "1.123456789012345" -m %.35Lg t128bit_float.h5)
+
+ # test to verify HDFFV-10480: out of bounds read in H5O_fill_new[old]_decode
+ ADD_H5_TEST (tCVE_2018_11206_fill_old 1 tCVE_2018_11206_fill_old.h5)
+ ADD_H5_TEST (tCVE_2018_11206_fill_new 1 tCVE_2018_11206_fill_new.h5)
##############################################################################
### P L U G I N T E S T S
diff --git a/tools/test/h5dump/dynlib_dump.c b/tools/test/h5dump/dynlib_dump.c
index 4568ca17981..433522de1f1 100644
--- a/tools/test/h5dump/dynlib_dump.c
+++ b/tools/test/h5dump/dynlib_dump.c
@@ -25,13 +25,13 @@ static size_t H5Z_filter_dynlibud(unsigned int flags, size_t cd_nelmts, const un
/* This message derives from H5Z */
const H5Z_class2_t H5Z_DYNLIBUD[1] = {{
- H5Z_CLASS_T_VERS, /* H5Z_class_t version */
- H5Z_FILTER_DYNLIBUD, /* Filter id number */
- 1, 1, /* Encoding and decoding enabled */
- "dynlibud", /* Filter name for debugging */
- NULL, /* The "can apply" callback */
- NULL, /* The "set local" callback */
- (H5Z_func_t)H5Z_filter_dynlibud, /* The actual filter function */
+ H5Z_CLASS_T_VERS, /* H5Z_class_t version */
+ H5Z_FILTER_DYNLIBUD, /* Filter id number */
+ 1, 1, /* Encoding and decoding enabled */
+ "dynlibud", /* Filter name for debugging */
+ NULL, /* The "can apply" callback */
+ NULL, /* The "set local" callback */
+ H5Z_filter_dynlibud, /* The actual filter function */
}};
H5PL_type_t
@@ -70,7 +70,7 @@ H5Z_filter_dynlibud(unsigned int flags, size_t cd_nelmts, const unsigned int *cd
return (0);
/* Assignment to eliminate unused parameter warning. */
- cd_values = cd_values;
+ (void)cd_values;
if (flags & H5Z_FLAG_REVERSE) { /*read*/
/* Subtract the original value with MULTIPLIER */
diff --git a/tools/test/h5dump/errfiles/tall-1.err b/tools/test/h5dump/errfiles/tall-1.err
index 2269c9763cc..84401596034 100644
--- a/tools/test/h5dump/errfiles/tall-1.err
+++ b/tools/test/h5dump/errfiles/tall-1.err
@@ -1,34 +1,37 @@
HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
- #000: (file name) line (number) in H5Oopen(): unable to open object
+ #000: (file name) line (number) in H5Oopen(): unable to synchronously open object
major: Object header
minor: Can't open object
- #001: (file name) line (number) in H5VL_object_open(): object open failed
+ #001: (file name) line (number) in H5O__open_api_common(): unable to open object
+ major: Object header
+ minor: Can't open object
+ #002: (file name) line (number) in H5VL_object_open(): object open failed
major: Virtual Object Layer
minor: Can't open object
- #002: (file name) line (number) in H5VL__object_open(): object open failed
+ #003: (file name) line (number) in H5VL__object_open(): object open failed
major: Virtual Object Layer
minor: Can't open object
- #003: (file name) line (number) in H5VL__native_object_open(): unable to open object by name
+ #004: (file name) line (number) in H5VL__native_object_open(): unable to open object by name
major: Object header
minor: Can't open object
- #004: (file name) line (number) in H5O_open_name(): object not found
+ #005: (file name) line (number) in H5O_open_name(): object not found
major: Object header
minor: Object not found
- #005: (file name) line (number) in H5G_loc_find(): can't find object
+ #006: (file name) line (number) in H5G_loc_find(): can't find object
major: Symbol table
minor: Object not found
- #006: (file name) line (number) in H5G_traverse(): internal path traversal failed
+ #007: (file name) line (number) in H5G_traverse(): internal path traversal failed
major: Symbol table
minor: Object not found
- #007: (file name) line (number) in H5G__traverse_real(): special link traversal failed
+ #008: (file name) line (number) in H5G__traverse_real(): special link traversal failed
major: Links
minor: Link traversal failure
- #008: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed
+ #009: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed
major: Links
minor: Link traversal failure
- #009: (file name) line (number) in H5G__traverse_ud(): traversal callback returned invalid ID
+ #010: (file name) line (number) in H5G__traverse_ud(): traversal callback returned invalid ID
major: Symbol table
minor: Unable to find ID information (already closed?)
- #010: (file name) line (number) in H5L__extern_traverse(): unable to open external file, external link file name = 'somefile'
+ #011: (file name) line (number) in H5L__extern_traverse(): unable to open external file, external link file name = 'somefile'
major: Links
minor: Unable to open file
diff --git a/tools/test/h5dump/errfiles/tall-2A.err b/tools/test/h5dump/errfiles/tall-2A.err
index 2269c9763cc..84401596034 100644
--- a/tools/test/h5dump/errfiles/tall-2A.err
+++ b/tools/test/h5dump/errfiles/tall-2A.err
@@ -1,34 +1,37 @@
HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
- #000: (file name) line (number) in H5Oopen(): unable to open object
+ #000: (file name) line (number) in H5Oopen(): unable to synchronously open object
major: Object header
minor: Can't open object
- #001: (file name) line (number) in H5VL_object_open(): object open failed
+ #001: (file name) line (number) in H5O__open_api_common(): unable to open object
+ major: Object header
+ minor: Can't open object
+ #002: (file name) line (number) in H5VL_object_open(): object open failed
major: Virtual Object Layer
minor: Can't open object
- #002: (file name) line (number) in H5VL__object_open(): object open failed
+ #003: (file name) line (number) in H5VL__object_open(): object open failed
major: Virtual Object Layer
minor: Can't open object
- #003: (file name) line (number) in H5VL__native_object_open(): unable to open object by name
+ #004: (file name) line (number) in H5VL__native_object_open(): unable to open object by name
major: Object header
minor: Can't open object
- #004: (file name) line (number) in H5O_open_name(): object not found
+ #005: (file name) line (number) in H5O_open_name(): object not found
major: Object header
minor: Object not found
- #005: (file name) line (number) in H5G_loc_find(): can't find object
+ #006: (file name) line (number) in H5G_loc_find(): can't find object
major: Symbol table
minor: Object not found
- #006: (file name) line (number) in H5G_traverse(): internal path traversal failed
+ #007: (file name) line (number) in H5G_traverse(): internal path traversal failed
major: Symbol table
minor: Object not found
- #007: (file name) line (number) in H5G__traverse_real(): special link traversal failed
+ #008: (file name) line (number) in H5G__traverse_real(): special link traversal failed
major: Links
minor: Link traversal failure
- #008: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed
+ #009: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed
major: Links
minor: Link traversal failure
- #009: (file name) line (number) in H5G__traverse_ud(): traversal callback returned invalid ID
+ #010: (file name) line (number) in H5G__traverse_ud(): traversal callback returned invalid ID
major: Symbol table
minor: Unable to find ID information (already closed?)
- #010: (file name) line (number) in H5L__extern_traverse(): unable to open external file, external link file name = 'somefile'
+ #011: (file name) line (number) in H5L__extern_traverse(): unable to open external file, external link file name = 'somefile'
major: Links
minor: Unable to open file
diff --git a/tools/test/h5dump/errfiles/tall-2A0.err b/tools/test/h5dump/errfiles/tall-2A0.err
index 2269c9763cc..84401596034 100644
--- a/tools/test/h5dump/errfiles/tall-2A0.err
+++ b/tools/test/h5dump/errfiles/tall-2A0.err
@@ -1,34 +1,37 @@
HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
- #000: (file name) line (number) in H5Oopen(): unable to open object
+ #000: (file name) line (number) in H5Oopen(): unable to synchronously open object
major: Object header
minor: Can't open object
- #001: (file name) line (number) in H5VL_object_open(): object open failed
+ #001: (file name) line (number) in H5O__open_api_common(): unable to open object
+ major: Object header
+ minor: Can't open object
+ #002: (file name) line (number) in H5VL_object_open(): object open failed
major: Virtual Object Layer
minor: Can't open object
- #002: (file name) line (number) in H5VL__object_open(): object open failed
+ #003: (file name) line (number) in H5VL__object_open(): object open failed
major: Virtual Object Layer
minor: Can't open object
- #003: (file name) line (number) in H5VL__native_object_open(): unable to open object by name
+ #004: (file name) line (number) in H5VL__native_object_open(): unable to open object by name
major: Object header
minor: Can't open object
- #004: (file name) line (number) in H5O_open_name(): object not found
+ #005: (file name) line (number) in H5O_open_name(): object not found
major: Object header
minor: Object not found
- #005: (file name) line (number) in H5G_loc_find(): can't find object
+ #006: (file name) line (number) in H5G_loc_find(): can't find object
major: Symbol table
minor: Object not found
- #006: (file name) line (number) in H5G_traverse(): internal path traversal failed
+ #007: (file name) line (number) in H5G_traverse(): internal path traversal failed
major: Symbol table
minor: Object not found
- #007: (file name) line (number) in H5G__traverse_real(): special link traversal failed
+ #008: (file name) line (number) in H5G__traverse_real(): special link traversal failed
major: Links
minor: Link traversal failure
- #008: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed
+ #009: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed
major: Links
minor: Link traversal failure
- #009: (file name) line (number) in H5G__traverse_ud(): traversal callback returned invalid ID
+ #010: (file name) line (number) in H5G__traverse_ud(): traversal callback returned invalid ID
major: Symbol table
minor: Unable to find ID information (already closed?)
- #010: (file name) line (number) in H5L__extern_traverse(): unable to open external file, external link file name = 'somefile'
+ #011: (file name) line (number) in H5L__extern_traverse(): unable to open external file, external link file name = 'somefile'
major: Links
minor: Unable to open file
diff --git a/tools/test/h5dump/errfiles/tall-2B.err b/tools/test/h5dump/errfiles/tall-2B.err
index 2269c9763cc..84401596034 100644
--- a/tools/test/h5dump/errfiles/tall-2B.err
+++ b/tools/test/h5dump/errfiles/tall-2B.err
@@ -1,34 +1,37 @@
HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
- #000: (file name) line (number) in H5Oopen(): unable to open object
+ #000: (file name) line (number) in H5Oopen(): unable to synchronously open object
major: Object header
minor: Can't open object
- #001: (file name) line (number) in H5VL_object_open(): object open failed
+ #001: (file name) line (number) in H5O__open_api_common(): unable to open object
+ major: Object header
+ minor: Can't open object
+ #002: (file name) line (number) in H5VL_object_open(): object open failed
major: Virtual Object Layer
minor: Can't open object
- #002: (file name) line (number) in H5VL__object_open(): object open failed
+ #003: (file name) line (number) in H5VL__object_open(): object open failed
major: Virtual Object Layer
minor: Can't open object
- #003: (file name) line (number) in H5VL__native_object_open(): unable to open object by name
+ #004: (file name) line (number) in H5VL__native_object_open(): unable to open object by name
major: Object header
minor: Can't open object
- #004: (file name) line (number) in H5O_open_name(): object not found
+ #005: (file name) line (number) in H5O_open_name(): object not found
major: Object header
minor: Object not found
- #005: (file name) line (number) in H5G_loc_find(): can't find object
+ #006: (file name) line (number) in H5G_loc_find(): can't find object
major: Symbol table
minor: Object not found
- #006: (file name) line (number) in H5G_traverse(): internal path traversal failed
+ #007: (file name) line (number) in H5G_traverse(): internal path traversal failed
major: Symbol table
minor: Object not found
- #007: (file name) line (number) in H5G__traverse_real(): special link traversal failed
+ #008: (file name) line (number) in H5G__traverse_real(): special link traversal failed
major: Links
minor: Link traversal failure
- #008: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed
+ #009: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed
major: Links
minor: Link traversal failure
- #009: (file name) line (number) in H5G__traverse_ud(): traversal callback returned invalid ID
+ #010: (file name) line (number) in H5G__traverse_ud(): traversal callback returned invalid ID
major: Symbol table
minor: Unable to find ID information (already closed?)
- #010: (file name) line (number) in H5L__extern_traverse(): unable to open external file, external link file name = 'somefile'
+ #011: (file name) line (number) in H5L__extern_traverse(): unable to open external file, external link file name = 'somefile'
major: Links
minor: Unable to open file
diff --git a/tools/test/h5dump/errfiles/tattr-3.err b/tools/test/h5dump/errfiles/tattr-3.err
index 8481acff318..7625965c453 100644
--- a/tools/test/h5dump/errfiles/tattr-3.err
+++ b/tools/test/h5dump/errfiles/tattr-3.err
@@ -1,20 +1,26 @@
HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
- #000: (file name) line (number) in H5Aopen(): unable to open attribute: 'attr'
+ #000: (file name) line (number) in H5Aopen(): unable to synchronously open attribute
+ major: Attribute
+ minor: Unable to create file
+ #001: (file name) line (number) in H5A__open_api_common(): unable to open attribute: 'attr'
+ major: Attribute
+ minor: Can't open object
+ #002: (file name) line (number) in H5A__open_common(): unable to open attribute: 'attr'
major: Attribute
minor: Can't open object
- #001: (file name) line (number) in H5VL_attr_open(): attribute open failed
+ #003: (file name) line (number) in H5VL_attr_open(): attribute open failed
major: Virtual Object Layer
minor: Can't open object
- #002: (file name) line (number) in H5VL__attr_open(): attribute open failed
+ #004: (file name) line (number) in H5VL__attr_open(): attribute open failed
major: Virtual Object Layer
minor: Can't open object
- #003: (file name) line (number) in H5VL__native_attr_open(): unable to open attribute: 'attr'
+ #005: (file name) line (number) in H5VL__native_attr_open(): unable to open attribute: 'attr'
major: Attribute
minor: Can't open object
- #004: (file name) line (number) in H5A__open(): unable to load attribute info from object header for attribute: 'attr'
+ #006: (file name) line (number) in H5A__open(): unable to load attribute info from object header for attribute: 'attr'
major: Attribute
minor: Can't open object
- #005: (file name) line (number) in H5O__attr_open_by_name(): can't locate attribute: 'attr'
+ #007: (file name) line (number) in H5O__attr_open_by_name(): can't locate attribute: 'attr'
major: Attribute
minor: Object not found
h5dump error: unable to open attribute "attr"
diff --git a/tools/test/h5dump/errfiles/tcomp-3.err b/tools/test/h5dump/errfiles/tcomp-3.err
index fc59b0b7f31..650df925421 100644
--- a/tools/test/h5dump/errfiles/tcomp-3.err
+++ b/tools/test/h5dump/errfiles/tcomp-3.err
@@ -1,28 +1,31 @@
HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
- #000: (file name) line (number) in H5Topen2(): unable to open named datatype
+ #000: (file name) line (number) in H5Topen2(): unable to open named datatype synchronously
major: Datatype
minor: Can't open object
- #001: (file name) line (number) in H5VL_datatype_open(): datatype open failed
+ #001: (file name) line (number) in H5T__open_api_common(): unable to open named datatype
+ major: Datatype
+ minor: Can't open object
+ #002: (file name) line (number) in H5VL_datatype_open(): datatype open failed
major: Virtual Object Layer
minor: Can't open object
- #002: (file name) line (number) in H5VL__datatype_open(): datatype open failed
+ #003: (file name) line (number) in H5VL__datatype_open(): datatype open failed
major: Virtual Object Layer
minor: Can't open object
- #003: (file name) line (number) in H5VL__native_datatype_open(): unable to open named datatype
+ #004: (file name) line (number) in H5VL__native_datatype_open(): unable to open named datatype
major: Datatype
minor: Can't open object
- #004: (file name) line (number) in H5T__open_name(): not found
+ #005: (file name) line (number) in H5T__open_name(): not found
major: Datatype
minor: Object not found
- #005: (file name) line (number) in H5G_loc_find(): can't find object
+ #006: (file name) line (number) in H5G_loc_find(): can't find object
major: Symbol table
minor: Object not found
- #006: (file name) line (number) in H5G_traverse(): internal path traversal failed
+ #007: (file name) line (number) in H5G_traverse(): internal path traversal failed
major: Symbol table
minor: Object not found
- #007: (file name) line (number) in H5G__traverse_real(): traversal operator failed
+ #008: (file name) line (number) in H5G__traverse_real(): traversal operator failed
major: Symbol table
minor: Callback failed
- #008: (file name) line (number) in H5G__loc_find_cb(): object '#6632' doesn't exist
+ #009: (file name) line (number) in H5G__loc_find_cb(): object '#6632' doesn't exist
major: Symbol table
minor: Object not found
diff --git a/tools/test/h5dump/errfiles/tdset-2.err b/tools/test/h5dump/errfiles/tdset-2.err
index 39bbb0e9727..051c6775331 100644
--- a/tools/test/h5dump/errfiles/tdset-2.err
+++ b/tools/test/h5dump/errfiles/tdset-2.err
@@ -1,29 +1,32 @@
HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
- #000: (file name) line (number) in H5Dopen2(): unable to open dataset
+ #000: (file name) line (number) in H5Dopen2(): unable to synchronously open dataset
major: Dataset
minor: Can't open object
- #001: (file name) line (number) in H5VL_dataset_open(): dataset open failed
+ #001: (file name) line (number) in H5D__open_api_common(): unable to open dataset
+ major: Dataset
+ minor: Can't open object
+ #002: (file name) line (number) in H5VL_dataset_open(): dataset open failed
major: Virtual Object Layer
minor: Can't open object
- #002: (file name) line (number) in H5VL__dataset_open(): dataset open failed
+ #003: (file name) line (number) in H5VL__dataset_open(): dataset open failed
major: Virtual Object Layer
minor: Can't open object
- #003: (file name) line (number) in H5VL__native_dataset_open(): unable to open dataset
+ #004: (file name) line (number) in H5VL__native_dataset_open(): unable to open dataset
major: Dataset
minor: Can't open object
- #004: (file name) line (number) in H5D__open_name(): not found
+ #005: (file name) line (number) in H5D__open_name(): not found
major: Dataset
minor: Object not found
- #005: (file name) line (number) in H5G_loc_find(): can't find object
+ #006: (file name) line (number) in H5G_loc_find(): can't find object
major: Symbol table
minor: Object not found
- #006: (file name) line (number) in H5G_traverse(): internal path traversal failed
+ #007: (file name) line (number) in H5G_traverse(): internal path traversal failed
major: Symbol table
minor: Object not found
- #007: (file name) line (number) in H5G__traverse_real(): traversal operator failed
+ #008: (file name) line (number) in H5G__traverse_real(): traversal operator failed
major: Symbol table
minor: Callback failed
- #008: (file name) line (number) in H5G__loc_find_cb(): object 'dset3' doesn't exist
+ #009: (file name) line (number) in H5G__loc_find_cb(): object 'dset3' doesn't exist
major: Symbol table
minor: Object not found
HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
diff --git a/tools/test/h5dump/errfiles/textlink.err b/tools/test/h5dump/errfiles/textlink.err
index 5ca94a83b3e..04b129c535b 100644
--- a/tools/test/h5dump/errfiles/textlink.err
+++ b/tools/test/h5dump/errfiles/textlink.err
@@ -1,68 +1,74 @@
HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
- #000: (file name) line (number) in H5Oopen(): unable to open object
+ #000: (file name) line (number) in H5Oopen(): unable to synchronously open object
major: Object header
minor: Can't open object
- #001: (file name) line (number) in H5VL_object_open(): object open failed
+ #001: (file name) line (number) in H5O__open_api_common(): unable to open object
+ major: Object header
+ minor: Can't open object
+ #002: (file name) line (number) in H5VL_object_open(): object open failed
major: Virtual Object Layer
minor: Can't open object
- #002: (file name) line (number) in H5VL__object_open(): object open failed
+ #003: (file name) line (number) in H5VL__object_open(): object open failed
major: Virtual Object Layer
minor: Can't open object
- #003: (file name) line (number) in H5VL__native_object_open(): unable to open object by name
+ #004: (file name) line (number) in H5VL__native_object_open(): unable to open object by name
major: Object header
minor: Can't open object
- #004: (file name) line (number) in H5O_open_name(): object not found
+ #005: (file name) line (number) in H5O_open_name(): object not found
major: Object header
minor: Object not found
- #005: (file name) line (number) in H5G_loc_find(): can't find object
+ #006: (file name) line (number) in H5G_loc_find(): can't find object
major: Symbol table
minor: Object not found
- #006: (file name) line (number) in H5G_traverse(): internal path traversal failed
+ #007: (file name) line (number) in H5G_traverse(): internal path traversal failed
major: Symbol table
minor: Object not found
- #007: (file name) line (number) in H5G__traverse_real(): special link traversal failed
+ #008: (file name) line (number) in H5G__traverse_real(): special link traversal failed
major: Links
minor: Link traversal failure
- #008: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed
+ #009: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed
major: Links
minor: Link traversal failure
- #009: (file name) line (number) in H5G__traverse_ud(): traversal callback returned invalid ID
+ #010: (file name) line (number) in H5G__traverse_ud(): traversal callback returned invalid ID
major: Symbol table
minor: Unable to find ID information (already closed?)
- #010: (file name) line (number) in H5L__extern_traverse(): unable to open external file, external link file name = 'filename'
+ #011: (file name) line (number) in H5L__extern_traverse(): unable to open external file, external link file name = 'filename'
major: Links
minor: Unable to open file
HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
- #000: (file name) line (number) in H5Oopen(): unable to open object
+ #000: (file name) line (number) in H5Oopen(): unable to synchronously open object
+ major: Object header
+ minor: Can't open object
+ #001: (file name) line (number) in H5O__open_api_common(): unable to open object
major: Object header
minor: Can't open object
- #001: (file name) line (number) in H5VL_object_open(): object open failed
+ #002: (file name) line (number) in H5VL_object_open(): object open failed
major: Virtual Object Layer
minor: Can't open object
- #002: (file name) line (number) in H5VL__object_open(): object open failed
+ #003: (file name) line (number) in H5VL__object_open(): object open failed
major: Virtual Object Layer
minor: Can't open object
- #003: (file name) line (number) in H5VL__native_object_open(): unable to open object by name
+ #004: (file name) line (number) in H5VL__native_object_open(): unable to open object by name
major: Object header
minor: Can't open object
- #004: (file name) line (number) in H5O_open_name(): object not found
+ #005: (file name) line (number) in H5O_open_name(): object not found
major: Object header
minor: Object not found
- #005: (file name) line (number) in H5G_loc_find(): can't find object
+ #006: (file name) line (number) in H5G_loc_find(): can't find object
major: Symbol table
minor: Object not found
- #006: (file name) line (number) in H5G_traverse(): internal path traversal failed
+ #007: (file name) line (number) in H5G_traverse(): internal path traversal failed
major: Symbol table
minor: Object not found
- #007: (file name) line (number) in H5G__traverse_real(): special link traversal failed
+ #008: (file name) line (number) in H5G__traverse_real(): special link traversal failed
major: Links
minor: Link traversal failure
- #008: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed
+ #009: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed
major: Links
minor: Link traversal failure
- #009: (file name) line (number) in H5G__traverse_ud(): traversal callback returned invalid ID
+ #010: (file name) line (number) in H5G__traverse_ud(): traversal callback returned invalid ID
major: Symbol table
minor: Unable to find ID information (already closed?)
- #010: (file name) line (number) in H5L__extern_traverse(): unable to open external file, external link file name = 'anotherfile'
+ #011: (file name) line (number) in H5L__extern_traverse(): unable to open external file, external link file name = 'anotherfile'
major: Links
minor: Unable to open file
diff --git a/tools/test/h5dump/errfiles/textlinkfar.err b/tools/test/h5dump/errfiles/textlinkfar.err
index 92bad14302f..e5b81ce4197 100644
--- a/tools/test/h5dump/errfiles/textlinkfar.err
+++ b/tools/test/h5dump/errfiles/textlinkfar.err
@@ -1,59 +1,62 @@
HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
- #000: (file name) line (number) in H5Oopen(): unable to open object
+ #000: (file name) line (number) in H5Oopen(): unable to synchronously open object
major: Object header
minor: Can't open object
- #001: (file name) line (number) in H5VL_object_open(): object open failed
+ #001: (file name) line (number) in H5O__open_api_common(): unable to open object
+ major: Object header
+ minor: Can't open object
+ #002: (file name) line (number) in H5VL_object_open(): object open failed
major: Virtual Object Layer
minor: Can't open object
- #002: (file name) line (number) in H5VL__object_open(): object open failed
+ #003: (file name) line (number) in H5VL__object_open(): object open failed
major: Virtual Object Layer
minor: Can't open object
- #003: (file name) line (number) in H5VL__native_object_open(): unable to open object by name
+ #004: (file name) line (number) in H5VL__native_object_open(): unable to open object by name
major: Object header
minor: Can't open object
- #004: (file name) line (number) in H5O_open_name(): object not found
+ #005: (file name) line (number) in H5O_open_name(): object not found
major: Object header
minor: Object not found
- #005: (file name) line (number) in H5G_loc_find(): can't find object
+ #006: (file name) line (number) in H5G_loc_find(): can't find object
major: Symbol table
minor: Object not found
- #006: (file name) line (number) in H5G_traverse(): internal path traversal failed
+ #007: (file name) line (number) in H5G_traverse(): internal path traversal failed
major: Symbol table
minor: Object not found
- #007: (file name) line (number) in H5G__traverse_real(): special link traversal failed
+ #008: (file name) line (number) in H5G__traverse_real(): special link traversal failed
major: Links
minor: Link traversal failure
- #008: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed
+ #009: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed
major: Links
minor: Link traversal failure
- #009: (file name) line (number) in H5G__traverse_ud(): traversal callback returned invalid ID
+ #010: (file name) line (number) in H5G__traverse_ud(): traversal callback returned invalid ID
major: Symbol table
minor: Unable to find ID information (already closed?)
- #010: (file name) line (number) in H5L__extern_traverse(): unable to open object
+ #011: (file name) line (number) in H5L__extern_traverse(): unable to open object
major: Links
minor: Can't open object
- #011: (file name) line (number) in H5O_open_name(): object not found
+ #012: (file name) line (number) in H5O_open_name(): object not found
major: Object header
minor: Object not found
- #012: (file name) line (number) in H5G_loc_find(): can't find object
+ #013: (file name) line (number) in H5G_loc_find(): can't find object
major: Symbol table
minor: Object not found
- #013: (file name) line (number) in H5G_traverse(): internal path traversal failed
+ #014: (file name) line (number) in H5G_traverse(): internal path traversal failed
major: Symbol table
minor: Object not found
- #014: (file name) line (number) in H5G__traverse_real(): special link traversal failed
+ #015: (file name) line (number) in H5G__traverse_real(): special link traversal failed
major: Links
minor: Link traversal failure
- #015: (file name) line (number) in H5G__traverse_special(): symbolic link traversal failed
+ #016: (file name) line (number) in H5G__traverse_special(): symbolic link traversal failed
major: Links
minor: Link traversal failure
- #016: (file name) line (number) in H5G__traverse_slink(): unable to follow symbolic link
+ #017: (file name) line (number) in H5G__traverse_slink(): unable to follow symbolic link
major: Symbol table
minor: Object not found
- #017: (file name) line (number) in H5G__traverse_real(): traversal operator failed
+ #018: (file name) line (number) in H5G__traverse_real(): traversal operator failed
major: Symbol table
minor: Callback failed
- #018: (file name) line (number) in H5G__traverse_slink_cb(): component not found
+ #019: (file name) line (number) in H5G__traverse_slink_cb(): component not found
major: Symbol table
minor: Object not found
HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
diff --git a/tools/test/h5dump/errfiles/textlinksrc.err b/tools/test/h5dump/errfiles/textlinksrc.err
index 92bad14302f..e5b81ce4197 100644
--- a/tools/test/h5dump/errfiles/textlinksrc.err
+++ b/tools/test/h5dump/errfiles/textlinksrc.err
@@ -1,59 +1,62 @@
HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
- #000: (file name) line (number) in H5Oopen(): unable to open object
+ #000: (file name) line (number) in H5Oopen(): unable to synchronously open object
major: Object header
minor: Can't open object
- #001: (file name) line (number) in H5VL_object_open(): object open failed
+ #001: (file name) line (number) in H5O__open_api_common(): unable to open object
+ major: Object header
+ minor: Can't open object
+ #002: (file name) line (number) in H5VL_object_open(): object open failed
major: Virtual Object Layer
minor: Can't open object
- #002: (file name) line (number) in H5VL__object_open(): object open failed
+ #003: (file name) line (number) in H5VL__object_open(): object open failed
major: Virtual Object Layer
minor: Can't open object
- #003: (file name) line (number) in H5VL__native_object_open(): unable to open object by name
+ #004: (file name) line (number) in H5VL__native_object_open(): unable to open object by name
major: Object header
minor: Can't open object
- #004: (file name) line (number) in H5O_open_name(): object not found
+ #005: (file name) line (number) in H5O_open_name(): object not found
major: Object header
minor: Object not found
- #005: (file name) line (number) in H5G_loc_find(): can't find object
+ #006: (file name) line (number) in H5G_loc_find(): can't find object
major: Symbol table
minor: Object not found
- #006: (file name) line (number) in H5G_traverse(): internal path traversal failed
+ #007: (file name) line (number) in H5G_traverse(): internal path traversal failed
major: Symbol table
minor: Object not found
- #007: (file name) line (number) in H5G__traverse_real(): special link traversal failed
+ #008: (file name) line (number) in H5G__traverse_real(): special link traversal failed
major: Links
minor: Link traversal failure
- #008: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed
+ #009: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed
major: Links
minor: Link traversal failure
- #009: (file name) line (number) in H5G__traverse_ud(): traversal callback returned invalid ID
+ #010: (file name) line (number) in H5G__traverse_ud(): traversal callback returned invalid ID
major: Symbol table
minor: Unable to find ID information (already closed?)
- #010: (file name) line (number) in H5L__extern_traverse(): unable to open object
+ #011: (file name) line (number) in H5L__extern_traverse(): unable to open object
major: Links
minor: Can't open object
- #011: (file name) line (number) in H5O_open_name(): object not found
+ #012: (file name) line (number) in H5O_open_name(): object not found
major: Object header
minor: Object not found
- #012: (file name) line (number) in H5G_loc_find(): can't find object
+ #013: (file name) line (number) in H5G_loc_find(): can't find object
major: Symbol table
minor: Object not found
- #013: (file name) line (number) in H5G_traverse(): internal path traversal failed
+ #014: (file name) line (number) in H5G_traverse(): internal path traversal failed
major: Symbol table
minor: Object not found
- #014: (file name) line (number) in H5G__traverse_real(): special link traversal failed
+ #015: (file name) line (number) in H5G__traverse_real(): special link traversal failed
major: Links
minor: Link traversal failure
- #015: (file name) line (number) in H5G__traverse_special(): symbolic link traversal failed
+ #016: (file name) line (number) in H5G__traverse_special(): symbolic link traversal failed
major: Links
minor: Link traversal failure
- #016: (file name) line (number) in H5G__traverse_slink(): unable to follow symbolic link
+ #017: (file name) line (number) in H5G__traverse_slink(): unable to follow symbolic link
major: Symbol table
minor: Object not found
- #017: (file name) line (number) in H5G__traverse_real(): traversal operator failed
+ #018: (file name) line (number) in H5G__traverse_real(): traversal operator failed
major: Symbol table
minor: Callback failed
- #018: (file name) line (number) in H5G__traverse_slink_cb(): component not found
+ #019: (file name) line (number) in H5G__traverse_slink_cb(): component not found
major: Symbol table
minor: Object not found
HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
diff --git a/tools/test/h5dump/errfiles/tgroup-2.err b/tools/test/h5dump/errfiles/tgroup-2.err
index 27557f37701..f9fa0cfd08c 100644
--- a/tools/test/h5dump/errfiles/tgroup-2.err
+++ b/tools/test/h5dump/errfiles/tgroup-2.err
@@ -1,29 +1,32 @@
HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
- #000: (file name) line (number) in H5Gopen2(): unable to open group
+ #000: (file name) line (number) in H5Gopen2(): unable to synchronously open group
+ major: Symbol table
+ minor: Unable to create file
+ #001: (file name) line (number) in H5G__open_api_common(): unable to open group
major: Symbol table
minor: Can't open object
- #001: (file name) line (number) in H5VL_group_open(): group open failed
+ #002: (file name) line (number) in H5VL_group_open(): group open failed
major: Virtual Object Layer
minor: Can't open object
- #002: (file name) line (number) in H5VL__group_open(): group open failed
+ #003: (file name) line (number) in H5VL__group_open(): group open failed
major: Virtual Object Layer
minor: Can't open object
- #003: (file name) line (number) in H5VL__native_group_open(): unable to open group
+ #004: (file name) line (number) in H5VL__native_group_open(): unable to open group
major: Symbol table
minor: Can't open object
- #004: (file name) line (number) in H5G__open_name(): group not found
+ #005: (file name) line (number) in H5G__open_name(): group not found
major: Symbol table
minor: Object not found
- #005: (file name) line (number) in H5G_loc_find(): can't find object
+ #006: (file name) line (number) in H5G_loc_find(): can't find object
major: Symbol table
minor: Object not found
- #006: (file name) line (number) in H5G_traverse(): internal path traversal failed
+ #007: (file name) line (number) in H5G_traverse(): internal path traversal failed
major: Symbol table
minor: Object not found
- #007: (file name) line (number) in H5G__traverse_real(): traversal operator failed
+ #008: (file name) line (number) in H5G__traverse_real(): traversal operator failed
major: Symbol table
minor: Callback failed
- #008: (file name) line (number) in H5G__loc_find_cb(): object 'y' doesn't exist
+ #009: (file name) line (number) in H5G__loc_find_cb(): object 'y' doesn't exist
major: Symbol table
minor: Object not found
h5dump error: unable to open group "/y"
diff --git a/tools/test/h5dump/errfiles/torderlinks1.err b/tools/test/h5dump/errfiles/torderlinks1.err
index 1fbd47e6576..182fc31a9a5 100644
--- a/tools/test/h5dump/errfiles/torderlinks1.err
+++ b/tools/test/h5dump/errfiles/torderlinks1.err
@@ -1,34 +1,37 @@
HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
- #000: (file name) line (number) in H5Oopen(): unable to open object
+ #000: (file name) line (number) in H5Oopen(): unable to synchronously open object
major: Object header
minor: Can't open object
- #001: (file name) line (number) in H5VL_object_open(): object open failed
+ #001: (file name) line (number) in H5O__open_api_common(): unable to open object
+ major: Object header
+ minor: Can't open object
+ #002: (file name) line (number) in H5VL_object_open(): object open failed
major: Virtual Object Layer
minor: Can't open object
- #002: (file name) line (number) in H5VL__object_open(): object open failed
+ #003: (file name) line (number) in H5VL__object_open(): object open failed
major: Virtual Object Layer
minor: Can't open object
- #003: (file name) line (number) in H5VL__native_object_open(): unable to open object by name
+ #004: (file name) line (number) in H5VL__native_object_open(): unable to open object by name
major: Object header
minor: Can't open object
- #004: (file name) line (number) in H5O_open_name(): object not found
+ #005: (file name) line (number) in H5O_open_name(): object not found
major: Object header
minor: Object not found
- #005: (file name) line (number) in H5G_loc_find(): can't find object
+ #006: (file name) line (number) in H5G_loc_find(): can't find object
major: Symbol table
minor: Object not found
- #006: (file name) line (number) in H5G_traverse(): internal path traversal failed
+ #007: (file name) line (number) in H5G_traverse(): internal path traversal failed
major: Symbol table
minor: Object not found
- #007: (file name) line (number) in H5G__traverse_real(): special link traversal failed
+ #008: (file name) line (number) in H5G__traverse_real(): special link traversal failed
major: Links
minor: Link traversal failure
- #008: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed
+ #009: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed
major: Links
minor: Link traversal failure
- #009: (file name) line (number) in H5G__traverse_ud(): traversal callback returned invalid ID
+ #010: (file name) line (number) in H5G__traverse_ud(): traversal callback returned invalid ID
major: Symbol table
minor: Unable to find ID information (already closed?)
- #010: (file name) line (number) in H5L__extern_traverse(): unable to open external file, external link file name = 'fname'
+ #011: (file name) line (number) in H5L__extern_traverse(): unable to open external file, external link file name = 'fname'
major: Links
minor: Unable to open file
diff --git a/tools/test/h5dump/errfiles/torderlinks2.err b/tools/test/h5dump/errfiles/torderlinks2.err
index 1fbd47e6576..182fc31a9a5 100644
--- a/tools/test/h5dump/errfiles/torderlinks2.err
+++ b/tools/test/h5dump/errfiles/torderlinks2.err
@@ -1,34 +1,37 @@
HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
- #000: (file name) line (number) in H5Oopen(): unable to open object
+ #000: (file name) line (number) in H5Oopen(): unable to synchronously open object
major: Object header
minor: Can't open object
- #001: (file name) line (number) in H5VL_object_open(): object open failed
+ #001: (file name) line (number) in H5O__open_api_common(): unable to open object
+ major: Object header
+ minor: Can't open object
+ #002: (file name) line (number) in H5VL_object_open(): object open failed
major: Virtual Object Layer
minor: Can't open object
- #002: (file name) line (number) in H5VL__object_open(): object open failed
+ #003: (file name) line (number) in H5VL__object_open(): object open failed
major: Virtual Object Layer
minor: Can't open object
- #003: (file name) line (number) in H5VL__native_object_open(): unable to open object by name
+ #004: (file name) line (number) in H5VL__native_object_open(): unable to open object by name
major: Object header
minor: Can't open object
- #004: (file name) line (number) in H5O_open_name(): object not found
+ #005: (file name) line (number) in H5O_open_name(): object not found
major: Object header
minor: Object not found
- #005: (file name) line (number) in H5G_loc_find(): can't find object
+ #006: (file name) line (number) in H5G_loc_find(): can't find object
major: Symbol table
minor: Object not found
- #006: (file name) line (number) in H5G_traverse(): internal path traversal failed
+ #007: (file name) line (number) in H5G_traverse(): internal path traversal failed
major: Symbol table
minor: Object not found
- #007: (file name) line (number) in H5G__traverse_real(): special link traversal failed
+ #008: (file name) line (number) in H5G__traverse_real(): special link traversal failed
major: Links
minor: Link traversal failure
- #008: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed
+ #009: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed
major: Links
minor: Link traversal failure
- #009: (file name) line (number) in H5G__traverse_ud(): traversal callback returned invalid ID
+ #010: (file name) line (number) in H5G__traverse_ud(): traversal callback returned invalid ID
major: Symbol table
minor: Unable to find ID information (already closed?)
- #010: (file name) line (number) in H5L__extern_traverse(): unable to open external file, external link file name = 'fname'
+ #011: (file name) line (number) in H5L__extern_traverse(): unable to open external file, external link file name = 'fname'
major: Links
minor: Unable to open file
diff --git a/tools/test/h5dump/errfiles/tperror.err b/tools/test/h5dump/errfiles/tperror.err
index e2f24c1bb2c..9e7972a8091 100644
--- a/tools/test/h5dump/errfiles/tperror.err
+++ b/tools/test/h5dump/errfiles/tperror.err
@@ -1,29 +1,32 @@
HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
- #000: (file name) line (number) in H5Dopen2(): unable to open dataset
+ #000: (file name) line (number) in H5Dopen2(): unable to synchronously open dataset
major: Dataset
minor: Can't open object
- #001: (file name) line (number) in H5VL_dataset_open(): dataset open failed
+ #001: (file name) line (number) in H5D__open_api_common(): unable to open dataset
+ major: Dataset
+ minor: Can't open object
+ #002: (file name) line (number) in H5VL_dataset_open(): dataset open failed
major: Virtual Object Layer
minor: Can't open object
- #002: (file name) line (number) in H5VL__dataset_open(): dataset open failed
+ #003: (file name) line (number) in H5VL__dataset_open(): dataset open failed
major: Virtual Object Layer
minor: Can't open object
- #003: (file name) line (number) in H5VL__native_dataset_open(): unable to open dataset
+ #004: (file name) line (number) in H5VL__native_dataset_open(): unable to open dataset
major: Dataset
minor: Can't open object
- #004: (file name) line (number) in H5D__open_name(): not found
+ #005: (file name) line (number) in H5D__open_name(): not found
major: Dataset
minor: Object not found
- #005: (file name) line (number) in H5G_loc_find(): can't find object
+ #006: (file name) line (number) in H5G_loc_find(): can't find object
major: Symbol table
minor: Object not found
- #006: (file name) line (number) in H5G_traverse(): internal path traversal failed
+ #007: (file name) line (number) in H5G_traverse(): internal path traversal failed
major: Symbol table
minor: Object not found
- #007: (file name) line (number) in H5G__traverse_real(): traversal operator failed
+ #008: (file name) line (number) in H5G__traverse_real(): traversal operator failed
major: Symbol table
minor: Callback failed
- #008: (file name) line (number) in H5G__loc_find_cb(): object 'bogus' doesn't exist
+ #009: (file name) line (number) in H5G__loc_find_cb(): object 'bogus' doesn't exist
major: Symbol table
minor: Object not found
HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
diff --git a/tools/test/h5dump/errfiles/tslink-D.err b/tools/test/h5dump/errfiles/tslink-D.err
index e650a33ea8f..f465f290306 100644
--- a/tools/test/h5dump/errfiles/tslink-D.err
+++ b/tools/test/h5dump/errfiles/tslink-D.err
@@ -1,37 +1,40 @@
HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
- #000: (file name) line (number) in H5Dopen2(): unable to open dataset
+ #000: (file name) line (number) in H5Dopen2(): unable to synchronously open dataset
major: Dataset
minor: Can't open object
- #001: (file name) line (number) in H5VL_dataset_open(): dataset open failed
+ #001: (file name) line (number) in H5D__open_api_common(): unable to open dataset
+ major: Dataset
+ minor: Can't open object
+ #002: (file name) line (number) in H5VL_dataset_open(): dataset open failed
major: Virtual Object Layer
minor: Can't open object
- #002: (file name) line (number) in H5VL__dataset_open(): dataset open failed
+ #003: (file name) line (number) in H5VL__dataset_open(): dataset open failed
major: Virtual Object Layer
minor: Can't open object
- #003: (file name) line (number) in H5VL__native_dataset_open(): unable to open dataset
+ #004: (file name) line (number) in H5VL__native_dataset_open(): unable to open dataset
major: Dataset
minor: Can't open object
- #004: (file name) line (number) in H5D__open_name(): not found
+ #005: (file name) line (number) in H5D__open_name(): not found
major: Dataset
minor: Object not found
- #005: (file name) line (number) in H5G_loc_find(): can't find object
+ #006: (file name) line (number) in H5G_loc_find(): can't find object
major: Symbol table
minor: Object not found
- #006: (file name) line (number) in H5G_traverse(): internal path traversal failed
+ #007: (file name) line (number) in H5G_traverse(): internal path traversal failed
major: Symbol table
minor: Object not found
- #007: (file name) line (number) in H5G__traverse_real(): special link traversal failed
+ #008: (file name) line (number) in H5G__traverse_real(): special link traversal failed
major: Links
minor: Link traversal failure
- #008: (file name) line (number) in H5G__traverse_special(): symbolic link traversal failed
+ #009: (file name) line (number) in H5G__traverse_special(): symbolic link traversal failed
major: Links
minor: Link traversal failure
- #009: (file name) line (number) in H5G__traverse_slink(): unable to follow symbolic link
+ #010: (file name) line (number) in H5G__traverse_slink(): unable to follow symbolic link
major: Symbol table
minor: Object not found
- #010: (file name) line (number) in H5G__traverse_real(): traversal operator failed
+ #011: (file name) line (number) in H5G__traverse_real(): traversal operator failed
major: Symbol table
minor: Callback failed
- #011: (file name) line (number) in H5G__traverse_slink_cb(): component not found
+ #012: (file name) line (number) in H5G__traverse_slink_cb(): component not found
major: Symbol table
minor: Object not found
diff --git a/tools/test/h5dump/h5dumpgentest.c b/tools/test/h5dump/h5dumpgentest.c
index 0d38f34c022..29922e86cbf 100644
--- a/tools/test/h5dump/h5dumpgentest.c
+++ b/tools/test/h5dump/h5dumpgentest.c
@@ -115,6 +115,8 @@
#define FILE85 "tgrpnullspace.h5"
#define FILE86 "err_attr_dspace.h5"
#define FILE87 "tintsnodata.h5"
+#define FILE88 "tldouble_scalar.h5"
+#define FILE89 "tfloatsattrs.h5"
/*-------------------------------------------------------------------------
* prototypes
@@ -153,13 +155,13 @@ static size_t H5Z_filter_dynlibud(unsigned int flags, size_t cd_nelmts, const un
/* This message derives from H5Z */
const H5Z_class2_t H5Z_DYNLIBUD[1] = {{
- H5Z_CLASS_T_VERS, /* H5Z_class_t version */
- H5Z_FILTER_DYNLIBUD, /* Filter id number */
- 1, 1, /* Encoding and decoding enabled */
- "dynlibud", /* Filter name for debugging */
- NULL, /* The "can apply" callback */
- NULL, /* The "set local" callback */
- (H5Z_func_t)H5Z_filter_dynlibud, /* The actual filter function */
+ H5Z_CLASS_T_VERS, /* H5Z_class_t version */
+ H5Z_FILTER_DYNLIBUD, /* Filter id number */
+ 1, 1, /* Encoding and decoding enabled */
+ "dynlibud", /* Filter name for debugging */
+ NULL, /* The "can apply" callback */
+ NULL, /* The "set local" callback */
+ H5Z_filter_dynlibud, /* The actual filter function */
}};
/* A UD link traversal function. Shouldn't actually be called. */
@@ -395,6 +397,15 @@ typedef struct s1_t {
#define F83_RANK 1
#define F83_ARRAYDIM 3
+/* "FILE89" macros */
+#define F89_XDIM 8
+#define F89_DATASETF32 "DS32BITS"
+#define F89_YDIM32 32
+#define F89_DATASETF64 "DS64BITS"
+#define F89_YDIM64 64
+#define F89_DATASETF128 "DS128BITS"
+#define F89_YDIM128 128
+
static void
gent_group(void)
{
@@ -2106,7 +2117,7 @@ gent_objref(void)
uint32_t * tu32; /* Temporary pointer to uint32 data */
int i; /* counting variables */
const char *write_comment = "Foo!"; /* Comments for group */
- hbool_t supports_comments = FALSE;
+ uint64_t supports_comments = 0;
/* Allocate write & read buffers */
wbuf = (hobj_ref_t *)HDmalloc(sizeof(hobj_ref_t) * SPACE1_DIM1);
@@ -2126,7 +2137,7 @@ gent_objref(void)
H5VLquery_optional(fid1, H5VL_SUBCLS_OBJECT, H5VL_NATIVE_OBJECT_SET_COMMENT, &supports_comments);
/* Set group's comment */
- if (supports_comments)
+ if (supports_comments & H5VL_OPT_QUERY_SUPPORTED)
H5Oset_comment(group, write_comment);
/* Create a dataset (inside Group1) */
@@ -3677,9 +3688,9 @@ gent_empty(void)
static void
gent_group_comments(void)
{
- hid_t fid = H5I_INVALID_HID;
- hid_t group = H5I_INVALID_HID;
- hbool_t supports_comments = FALSE;
+ hid_t fid = H5I_INVALID_HID;
+ hid_t group = H5I_INVALID_HID;
+ uint64_t supports_comments = 0;
fid = H5Fcreate(FILE33, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -3688,69 +3699,69 @@ gent_group_comments(void)
/* / */
group = H5Gcreate2(fid, "/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- if (supports_comments)
+ if (supports_comments & H5VL_OPT_QUERY_SUPPORTED)
H5Oset_comment_by_name(group, "/g1", "Comment for group /g1", H5P_DEFAULT);
H5Gclose(group);
group = H5Gcreate2(fid, "/g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- if (supports_comments)
+ if (supports_comments & H5VL_OPT_QUERY_SUPPORTED)
H5Oset_comment_by_name(group, "/g2", "Comment for group /g2", H5P_DEFAULT);
H5Gclose(group);
group = H5Gcreate2(fid, "/g3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- if (supports_comments)
+ if (supports_comments & H5VL_OPT_QUERY_SUPPORTED)
H5Oset_comment_by_name(group, "/g3", "Comment for group /g3", H5P_DEFAULT);
H5Gclose(group);
/* /g1 */
group = H5Gcreate2(fid, "/g1/g1.1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- if (supports_comments)
+ if (supports_comments & H5VL_OPT_QUERY_SUPPORTED)
H5Oset_comment_by_name(group, "/g1/g1.1", "Comment for group /g1/g1.1", H5P_DEFAULT);
H5Gclose(group);
group = H5Gcreate2(fid, "/g1/g1.2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- if (supports_comments)
+ if (supports_comments & H5VL_OPT_QUERY_SUPPORTED)
H5Oset_comment_by_name(group, "/g1/g1.2", "Comment for group /g1/g1.2", H5P_DEFAULT);
H5Gclose(group);
/* /g2 */
group = H5Gcreate2(fid, "/g2/g2.1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- if (supports_comments)
+ if (supports_comments & H5VL_OPT_QUERY_SUPPORTED)
H5Oset_comment_by_name(group, "/g2/g2.1", "Comment for group /g2/g2.1", H5P_DEFAULT);
H5Gclose(group);
/* /g3 */
group = H5Gcreate2(fid, "/g3/g3.1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- if (supports_comments)
+ if (supports_comments & H5VL_OPT_QUERY_SUPPORTED)
H5Oset_comment_by_name(group, "/g3/g3.1", "Comment for group /g3/g3.1", H5P_DEFAULT);
H5Gclose(group);
group = H5Gcreate2(fid, "/g3/g3.2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- if (supports_comments)
+ if (supports_comments & H5VL_OPT_QUERY_SUPPORTED)
H5Oset_comment_by_name(group, "/g3/g3.2", "Comment for group /g3/g3.2", H5P_DEFAULT);
H5Gclose(group);
group = H5Gcreate2(fid, "/g3/g3.3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- if (supports_comments)
+ if (supports_comments & H5VL_OPT_QUERY_SUPPORTED)
H5Oset_comment_by_name(group, "/g3/g3.3", "Comment for group /g3/g3.3", H5P_DEFAULT);
H5Gclose(group);
group = H5Gcreate2(fid, "/g3/g3.4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- if (supports_comments)
+ if (supports_comments & H5VL_OPT_QUERY_SUPPORTED)
H5Oset_comment_by_name(group, "/g3/g3.4", "Comment for group /g3/g3.4", H5P_DEFAULT);
H5Gclose(group);
/* /g2/g2.1 */
group = H5Gcreate2(fid, "/g2/g2.1/g2.1.1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- if (supports_comments)
+ if (supports_comments & H5VL_OPT_QUERY_SUPPORTED)
H5Oset_comment_by_name(group, "/g2/g2.1/g2.1.1", "Comment for group /g2/g2.1/g2.1.1", H5P_DEFAULT);
H5Gclose(group);
group = H5Gcreate2(fid, "/g2/g2.1/g2.1.2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- if (supports_comments)
+ if (supports_comments & H5VL_OPT_QUERY_SUPPORTED)
H5Oset_comment_by_name(group, "/g2/g2.1/g2.1.2", "Comment for group /g2/g2.1/g2.1.2", H5P_DEFAULT);
H5Gclose(group);
group = H5Gcreate2(fid, "/g2/g2.1/g2.1.3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- if (supports_comments)
+ if (supports_comments & H5VL_OPT_QUERY_SUPPORTED)
H5Oset_comment_by_name(group, "/g2/g2.1/g2.1.3", "Comment for group /g2/g2.1/g2.1.3", H5P_DEFAULT);
H5Gclose(group);
/* /glongcomment */
group = H5Gcreate2(fid, "/glongcomment", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- if (supports_comments)
+ if (supports_comments & H5VL_OPT_QUERY_SUPPORTED)
H5Oset_comment_by_name(
group, "/glongcomment",
"Comment for group /glongcomment with a really, really, really long, long, long comment",
@@ -4008,7 +4019,7 @@ gent_char(void)
*
* Return: void
*
- * Programmer: pvn@ncsa.uiuc.edu
+ * Programmer: Pedro Vicente
*
* Date: May 28, 2003
*
@@ -4435,7 +4446,7 @@ write_attr_in(hid_t loc_id, const char *dset_name, /* for saving reference to da
*
* Return: void
*
- * Programmer: pvn@ncsa.uiuc.edu
+ * Programmer: Pedro Vicente
*
* Date: May 28, 2003
*
@@ -4871,7 +4882,7 @@ write_dset_in(hid_t loc_id, const char *dset_name, /* for saving reference to da
*
* Return: void
*
- * Programmer: pvn@ncsa.uiuc.edu
+ * Programmer: Pedro Vicente
*
* Date: May 19, 2003
*
@@ -4940,7 +4951,7 @@ gent_attr_all(void)
*
* Purpose: utility function to write an attribute
*
- * Programmer: pvn@ncsa.uiuc.edu
+ * Programmer: Pedro Vicente
*
* Date: May 19, 2003
*
@@ -4978,7 +4989,7 @@ write_attr(hid_t loc_id, int rank, hsize_t *dims, const char *attr_name, hid_t t
*
* Return:
*
- * Programmer: pvn@ncsa.uiuc.edu
+ * Programmer: Pedro Vicente
*
* Date: May 27, 2003
*
@@ -5449,7 +5460,7 @@ gent_filters(void)
int buf1[DIM1][DIM2];
int i, j, n;
int H5_ATTR_NDEBUG_UNUSED ret;
- hbool_t supports_comments = FALSE;
+ uint64_t supports_comments = 0;
for (i = n = 0; i < DIM1; i++) {
for (j = 0; j < DIM2; j++) {
@@ -5481,7 +5492,7 @@ gent_filters(void)
ret = make_dset(fid, "compact", sid, H5T_NATIVE_INT, dcpl, buf1);
HDassert(ret >= 0);
- if (supports_comments) {
+ if (supports_comments & H5VL_OPT_QUERY_SUPPORTED) {
ret = H5Oset_comment_by_name(fid, "compact", "This is a dataset with compact storage", H5P_DEFAULT);
HDassert(ret >= 0);
}
@@ -5492,7 +5503,7 @@ gent_filters(void)
ret = make_dset(fid, "contiguous", sid, H5T_NATIVE_INT, dcpl, buf1);
HDassert(ret >= 0);
- if (supports_comments) {
+ if (supports_comments & H5VL_OPT_QUERY_SUPPORTED) {
ret = H5Oset_comment_by_name(fid, "contiguous", "This is a dataset with contiguous storage",
H5P_DEFAULT);
HDassert(ret >= 0);
@@ -5507,7 +5518,7 @@ gent_filters(void)
ret = make_dset(fid, "chunked", sid, H5T_NATIVE_INT, dcpl, buf1);
HDassert(ret >= 0);
- if (supports_comments) {
+ if (supports_comments & H5VL_OPT_QUERY_SUPPORTED) {
ret = H5Oset_comment_by_name(fid, "chunked", "This is a dataset with chunked storage", H5P_DEFAULT);
HDassert(ret >= 0);
}
@@ -5723,7 +5734,7 @@ gent_filters(void)
ret = H5Tcommit2(fid, "mytype", tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
HDassert(ret >= 0);
- if (supports_comments) {
+ if (supports_comments & H5VL_OPT_QUERY_SUPPORTED) {
ret = H5Oset_comment_by_name(fid, "mytype", "This is a commited datatype", H5P_DEFAULT);
HDassert(ret >= 0);
}
@@ -6335,6 +6346,57 @@ gent_ldouble(void)
return -1;
}
+/*-------------------------------------------------------------------------
+ * Function: gent_ldouble_scalar
+ *
+ * Purpose: make file with a long double scalar dataset
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+gent_ldouble_scalar(void)
+{
+ hid_t fid;
+ hid_t did;
+ hid_t tid;
+ hid_t sid;
+ hsize_t dims[1] = {6};
+ long double buf[6] = {0.0, 1.0, 2.0, 3.0, 4.0, 5.0};
+
+ if ((fid = H5Fcreate(FILE88, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ goto error;
+
+ if ((sid = H5Screate(H5S_SCALAR)) < 0)
+ goto error;
+
+ if ((tid = H5Tarray_create2(H5T_NATIVE_LDOUBLE, 1, dims)) < 0)
+ goto error;
+
+ if (H5Tget_size(tid) == 0)
+ goto error;
+
+ if ((did = H5Dcreate2(fid, "dset", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ goto error;
+
+ if (H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
+ goto error;
+
+ if (H5Sclose(sid) < 0)
+ goto error;
+ if (H5Tclose(tid) < 0)
+ goto error;
+ if (H5Dclose(did) < 0)
+ goto error;
+ if (H5Fclose(fid) < 0)
+ goto error;
+
+ return 0;
+
+error:
+ HDprintf("error !\n");
+ return -1;
+}
+
/*-------------------------------------------------------------------------
* Function: gent_binary
*
@@ -6499,7 +6561,6 @@ gent_bigdims(void)
H5Fclose(fid);
}
H5E_END_TRY;
- return;
}
/*-------------------------------------------------------------------------
@@ -6685,7 +6746,6 @@ gent_group_creation_order(void)
H5Fclose(fid);
}
H5E_END_TRY;
- return;
}
/*-------------------------------------------------------------------------
@@ -6945,7 +7005,6 @@ gent_attr_creation_order(void)
H5Fclose(fid);
}
H5E_END_TRY;
- return;
}
/*-------------------------------------------------------------------------
@@ -10160,6 +10219,152 @@ gent_intsattrs(void)
HDfree(asetdbl);
}
+/*-------------------------------------------------------------------------
+ * Function: gent_floatsattrs
+ *
+ * Purpose: Generate a file to be used in the h5dump tests.
+ * Three datasets of 4, 8 and 16 bytes of float types are created.
+ * Fill them with raw data such that no bit will be all zero in a dataset.
+ *-------------------------------------------------------------------------
+ */
+static void
+gent_floatsattrs(void)
+{
+ hid_t fid = H5I_INVALID_HID;
+ hid_t tid = H5I_INVALID_HID;
+ hid_t attr = H5I_INVALID_HID;
+ hid_t dataset = H5I_INVALID_HID;
+ hid_t space = H5I_INVALID_HID;
+ hid_t aspace = H5I_INVALID_HID;
+ hsize_t dims[2], adims[1];
+
+ float ** dset32 = NULL;
+ double ** dset64 = NULL;
+ long double **dset128 = NULL;
+
+ float * aset32 = NULL;
+ double * aset64 = NULL;
+ long double *aset128 = NULL;
+
+ float val32bits;
+ double val64bits;
+ long double val128bits;
+
+ unsigned int i, j;
+
+ /* Create arrays */
+ H5TEST_ALLOCATE_2D_ARRAY(dset32, float, F89_XDIM, F89_YDIM32);
+ H5TEST_ALLOCATE_2D_ARRAY(dset64, double, F89_XDIM, F89_YDIM64);
+ H5TEST_ALLOCATE_2D_ARRAY(dset128, long double, F89_XDIM, F89_YDIM128);
+
+ aset32 = HDcalloc(F89_XDIM * F89_YDIM32, sizeof(float));
+ aset64 = HDcalloc(F89_XDIM * F89_YDIM64, sizeof(double));
+ aset128 = HDcalloc(F89_XDIM * F89_YDIM128, sizeof(long double));
+
+ fid = H5Fcreate(FILE89, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+
+ if ((tid = H5Tcopy(H5T_NATIVE_LDOUBLE)) < 0)
+ goto error;
+
+ if (H5Tget_size(tid) == 0)
+ goto error;
+
+ /* Dataset of 32 bits float */
+ dims[0] = F89_XDIM;
+ dims[1] = F89_YDIM32;
+ space = H5Screate_simple(2, dims, NULL);
+ dataset = H5Dcreate2(fid, F89_DATASETF32, H5T_IEEE_F32LE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ val32bits = (float)F89_YDIM32;
+ for (i = 0; i < dims[0]; i++) {
+ dset32[i][0] = val32bits;
+ aset32[i * dims[1]] = dset32[i][0];
+ for (j = 1; j < dims[1]; j++) {
+ dset32[i][j] = (float)(j * dims[0] + i) / (float)F89_YDIM32;
+ aset32[i * dims[1] + j] = dset32[i][j];
+ }
+ val32bits -= (float)1;
+ }
+
+ H5Dwrite(dataset, H5T_IEEE_F32LE, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset32[0]);
+ /* Attribute of 32 bits float */
+ adims[0] = F89_XDIM * F89_YDIM32;
+ aspace = H5Screate_simple(1, adims, NULL);
+ attr = H5Acreate2(dataset, F89_DATASETF32, H5T_IEEE_F32LE, aspace, H5P_DEFAULT, H5P_DEFAULT);
+ H5Awrite(attr, H5T_IEEE_F32LE, aset32);
+ H5Aclose(attr);
+ H5Sclose(aspace);
+ H5Sclose(space);
+ H5Dclose(dataset);
+
+ /* Dataset of 64 bits double */
+ dims[0] = F89_XDIM;
+ dims[1] = F89_YDIM64;
+ space = H5Screate_simple(2, dims, NULL);
+ dataset = H5Dcreate2(fid, F89_DATASETF64, H5T_IEEE_F64LE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ val64bits = (double)F89_YDIM64;
+ for (i = 0; i < dims[0]; i++) {
+ dset64[i][0] = val64bits;
+ aset64[i * dims[1]] = dset64[i][0];
+ for (j = 1; j < dims[1]; j++) {
+ dset64[i][j] = (double)(j * dims[0] + i) / (double)F89_YDIM64;
+ aset64[i * dims[1] + j] = dset64[i][j];
+ }
+ val64bits -= (double)1;
+ }
+
+ H5Dwrite(dataset, H5T_IEEE_F64LE, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset64[0]);
+ /* Attribute of 64 bits double */
+ adims[0] = F89_XDIM * F89_YDIM64;
+ aspace = H5Screate_simple(1, adims, NULL);
+ attr = H5Acreate2(dataset, F89_DATASETF64, H5T_IEEE_F64LE, aspace, H5P_DEFAULT, H5P_DEFAULT);
+ H5Awrite(attr, H5T_IEEE_F64LE, aset64);
+ H5Aclose(attr);
+ H5Sclose(aspace);
+ H5Sclose(space);
+ H5Dclose(dataset);
+
+ /* Dataset of 128 bits long double */
+ dims[0] = F89_XDIM;
+ dims[1] = F89_YDIM128;
+ space = H5Screate_simple(2, dims, NULL);
+ dataset = H5Dcreate2(fid, F89_DATASETF128, tid, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ val128bits = (long double)F89_YDIM128;
+ for (i = 0; i < dims[0]; i++) {
+ dset128[i][0] = val128bits;
+ aset128[i * dims[1]] = dset128[i][0];
+ for (j = 1; j < dims[1]; j++) {
+ dset128[i][j] = (long double)(j * dims[0] + i) / (long double)F89_YDIM128;
+ aset128[i * dims[1] + j] = dset128[i][j];
+ }
+ val128bits -= (long double)1;
+ }
+
+ H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset128[0]);
+ /* Attribute of 128 bits long double */
+ adims[0] = F89_XDIM * F89_YDIM128;
+ aspace = H5Screate_simple(1, adims, NULL);
+ attr = H5Acreate2(dataset, F89_DATASETF128, tid, aspace, H5P_DEFAULT, H5P_DEFAULT);
+ H5Awrite(attr, tid, aset128);
+ H5Aclose(attr);
+ H5Sclose(aspace);
+ H5Sclose(space);
+ H5Dclose(dataset);
+
+error:
+ H5Fclose(fid);
+
+ HDfree(dset32);
+ HDfree(dset64);
+ HDfree(dset128);
+
+ HDfree(aset32);
+ HDfree(aset64);
+ HDfree(aset128);
+}
+
static void
gent_bitnopaquefields(void)
{
@@ -10872,7 +11077,7 @@ H5Z_filter_dynlibud(unsigned int flags, size_t cd_nelmts, const unsigned int *cd
return (0);
/* Assignment to eliminate unused parameter warning. */
- cd_values = cd_values;
+ (void)cd_values;
if (flags & H5Z_FLAG_REVERSE) { /*read*/
/* Subtract the original value with MULTIPLIER */
@@ -11089,6 +11294,7 @@ main(void)
gent_aindices();
gent_longlinks();
gent_ldouble();
+ gent_ldouble_scalar();
gent_binary();
gent_bigdims();
gent_hyperslab();
@@ -11112,6 +11318,7 @@ main(void)
gent_compound_ints();
gent_intattrscalars();
gent_intsattrs();
+ gent_floatsattrs();
gent_bitnopaquefields();
gent_nodata();
diff --git a/tools/test/h5dump/testh5dump.sh.in b/tools/test/h5dump/testh5dump.sh.in
index 686ecfbeadc..94643023dc8 100644
--- a/tools/test/h5dump/testh5dump.sh.in
+++ b/tools/test/h5dump/testh5dump.sh.in
@@ -132,6 +132,7 @@ $SRC_H5DUMP_TESTFILES/tfamily00010.h5
$SRC_H5DUMP_TESTFILES/tfcontents1.h5
$SRC_H5DUMP_TESTFILES/tfcontents2.h5
$SRC_H5DUMP_TESTFILES/tfilters.h5
+$SRC_H5DUMP_TESTFILES/tfloatsattrs.h5
$SRC_H5DUMP_TESTFILES/tfpformat.h5
$SRC_H5DUMP_TESTFILES/tfvalues.h5
$SRC_H5DUMP_TESTFILES/tgroup.h5
@@ -142,7 +143,8 @@ $SRC_H5DUMP_TESTFILES/thyperslab.h5
$SRC_H5DUMP_TESTFILES/tintsattrs.h5
$SRC_H5DUMP_TESTFILES/tints4dims.h5
$SRC_H5DUMP_TESTFILES/tlarge_objname.h5
-#$SRC_H5DUMP_TESTFILES/tldouble.h5
+$SRC_H5DUMP_TESTFILES/tldouble.h5
+$SRC_H5DUMP_TESTFILES/tldouble_scalar.h5
$SRC_H5DUMP_TESTFILES/tlonglinks.h5
$SRC_H5DUMP_TESTFILES/tloop.h5
$SRC_H5DUMP_TESTFILES/tmulti-b.h5
@@ -180,6 +182,8 @@ $SRC_H5DUMP_TESTFILES/tvlenstr_array.h5
$SRC_H5DUMP_TESTFILES/tvlstr.h5
$SRC_H5DUMP_TESTFILES/tvms.h5
$SRC_H5DUMP_TESTFILES/err_attr_dspace.h5
+$SRC_H5DUMP_TESTFILES/tCVE_2018_11206_fill_old.h5
+$SRC_H5DUMP_TESTFILES/tCVE_2018_11206_fill_new.h5
"
LIST_OTHER_TEST_FILES="
@@ -262,6 +266,7 @@ $SRC_H5DUMP_TESTFILES/textlink.ddl
$SRC_H5DUMP_TESTFILES/tfamily.ddl
$SRC_H5DUMP_TESTFILES/tfill.ddl
$SRC_H5DUMP_TESTFILES/tfletcher32.ddl
+$SRC_H5DUMP_TESTFILES/tfloatsattrs.ddl
$SRC_H5DUMP_TESTFILES/tfpformat.ddl
$SRC_H5DUMP_TESTFILES/tgroup-1.ddl
$SRC_H5DUMP_TESTFILES/tgroup-2.ddl
@@ -287,7 +292,8 @@ $SRC_H5DUMP_TESTFILES/tints4dimsCountEq.ddl
$SRC_H5DUMP_TESTFILES/tints4dimsStride2.ddl
$SRC_H5DUMP_TESTFILES/tintsattrs.ddl
$SRC_H5DUMP_TESTFILES/tlarge_objname.ddl
-#$SRC_H5DUMP_TESTFILES/tldouble.ddl
+$SRC_H5DUMP_TESTFILES/tldouble.ddl
+$SRC_H5DUMP_TESTFILES/tldouble_scalar.ddl
$SRC_H5DUMP_TESTFILES/tlonglinks.ddl
$SRC_H5DUMP_TESTFILES/tloop-1.ddl
$SRC_H5DUMP_TESTFILES/tmulti.ddl
@@ -1380,7 +1386,9 @@ TOOLTEST tgrpnullspace.ddl -p --enable-error-stack tgrpnullspace.h5
TOOLTEST zerodim.ddl --enable-error-stack zerodim.h5
# test for long double (some systems do not have long double)
-#TOOLTEST tldouble.ddl --enable-error-stack tldouble.h5
+TOOLTEST tfloatsattrs.ddl -p --enable-error-stack tfloatsattrs.h5
+TOOLTEST tldouble.ddl --enable-error-stack tldouble.h5
+TOOLTEST tldouble_scalar.ddl -p --enable-error-stack tldouble_scalar.h5
# test for vms
TOOLTEST tvms.ddl --enable-error-stack tvms.h5
@@ -1472,7 +1480,11 @@ TOOLTEST3 non_existing.ddl --enable-error-stack tgroup.h5 non_existing.h5
TOOLTEST err_attr_dspace.ddl err_attr_dspace.h5
# test to verify HDFFV-9407: long double full precision
-GREPTEST OUTTXT "1.123456789012345" t128bit_float.ddl -m %.35Lf t128bit_float.h5
+#GREPTEST OUTTXT "1.123456789012345" t128bit_float.ddl -m %.35Lf t128bit_float.h5
+
+# test to verify HDFFV-10480: out of bounds read in H5O_fill_new[old]_decode
+TOOLTEST_FAIL tCVE_2018_11206_fill_old.h5
+TOOLTEST_FAIL tCVE_2018_11206_fill_new.h5
# Clean up temporary files/directories
CLEAN_TESTFILES_AND_TESTDIR
diff --git a/tools/test/h5import/h5importtest.c b/tools/test/h5import/h5importtest.c
index 340e31bd299..e49125bc784 100644
--- a/tools/test/h5import/h5importtest.c
+++ b/tools/test/h5import/h5importtest.c
@@ -64,8 +64,8 @@ main(void)
double b64r3[5][3][4];
double row8[3], col8[4], pln8[5];
- double rowo8 = 11.0F, colo8 = 21.0F, plno8 = 51.0F;
- double rowi8 = 1.0F, coli8 = 2.0F, plni8 = 5.0F;
+ double rowo8 = 11.0, colo8 = 21.0, plno8 = 51.0;
+ double rowi8 = 1.0, coli8 = 2.0, plni8 = 5.0;
/* Initialize machine endian */
volatile uint32_t ibyte = 0x01234567;
diff --git a/tools/test/h5jam/h5jamgentest.c b/tools/test/h5jam/h5jamgentest.c
index 45ff0b027ba..1da6b630ca6 100644
--- a/tools/test/h5jam/h5jamgentest.c
+++ b/tools/test/h5jam/h5jamgentest.c
@@ -277,7 +277,7 @@ gent_ub(const char *filename, size_t ub_size, size_t ub_fill)
for (u = 0; u < ub_fill; u++)
*bp++ = pattern[u % 10];
- HDwrite(fd, buf, ub_size);
+ (void)HDwrite(fd, buf, ub_size);
HDclose(fd);
}
@@ -301,7 +301,7 @@ create_textfile(const char *name, size_t size)
for (i = 0; i < size; i++)
*bp++ = pattern[i % 10];
- HDwrite(fd, buf, size);
+ (void)HDwrite(fd, buf, size);
HDfree(buf);
@@ -329,7 +329,7 @@ create_binfile(char *name, off_t size)
for (i = 0; i < size; i++)
*bp++ = (char)i & 0xff;
- HDwrite(fd, buf, size);
+ (void)HDwrite(fd, buf, size);
HDclose(fd);
}
diff --git a/tools/test/h5ls/dynlib_ls.c b/tools/test/h5ls/dynlib_ls.c
index 4568ca17981..433522de1f1 100644
--- a/tools/test/h5ls/dynlib_ls.c
+++ b/tools/test/h5ls/dynlib_ls.c
@@ -25,13 +25,13 @@ static size_t H5Z_filter_dynlibud(unsigned int flags, size_t cd_nelmts, const un
/* This message derives from H5Z */
const H5Z_class2_t H5Z_DYNLIBUD[1] = {{
- H5Z_CLASS_T_VERS, /* H5Z_class_t version */
- H5Z_FILTER_DYNLIBUD, /* Filter id number */
- 1, 1, /* Encoding and decoding enabled */
- "dynlibud", /* Filter name for debugging */
- NULL, /* The "can apply" callback */
- NULL, /* The "set local" callback */
- (H5Z_func_t)H5Z_filter_dynlibud, /* The actual filter function */
+ H5Z_CLASS_T_VERS, /* H5Z_class_t version */
+ H5Z_FILTER_DYNLIBUD, /* Filter id number */
+ 1, 1, /* Encoding and decoding enabled */
+ "dynlibud", /* Filter name for debugging */
+ NULL, /* The "can apply" callback */
+ NULL, /* The "set local" callback */
+ H5Z_filter_dynlibud, /* The actual filter function */
}};
H5PL_type_t
@@ -70,7 +70,7 @@ H5Z_filter_dynlibud(unsigned int flags, size_t cd_nelmts, const unsigned int *cd
return (0);
/* Assignment to eliminate unused parameter warning. */
- cd_values = cd_values;
+ (void)cd_values;
if (flags & H5Z_FLAG_REVERSE) { /*read*/
/* Subtract the original value with MULTIPLIER */
diff --git a/tools/test/h5repack/CMakeTests.cmake b/tools/test/h5repack/CMakeTests.cmake
index 649cdab2434..037287dd9ae 100644
--- a/tools/test/h5repack/CMakeTests.cmake
+++ b/tools/test/h5repack/CMakeTests.cmake
@@ -51,6 +51,8 @@
${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_named_dtypes.h5
${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_nested_8bit_enum.h5
${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_nested_8bit_enum_deflated.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_CVE-2018-17432.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_CVE-2018-14460.h5
${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_nbit.h5
${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_objs.h5
${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_refs.h5
@@ -72,6 +74,14 @@
${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_paged_persist.h5
# h5diff/testfile
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_attr1.h5
+ # tools/testfiles for external links
+ ${HDF5_TOOLS_DIR}/testfiles/tsoftlinks.h5
+ ${HDF5_TOOLS_DIR}/testfiles/textlinkfar.h5
+ ${HDF5_TOOLS_DIR}/testfiles/textlinksrc.h5
+ ${HDF5_TOOLS_DIR}/testfiles/textlinktar.h5
+ ${HDF5_TOOLS_DIR}/testfiles/textlink.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5copy_extlinks_src.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5copy_extlinks_trg.h5
# tools/testfiles
${HDF5_TOOLS_DIR}/testfiles/tfamily00000.h5
${HDF5_TOOLS_DIR}/testfiles/tfamily00001.h5
@@ -128,6 +138,13 @@
${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/plugin_version_test.h5repack_layout.h5
${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/plugin_zero.h5repack_layout.h5
${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/plugin_none.h5repack_layout.UD.h5
+ # tools/testfiles for external links
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/tsoftlinks-merge.tsoftlinks.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlinkfar-merge.textlinkfar.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlinksrc-merge.textlinksrc.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlinktar-merge.textlinktar.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlink-merge.textlink.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5copy_extlinks_src-merge.h5copy_extlinks_src.h5
)
set (LIST_DDL_TEST_FILES
@@ -154,6 +171,25 @@
# refs
${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/attrregion.tattrreg.h5
${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/dataregion.tdatareg.h5
+ # tools/testfiles for external links
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlinkfar-base.textlinkfar.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlinksrc-base.textlinksrc.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlinktar-base.textlinktar.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlink-base.textlink.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/tsoftlinks-base.tsoftlinks.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5copy_extlinks_src-base.h5copy_extlinks_src.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlinkfar-prune.textlinkfar.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlinksrc-prune.textlinksrc.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlinktar-prune.textlinktar.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlink-prune.textlink.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/tsoftlinks-prune.tsoftlinks.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5copy_extlinks_src-prune.h5copy_extlinks_src.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlinkfar-mergeprune.textlinkfar.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlinksrc-mergeprune.textlinksrc.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlinktar-mergeprune.textlinktar.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlink-mergeprune.textlink.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/tsoftlinks-mergeprune.tsoftlinks.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5copy_extlinks_src-mergeprune.h5copy_extlinks_src.h5
)
foreach (h5_file ${LIST_HDF5_TEST_FILES})
@@ -1515,6 +1551,16 @@
# Note: this test is experimental for sharing test file among tools
ADD_H5_TEST (HDFFV-7840 "TEST" h5diff_attr1.h5)
+# test CVE-2018-17432 fix
+ set (arg h5repack_CVE-2018-17432.h5 h5repack__CVE-2018-17432_out.h5 --low=1 --high=2 -f GZIP=8 -l dset1:CHUNK=5x6)
+ set (TESTTYPE "TEST")
+ ADD_H5_FILTER_TEST (HDFFV-10590 "" ${TESTTYPE} 1 ${arg})
+
+# test CVE-2018-14460 fix
+ set (arg h5repack_CVE-2018-14460.h5 h5repack_CVE-2018-14460_out.h5)
+ set (TESTTYPE "TEST")
+ ADD_H5_FILTER_TEST (HDFFV-11223 "" ${TESTTYPE} 1 ${arg})
+
# tests for metadata block size option ('-M')
ADD_H5_TEST_META (meta_short h5repack_layout.h5 -M 8192)
ADD_H5_TEST_META (meta_long h5repack_layout.h5 --metadata_block_size=8192)
@@ -1581,6 +1627,44 @@ ADD_H5_EXTERNAL_TEST (ext_int32le_2d "TEST" int32le_2d -l CONTI)
ADD_H5_EXTERNAL_TEST (ext_int32le_3d "TEST" int32le_3d -l CONTI)
ADD_H5_EXTERNAL_TEST (ext_uint8be "TEST" uint8be -l CONTI)
+##############################################################################
+### E X T E R N A L L I N K T E S T S
+##############################################################################
+### HDFFV-11128 needs fixed to enable the following test
+#ADD_H5_DMP_TEST (h5copy_extlinks_src-base "TEST" 0 h5copy_extlinks_src.h5 --enable-error-stack)
+ADD_H5_DMP_TEST (tsoftlinks-base "TEST" 0 tsoftlinks.h5 --enable-error-stack)
+ADD_H5_DMP_TEST (textlink-base "TEST" 0 textlink.h5 --enable-error-stack)
+ADD_H5_DMP_TEST (textlinkfar-base "TEST" 0 textlinkfar.h5 --enable-error-stack)
+ADD_H5_DMP_TEST (textlinksrc-base "TEST" 0 textlinksrc.h5 --enable-error-stack)
+ADD_H5_DMP_TEST (textlinktar-base "TEST" 0 textlinktar.h5 --enable-error-stack)
+
+ADD_H5_DIFF_TEST (h5copy_extlinks_src-merge "TEST" 0 h5copy_extlinks_src.h5 --merge)
+ADD_H5_DIFF_TEST (tsoftlinks-merge "TEST" 1 tsoftlinks.h5 --merge)
+ADD_H5_DIFF_TEST (textlink-merge "TEST" 0 textlink.h5 --merge)
+### HDFFV-11128 needs fixed to enable the following test
+#ADD_H5_DIFF_TEST (textlinkfar-merge "TEST" 1 textlinkfar.h5 --merge)
+### HDFFV-11128 needs fixed to enable the following test
+#ADD_H5_DIFF_TEST (textlinksrc-merge "TEST" 1 textlinksrc.h5 --merge)
+### HDFFV-11128 needs fixed to enable the following test
+#ADD_H5_DIFF_TEST (textlinktar-merge "TEST" 1 textlinktar.h5 --merge)
+
+ADD_H5_DMP_TEST (h5copy_extlinks_src-prune "TEST" 0 h5copy_extlinks_src.h5 --prune --enable-error-stack)
+ADD_H5_DMP_TEST (tsoftlinks-prune "TEST" 0 tsoftlinks.h5 --prune --enable-error-stack)
+ADD_H5_DMP_TEST (textlink-prune "TEST" 0 textlink.h5 --prune --enable-error-stack)
+ADD_H5_DMP_TEST (textlinkfar-prune "TEST" 0 textlinkfar.h5 --prune --enable-error-stack)
+ADD_H5_DMP_TEST (textlinksrc-prune "TEST" 0 textlinksrc.h5 --prune --enable-error-stack)
+ADD_H5_DMP_TEST (textlinktar-prune "TEST" 0 textlinktar.h5 --prune --enable-error-stack)
+
+ADD_H5_DMP_TEST (h5copy_extlinks_src-mergeprune "TEST" 0 h5copy_extlinks_src.h5 --merge --prune --enable-error-stack)
+ADD_H5_DMP_TEST (tsoftlinks-mergeprune "TEST" 0 tsoftlinks.h5 --merge --prune --enable-error-stack)
+ADD_H5_DMP_TEST (textlink-mergeprune "TEST" 0 textlink.h5 --merge --prune --enable-error-stack)
+### HDFFV-11128 needs fixed to enable the following test
+#ADD_H5_DMP_TEST (textlinkfar-mergeprune "TEST" 0 textlinkfar.h5 --merge --prune --enable-error-stack)
+### HDFFV-11128 needs fixed to enable the following test
+#ADD_H5_DMP_TEST (textlinksrc-mergeprune "TEST" 0 textlinksrc.h5 --merge --prune --enable-error-stack)
+### HDFFV-11128 needs fixed to enable the following test
+#ADD_H5_DMP_TEST (textlinktar-mergeprune "TEST" 0 textlinktar.h5 --merge --prune --enable-error-stack)
+
##############################################################################
### P L U G I N T E S T S
##############################################################################
diff --git a/tools/test/h5repack/dynlib_rpk.c b/tools/test/h5repack/dynlib_rpk.c
index e64e67b22d0..b228344e7a9 100644
--- a/tools/test/h5repack/dynlib_rpk.c
+++ b/tools/test/h5repack/dynlib_rpk.c
@@ -27,13 +27,13 @@ static size_t H5Z_filter_dynlib1(unsigned int flags, size_t cd_nelmts, const uns
/* This message derives from H5Z */
const H5Z_class2_t H5Z_DYNLIB1[1] = {{
- H5Z_CLASS_T_VERS, /* H5Z_class_t version */
- H5Z_FILTER_DYNLIB1, /* Filter id number */
- 1, 1, /* Encoding and decoding enabled */
- "dynlib1", /* Filter name for debugging */
- NULL, /* The "can apply" callback */
- NULL, /* The "set local" callback */
- (H5Z_func_t)H5Z_filter_dynlib1, /* The actual filter function */
+ H5Z_CLASS_T_VERS, /* H5Z_class_t version */
+ H5Z_FILTER_DYNLIB1, /* Filter id number */
+ 1, 1, /* Encoding and decoding enabled */
+ "dynlib1", /* Filter name for debugging */
+ NULL, /* The "can apply" callback */
+ NULL, /* The "set local" callback */
+ H5Z_filter_dynlib1, /* The actual filter function */
}};
H5PL_type_t
diff --git a/tools/test/h5repack/dynlib_vrpk.c b/tools/test/h5repack/dynlib_vrpk.c
index 2db97daa9fc..5eac4f2a348 100644
--- a/tools/test/h5repack/dynlib_vrpk.c
+++ b/tools/test/h5repack/dynlib_vrpk.c
@@ -27,13 +27,13 @@ static size_t H5Z_filter_dynlib4(unsigned int flags, size_t cd_nelmts, const uns
/* This message derives from H5Z */
const H5Z_class2_t H5Z_DYNLIB4[1] = {{
- H5Z_CLASS_T_VERS, /* H5Z_class_t version */
- H5Z_FILTER_DYNLIB4, /* Filter id number */
- 1, 1, /* Encoding and decoding enabled */
- "dynlib4", /* Filter name for debugging */
- NULL, /* The "can apply" callback */
- NULL, /* The "set local" callback */
- (H5Z_func_t)H5Z_filter_dynlib4, /* The actual filter function */
+ H5Z_CLASS_T_VERS, /* H5Z_class_t version */
+ H5Z_FILTER_DYNLIB4, /* Filter id number */
+ 1, 1, /* Encoding and decoding enabled */
+ "dynlib4", /* Filter name for debugging */
+ NULL, /* The "can apply" callback */
+ NULL, /* The "set local" callback */
+ H5Z_filter_dynlib4, /* The actual filter function */
}};
H5PL_type_t
diff --git a/tools/test/h5repack/h5repack.sh.in b/tools/test/h5repack/h5repack.sh.in
index 8f3ed8c18b1..3756a9520ff 100644
--- a/tools/test/h5repack/h5repack.sh.in
+++ b/tools/test/h5repack/h5repack.sh.in
@@ -92,10 +92,18 @@ $SRC_H5REPACK_TESTFILES/h5repack_attr_refs.h5
$SRC_H5REPACK_TESTFILES/h5repack_deflate.h5
$SRC_H5REPACK_TESTFILES/h5repack_early.h5
$SRC_H5REPACK_TESTFILES/h5repack_ext.h5
+$SRC_H5REPACK_TESTFILES/h5repack_f32le.h5
+$SRC_H5REPACK_TESTFILES/h5repack_f32le_ex.h5
$SRC_H5REPACK_TESTFILES/h5repack_fill.h5
$SRC_H5REPACK_TESTFILES/h5repack_filters.h5
$SRC_H5REPACK_TESTFILES/h5repack_fletcher.h5
$SRC_H5REPACK_TESTFILES/h5repack_hlink.h5
+$SRC_H5REPACK_TESTFILES/h5repack_int32le_1d.h5
+$SRC_H5REPACK_TESTFILES/h5repack_int32le_1d_ex.h5
+$SRC_H5REPACK_TESTFILES/h5repack_int32le_2d.h5
+$SRC_H5REPACK_TESTFILES/h5repack_int32le_2d_ex.h5
+$SRC_H5REPACK_TESTFILES/h5repack_int32le_3d.h5
+$SRC_H5REPACK_TESTFILES/h5repack_int32le_3d_ex.h5
$SRC_H5REPACK_TESTFILES/h5repack_layout.h5
$SRC_H5REPACK_TESTFILES/h5repack_layouto.h5
$SRC_H5REPACK_TESTFILES/h5repack_layout2.h5
@@ -109,23 +117,29 @@ $SRC_H5REPACK_TESTFILES/h5repack_refs.h5
$SRC_H5REPACK_TESTFILES/h5repack_shuffle.h5
$SRC_H5REPACK_TESTFILES/h5repack_soffset.h5
$SRC_H5REPACK_TESTFILES/h5repack_szip.h5
+$SRC_H5REPACK_TESTFILES/h5repack_uint8be.h5
+$SRC_H5REPACK_TESTFILES/h5repack_uint8be_ex.h5
+########fsm#files########
$SRC_H5REPACK_TESTFILES/h5repack_aggr.h5
$SRC_H5REPACK_TESTFILES/h5repack_fsm_aggr_nopersist.h5
$SRC_H5REPACK_TESTFILES/h5repack_fsm_aggr_persist.h5
$SRC_H5REPACK_TESTFILES/h5repack_none.h5
$SRC_H5REPACK_TESTFILES/h5repack_paged_nopersist.h5
$SRC_H5REPACK_TESTFILES/h5repack_paged_persist.h5
-$SRC_H5REPACK_TESTFILES/h5repack_f32le.h5
-$SRC_H5REPACK_TESTFILES/h5repack_f32le_ex.h5
-$SRC_H5REPACK_TESTFILES/h5repack_int32le_1d.h5
-$SRC_H5REPACK_TESTFILES/h5repack_int32le_1d_ex.h5
-$SRC_H5REPACK_TESTFILES/h5repack_int32le_2d.h5
-$SRC_H5REPACK_TESTFILES/h5repack_int32le_2d_ex.h5
-$SRC_H5REPACK_TESTFILES/h5repack_int32le_3d.h5
-$SRC_H5REPACK_TESTFILES/h5repack_int32le_3d_ex.h5
-$SRC_H5REPACK_TESTFILES/h5repack_uint8be.h5
-$SRC_H5REPACK_TESTFILES/h5repack_uint8be_ex.h5
+########h5diff/testfile########
$SRC_H5DIFF_TESTFILES/h5diff_attr1.h5
+########test#HDFFV-10590########
+$SRC_H5REPACK_TESTFILES/h5repack_CVE-2018-17432.h5
+$SRC_H5REPACK_TESTFILES/h5repack_CVE-2018-14460.h5
+########tools/testfiles#for#external#links########
+$SRC_TOOLS_TESTFILES/tsoftlinks.h5
+$SRC_TOOLS_TESTFILES/textlinkfar.h5
+$SRC_TOOLS_TESTFILES/textlinksrc.h5
+$SRC_TOOLS_TESTFILES/textlinktar.h5
+$SRC_TOOLS_TESTFILES/textlink.h5
+$SRC_H5REPACK_TESTFILES/h5copy_extlinks_src.h5
+$SRC_H5REPACK_TESTFILES/h5copy_extlinks_trg.h5
+########tools/testfiles########
$SRC_TOOLS_TESTFILES/tfamily00000.h5
$SRC_TOOLS_TESTFILES/tfamily00001.h5
$SRC_TOOLS_TESTFILES/tfamily00002.h5
@@ -138,6 +152,8 @@ $SRC_TOOLS_TESTFILES/tfamily00008.h5
$SRC_TOOLS_TESTFILES/tfamily00009.h5
$SRC_TOOLS_TESTFILES/tfamily00010.h5
$SRC_TOOLS_TESTFILES/tordergr.h5
+########reference#conversion#files########
+########tools/testfiles/vds########
$SRC_TOOLS_TESTFILES/vds/1_a.h5
$SRC_TOOLS_TESTFILES/vds/1_b.h5
$SRC_TOOLS_TESTFILES/vds/1_c.h5
@@ -168,33 +184,73 @@ $SRC_H5REPACK_TESTFILES/h5repack-help.txt
$SRC_H5REPACK_TESTFILES/h5repack_ext.bin
$SRC_H5REPACK_TESTFILES/ublock.bin
$SRC_H5REPACK_TESTFILES/h5repack.info
-$SRC_H5REPACK_TESTFILES/crtorder.tordergr.h5.ddl
-$SRC_H5REPACK_TESTFILES/deflate_limit.h5repack_layout.h5.ddl
+########dat#files########
$SRC_H5REPACK_TESTFILES/h5repack_f32le_ex-0.dat
$SRC_H5REPACK_TESTFILES/h5repack_int32le_1d_ex-0.dat
$SRC_H5REPACK_TESTFILES/h5repack_int32le_1d_ex-1.dat
$SRC_H5REPACK_TESTFILES/h5repack_int32le_2d_ex-0.dat
$SRC_H5REPACK_TESTFILES/h5repack_int32le_3d_ex-0.dat
-$SRC_H5REPACK_TESTFILES/h5repack_layout.h5.ddl
-$SRC_H5REPACK_TESTFILES/h5repack_filters.h5-gzip_verbose_filters.tst
-$SRC_H5REPACK_TESTFILES/h5repack_layout.h5-dset2_chunk_20x10-errstk.tst
-$SRC_H5REPACK_TESTFILES/h5repack_layout.h5-plugin_test.ddl
$SRC_H5REPACK_TESTFILES/h5repack_uint8be_ex-0.dat
$SRC_H5REPACK_TESTFILES/h5repack_uint8be_ex-1.dat
$SRC_H5REPACK_TESTFILES/h5repack_uint8be_ex-2.dat
$SRC_H5REPACK_TESTFILES/h5repack_uint8be_ex-3.dat
-$SRC_H5REPACK_TESTFILES/plugin_test.h5repack_layout.h5.tst
-$SRC_H5REPACK_TESTFILES/1_vds.h5-vds_dset_chunk20x10x5-v.ddl
-$SRC_H5REPACK_TESTFILES/2_vds.h5-vds_chunk3x6x9-v.ddl
-$SRC_H5REPACK_TESTFILES/3_1_vds.h5-vds_chunk2x5x8-v.ddl
-$SRC_H5REPACK_TESTFILES/4_vds.h5-vds_compa-v.ddl
-$SRC_H5REPACK_TESTFILES/4_vds.h5-vds_conti-v.ddl
+###############
+$SRC_H5REPACK_TESTFILES/crtorder.tordergr.h5.ddl
+$SRC_H5REPACK_TESTFILES/deflate_limit.h5repack_layout.h5.ddl
+$SRC_H5REPACK_TESTFILES/h5repack_layout.h5.ddl
+$SRC_H5REPACK_TESTFILES/h5repack_layout.h5-plugin_test.ddl
+########fsm#files########
$SRC_H5REPACK_TESTFILES/SP.h5repack_fsm_aggr_nopersist.h5.ddl
$SRC_H5REPACK_TESTFILES/S.h5repack_fsm_aggr_persist.h5.ddl
$SRC_H5REPACK_TESTFILES/STG.h5repack_none.h5.ddl
$SRC_H5REPACK_TESTFILES/GS.h5repack_paged_nopersist.h5.ddl
$SRC_H5REPACK_TESTFILES/SP.h5repack_paged_persist.h5.ddl
$SRC_H5REPACK_TESTFILES/SPT.h5repack_aggr.h5.ddl
+########vds#files########
+$SRC_H5REPACK_TESTFILES/1_vds.h5-vds_dset_chunk20x10x5-v.ddl
+$SRC_H5REPACK_TESTFILES/2_vds.h5-vds_chunk3x6x9-v.ddl
+$SRC_H5REPACK_TESTFILES/3_1_vds.h5-vds_chunk2x5x8-v.ddl
+$SRC_H5REPACK_TESTFILES/4_vds.h5-vds_compa-v.ddl
+$SRC_H5REPACK_TESTFILES/4_vds.h5-vds_conti-v.ddl
+########refs#files########
+$SRC_H5REPACK_TESTFILES/attrregion.tattrreg.h5.ddl
+$SRC_H5REPACK_TESTFILES/dataregion.tdatareg.h5.ddl
+########external#links#files########
+$SRC_H5REPACK_TESTFILES/textlinkfar-base.textlinkfar.h5.ddl
+$SRC_H5REPACK_TESTFILES/textlinksrc-base.textlinksrc.h5.ddl
+$SRC_H5REPACK_TESTFILES/textlinktar-base.textlinktar.h5.ddl
+$SRC_H5REPACK_TESTFILES/textlink-base.textlink.h5.ddl
+$SRC_H5REPACK_TESTFILES/tsoftlinks-base.tsoftlinks.h5.ddl
+$SRC_H5REPACK_TESTFILES/h5copy_extlinks_src-base.h5copy_extlinks_src.h5.ddl
+$SRC_H5REPACK_TESTFILES/textlinkfar-merge.textlinkfar.h5.tst
+$SRC_H5REPACK_TESTFILES/textlinksrc-merge.textlinksrc.h5.tst
+$SRC_H5REPACK_TESTFILES/textlinktar-merge.textlinktar.h5.tst
+$SRC_H5REPACK_TESTFILES/textlink-merge.textlink.h5.tst
+$SRC_H5REPACK_TESTFILES/tsoftlinks-merge.tsoftlinks.h5.tst
+$SRC_H5REPACK_TESTFILES/h5copy_extlinks_src-merge.h5copy_extlinks_src.h5.tst
+$SRC_H5REPACK_TESTFILES/textlinkfar-prune.textlinkfar.h5.ddl
+$SRC_H5REPACK_TESTFILES/textlinksrc-prune.textlinksrc.h5.ddl
+$SRC_H5REPACK_TESTFILES/textlinktar-prune.textlinktar.h5.ddl
+$SRC_H5REPACK_TESTFILES/textlink-prune.textlink.h5.ddl
+$SRC_H5REPACK_TESTFILES/tsoftlinks-prune.tsoftlinks.h5.ddl
+$SRC_H5REPACK_TESTFILES/h5copy_extlinks_src-prune.h5copy_extlinks_src.h5.ddl
+$SRC_H5REPACK_TESTFILES/textlinkfar-mergeprune.textlinkfar.h5.ddl
+$SRC_H5REPACK_TESTFILES/textlinksrc-mergeprune.textlinksrc.h5.ddl
+$SRC_H5REPACK_TESTFILES/textlinktar-mergeprune.textlinktar.h5.ddl
+$SRC_H5REPACK_TESTFILES/textlink-mergeprune.textlink.h5.ddl
+$SRC_H5REPACK_TESTFILES/tsoftlinks-mergeprune.tsoftlinks.h5.ddl
+$SRC_H5REPACK_TESTFILES/h5copy_extlinks_src-mergeprune.h5copy_extlinks_src.h5.ddl
+########tst#files########
+$SRC_H5REPACK_TESTFILES/h5repack_filters.h5-gzip_verbose_filters.tst
+$SRC_H5REPACK_TESTFILES/h5repack_layout.h5-dset2_chunk_20x10-errstk.tst
+$SRC_H5REPACK_TESTFILES/plugin_test.h5repack_layout.h5.tst
+########external#links#tst#files########
+$SRC_H5REPACK_TESTFILES/tsoftlinks-merge.tsoftlinks.h5.tst
+$SRC_H5REPACK_TESTFILES/textlinkfar-merge.textlinkfar.h5.tst
+$SRC_H5REPACK_TESTFILES/textlinksrc-merge.textlinksrc.h5.tst
+$SRC_H5REPACK_TESTFILES/textlinktar-merge.textlinktar.h5.tst
+$SRC_H5REPACK_TESTFILES/textlink-merge.textlink.h5.tst
+$SRC_H5REPACK_TESTFILES/h5copy_extlinks_src-merge.h5copy_extlinks_src.h5.tst
"
#
@@ -812,6 +868,149 @@ TOOLTESTV()
rm -f $outfile
}
+# Same as TOOLTEST, but expects h5repack fails
+#
+TOOLTEST_FAIL()
+{
+ infile=$1
+ outfile=$2
+ expect="$TESTDIR/$2-$1.ddl"
+ actual="$TESTDIR/$2-$1.out"
+ actual_err="$TESTDIR/$2-$1.err"
+ shift
+ shift
+
+ # Run test.
+ TESTING $H5REPACK $@
+ (
+ cd $TESTDIR
+ $ENVCMD $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile
+ ) >$actual
+ RET=$?
+ if [ $RET == 0 ] ; then
+ nerrors="`expr $nerrors + 1`"
+ echo " FAILED"
+ else
+ echo " PASSED"
+ fi
+ rm -f $outfile
+}
+
+# This is same as TOOLTESTV() with comparing display output
+# with actual filename swapped
+#
+TOOLTESTSV()
+{
+ expect="$TESTDIR/$1.$2.tst"
+ actual="$TESTDIR/`basename $2 .ddl`.out"
+ actual_err="$TESTDIR/`basename $2 .ddl`.err"
+
+ infile=$2
+ outfile=out-$1.$2
+ shift
+ shift
+
+ # Run test.
+ TESTING $H5REPACK $@
+ (
+ cd $TESTDIR
+ $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile
+ ) >$actual 2>$actual_err
+ RET=$?
+ if [ $RET != 0 ] ; then
+ echo "*FAILED*"
+ nerrors="`expr $nerrors + 1`"
+ else
+ echo " PASSED"
+ VERIFY h5diff equal $@
+ (
+ cd $TESTDIR
+ $RUNSERIAL $H5DIFF_BIN -v $infile $outfile
+ ) >$actual 2>$actual_err
+ RET=$?
+ if [ $RET != 0 ] ; then
+ echo "*FAILED*"
+ nerrors="`expr $nerrors + 1`"
+ else
+ echo " PASSED"
+ fi
+ fi
+
+ # display output compare
+ STDOUT_FILTER $actual
+ cat $actual_err >> $actual
+
+ VERIFY output from $H5REPACK $@
+ if cmp -s $expect $actual; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected result (*.tst) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && diff -c $expect $actual |sed 's/^/ /'
+ fi
+
+ rm -f $actual $actual_err
+ rm -f $outfile
+}
+
+# This is same as TOOLTESTSV() but expects a diff fail
+#
+TOOLFAILSV()
+{
+ expect="$TESTDIR/$1.$2.tst"
+ actual="$TESTDIR/`basename $2 .ddl`.out"
+ actual_err="$TESTDIR/`basename $2 .ddl`.err"
+
+ infile=$2
+ outfile=out-$1.$2
+ shift
+ shift
+
+ # Run test.
+ TESTING $H5REPACK $@
+ (
+ cd $TESTDIR
+ $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile
+ ) >$actual 2>$actual_err
+ RET=$?
+ if [ $RET != 0 ] ; then
+ echo "*FAILED*"
+ nerrors="`expr $nerrors + 1`"
+ else
+ echo " PASSED"
+ VERIFY h5diff unequal $@
+ (
+ cd $TESTDIR
+ $RUNSERIAL $H5DIFF_BIN -v $infile $outfile
+ ) >$actual 2>$actual_err
+ RET=$?
+ if [ $RET == 0 ] ; then
+ echo "*FAILED*"
+ nerrors="`expr $nerrors + 1`"
+ else
+ echo " PASSED"
+ fi
+ fi
+
+ # display output compare
+ STDOUT_FILTER $actual
+ cat $actual_err >> $actual
+
+ VERIFY output from $H5REPACK $@
+ if cmp -s $expect $actual; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected result (*.tst) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && diff -c $expect $actual |sed 's/^/ /'
+ fi
+
+ rm -f $actual $actual_err
+ rm -f $outfile
+}
+
# same as TOOLTESTV but filters error stack output and compares to an error file
# Extract file name, line number, version and thread IDs because they may be different
# ADD_H5ERR_MASK_TEST
@@ -1513,6 +1712,14 @@ TOOLTEST HDFFV-5932 h5repack_attr_refs.h5
# Note: this test is experimental for sharing test file among tools
TOOLTEST HDFFV-7840 h5diff_attr1.h5
+# test HDFFV-10590
+arg="h5repack_CVE-2018-17432.h5 h5repack_CVE-2018-17432_out.h5 --low=1 --high=2 -f GZIP=8 -l dset1:CHUNK=5x6"
+TOOLTEST_FAIL $arg
+
+# test HDFFV-11223
+arg="h5repack_CVE-2018-14460.h5 h5repack_CVE-2018-14460_out.h5"
+TOOLTEST_FAIL $arg
+
# tests for metadata block size option
TOOLTEST_META meta_short h5repack_layout.h5 -M 8192
TOOLTEST_META meta_long h5repack_layout.h5 --metadata_block_size=8192
@@ -1575,6 +1782,44 @@ VERIFY_INVALIDBOUNDS 0 1 bounds_latest_latest.h5
##############################################################################
VERIFY_EXTERNAL_CONSOLIDATION -l CONTI
+##############################################################################
+### E X T E R N A L L I N K T E S T S
+##############################################################################
+### HDFFV-11128 needs fixed to enable the following test
+#TOOLTEST_DUMP h5copy_extlinks_src-base h5copy_extlinks_src.h5 --enable-error-stack
+TOOLTEST_DUMP tsoftlinks-base tsoftlinks.h5 --enable-error-stack
+TOOLTEST_DUMP textlink-base textlink.h5 --enable-error-stack
+TOOLTEST_DUMP textlinkfar-base textlinkfar.h5 --enable-error-stack
+TOOLTEST_DUMP textlinksrc-base textlinksrc.h5 --enable-error-stack
+TOOLTEST_DUMP textlinktar-base textlinktar.h5 --enable-error-stack
+
+TOOLTESTSV h5copy_extlinks_src-merge h5copy_extlinks_src.h5 --merge
+TOOLFAILSV tsoftlinks-merge tsoftlinks.h5 --merge
+TOOLTESTSV textlink-merge textlink.h5 --merge
+### HDFFV-11128 needs fixed to enable the following test
+#TOOLFAILSV textlinkfar-merge textlinkfar.h5 --merge
+### HDFFV-11128 needs fixed to enable the following test
+#TOOLFAILSV textlinksrc-merge textlinksrc.h5 --merge
+### HDFFV-11128 needs fixed to enable the following test
+#TOOLFAILSV textlinktar-merge textlinktar.h5 --merge
+
+TOOLTEST_DUMP h5copy_extlinks_src-prune h5copy_extlinks_src.h5 --prune --enable-error-stack
+TOOLTEST_DUMP tsoftlinks-prune tsoftlinks.h5 --prune --enable-error-stack
+TOOLTEST_DUMP textlink-prune textlink.h5 --prune --enable-error-stack
+TOOLTEST_DUMP textlinkfar-prune textlinkfar.h5 --prune --enable-error-stack
+TOOLTEST_DUMP textlinksrc-prune textlinksrc.h5 --prune --enable-error-stack
+TOOLTEST_DUMP textlinktar-prune textlinktar.h5 --prune --enable-error-stack
+
+TOOLTEST_DUMP h5copy_extlinks_src-mergeprune h5copy_extlinks_src.h5 --merge --prune --enable-error-stack
+TOOLTEST_DUMP tsoftlinks-mergeprune tsoftlinks.h5 --merge --prune --enable-error-stack
+TOOLTEST_DUMP textlink-mergeprune textlink.h5 --merge --prune --enable-error-stack
+### HDFFV-11128 needs fixed to enable the following test
+#TOOLTEST_DUMP textlinkfar-mergeprune textlinkfar.h5 --merge --prune --enable-error-stack
+### HDFFV-11128 needs fixed to enable the following test
+#TOOLTEST_DUMP textlinksrc-mergeprune textlinksrc.h5 --merge --prune --enable-error-stack
+### HDFFV-11128 needs fixed to enable the following test
+#TOOLTEST_DUMP textlinktar-mergeprune textlinktar.h5 --merge --prune --enable-error-stack
+
# Clean up temporary files/directories
CLEAN_TESTFILES_AND_TESTDIR
diff --git a/tools/test/h5repack/h5repackgentest.c b/tools/test/h5repack/h5repackgentest.c
index 2b94422291c..576b1c7f57c 100644
--- a/tools/test/h5repack/h5repackgentest.c
+++ b/tools/test/h5repack/h5repackgentest.c
@@ -72,8 +72,8 @@ struct external_def {
* Returns 0 on success, -1 on failure.
*/
static int
-__make_dataset(hid_t file_id, const char *dset_name, hid_t mem_type_id, hid_t space_id, hid_t dcpl_id,
- void *wdata)
+make_dataset(hid_t file_id, const char *dset_name, hid_t mem_type_id, hid_t space_id, hid_t dcpl_id,
+ void *wdata)
{
hid_t dset_id = H5I_INVALID_HID;
int ret_value = 0;
@@ -90,7 +90,7 @@ __make_dataset(hid_t file_id, const char *dset_name, hid_t mem_type_id, hid_t sp
(void)H5Dclose(dset_id);
return ret_value;
-} /* end __make_dataset() */
+} /* end make_dataset() */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
* Helper function to populate the DCPL external storage list.
@@ -101,8 +101,8 @@ __make_dataset(hid_t file_id, const char *dset_name, hid_t mem_type_id, hid_t sp
* Returns 0 on success, -1 on failure.
*/
static int
-__set_dcpl_external_list(hid_t dcpl, const char *filename, unsigned n_elts_per_file, unsigned n_elts_total,
- hsize_t elt_size)
+set_dcpl_external_list(hid_t dcpl, const char *filename, unsigned n_elts_per_file, unsigned n_elts_total,
+ hsize_t elt_size)
{
char name[MAX_NAME_SIZE];
unsigned n_external_files = 0;
@@ -123,7 +123,7 @@ __set_dcpl_external_list(hid_t dcpl, const char *filename, unsigned n_elts_per_f
return -1;
}
return 0;
-} /* end __set_dcpl_external_list() */
+} /* end set_dcpl_external_list() */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
* Generalized utility function to write a file with the specified data and
@@ -132,8 +132,8 @@ __set_dcpl_external_list(hid_t dcpl, const char *filename, unsigned n_elts_per_f
* Returns 0 on success, -1 on failure.
*/
static int
-__make_file(const char *basename, struct external_def *ext, hid_t type_id, hsize_t rank, hsize_t *dims,
- void *wdata)
+make_file(const char *basename, struct external_def *ext, hid_t type_id, hsize_t rank, hsize_t *dims,
+ void *wdata)
{
char filename[MAX_NAME_SIZE];
hid_t file_id = H5I_INVALID_HID;
@@ -149,8 +149,8 @@ __make_file(const char *basename, struct external_def *ext, hid_t type_id, hsize
if (dcpl_id == H5I_INVALID_HID)
H5REPACKGENTEST_OOPS;
- if (__set_dcpl_external_list(dcpl_id, basename, ext->n_elts_per_file, ext->n_elts_total,
- ext->type_size) < 0)
+ if (set_dcpl_external_list(dcpl_id, basename, ext->n_elts_per_file, ext->n_elts_total,
+ ext->type_size) < 0)
H5REPACKGENTEST_OOPS;
}
@@ -162,13 +162,13 @@ __make_file(const char *basename, struct external_def *ext, hid_t type_id, hsize
if (file_id == H5I_INVALID_HID)
H5REPACKGENTEST_OOPS;
- if (__make_dataset(file_id, "dset", type_id, space_id, dcpl_id, wdata) < 0)
+ if (make_dataset(file_id, "dset", type_id, space_id, dcpl_id, wdata) < 0)
H5REPACKGENTEST_OOPS;
done:
H5REPACKGENTEST_COMMON_CLEANUP(dcpl_id, file_id, space_id);
return ret_value;
-} /* end __make_file() */
+} /* end make_file() */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
* Returns 0 on success, -1 on failure.
@@ -190,7 +190,7 @@ generate_int32le_1d(hbool_t external)
}
def_ptr = (TRUE == external) ? (&def) : NULL;
- if (__make_file(FILE_INT32LE_1, def_ptr, H5T_STD_I32LE, 1, dims, wdata) < 0)
+ if (make_file(FILE_INT32LE_1, def_ptr, H5T_STD_I32LE, 1, dims, wdata) < 0)
ret_value = -1;
return ret_value;
@@ -216,7 +216,7 @@ generate_int32le_2d(hbool_t external)
}
def_ptr = (TRUE == external) ? (&def) : NULL;
- if (__make_file(FILE_INT32LE_2, def_ptr, H5T_STD_I32LE, 2, dims, wdata) < 0)
+ if (make_file(FILE_INT32LE_2, def_ptr, H5T_STD_I32LE, 2, dims, wdata) < 0)
ret_value = -1;
return ret_value;
@@ -249,7 +249,7 @@ generate_int32le_3d(hbool_t external)
}
def_ptr = (TRUE == external) ? (&def) : NULL;
- if (__make_file(FILE_INT32LE_3, def_ptr, H5T_STD_I32LE, 3, dims, wdata) < 0)
+ if (make_file(FILE_INT32LE_3, def_ptr, H5T_STD_I32LE, 3, dims, wdata) < 0)
ret_value = -1;
return ret_value;
@@ -282,7 +282,7 @@ generate_uint8be(hbool_t external)
}
def_ptr = (TRUE == external) ? (&def) : NULL;
- if (__make_file(FILE_UINT8BE, def_ptr, H5T_STD_U8BE, 3, dims, wdata) < 0)
+ if (make_file(FILE_UINT8BE, def_ptr, H5T_STD_U8BE, 3, dims, wdata) < 0)
ret_value = -1;
return ret_value;
@@ -312,7 +312,7 @@ generate_f32le(hbool_t external)
}
def_ptr = (TRUE == external) ? (&def) : NULL;
- if (__make_file(FILE_F32LE, def_ptr, H5T_IEEE_F32LE, 2, dims, wdata) < 0)
+ if (make_file(FILE_F32LE, def_ptr, H5T_IEEE_F32LE, 2, dims, wdata) < 0)
ret_value = -1;
return ret_value;
diff --git a/tools/test/h5repack/h5repacktst.c b/tools/test/h5repack/h5repacktst.c
index 8e483b71f98..3396217f493 100644
--- a/tools/test/h5repack/h5repacktst.c
+++ b/tools/test/h5repack/h5repacktst.c
@@ -3292,8 +3292,6 @@ make_layout2(hid_t loc_id)
if (make_dset(loc_id, CHUNKED_S_FIX, s_sid, chunked_dcpl, s_buf[0]) < 0)
goto error;
- HDfree(s_buf);
-
ret_value = 0;
error:
@@ -3820,7 +3818,7 @@ make_userblock_file(void)
*
* Purpose: write datasets in LOC_ID
*
- * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+ * Programmer: Pedro Vicente
*
* Date: November 12, 2003
*
@@ -4657,7 +4655,7 @@ make_dset_reg_ref(hid_t loc_id)
*
* Purpose: write attributes in LOC_ID (dataset, group, named datatype)
*
- * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+ * Programmer: Pedro Vicente
*
* Date: November 12, 2003
*
@@ -5795,7 +5793,7 @@ write_attr_in(hid_t loc_id, const char *dset_name, /* for saving reference to da
*
* Purpose: utility function to create and write a dataset in LOC_ID
*
- * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+ * Programmer: Pedro Vicente
*
* Date: November 12, 2003
*
@@ -5828,7 +5826,7 @@ make_dset(hid_t loc_id, const char *name, hid_t sid, hid_t dcpl, void *buf)
*
* Purpose: utility function to create and write a dataset in LOC_ID
*
- * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+ * Programmer: Pedro Vicente
*
* Date: November 12, 2003
*
@@ -5870,7 +5868,7 @@ write_dset(hid_t loc_id, int rank, hsize_t *dims, const char *dset_name, hid_t t
*
* Purpose: utility function to write an attribute in LOC_ID
*
- * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+ * Programmer: Pedro Vicente
*
* Date: November 12, 2003
*
diff --git a/tools/test/h5repack/testfiles/h5copy_extlinks_src-base.h5copy_extlinks_src.h5.ddl b/tools/test/h5repack/testfiles/h5copy_extlinks_src-base.h5copy_extlinks_src.h5.ddl
new file mode 100644
index 00000000000..ad8a32002ad
--- /dev/null
+++ b/tools/test/h5repack/testfiles/h5copy_extlinks_src-base.h5copy_extlinks_src.h5.ddl
@@ -0,0 +1,28 @@
+HDF5 "out-h5copy_extlinks_src-mergeprune.h5copy_extlinks_src.h5" {
+GROUP "/" {
+ GROUP "group_ext" {
+ DATATYPE "extlink_datatype" H5T_STD_I32LE;
+ DATASET "extlink_dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 2200
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ GROUP "extlink_grp" {
+ }
+ }
+}
+}
diff --git a/tools/test/h5repack/testfiles/h5copy_extlinks_src-merge.h5copy_extlinks_src.h5.tst b/tools/test/h5repack/testfiles/h5copy_extlinks_src-merge.h5copy_extlinks_src.h5.tst
new file mode 100644
index 00000000000..52f215d751e
--- /dev/null
+++ b/tools/test/h5repack/testfiles/h5copy_extlinks_src-merge.h5copy_extlinks_src.h5.tst
@@ -0,0 +1,26 @@
+
+file1 file2
+---------------------------------------
+ x x /
+ x x /group_ext
+ x x /group_ext/extlink_datatype
+ x x /group_ext/extlink_dset
+ x x /group_ext/extlink_grp
+ x x /group_ext/extlink_notyet1
+ x x /group_ext/extlink_notyet2
+
+group : > and >
+0 differences found
+group : and
+0 differences found
+Not comparable: is of type H5G_UDLINK and is of type H5G_TYPE
+Not comparable: is of type H5G_UDLINK and is of type H5G_DATASET
+Not comparable: is of type H5G_UDLINK and is of type H5G_GROUP
+external link: and
+0 differences found
+external link: and
+0 differences found
+--------------------------------
+Some objects are not comparable
+--------------------------------
+Use -c for a list of objects without details of differences.
diff --git a/tools/test/h5repack/testfiles/h5copy_extlinks_src-mergeprune.h5copy_extlinks_src.h5.ddl b/tools/test/h5repack/testfiles/h5copy_extlinks_src-mergeprune.h5copy_extlinks_src.h5.ddl
new file mode 100644
index 00000000000..ad8a32002ad
--- /dev/null
+++ b/tools/test/h5repack/testfiles/h5copy_extlinks_src-mergeprune.h5copy_extlinks_src.h5.ddl
@@ -0,0 +1,28 @@
+HDF5 "out-h5copy_extlinks_src-mergeprune.h5copy_extlinks_src.h5" {
+GROUP "/" {
+ GROUP "group_ext" {
+ DATATYPE "extlink_datatype" H5T_STD_I32LE;
+ DATASET "extlink_dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 2200
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ GROUP "extlink_grp" {
+ }
+ }
+}
+}
diff --git a/tools/test/h5repack/testfiles/h5copy_extlinks_src-prune.h5copy_extlinks_src.h5.ddl b/tools/test/h5repack/testfiles/h5copy_extlinks_src-prune.h5copy_extlinks_src.h5.ddl
new file mode 100644
index 00000000000..b7d7bca3145
--- /dev/null
+++ b/tools/test/h5repack/testfiles/h5copy_extlinks_src-prune.h5copy_extlinks_src.h5.ddl
@@ -0,0 +1,6 @@
+HDF5 "out-h5copy_extlinks_src-prune.h5copy_extlinks_src.h5" {
+GROUP "/" {
+ GROUP "group_ext" {
+ }
+}
+}
diff --git a/tools/test/h5repack/testfiles/h5copy_extlinks_src.h5 b/tools/test/h5repack/testfiles/h5copy_extlinks_src.h5
new file mode 100644
index 00000000000..7b8621e1fad
Binary files /dev/null and b/tools/test/h5repack/testfiles/h5copy_extlinks_src.h5 differ
diff --git a/tools/test/h5repack/testfiles/h5copy_extlinks_trg.h5 b/tools/test/h5repack/testfiles/h5copy_extlinks_trg.h5
new file mode 100644
index 00000000000..3a0242d5252
Binary files /dev/null and b/tools/test/h5repack/testfiles/h5copy_extlinks_trg.h5 differ
diff --git a/tools/test/h5repack/testfiles/h5repack-help.txt b/tools/test/h5repack/testfiles/h5repack-help.txt
index 00fae242a33..cb10d22597d 100644
--- a/tools/test/h5repack/testfiles/h5repack-help.txt
+++ b/tools/test/h5repack/testfiles/h5repack-help.txt
@@ -29,6 +29,9 @@ usage: h5repack [OPTIONS] file1 file2
--high=BOUND The high bound for library release versions to use
when creating objects in the file
(default is H5F_LIBVER_LATEST)
+ --merge Follow external soft link recursively and merge data
+ --prune Do not follow external soft links and remove link
+ --merge --prune Follow external link, merge data and remove dangling link
-c L1, --compact=L1 Maximum number of links in header messages
-d L2, --indexed=L2 Minimum number of links in the indexed format
-s S[:F], --ssize=S[:F] Shared object header message minimum size
@@ -133,6 +136,7 @@ usage: h5repack [OPTIONS] file1 file2
UD=
Required values: filter_number, filter_flag, cd_value_count, value1
Optional values: value2 to valueN
+ filter_flag: 1 is OPTIONAL or 0 is MANDATORY
NONE (no parameter)
LAYT - is a string with the format:
diff --git a/tools/test/h5repack/testfiles/h5repack_CVE-2018-14460.h5 b/tools/test/h5repack/testfiles/h5repack_CVE-2018-14460.h5
new file mode 100644
index 00000000000..f4093b575c3
Binary files /dev/null and b/tools/test/h5repack/testfiles/h5repack_CVE-2018-14460.h5 differ
diff --git a/tools/test/h5repack/testfiles/h5repack_CVE-2018-17432.h5 b/tools/test/h5repack/testfiles/h5repack_CVE-2018-17432.h5
new file mode 100644
index 00000000000..7a815ba9e3b
Binary files /dev/null and b/tools/test/h5repack/testfiles/h5repack_CVE-2018-17432.h5 differ
diff --git a/tools/test/h5repack/testfiles/h5repack_layout.h5-dset2_chunk_20x10-errstk.tst b/tools/test/h5repack/testfiles/h5repack_layout.h5-dset2_chunk_20x10-errstk.tst
index 6f586cc9e48..3d9f0c2d22d 100644
--- a/tools/test/h5repack/testfiles/h5repack_layout.h5-dset2_chunk_20x10-errstk.tst
+++ b/tools/test/h5repack/testfiles/h5repack_layout.h5-dset2_chunk_20x10-errstk.tst
@@ -1,44 +1,47 @@
HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
- #000: (file name) line (number) in H5Dcreate2(): unable to create dataset
+ #000: (file name) line (number) in H5Dcreate2(): unable to synchronously create dataset
major: Dataset
minor: Unable to create file
- #001: (file name) line (number) in H5VL_dataset_create(): dataset create failed
+ #001: (file name) line (number) in H5D__create_api_common(): unable to create dataset
+ major: Dataset
+ minor: Unable to create file
+ #002: (file name) line (number) in H5VL_dataset_create(): dataset create failed
major: Virtual Object Layer
minor: Unable to create file
- #002: (file name) line (number) in H5VL__dataset_create(): dataset create failed
+ #003: (file name) line (number) in H5VL__dataset_create(): dataset create failed
major: Virtual Object Layer
minor: Unable to create file
- #003: (file name) line (number) in H5VL__native_dataset_create(): unable to create dataset
+ #004: (file name) line (number) in H5VL__native_dataset_create(): unable to create dataset
major: Dataset
minor: Unable to initialize object
- #004: (file name) line (number) in H5D__create_named(): unable to create and link to dataset
+ #005: (file name) line (number) in H5D__create_named(): unable to create and link to dataset
major: Dataset
minor: Unable to initialize object
- #005: (file name) line (number) in H5L_link_object(): unable to create new link to object
+ #006: (file name) line (number) in H5L_link_object(): unable to create new link to object
major: Links
minor: Unable to initialize object
- #006: (file name) line (number) in H5L__create_real(): can't insert link
+ #007: (file name) line (number) in H5L__create_real(): can't insert link
major: Links
minor: Unable to insert object
- #007: (file name) line (number) in H5G_traverse(): internal path traversal failed
+ #008: (file name) line (number) in H5G_traverse(): internal path traversal failed
major: Symbol table
minor: Object not found
- #008: (file name) line (number) in H5G__traverse_real(): traversal operator failed
+ #009: (file name) line (number) in H5G__traverse_real(): traversal operator failed
major: Symbol table
minor: Callback failed
- #009: (file name) line (number) in H5L__link_cb(): unable to create object
+ #010: (file name) line (number) in H5L__link_cb(): unable to create object
major: Links
minor: Unable to initialize object
- #010: (file name) line (number) in H5O_obj_create(): unable to open object
+ #011: (file name) line (number) in H5O_obj_create(): unable to open object
major: Object header
minor: Can't open object
- #011: (file name) line (number) in H5O__dset_create(): unable to create dataset
+ #012: (file name) line (number) in H5O__dset_create(): unable to create dataset
major: Dataset
minor: Unable to initialize object
- #012: (file name) line (number) in H5D__create(): unable to construct layout information
+ #013: (file name) line (number) in H5D__create(): unable to construct layout information
major: Dataset
minor: Unable to initialize object
- #013: (file name) line (number) in H5D__chunk_construct(): dimensionality of chunks doesn't match the dataspace
+ #014: (file name) line (number) in H5D__chunk_construct(): dimensionality of chunks doesn't match the dataspace
major: Dataset
minor: Bad value
H5tools-DIAG: Error detected in HDF5:tools (version (number)) thread (IDs):
diff --git a/tools/test/h5repack/testfiles/textlink-base.textlink.h5.ddl b/tools/test/h5repack/testfiles/textlink-base.textlink.h5.ddl
new file mode 100644
index 00000000000..b87a17db1a3
--- /dev/null
+++ b/tools/test/h5repack/testfiles/textlink-base.textlink.h5.ddl
@@ -0,0 +1,12 @@
+HDF5 "out-textlink-base.textlink.h5" {
+GROUP "/" {
+ EXTERNAL_LINK "extlink1" {
+ TARGETFILE "filename"
+ TARGETPATH "objname"
+ }
+ EXTERNAL_LINK "extlink2" {
+ TARGETFILE "anotherfile"
+ TARGETPATH "anotherobj"
+ }
+}
+}
diff --git a/tools/test/h5repack/testfiles/textlink-merge.textlink.h5.tst b/tools/test/h5repack/testfiles/textlink-merge.textlink.h5.tst
new file mode 100644
index 00000000000..a7ff71de508
--- /dev/null
+++ b/tools/test/h5repack/testfiles/textlink-merge.textlink.h5.tst
@@ -0,0 +1,13 @@
+
+file1 file2
+---------------------------------------
+ x x /
+ x x /extlink1
+ x x /extlink2
+
+group : > and >
+0 differences found
+external link: and
+0 differences found
+external link: and
+0 differences found
diff --git a/tools/test/h5repack/testfiles/textlink-mergeprune.textlink.h5.ddl b/tools/test/h5repack/testfiles/textlink-mergeprune.textlink.h5.ddl
new file mode 100644
index 00000000000..7206ae9637b
--- /dev/null
+++ b/tools/test/h5repack/testfiles/textlink-mergeprune.textlink.h5.ddl
@@ -0,0 +1,4 @@
+HDF5 "out-textlink-mergeprune.textlink.h5" {
+GROUP "/" {
+}
+}
diff --git a/tools/test/h5repack/testfiles/textlink-prune.textlink.h5.ddl b/tools/test/h5repack/testfiles/textlink-prune.textlink.h5.ddl
new file mode 100644
index 00000000000..83db344f49e
--- /dev/null
+++ b/tools/test/h5repack/testfiles/textlink-prune.textlink.h5.ddl
@@ -0,0 +1,4 @@
+HDF5 "out-textlink-prune.textlink.h5" {
+GROUP "/" {
+}
+}
diff --git a/tools/test/h5repack/testfiles/textlinkfar-base.textlinkfar.h5.ddl b/tools/test/h5repack/testfiles/textlinkfar-base.textlinkfar.h5.ddl
new file mode 100644
index 00000000000..a5eb497a99c
--- /dev/null
+++ b/tools/test/h5repack/testfiles/textlinkfar-base.textlinkfar.h5.ddl
@@ -0,0 +1,116 @@
+HDF5 "out-textlinkfar-base.textlinkfar.h5" {
+GROUP "/" {
+ EXTERNAL_LINK "src_file" {
+ TARGETFILE "textlinksrc.h5"
+ TARGETPATH "/"
+ GROUP "/" {
+ EXTERNAL_LINK "ext2soft_link1" {
+ TARGETFILE "tsoftlinks.h5"
+ TARGETPATH "/soft_dset1"
+ DATASET "/soft_dset1" {
+ DATATYPE H5T_STD_I32BE
+ DATASPACE SIMPLE { ( 4, 2 ) / ( 4, 2 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 32
+ OFFSET 2848
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ }
+ EXTERNAL_LINK "ext2softdangle_link1" {
+ TARGETFILE "tsoftlinks.h5"
+ TARGETPATH "/soft_dangle"
+ }
+ EXTERNAL_LINK "ext_link1" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "group"
+ GROUP "group" {
+ DATASET "dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 3136
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ EXTERNAL_LINK "elink_t1" {
+ TARGETFILE "textlinksrc.h5"
+ TARGETPATH "/"
+ GROUP "/" {
+ HARDLINK "/"
+ }
+ }
+ EXTERNAL_LINK "elink_t2" {
+ TARGETFILE "textlinksrc.h5"
+ TARGETPATH "/ext_link4"
+ }
+ GROUP "subgroup" {
+ GROUP "link_to_group" {
+ HARDLINK "/group"
+ }
+ }
+ }
+ }
+ EXTERNAL_LINK "ext_link2" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "dset"
+ DATASET "dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 3160
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ }
+ EXTERNAL_LINK "ext_link3" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "type"
+ DATATYPE "type" H5T_STD_I32LE;
+ }
+ EXTERNAL_LINK "ext_link4" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "group/elink_t2"
+ }
+ EXTERNAL_LINK "ext_link5" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "empty_group"
+ GROUP "empty_group" {
+ }
+ }
+ }
+ }
+}
+}
diff --git a/tools/test/h5repack/testfiles/textlinkfar-merge.textlinkfar.h5.tst b/tools/test/h5repack/testfiles/textlinkfar-merge.textlinkfar.h5.tst
new file mode 100644
index 00000000000..6673d39e3d6
--- /dev/null
+++ b/tools/test/h5repack/testfiles/textlinkfar-merge.textlinkfar.h5.tst
@@ -0,0 +1,20 @@
+
+file1 file2
+---------------------------------------
+ x x /
+ x x /src_file
+ x /src_file/ext2soft_link1
+ x /src_file/ext2softdangle_link1
+ x /src_file/ext_link1
+ x /src_file/ext_link2
+ x /src_file/ext_link3
+ x /src_file/ext_link4
+ x /src_file/ext_link5
+
+group : > and >
+0 differences found
+Not comparable: is of type H5G_UDLINK and is of type H5G_GROUP
+--------------------------------
+Some objects are not comparable
+--------------------------------
+Use -c for a list of objects without details of differences.
diff --git a/tools/test/h5repack/testfiles/textlinkfar-mergeprune.textlinkfar.h5.ddl b/tools/test/h5repack/testfiles/textlinkfar-mergeprune.textlinkfar.h5.ddl
new file mode 100644
index 00000000000..7ba3308c41a
--- /dev/null
+++ b/tools/test/h5repack/testfiles/textlinkfar-mergeprune.textlinkfar.h5.ddl
@@ -0,0 +1,152 @@
+HDF5 "out-textlinkfar-mergeprune.textlinkfar.h5" {
+GROUP "/" {
+ GROUP "src_file" {
+ EXTERNAL_LINK "ext2soft_link1" {
+ TARGETFILE "tsoftlinks.h5"
+ TARGETPATH "/soft_dset1"
+ DATASET "/soft_dset1" {
+ DATATYPE H5T_STD_I32BE
+ DATASPACE SIMPLE { ( 4, 2 ) / ( 4, 2 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 32
+ OFFSET 2848
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ }
+ EXTERNAL_LINK "ext2softdangle_link1" {
+ TARGETFILE "tsoftlinks.h5"
+ TARGETPATH "/soft_dangle"
+ }
+ EXTERNAL_LINK "ext_link1" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "group"
+ GROUP "group" {
+ DATASET "dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 3136
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ EXTERNAL_LINK "elink_t1" {
+ TARGETFILE "textlinksrc.h5"
+ TARGETPATH "/"
+ GROUP "/" {
+ EXTERNAL_LINK "ext2soft_link1" {
+ TARGETFILE "tsoftlinks.h5"
+ TARGETPATH "/soft_dset1"
+ DATASET "/soft_dset1" {
+ HARDLINK "/dset1"
+ }
+ }
+ EXTERNAL_LINK "ext2softdangle_link1" {
+ TARGETFILE "tsoftlinks.h5"
+ TARGETPATH "/soft_dangle"
+ }
+ EXTERNAL_LINK "ext_link1" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "group"
+ GROUP "group" {
+ HARDLINK "/group"
+ }
+ }
+ EXTERNAL_LINK "ext_link2" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "dset"
+ DATASET "dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 3160
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ }
+ EXTERNAL_LINK "ext_link3" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "type"
+ DATATYPE "type" H5T_STD_I32LE;
+ }
+ EXTERNAL_LINK "ext_link4" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "group/elink_t2"
+ }
+ EXTERNAL_LINK "ext_link5" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "empty_group"
+ GROUP "empty_group" {
+ }
+ }
+ }
+ }
+ EXTERNAL_LINK "elink_t2" {
+ TARGETFILE "textlinksrc.h5"
+ TARGETPATH "/ext_link4"
+ }
+ GROUP "subgroup" {
+ GROUP "link_to_group" {
+ HARDLINK "/group"
+ }
+ }
+ }
+ }
+ EXTERNAL_LINK "ext_link2" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "dset"
+ DATASET "dset" {
+ HARDLINK "/dset"
+ }
+ }
+ EXTERNAL_LINK "ext_link3" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "type"
+ DATATYPE "type" HARDLINK "/type"
+ }
+ EXTERNAL_LINK "ext_link4" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "group/elink_t2"
+ }
+ EXTERNAL_LINK "ext_link5" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "empty_group"
+ GROUP "empty_group" {
+ HARDLINK "/empty_group"
+ }
+ }
+ }
+}
+}
diff --git a/tools/test/h5repack/testfiles/textlinkfar-prune.textlinkfar.h5.ddl b/tools/test/h5repack/testfiles/textlinkfar-prune.textlinkfar.h5.ddl
new file mode 100644
index 00000000000..30f8f1b3cfd
--- /dev/null
+++ b/tools/test/h5repack/testfiles/textlinkfar-prune.textlinkfar.h5.ddl
@@ -0,0 +1,4 @@
+HDF5 "out-textlinkfar-prune.textlinkfar.h5" {
+GROUP "/" {
+}
+}
diff --git a/tools/test/h5repack/testfiles/textlinksrc-base.textlinksrc.h5.ddl b/tools/test/h5repack/testfiles/textlinksrc-base.textlinksrc.h5.ddl
new file mode 100644
index 00000000000..9a9a9aa88ce
--- /dev/null
+++ b/tools/test/h5repack/testfiles/textlinksrc-base.textlinksrc.h5.ddl
@@ -0,0 +1,150 @@
+HDF5 "out-textlinksrc-base.textlinksrc.h5" {
+GROUP "/" {
+ EXTERNAL_LINK "ext2soft_link1" {
+ TARGETFILE "tsoftlinks.h5"
+ TARGETPATH "/soft_dset1"
+ DATASET "/soft_dset1" {
+ DATATYPE H5T_STD_I32BE
+ DATASPACE SIMPLE { ( 4, 2 ) / ( 4, 2 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 32
+ OFFSET 2848
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ }
+ EXTERNAL_LINK "ext2softdangle_link1" {
+ TARGETFILE "tsoftlinks.h5"
+ TARGETPATH "/soft_dangle"
+ }
+ EXTERNAL_LINK "ext_link1" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "group"
+ GROUP "group" {
+ DATASET "dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 3136
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ EXTERNAL_LINK "elink_t1" {
+ TARGETFILE "textlinksrc.h5"
+ TARGETPATH "/"
+ GROUP "/" {
+ EXTERNAL_LINK "ext2soft_link1" {
+ TARGETFILE "tsoftlinks.h5"
+ TARGETPATH "/soft_dset1"
+ DATASET "/soft_dset1" {
+ HARDLINK "/dset1"
+ }
+ }
+ EXTERNAL_LINK "ext2softdangle_link1" {
+ TARGETFILE "tsoftlinks.h5"
+ TARGETPATH "/soft_dangle"
+ }
+ EXTERNAL_LINK "ext_link1" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "group"
+ GROUP "group" {
+ HARDLINK "/group"
+ }
+ }
+ EXTERNAL_LINK "ext_link2" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "dset"
+ DATASET "dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 3160
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ }
+ EXTERNAL_LINK "ext_link3" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "type"
+ DATATYPE "type" H5T_STD_I32LE;
+ }
+ EXTERNAL_LINK "ext_link4" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "group/elink_t2"
+ }
+ EXTERNAL_LINK "ext_link5" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "empty_group"
+ GROUP "empty_group" {
+ }
+ }
+ }
+ }
+ EXTERNAL_LINK "elink_t2" {
+ TARGETFILE "textlinksrc.h5"
+ TARGETPATH "/ext_link4"
+ }
+ GROUP "subgroup" {
+ GROUP "link_to_group" {
+ HARDLINK "/group"
+ }
+ }
+ }
+ }
+ EXTERNAL_LINK "ext_link2" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "dset"
+ DATASET "dset" {
+ HARDLINK "/dset"
+ }
+ }
+ EXTERNAL_LINK "ext_link3" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "type"
+ DATATYPE "type" HARDLINK "/type"
+ }
+ EXTERNAL_LINK "ext_link4" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "group/elink_t2"
+ }
+ EXTERNAL_LINK "ext_link5" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "empty_group"
+ GROUP "empty_group" {
+ HARDLINK "/empty_group"
+ }
+ }
+}
+}
diff --git a/tools/test/h5repack/testfiles/textlinksrc-merge.textlinksrc.h5.tst b/tools/test/h5repack/testfiles/textlinksrc-merge.textlinksrc.h5.tst
new file mode 100644
index 00000000000..d5a59026d20
--- /dev/null
+++ b/tools/test/h5repack/testfiles/textlinksrc-merge.textlinksrc.h5.tst
@@ -0,0 +1,32 @@
+
+file1 file2
+---------------------------------------
+ x x /
+ x x /ext2soft_link1
+ x x /ext2softdangle_link1
+ x x /ext_link1
+ x /ext_link1/dset
+ x /ext_link1/elink_t1
+ x /ext_link1/elink_t2
+ x /ext_link1/subgroup
+ x /ext_link1/subgroup/link_to_group
+ x x /ext_link2
+ x x /ext_link3
+ x x /ext_link4
+ x x /ext_link5
+
+group : > and >
+0 differences found
+Not comparable: is of type H5G_UDLINK and is of type H5G_DATASET
+external link: and
+0 differences found
+Not comparable: is of type H5G_UDLINK and is of type H5G_GROUP
+Not comparable: is of type H5G_UDLINK and is of type H5G_DATASET
+Not comparable: is of type H5G_UDLINK and is of type H5G_TYPE
+external link: and
+0 differences found
+Not comparable: is of type H5G_UDLINK and is of type H5G_GROUP
+--------------------------------
+Some objects are not comparable
+--------------------------------
+Use -c for a list of objects without details of differences.
diff --git a/tools/test/h5repack/testfiles/textlinksrc-mergeprune.textlinksrc.h5.ddl b/tools/test/h5repack/testfiles/textlinksrc-mergeprune.textlinksrc.h5.ddl
new file mode 100644
index 00000000000..5b3c740172f
--- /dev/null
+++ b/tools/test/h5repack/testfiles/textlinksrc-mergeprune.textlinksrc.h5.ddl
@@ -0,0 +1,187 @@
+HDF5 "out-textlinksrc-mergeprune.textlinksrc.h5" {
+GROUP "/" {
+ DATASET "ext2soft_link1" {
+ DATATYPE H5T_STD_I32BE
+ DATASPACE SIMPLE { ( 4, 2 ) / ( 4, 2 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 32
+ OFFSET 2048
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ GROUP "ext_link1" {
+ DATASET "dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 2080
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ EXTERNAL_LINK "elink_t1" {
+ TARGETFILE "textlinksrc.h5"
+ TARGETPATH "/"
+ GROUP "/" {
+ EXTERNAL_LINK "ext2soft_link1" {
+ TARGETFILE "tsoftlinks.h5"
+ TARGETPATH "/soft_dset1"
+ DATASET "/soft_dset1" {
+ DATATYPE H5T_STD_I32BE
+ DATASPACE SIMPLE { ( 4, 2 ) / ( 4, 2 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 32
+ OFFSET 2848
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ }
+ EXTERNAL_LINK "ext2softdangle_link1" {
+ TARGETFILE "tsoftlinks.h5"
+ TARGETPATH "/soft_dangle"
+ }
+ EXTERNAL_LINK "ext_link1" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "group"
+ GROUP "group" {
+ DATASET "dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 3136
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ EXTERNAL_LINK "elink_t1" {
+ TARGETFILE "textlinksrc.h5"
+ TARGETPATH "/"
+ GROUP "/" {
+ HARDLINK "/"
+ }
+ }
+ EXTERNAL_LINK "elink_t2" {
+ TARGETFILE "textlinksrc.h5"
+ TARGETPATH "/ext_link4"
+ }
+ GROUP "subgroup" {
+ GROUP "link_to_group" {
+ HARDLINK "/group"
+ }
+ }
+ }
+ }
+ EXTERNAL_LINK "ext_link2" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "dset"
+ DATASET "dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 3160
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ }
+ EXTERNAL_LINK "ext_link3" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "type"
+ DATATYPE "type" H5T_STD_I32LE;
+ }
+ EXTERNAL_LINK "ext_link4" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "group/elink_t2"
+ }
+ EXTERNAL_LINK "ext_link5" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "empty_group"
+ GROUP "empty_group" {
+ }
+ }
+ }
+ }
+ EXTERNAL_LINK "elink_t2" {
+ TARGETFILE "textlinksrc.h5"
+ TARGETPATH "/ext_link4"
+ }
+ GROUP "subgroup" {
+ GROUP "link_to_group" {
+ HARDLINK "/ext_link1"
+ }
+ }
+ }
+ DATASET "ext_link2" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 2104
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ DATATYPE "ext_link3" H5T_STD_I32LE;
+ GROUP "ext_link5" {
+ }
+}
+}
diff --git a/tools/test/h5repack/testfiles/textlinksrc-prune.textlinksrc.h5.ddl b/tools/test/h5repack/testfiles/textlinksrc-prune.textlinksrc.h5.ddl
new file mode 100644
index 00000000000..65d35ef9759
--- /dev/null
+++ b/tools/test/h5repack/testfiles/textlinksrc-prune.textlinksrc.h5.ddl
@@ -0,0 +1,4 @@
+HDF5 "out-textlinksrc-prune.textlinksrc.h5" {
+GROUP "/" {
+}
+}
diff --git a/tools/test/h5repack/testfiles/textlinktar-base.textlinktar.h5.ddl b/tools/test/h5repack/testfiles/textlinktar-base.textlinktar.h5.ddl
new file mode 100644
index 00000000000..3f02ff2dfc7
--- /dev/null
+++ b/tools/test/h5repack/testfiles/textlinktar-base.textlinktar.h5.ddl
@@ -0,0 +1,168 @@
+HDF5 "out-textlinktar-base.textlinktar.h5" {
+GROUP "/" {
+ DATASET "dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 2048
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ GROUP "empty_group" {
+ }
+ GROUP "group" {
+ DATASET "dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 2072
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ EXTERNAL_LINK "elink_t1" {
+ TARGETFILE "textlinksrc.h5"
+ TARGETPATH "/"
+ GROUP "/" {
+ EXTERNAL_LINK "ext2soft_link1" {
+ TARGETFILE "tsoftlinks.h5"
+ TARGETPATH "/soft_dset1"
+ DATASET "/soft_dset1" {
+ DATATYPE H5T_STD_I32BE
+ DATASPACE SIMPLE { ( 4, 2 ) / ( 4, 2 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 32
+ OFFSET 2848
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ }
+ EXTERNAL_LINK "ext2softdangle_link1" {
+ TARGETFILE "tsoftlinks.h5"
+ TARGETPATH "/soft_dangle"
+ }
+ EXTERNAL_LINK "ext_link1" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "group"
+ GROUP "group" {
+ DATASET "dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 3136
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ EXTERNAL_LINK "elink_t1" {
+ TARGETFILE "textlinksrc.h5"
+ TARGETPATH "/"
+ GROUP "/" {
+ HARDLINK "/"
+ }
+ }
+ EXTERNAL_LINK "elink_t2" {
+ TARGETFILE "textlinksrc.h5"
+ TARGETPATH "/ext_link4"
+ }
+ GROUP "subgroup" {
+ GROUP "link_to_group" {
+ HARDLINK "/group"
+ }
+ }
+ }
+ }
+ EXTERNAL_LINK "ext_link2" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "dset"
+ DATASET "dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 3160
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ }
+ EXTERNAL_LINK "ext_link3" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "type"
+ DATATYPE "type" H5T_STD_I32LE;
+ }
+ EXTERNAL_LINK "ext_link4" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "group/elink_t2"
+ }
+ EXTERNAL_LINK "ext_link5" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "empty_group"
+ GROUP "empty_group" {
+ }
+ }
+ }
+ }
+ EXTERNAL_LINK "elink_t2" {
+ TARGETFILE "textlinksrc.h5"
+ TARGETPATH "/ext_link4"
+ }
+ GROUP "subgroup" {
+ GROUP "link_to_group" {
+ HARDLINK "/group"
+ }
+ }
+ }
+ DATATYPE "type" H5T_STD_I32LE;
+}
+}
diff --git a/tools/test/h5repack/testfiles/textlinktar-merge.textlinktar.h5.tst b/tools/test/h5repack/testfiles/textlinktar-merge.textlinktar.h5.tst
new file mode 100644
index 00000000000..ccf4f7b2095
--- /dev/null
+++ b/tools/test/h5repack/testfiles/textlinktar-merge.textlinktar.h5.tst
@@ -0,0 +1,44 @@
+
+file1 file2
+---------------------------------------
+ x x /
+ x x /dset
+ x x /empty_group
+ x x /group
+ x x /group/dset
+ x x /group/elink_t1
+ x /group/elink_t1/ext2soft_link1
+ x /group/elink_t1/ext2softdangle_link1
+ x /group/elink_t1/ext_link1
+ x /group/elink_t1/ext_link2
+ x /group/elink_t1/ext_link3
+ x /group/elink_t1/ext_link4
+ x /group/elink_t1/ext_link5
+ x x /group/elink_t2
+ x x /group/subgroup
+ x x /group/subgroup/link_to_group
+ x x /type
+
+group : > and >
+0 differences found
+dataset: and
+0 differences found
+group : and
+0 differences found
+group : and
+0 differences found
+dataset: and
+0 differences found
+Not comparable: is of type H5G_UDLINK and is of type H5G_GROUP
+external link: and
+0 differences found
+group : and
+0 differences found
+group : and
+0 differences found
+datatype: and
+0 differences found
+--------------------------------
+Some objects are not comparable
+--------------------------------
+Use -c for a list of objects without details of differences.
diff --git a/tools/test/h5repack/testfiles/textlinktar-mergeprune.textlinktar.h5.ddl b/tools/test/h5repack/testfiles/textlinktar-mergeprune.textlinktar.h5.ddl
new file mode 100644
index 00000000000..c52e34dbb2e
--- /dev/null
+++ b/tools/test/h5repack/testfiles/textlinktar-mergeprune.textlinktar.h5.ddl
@@ -0,0 +1,200 @@
+HDF5 "out-textlinktar-mergeprune.textlinktar.h5" {
+GROUP "/" {
+ DATASET "dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 2048
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ GROUP "empty_group" {
+ }
+ GROUP "group" {
+ DATASET "dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 2072
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ GROUP "elink_t1" {
+ EXTERNAL_LINK "ext2soft_link1" {
+ TARGETFILE "tsoftlinks.h5"
+ TARGETPATH "/soft_dset1"
+ DATASET "/soft_dset1" {
+ DATATYPE H5T_STD_I32BE
+ DATASPACE SIMPLE { ( 4, 2 ) / ( 4, 2 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 32
+ OFFSET 2848
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ }
+ EXTERNAL_LINK "ext2softdangle_link1" {
+ TARGETFILE "tsoftlinks.h5"
+ TARGETPATH "/soft_dangle"
+ }
+ EXTERNAL_LINK "ext_link1" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "group"
+ GROUP "group" {
+ DATASET "dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 3136
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ EXTERNAL_LINK "elink_t1" {
+ TARGETFILE "textlinksrc.h5"
+ TARGETPATH "/"
+ GROUP "/" {
+ EXTERNAL_LINK "ext2soft_link1" {
+ TARGETFILE "tsoftlinks.h5"
+ TARGETPATH "/soft_dset1"
+ DATASET "/soft_dset1" {
+ HARDLINK "/dset1"
+ }
+ }
+ EXTERNAL_LINK "ext2softdangle_link1" {
+ TARGETFILE "tsoftlinks.h5"
+ TARGETPATH "/soft_dangle"
+ }
+ EXTERNAL_LINK "ext_link1" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "group"
+ GROUP "group" {
+ HARDLINK "/group"
+ }
+ }
+ EXTERNAL_LINK "ext_link2" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "dset"
+ DATASET "dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 3160
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ }
+ EXTERNAL_LINK "ext_link3" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "type"
+ DATATYPE "type" H5T_STD_I32LE;
+ }
+ EXTERNAL_LINK "ext_link4" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "group/elink_t2"
+ }
+ EXTERNAL_LINK "ext_link5" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "empty_group"
+ GROUP "empty_group" {
+ }
+ }
+ }
+ }
+ EXTERNAL_LINK "elink_t2" {
+ TARGETFILE "textlinksrc.h5"
+ TARGETPATH "/ext_link4"
+ }
+ GROUP "subgroup" {
+ GROUP "link_to_group" {
+ HARDLINK "/group"
+ }
+ }
+ }
+ }
+ EXTERNAL_LINK "ext_link2" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "dset"
+ DATASET "dset" {
+ HARDLINK "/dset"
+ }
+ }
+ EXTERNAL_LINK "ext_link3" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "type"
+ DATATYPE "type" HARDLINK "/type"
+ }
+ EXTERNAL_LINK "ext_link4" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "group/elink_t2"
+ }
+ EXTERNAL_LINK "ext_link5" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "empty_group"
+ GROUP "empty_group" {
+ HARDLINK "/empty_group"
+ }
+ }
+ }
+ GROUP "subgroup" {
+ GROUP "link_to_group" {
+ HARDLINK "/group"
+ }
+ }
+ }
+ DATATYPE "type" H5T_STD_I32LE;
+}
+}
diff --git a/tools/test/h5repack/testfiles/textlinktar-prune.textlinktar.h5.ddl b/tools/test/h5repack/testfiles/textlinktar-prune.textlinktar.h5.ddl
new file mode 100644
index 00000000000..6787784b1d1
--- /dev/null
+++ b/tools/test/h5repack/testfiles/textlinktar-prune.textlinktar.h5.ddl
@@ -0,0 +1,52 @@
+HDF5 "out-textlinktar-prune.textlinktar.h5" {
+GROUP "/" {
+ DATASET "dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 2048
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ GROUP "empty_group" {
+ }
+ GROUP "group" {
+ DATASET "dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 2072
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ GROUP "subgroup" {
+ GROUP "link_to_group" {
+ HARDLINK "/group"
+ }
+ }
+ }
+ DATATYPE "type" H5T_STD_I32LE;
+}
+}
diff --git a/tools/test/h5repack/testfiles/tsoftlinks-base.tsoftlinks.h5.ddl b/tools/test/h5repack/testfiles/tsoftlinks-base.tsoftlinks.h5.ddl
new file mode 100644
index 00000000000..b0cd32dcc7e
--- /dev/null
+++ b/tools/test/h5repack/testfiles/tsoftlinks-base.tsoftlinks.h5.ddl
@@ -0,0 +1,77 @@
+HDF5 "out-tsoftlinks-base.tsoftlinks.h5" {
+GROUP "/" {
+ DATASET "dset1" {
+ DATATYPE H5T_STD_I32BE
+ DATASPACE SIMPLE { ( 4, 2 ) / ( 4, 2 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 32
+ OFFSET 2048
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ DATASET "dset2" {
+ DATATYPE H5T_STD_I32BE
+ DATASPACE SIMPLE { ( 4, 2 ) / ( 4, 2 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 32
+ OFFSET 2080
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ DATATYPE "dtype" H5T_STD_I32BE;
+ GROUP "group1" {
+ SOFTLINK "soft_dangle" {
+ LINKTARGET "not_yet"
+ }
+ SOFTLINK "soft_dset1" {
+ LINKTARGET "/dset1"
+ }
+ SOFTLINK "soft_dset2" {
+ LINKTARGET "/dset2"
+ }
+ SOFTLINK "soft_dtype" {
+ LINKTARGET "/dtype"
+ }
+ SOFTLINK "soft_empty_grp" {
+ LINKTARGET "/group_empty"
+ }
+ }
+ GROUP "group_empty" {
+ }
+ SOFTLINK "soft_dangle" {
+ LINKTARGET "not_yet"
+ }
+ SOFTLINK "soft_dset1" {
+ LINKTARGET "/dset1"
+ }
+ SOFTLINK "soft_dtype" {
+ LINKTARGET "/dtype"
+ }
+ SOFTLINK "soft_empty_grp" {
+ LINKTARGET "/group_empty"
+ }
+ SOFTLINK "soft_group1" {
+ LINKTARGET "/group1"
+ }
+}
+}
diff --git a/tools/test/h5repack/testfiles/tsoftlinks-merge.tsoftlinks.h5.tst b/tools/test/h5repack/testfiles/tsoftlinks-merge.tsoftlinks.h5.tst
new file mode 100644
index 00000000000..27c33d7069c
--- /dev/null
+++ b/tools/test/h5repack/testfiles/tsoftlinks-merge.tsoftlinks.h5.tst
@@ -0,0 +1,53 @@
+
+file1 file2
+---------------------------------------
+ x x /
+ x x /dset1
+ x x /dset2
+ x x /dtype
+ x x /group1
+ x x /group1/soft_dangle
+ x x /group1/soft_dset1
+ x x /group1/soft_dset2
+ x x /group1/soft_dtype
+ x x /group1/soft_empty_grp
+ x x /group_empty
+ x x /soft_dangle
+ x x /soft_dset1
+ x x /soft_dtype
+ x x /soft_empty_grp
+ x x /soft_group1
+ x /soft_group1/soft_dangle
+ x /soft_group1/soft_dset1
+ x /soft_group1/soft_dset2
+ x /soft_group1/soft_dtype
+ x /soft_group1/soft_empty_grp
+
+group : > and >
+0 differences found
+dataset: and
+0 differences found
+dataset: and
+0 differences found
+datatype: and
+0 differences found
+group : and
+0 differences found
+link : and
+0 differences found
+Not comparable: is of type H5G_LINK and is of type H5G_DATASET
+Not comparable: is of type H5G_LINK and is of type H5G_DATASET
+Not comparable: is of type H5G_LINK and is of type H5G_TYPE
+Not comparable: is of type H5G_LINK and is of type H5G_GROUP
+group : and
+0 differences found
+link : and
+0 differences found
+Not comparable: is of type H5G_LINK and is of type H5G_DATASET
+Not comparable: is of type H5G_LINK and is of type H5G_TYPE
+Not comparable: is of type H5G_LINK and is of type H5G_GROUP
+Not comparable: is of type H5G_LINK and is of type H5G_GROUP
+--------------------------------
+Some objects are not comparable
+--------------------------------
+Use -c for a list of objects without details of differences.
diff --git a/tools/test/h5repack/testfiles/tsoftlinks-mergeprune.tsoftlinks.h5.ddl b/tools/test/h5repack/testfiles/tsoftlinks-mergeprune.tsoftlinks.h5.ddl
new file mode 100644
index 00000000000..fa4e12d8f28
--- /dev/null
+++ b/tools/test/h5repack/testfiles/tsoftlinks-mergeprune.tsoftlinks.h5.ddl
@@ -0,0 +1,127 @@
+HDF5 "out-tsoftlinks-mergeprune.tsoftlinks.h5" {
+GROUP "/" {
+ DATASET "dset1" {
+ DATATYPE H5T_STD_I32BE
+ DATASPACE SIMPLE { ( 4, 2 ) / ( 4, 2 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 32
+ OFFSET 2048
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ DATASET "dset2" {
+ DATATYPE H5T_STD_I32BE
+ DATASPACE SIMPLE { ( 4, 2 ) / ( 4, 2 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 32
+ OFFSET 2080
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ DATATYPE "dtype" H5T_STD_I32BE;
+ GROUP "group1" {
+ DATASET "soft_dset1" {
+ DATATYPE H5T_STD_I32BE
+ DATASPACE SIMPLE { ( 4, 2 ) / ( 4, 2 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 32
+ OFFSET 2112
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ DATASET "soft_dset2" {
+ DATATYPE H5T_STD_I32BE
+ DATASPACE SIMPLE { ( 4, 2 ) / ( 4, 2 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 32
+ OFFSET 2144
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ DATATYPE "soft_dtype" H5T_STD_I32BE;
+ GROUP "soft_empty_grp" {
+ }
+ }
+ GROUP "group_empty" {
+ }
+ DATASET "soft_dset1" {
+ DATATYPE H5T_STD_I32BE
+ DATASPACE SIMPLE { ( 4, 2 ) / ( 4, 2 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 32
+ OFFSET 2176
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ DATATYPE "soft_dtype" H5T_STD_I32BE;
+ GROUP "soft_empty_grp" {
+ }
+ GROUP "soft_group1" {
+ SOFTLINK "soft_dangle" {
+ LINKTARGET "not_yet"
+ }
+ SOFTLINK "soft_dset1" {
+ LINKTARGET "/dset1"
+ }
+ SOFTLINK "soft_dset2" {
+ LINKTARGET "/dset2"
+ }
+ SOFTLINK "soft_dtype" {
+ LINKTARGET "/dtype"
+ }
+ SOFTLINK "soft_empty_grp" {
+ LINKTARGET "/group_empty"
+ }
+ }
+}
+}
diff --git a/tools/test/h5repack/testfiles/tsoftlinks-prune.tsoftlinks.h5.ddl b/tools/test/h5repack/testfiles/tsoftlinks-prune.tsoftlinks.h5.ddl
new file mode 100644
index 00000000000..de58ef27355
--- /dev/null
+++ b/tools/test/h5repack/testfiles/tsoftlinks-prune.tsoftlinks.h5.ddl
@@ -0,0 +1,47 @@
+HDF5 "out-tsoftlinks-prune.tsoftlinks.h5" {
+GROUP "/" {
+ DATASET "dset1" {
+ DATATYPE H5T_STD_I32BE
+ DATASPACE SIMPLE { ( 4, 2 ) / ( 4, 2 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 32
+ OFFSET 2048
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ DATASET "dset2" {
+ DATATYPE H5T_STD_I32BE
+ DATASPACE SIMPLE { ( 4, 2 ) / ( 4, 2 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 32
+ OFFSET 2080
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ DATATYPE "dtype" H5T_STD_I32BE;
+ GROUP "group1" {
+ }
+ GROUP "group_empty" {
+ }
+}
+}
diff --git a/tools/test/h5stat/h5stat_gentest.c b/tools/test/h5stat/h5stat_gentest.c
index b55cd0649a0..a9813e7eb2e 100644
--- a/tools/test/h5stat/h5stat_gentest.c
+++ b/tools/test/h5stat/h5stat_gentest.c
@@ -497,7 +497,7 @@ gen_err_refcount(const char *fname)
attribute message */
if ((fd = HDopen(fname, O_RDWR, 0633)) >= 0) {
HDlseek(fd, 4520 + 24, SEEK_SET);
- HDwrite(fd, &val, 2);
+ (void)HDwrite(fd, &val, 2);
HDclose(fd);
}
diff --git a/tools/test/misc/testfiles/h5mkgrp_version.txt.in b/tools/test/misc/testfiles/h5mkgrp_version.txt.in
index 75c13a54a44..37dbabd1475 100644
--- a/tools/test/misc/testfiles/h5mkgrp_version.txt.in
+++ b/tools/test/misc/testfiles/h5mkgrp_version.txt.in
@@ -1 +1 @@
-h5mkgrp: Version @HDF5_PACKAGE_VERSION_STRING@
+h5mkgrp: Version @HDF5_RELEASE_VERSION_STRING@
diff --git a/tools/test/perform/chunk.c b/tools/test/perform/chunk.c
index ada2ed39420..1b6793a5950 100644
--- a/tools/test/perform/chunk.c
+++ b/tools/test/perform/chunk.c
@@ -55,20 +55,20 @@
#define RM_CACHE_STRT 25
#define RM_CACHE_END 25
#define RM_CACHE_DELT 5
-#define RM_START (double)0.50F
-#define RM_END (double)5.00F
-#define RM_DELTA (double)0.50F
-#define RM_W0 0.0F
+#define RM_START 0.50
+#define RM_END 5.00
+#define RM_DELTA 0.50
+#define RM_W0 0.0
#define RM_NRDCC 521
/* Diagonal test */
#define DIAG_CACHE_STRT 25
#define DIAG_CACHE_END 25
#define DIAG_CACHE_DELT 5
-#define DIAG_START (double)0.50F
-#define DIAG_END (double)5.00F
-#define DIAG_DELTA (double)0.50F
-/* #define DIAG_W0 0.65F */
+#define DIAG_START 0.50
+#define DIAG_END 5.00
+#define DIAG_DELTA 0.50
+/* #define DIAG_W0 0.65 */
/* #define DIAG_NRDCC 521 */
static size_t nio_g;
diff --git a/tools/test/perform/chunk_cache.c b/tools/test/perform/chunk_cache.c
index fcaa33736f0..25fa34cb880 100644
--- a/tools/test/perform/chunk_cache.c
+++ b/tools/test/perform/chunk_cache.c
@@ -262,13 +262,14 @@ check_partial_chunks_perf(hid_t file)
end_t = H5_get_time();
- if ((end_t - start_t) > (double)0.0f)
- printf("1. Partial chunks: total read time is %lf; number of bytes being read from file is %zu\n",
- (end_t - start_t), nbytes_global);
+ if ((end_t - start_t) > 0.0)
+ HDprintf("1. Partial chunks: total read time is %lf; number of bytes being read from file is %zu\n",
+ (end_t - start_t), nbytes_global);
else
- printf("1. Partial chunks: no total read time because timer is not available; number of bytes being "
- "read from file is %zu\n",
- nbytes_global);
+ HDprintf(
+ "1. Partial chunks: no total read time because timer is not available; number of bytes being "
+ "read from file is %zu\n",
+ nbytes_global);
H5Dclose(dataset);
H5Sclose(filespace);
@@ -340,13 +341,14 @@ check_hash_value_perf(hid_t file)
end_t = H5_get_time();
- if ((end_t - start_t) > (double)0.0f)
- printf("2. Hash value: total read time is %lf; number of bytes being read from file is %zu\n",
- (end_t - start_t), nbytes_global);
+ if ((end_t - start_t) > 0.0)
+ HDprintf("2. Hash value: total read time is %lf; number of bytes being read from file is %zu\n",
+ (end_t - start_t), nbytes_global);
else
- printf("2. Hash value: no total read time because timer is not available; number of bytes being read "
- "from file is %zu\n",
- nbytes_global);
+ HDprintf(
+ "2. Hash value: no total read time because timer is not available; number of bytes being read "
+ "from file is %zu\n",
+ nbytes_global);
H5Dclose(dataset);
H5Sclose(filespace);
@@ -375,7 +377,7 @@ check_hash_value_perf(hid_t file)
int
main(void)
{
- hid_t file; /* handles */
+ hid_t file = H5I_INVALID_HID; /* file ID */
int nerrors = 0;
/* Create a new file. If file exists its contents will be overwritten. */
@@ -404,6 +406,6 @@ main(void)
return 0;
error:
- fprintf(stderr, "*** ERRORS DETECTED ***\n");
+ HDfprintf(stderr, "*** ERRORS DETECTED ***\n");
return 1;
}
diff --git a/tools/test/perform/iopipe.c b/tools/test/perform/iopipe.c
index 68eaa3aa7af..d0db06aeabf 100644
--- a/tools/test/perform/iopipe.c
+++ b/tools/test/perform/iopipe.c
@@ -64,11 +64,11 @@ print_stats(const char *prefix,
#ifdef H5_HAVE_GETRUSAGE
double u_time, s_time;
- u_time = ((double)(r_stop->ru_utime.tv_sec) + (double)(r_stop->ru_utime.tv_usec) / (double)1000000.0F) -
- ((double)(r_start->ru_utime.tv_sec) + (double)(r_start->ru_utime.tv_usec) / (double)1000000.0F);
+ u_time = ((double)(r_stop->ru_utime.tv_sec) + (double)(r_stop->ru_utime.tv_usec) / 1000000.0) -
+ ((double)(r_start->ru_utime.tv_sec) + (double)(r_start->ru_utime.tv_usec) / 1000000.0);
- s_time = ((double)(r_stop->ru_stime.tv_sec) + (double)(r_stop->ru_stime.tv_usec) / (double)1000000.0F) -
- ((double)(r_start->ru_stime.tv_sec) + (double)(r_start->ru_stime.tv_usec) / (double)1000000.0F);
+ s_time = ((double)(r_stop->ru_stime.tv_sec) + (double)(r_stop->ru_stime.tv_usec) / 1000000.0) -
+ ((double)(r_start->ru_stime.tv_sec) + (double)(r_start->ru_stime.tv_usec) / 1000000.0);
#endif
e_time = t_stop - t_start;
H5_bandwidth(bw, (double)nbytes, e_time);
@@ -149,8 +149,7 @@ main(void)
* Win32 version 5.0 compiler.
* 1998-11-06 ptl
*/
- HDprintf("I/O request size is %1.1fMB\n",
- (double)(hssize_t)(size[0] * size[1]) / (double)1024.0F * (double)1024);
+ HDprintf("I/O request size is %1.1fMB\n", (double)(hssize_t)(size[0] * size[1]) / 1024.0 * 1024.0);
/* Open the files */
file = H5Fcreate(HDF5_FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
diff --git a/tools/test/perform/perf.c b/tools/test/perform/perf.c
index 30bda7b61ef..bf4b2a950c2 100644
--- a/tools/test/perform/perf.c
+++ b/tools/test/perform/perf.c
@@ -313,7 +313,7 @@ main(int argc, char **argv)
VRFY((ret >= 0), "H5Dwrite dataset1 succeeded", !H5FATAL);
if (ret < 0)
- HDfprintf(stderr, "node %d, read error, loc = %Ld: %s\n", mynod, mynod * opt_block,
+ HDfprintf(stderr, "node %d, read error, loc = %" PRId64 ": %s\n", mynod, mynod * opt_block,
strerror(myerrno));
/* if the user wanted to check correctness, compare the write
@@ -427,7 +427,8 @@ parse_args(int argc, char **argv)
if (NULL != (p = (char *)HDstrchr(optarg, '/')))
opt_threshold = (hsize_t)HDatoi(p + 1);
}
- HDfprintf(stdout, "alignment/threshold=%Hu/%Hu\n", opt_alignment, opt_threshold);
+ HDfprintf(stdout, "alignment/threshold=%" PRIuHSIZE "/%" PRIuHSIZE "\n", opt_alignment,
+ opt_threshold);
break;
case '2': /* use 2-files, i.e., split file driver */
opt_split_vfd = 1;
diff --git a/tools/test/perform/pio_standalone.h b/tools/test/perform/pio_standalone.h
index 3da26605cb3..35a521773b4 100644
--- a/tools/test/perform/pio_standalone.h
+++ b/tools/test/perform/pio_standalone.h
@@ -130,12 +130,12 @@
#else /* H5_HAVE_WIN32_API */
#define HDfileno(F) fileno(F)
#endif /* H5_HAVE_WIN32_API */
-#define HDfloor(X) floor(X)
-#define HDfmod(X, Y) fmod(X, Y)
-#define HDfopen(S, M) fopen(S, M)
-#define HDfork() fork()
-#define HDfpathconf(F, N) fpathconf(F, N)
-H5_DLL int HDfprintf(FILE *stream, const char *fmt, ...);
+#define HDfloor(X) floor(X)
+#define HDfmod(X, Y) fmod(X, Y)
+#define HDfopen(S, M) fopen(S, M)
+#define HDfork() fork()
+#define HDfpathconf(F, N) fpathconf(F, N)
+#define HDfprintf fprintf
#define HDfputc(C, F) fputc(C, F)
#define HDfputs(S, F) fputs(S, F)
#define HDfread(M, Z, N, F) fread(M, Z, N, F)
@@ -348,15 +348,9 @@ H5_DLL int HDrand(void);
#define HDsin(X) sin(X)
#define HDsinh(X) sinh(X)
#define HDsleep(N) sleep(N)
-#ifdef H5_HAVE_WIN32_API
-H5_DLL int c99_snprintf(char *str, size_t size, const char *format, ...);
-#define HDsnprintf c99_snprintf /*varargs*/
-#else
-#define HDsnprintf snprintf /*varargs*/
-#endif
-/* sprintf() variable arguments */
-#define HDsprintf sprintf /*varargs*/
-#define HDsqrt(X) sqrt(X)
+#define HDsnprintf snprintf /*varargs*/
+#define HDsprintf sprintf /*varargs*/
+#define HDsqrt(X) sqrt(X)
#ifdef H5_HAVE_RAND_R
H5_DLL void HDsrand(unsigned int seed);
#define HDsrandom(S) HDsrand(S)
@@ -367,7 +361,6 @@ H5_DLL void HDsrand(unsigned int seed);
#define HDsrand(S) srand(S)
#define HDsrandom(S) srand(S)
#endif
-/* sscanf() variable arguments */
#ifdef H5_HAVE_WIN32_API
#define HDstrcasecmp(A, B) _stricmp(A, B)
@@ -429,25 +422,20 @@ H5_DLL int64_t HDstrtoll(const char *s, const char **rest, int base);
#else
#define HDunlink(S) unlink(S)
#endif
-#define HDutime(S, T) utime(S, T)
-#define HDva_arg(A, T) va_arg(A, T)
-#define HDva_end(A) va_end(A)
-#define HDva_start(A, P) va_start(A, P)
-#define HDvasprintf(RET, FMT, A) vasprintf(RET, FMT, A)
-#define HDvfprintf(F, FMT, A) vfprintf(F, FMT, A)
-#define HDvprintf(FMT, A) vprintf(FMT, A)
-#define HDvsprintf(S, FMT, A) vsprintf(S, FMT, A)
-#ifdef H5_HAVE_WIN32_API
-H5_DLL int c99_vsnprintf(char *str, size_t size, const char *format, va_list ap);
-#define HDvsnprintf c99_vsnprintf
-#else
+#define HDutime(S, T) utime(S, T)
+#define HDva_arg(A, T) va_arg(A, T)
+#define HDva_end(A) va_end(A)
+#define HDva_start(A, P) va_start(A, P)
+#define HDvasprintf(RET, FMT, A) vasprintf(RET, FMT, A)
+#define HDvfprintf(F, FMT, A) vfprintf(F, FMT, A)
+#define HDvprintf(FMT, A) vprintf(FMT, A)
+#define HDvsprintf(S, FMT, A) vsprintf(S, FMT, A)
#define HDvsnprintf(S, N, FMT, A) vsnprintf(S, N, FMT, A)
-#endif
-#define HDwait(W) wait(W)
-#define HDwaitpid(P, W, O) waitpid(P, W, O)
-#define HDwcstombs(S, P, Z) wcstombs(S, P, Z)
-#define HDwctomb(S, C) wctomb(S, C)
-#define HDwrite(F, M, Z) write(F, M, Z)
+#define HDwait(W) wait(W)
+#define HDwaitpid(P, W, O) waitpid(P, W, O)
+#define HDwcstombs(S, P, Z) wcstombs(S, P, Z)
+#define HDwctomb(S, C) wctomb(S, C)
+#define HDwrite(F, M, Z) write(F, M, Z)
/*
* And now for a couple non-Posix functions... Watch out for systems that
diff --git a/tools/test/perform/sio_engine.c b/tools/test/perform/sio_engine.c
index ff0e4eb6afb..e5a0ec82be6 100644
--- a/tools/test/perform/sio_engine.c
+++ b/tools/test/perform/sio_engine.c
@@ -80,7 +80,7 @@ static int clean_file_g = -1; /*whether to cleanup temporary test */
/*0 is no cleanup; 1 is do cleanup */
/* the different types of file descriptors we can expect */
-typedef union _file_descr {
+typedef union {
int posixfd; /* POSIX file handle*/
hid_t h5fd; /* HDF5 file */
} file_descr;
@@ -783,7 +783,7 @@ do_read(results *res, file_descr *fd, parameters *parms, void *buffer)
/* Allocate data verification buffer */
if (NULL == (buffer2 = (char *)malloc(linear_buf_size))) {
- HDfprintf(stderr, "malloc for data verification buffer size (%Zu) failed\n", linear_buf_size);
+ HDfprintf(stderr, "malloc for data verification buffer size (%zu) failed\n", linear_buf_size);
GOTOERROR(FAIL);
} /* end if */
diff --git a/tools/test/perform/sio_perf.c b/tools/test/perform/sio_perf.c
index f24e97a1b03..fe4e7e7435b 100644
--- a/tools/test/perform/sio_perf.c
+++ b/tools/test/perform/sio_perf.c
@@ -65,8 +65,7 @@
#define SIO_HDF5 0x4
/* report 0.0 in case t is zero too */
-#define MB_PER_SEC(bytes, t) \
- (H5_DBL_ABS_EQUAL(t, (double)0.0F) ? (double)0.0F : ((((double)bytes) / (double)ONE_MB) / (t)))
+#define MB_PER_SEC(bytes, t) (H5_DBL_ABS_EQUAL(t, 0.0) ? 0.0 : ((((double)bytes) / (double)ONE_MB) / (t)))
#ifndef TRUE
#define TRUE 1
@@ -292,7 +291,7 @@ struct options {
size_t page_size;
};
-typedef struct _minmax {
+typedef struct {
double min;
double max;
double sum;
@@ -872,9 +871,9 @@ report_parameters(struct options *opts)
HDfprintf(output, "\n");
if (opts->page_size) {
- HDfprintf(output, "Page Aggregation Enabled. Page size = %ld\n", opts->page_size);
+ HDfprintf(output, "Page Aggregation Enabled. Page size = %zu\n", opts->page_size);
if (opts->page_buffer_size)
- HDfprintf(output, "Page Buffering Enabled. Page Buffer size = %ld\n", opts->page_buffer_size);
+ HDfprintf(output, "Page Buffering Enabled. Page Buffer size = %zu\n", opts->page_buffer_size);
else
HDfprintf(output, "Page Buffering Disabled\n");
}
diff --git a/tools/test/perform/sio_perf.h b/tools/test/perform/sio_perf.h
index acdb8015e88..6242782c656 100644
--- a/tools/test/perform/sio_perf.h
+++ b/tools/test/perform/sio_perf.h
@@ -10,8 +10,8 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#ifndef SIO_PERF_H__
-#define SIO_PERF_H__
+#ifndef SIO_PERF_H
+#define SIO_PERF_H
#ifndef STANDALONE
#include "io_timer.h"
@@ -101,4 +101,4 @@ extern void do_sio(parameters param, results *res);
}
#endif /* __cplusplus */
-#endif /* PIO_PERF_H__ */
+#endif /* SIO_PERF_H */
diff --git a/tools/test/perform/sio_standalone.h b/tools/test/perform/sio_standalone.h
index 924cbfd618f..d8b641206dc 100644
--- a/tools/test/perform/sio_standalone.h
+++ b/tools/test/perform/sio_standalone.h
@@ -10,8 +10,8 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#ifndef SIO_STANDALONE_H__
-#define SIO_PERF_H__
+#ifndef SIO_STANDALONE_H
+#define SIO_STANDALONE_H
/* Header file for building h5perf by standalone mode.
* Created: Christian Chilan, 2005/5/18.
@@ -145,12 +145,12 @@
#else /* H5_HAVE_WIN32_API */
#define HDfileno(F) fileno(F)
#endif /* H5_HAVE_WIN32_API */
-#define HDfloor(X) floor(X)
-#define HDfmod(X, Y) fmod(X, Y)
-#define HDfopen(S, M) fopen(S, M)
-#define HDfork() fork()
-#define HDfpathconf(F, N) fpathconf(F, N)
-H5_DLL int HDfprintf(FILE *stream, const char *fmt, ...);
+#define HDfloor(X) floor(X)
+#define HDfmod(X, Y) fmod(X, Y)
+#define HDfopen(S, M) fopen(S, M)
+#define HDfork() fork()
+#define HDfpathconf(F, N) fpathconf(F, N)
+#define HDfprintf fprintf
#define HDfputc(C, F) fputc(C, F)
#define HDfputs(S, F) fputs(S, F)
#define HDfread(M, Z, N, F) fread(M, Z, N, F)
@@ -363,15 +363,9 @@ H5_DLL int HDrand(void);
#define HDsin(X) sin(X)
#define HDsinh(X) sinh(X)
#define HDsleep(N) sleep(N)
-#ifdef H5_HAVE_WIN32_API
-H5_DLL int c99_snprintf(char *str, size_t size, const char *format, ...);
-#define HDsnprintf c99_snprintf /*varargs*/
-#else
-#define HDsnprintf snprintf /*varargs*/
-#endif
-/* sprintf() variable arguments */
-#define HDsprintf sprintf /*varargs*/
-#define HDsqrt(X) sqrt(X)
+#define HDsnprintf snprintf /*varargs*/
+#define HDsprintf sprintf /*varargs*/
+#define HDsqrt(X) sqrt(X)
#ifdef H5_HAVE_RAND_R
H5_DLL void HDsrand(unsigned int seed);
#define HDsrandom(S) HDsrand(S)
@@ -382,7 +376,6 @@ H5_DLL void HDsrand(unsigned int seed);
#define HDsrand(S) srand(S)
#define HDsrandom(S) srand(S)
#endif
-/* sscanf() variable arguments */
#ifdef H5_HAVE_WIN32_API
#define HDstrcasecmp(A, B) _stricmp(A, B)
@@ -444,25 +437,20 @@ H5_DLL int64_t HDstrtoll(const char *s, const char **rest, int base);
#else
#define HDunlink(S) unlink(S)
#endif
-#define HDutime(S, T) utime(S, T)
-#define HDva_arg(A, T) va_arg(A, T)
-#define HDva_end(A) va_end(A)
-#define HDva_start(A, P) va_start(A, P)
-#define HDvasprintf(RET, FMT, A) vasprintf(RET, FMT, A)
-#define HDvfprintf(F, FMT, A) vfprintf(F, FMT, A)
-#define HDvprintf(FMT, A) vprintf(FMT, A)
-#define HDvsprintf(S, FMT, A) vsprintf(S, FMT, A)
-#ifdef H5_HAVE_WIN32_API
-H5_DLL int c99_vsnprintf(char *str, size_t size, const char *format, va_list ap);
-#define HDvsnprintf c99_vsnprintf
-#else
+#define HDutime(S, T) utime(S, T)
+#define HDva_arg(A, T) va_arg(A, T)
+#define HDva_end(A) va_end(A)
+#define HDva_start(A, P) va_start(A, P)
+#define HDvasprintf(RET, FMT, A) vasprintf(RET, FMT, A)
+#define HDvfprintf(F, FMT, A) vfprintf(F, FMT, A)
+#define HDvprintf(FMT, A) vprintf(FMT, A)
+#define HDvsprintf(S, FMT, A) vsprintf(S, FMT, A)
#define HDvsnprintf(S, N, FMT, A) vsnprintf(S, N, FMT, A)
-#endif
-#define HDwait(W) wait(W)
-#define HDwaitpid(P, W, O) waitpid(P, W, O)
-#define HDwcstombs(S, P, Z) wcstombs(S, P, Z)
-#define HDwctomb(S, C) wctomb(S, C)
-#define HDwrite(F, M, Z) write(F, M, Z)
+#define HDwait(W) wait(W)
+#define HDwaitpid(P, W, O) waitpid(P, W, O)
+#define HDwcstombs(S, P, Z) wcstombs(S, P, Z)
+#define HDwctomb(S, C) wctomb(S, C)
+#define HDwrite(F, M, Z) write(F, M, Z)
/*
* And now for a couple non-Posix functions... Watch out for systems that
diff --git a/tools/test/perform/zip_perf.c b/tools/test/perform/zip_perf.c
index 6a1e1aae8e0..517866b4fb5 100644
--- a/tools/test/perform/zip_perf.c
+++ b/tools/test/perform/zip_perf.c
@@ -32,11 +32,10 @@
#define ONE_MB (ONE_KB * ONE_KB)
#define ONE_GB (ONE_MB * ONE_KB)
-#define MICROSECOND 1000000.0F
+#define MICROSECOND 1000000.0
/* report 0.0 in case t is zero too */
-#define MB_PER_SEC(bytes, t) \
- ((fabs(t) < (double)0.0000000001F) ? (double)0.0F : ((((double)bytes) / (double)ONE_MB) / (t)))
+#define MB_PER_SEC(bytes, t) ((fabs(t) < 0.0000000001) ? 0.0 : ((((double)bytes) / (double)ONE_MB) / (t)))
#ifndef TRUE
#define TRUE 1
@@ -169,7 +168,7 @@ write_file(Bytef *source, uLongf sourceLen)
/* destination buffer needs to be at least 0.1% larger than sourceLen
* plus 12 bytes */
- destLen = (uLongf)((double)sourceLen + ((double)sourceLen * (double)0.1F)) + 12;
+ destLen = (uLongf)((double)sourceLen + ((double)sourceLen * 0.1)) + 12;
dest = (Bytef *)HDmalloc(destLen);
if (!dest)
@@ -179,8 +178,8 @@ write_file(Bytef *source, uLongf sourceLen)
compress_buffer(dest, &destLen, source, sourceLen);
HDgettimeofday(&timer_stop, NULL);
- compression_time += ((double)timer_stop.tv_sec + ((double)timer_stop.tv_usec) / (double)MICROSECOND) -
- ((double)timer_start.tv_sec + ((double)timer_start.tv_usec) / (double)MICROSECOND);
+ compression_time += ((double)timer_stop.tv_sec + ((double)timer_stop.tv_usec) / MICROSECOND) -
+ ((double)timer_start.tv_sec + ((double)timer_start.tv_usec) / MICROSECOND);
if (report_once_flag) {
HDfprintf(stdout, "\tCompression Ratio: %g\n", ((double)destLen) / (double)sourceLen);
diff --git a/tools/testfiles/h5dump-help.txt b/tools/testfiles/h5dump-help.txt
index a122dee672d..5b11223e16b 100644
--- a/tools/testfiles/h5dump-help.txt
+++ b/tools/testfiles/h5dump-help.txt
@@ -15,7 +15,7 @@ usage: h5dump [OPTIONS] files
--s3-cred= Supply S3 authentication information to "ros3" vfd.
:: "(,,)"
If absent or -> "(,,)", no authentication.
- Has no effect is filedriver is not `ros3'.
+ Has no effect if filedriver is not "ros3".
--hdfs-attrs= Supply configuration information for HDFS file access.
For use with "--filedriver=hdfs"
:: (,,
@@ -73,7 +73,7 @@ usage: h5dump [OPTIONS] files
-D U, --xml-dtd=U Use the DTD or schema at U
-X S, --xml-ns=S (XML Schema) Use qualified names n the XML
":": no namespace, default: "hdf5:"
- E.g., to dump a file called `-f', use h5dump -- -f
+ E.g., to dump a file called "-f", use h5dump -- -f
--------------- Subsetting Options ---------------
Subsetting is available by using the following options with a dataset
diff --git a/tools/testfiles/pbits/tnofilename-with-packed-bits.ddl b/tools/testfiles/pbits/tnofilename-with-packed-bits.ddl
index a122dee672d..5b11223e16b 100644
--- a/tools/testfiles/pbits/tnofilename-with-packed-bits.ddl
+++ b/tools/testfiles/pbits/tnofilename-with-packed-bits.ddl
@@ -15,7 +15,7 @@ usage: h5dump [OPTIONS] files
--s3-cred= Supply S3 authentication information to "ros3" vfd.
:: "(,,)"
If absent or -> "(,,)", no authentication.
- Has no effect is filedriver is not `ros3'.
+ Has no effect if filedriver is not "ros3".
--hdfs-attrs= Supply configuration information for HDFS file access.
For use with "--filedriver=hdfs"
:: (,,
@@ -73,7 +73,7 @@ usage: h5dump [OPTIONS] files
-D U, --xml-dtd=U Use the DTD or schema at U
-X S, --xml-ns=S (XML Schema) Use qualified names n the XML
":": no namespace, default: "hdf5:"
- E.g., to dump a file called `-f', use h5dump -- -f
+ E.g., to dump a file called "-f", use h5dump -- -f
--------------- Subsetting Options ---------------
Subsetting is available by using the following options with a dataset
diff --git a/tools/testfiles/pbits/tpbitsIncomplete.ddl b/tools/testfiles/pbits/tpbitsIncomplete.ddl
index a122dee672d..5b11223e16b 100644
--- a/tools/testfiles/pbits/tpbitsIncomplete.ddl
+++ b/tools/testfiles/pbits/tpbitsIncomplete.ddl
@@ -15,7 +15,7 @@ usage: h5dump [OPTIONS] files
--s3-cred= Supply S3 authentication information to "ros3" vfd.
:: "(,,)"
If absent or -> "(,,)", no authentication.
- Has no effect is filedriver is not `ros3'.
+ Has no effect if filedriver is not "ros3".
--hdfs-attrs= Supply configuration information for HDFS file access.
For use with "--filedriver=hdfs"
:: (,,
@@ -73,7 +73,7 @@ usage: h5dump [OPTIONS] files
-D U, --xml-dtd=U Use the DTD or schema at U
-X S, --xml-ns=S (XML Schema) Use qualified names n the XML
":": no namespace, default: "hdf5:"
- E.g., to dump a file called `-f', use h5dump -- -f
+ E.g., to dump a file called "-f", use h5dump -- -f
--------------- Subsetting Options ---------------
Subsetting is available by using the following options with a dataset
diff --git a/tools/testfiles/pbits/tpbitsLengthExceeded.ddl b/tools/testfiles/pbits/tpbitsLengthExceeded.ddl
index a122dee672d..5b11223e16b 100644
--- a/tools/testfiles/pbits/tpbitsLengthExceeded.ddl
+++ b/tools/testfiles/pbits/tpbitsLengthExceeded.ddl
@@ -15,7 +15,7 @@ usage: h5dump [OPTIONS] files
--s3-cred= Supply S3 authentication information to "ros3" vfd.
:: "(,,)"
If absent or -> "(,,)", no authentication.
- Has no effect is filedriver is not `ros3'.
+ Has no effect if filedriver is not "ros3".
--hdfs-attrs= Supply configuration information for HDFS file access.
For use with "--filedriver=hdfs"
:: (,,
@@ -73,7 +73,7 @@ usage: h5dump [OPTIONS] files
-D U, --xml-dtd=U Use the DTD or schema at U
-X S, --xml-ns=S (XML Schema) Use qualified names n the XML
":": no namespace, default: "hdf5:"
- E.g., to dump a file called `-f', use h5dump -- -f
+ E.g., to dump a file called "-f", use h5dump -- -f
--------------- Subsetting Options ---------------
Subsetting is available by using the following options with a dataset
diff --git a/tools/testfiles/pbits/tpbitsLengthPositive.ddl b/tools/testfiles/pbits/tpbitsLengthPositive.ddl
index a122dee672d..5b11223e16b 100644
--- a/tools/testfiles/pbits/tpbitsLengthPositive.ddl
+++ b/tools/testfiles/pbits/tpbitsLengthPositive.ddl
@@ -15,7 +15,7 @@ usage: h5dump [OPTIONS] files
--s3-cred= Supply S3 authentication information to "ros3" vfd.
:: "(,,)"
If absent or -> "(,,)", no authentication.
- Has no effect is filedriver is not `ros3'.
+ Has no effect if filedriver is not "ros3".
--hdfs-attrs= Supply configuration information for HDFS file access.
For use with "--filedriver=hdfs"
:: (,,
@@ -73,7 +73,7 @@ usage: h5dump [OPTIONS] files
-D U, --xml-dtd=U Use the DTD or schema at U
-X S, --xml-ns=S (XML Schema) Use qualified names n the XML
":": no namespace, default: "hdf5:"
- E.g., to dump a file called `-f', use h5dump -- -f
+ E.g., to dump a file called "-f", use h5dump -- -f
--------------- Subsetting Options ---------------
Subsetting is available by using the following options with a dataset
diff --git a/tools/testfiles/pbits/tpbitsMaxExceeded.ddl b/tools/testfiles/pbits/tpbitsMaxExceeded.ddl
index a122dee672d..5b11223e16b 100644
--- a/tools/testfiles/pbits/tpbitsMaxExceeded.ddl
+++ b/tools/testfiles/pbits/tpbitsMaxExceeded.ddl
@@ -15,7 +15,7 @@ usage: h5dump [OPTIONS] files
--s3-cred= Supply S3 authentication information to "ros3" vfd.
:: "(,,)"
If absent or -> "(,,)", no authentication.
- Has no effect is filedriver is not `ros3'.
+ Has no effect if filedriver is not "ros3".
--hdfs-attrs= Supply configuration information for HDFS file access.
For use with "--filedriver=hdfs"
:: (,,
@@ -73,7 +73,7 @@ usage: h5dump [OPTIONS] files
-D U, --xml-dtd=U Use the DTD or schema at U
-X S, --xml-ns=S (XML Schema) Use qualified names n the XML
":": no namespace, default: "hdf5:"
- E.g., to dump a file called `-f', use h5dump -- -f
+ E.g., to dump a file called "-f", use h5dump -- -f
--------------- Subsetting Options ---------------
Subsetting is available by using the following options with a dataset
diff --git a/tools/testfiles/pbits/tpbitsOffsetExceeded.ddl b/tools/testfiles/pbits/tpbitsOffsetExceeded.ddl
index a122dee672d..5b11223e16b 100644
--- a/tools/testfiles/pbits/tpbitsOffsetExceeded.ddl
+++ b/tools/testfiles/pbits/tpbitsOffsetExceeded.ddl
@@ -15,7 +15,7 @@ usage: h5dump [OPTIONS] files
--s3-cred= Supply S3 authentication information to "ros3" vfd.
:: "(,,)"
If absent or -> "(,,)", no authentication.
- Has no effect is filedriver is not `ros3'.
+ Has no effect if filedriver is not "ros3".
--hdfs-attrs= Supply configuration information for HDFS file access.
For use with "--filedriver=hdfs"
:: (,,
@@ -73,7 +73,7 @@ usage: h5dump [OPTIONS] files
-D U, --xml-dtd=U Use the DTD or schema at U
-X S, --xml-ns=S (XML Schema) Use qualified names n the XML
":": no namespace, default: "hdf5:"
- E.g., to dump a file called `-f', use h5dump -- -f
+ E.g., to dump a file called "-f", use h5dump -- -f
--------------- Subsetting Options ---------------
Subsetting is available by using the following options with a dataset
diff --git a/tools/testfiles/pbits/tpbitsOffsetNegative.ddl b/tools/testfiles/pbits/tpbitsOffsetNegative.ddl
index a122dee672d..5b11223e16b 100644
--- a/tools/testfiles/pbits/tpbitsOffsetNegative.ddl
+++ b/tools/testfiles/pbits/tpbitsOffsetNegative.ddl
@@ -15,7 +15,7 @@ usage: h5dump [OPTIONS] files
--s3-cred= Supply S3 authentication information to "ros3" vfd.
:: "(,,)"
If absent or -> "(,,)", no authentication.
- Has no effect is filedriver is not `ros3'.
+ Has no effect if filedriver is not "ros3".
--hdfs-attrs= Supply configuration information for HDFS file access.
For use with "--filedriver=hdfs"
:: (,,
@@ -73,7 +73,7 @@ usage: h5dump [OPTIONS] files
-D U, --xml-dtd=U Use the DTD or schema at U
-X S, --xml-ns=S (XML Schema) Use qualified names n the XML
":": no namespace, default: "hdf5:"
- E.g., to dump a file called `-f', use h5dump -- -f
+ E.g., to dump a file called "-f", use h5dump -- -f
--------------- Subsetting Options ---------------
Subsetting is available by using the following options with a dataset
diff --git a/tools/testfiles/tCVE_2018_11206_fill_new.h5 b/tools/testfiles/tCVE_2018_11206_fill_new.h5
new file mode 100644
index 00000000000..643591c1276
Binary files /dev/null and b/tools/testfiles/tCVE_2018_11206_fill_new.h5 differ
diff --git a/tools/testfiles/tCVE_2018_11206_fill_old.h5 b/tools/testfiles/tCVE_2018_11206_fill_old.h5
new file mode 100644
index 00000000000..7f5b41aa3bf
Binary files /dev/null and b/tools/testfiles/tCVE_2018_11206_fill_old.h5 differ
diff --git a/tools/testfiles/tfloatsattrs.ddl b/tools/testfiles/tfloatsattrs.ddl
new file mode 100644
index 00000000000..11c65b8093f
--- /dev/null
+++ b/tools/testfiles/tfloatsattrs.ddl
@@ -0,0 +1,621 @@
+HDF5 "tfloatsattrs.h5" {
+GROUP "/" {
+ DATASET "DS128BITS" {
+ DATATYPE 128-bit little-endian floating-point 80-bit precision
+ DATASPACE SIMPLE { ( 8, 128 ) / ( 8, 128 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 16384
+ OFFSET 14416
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ DATA {
+ (0,0): 128, 0.0625, 0.125, 0.1875, 0.25, 0.3125, 0.375, 0.4375, 0.5,
+ (0,9): 0.5625, 0.625, 0.6875, 0.75, 0.8125, 0.875, 0.9375, 1, 1.0625,
+ (0,18): 1.125, 1.1875, 1.25, 1.3125, 1.375, 1.4375, 1.5, 1.5625, 1.625,
+ (0,27): 1.6875, 1.75, 1.8125, 1.875, 1.9375, 2, 2.0625, 2.125, 2.1875,
+ (0,36): 2.25, 2.3125, 2.375, 2.4375, 2.5, 2.5625, 2.625, 2.6875, 2.75,
+ (0,45): 2.8125, 2.875, 2.9375, 3, 3.0625, 3.125, 3.1875, 3.25, 3.3125,
+ (0,54): 3.375, 3.4375, 3.5, 3.5625, 3.625, 3.6875, 3.75, 3.8125, 3.875,
+ (0,63): 3.9375, 4, 4.0625, 4.125, 4.1875, 4.25, 4.3125, 4.375, 4.4375,
+ (0,72): 4.5, 4.5625, 4.625, 4.6875, 4.75, 4.8125, 4.875, 4.9375, 5,
+ (0,81): 5.0625, 5.125, 5.1875, 5.25, 5.3125, 5.375, 5.4375, 5.5,
+ (0,89): 5.5625, 5.625, 5.6875, 5.75, 5.8125, 5.875, 5.9375, 6, 6.0625,
+ (0,98): 6.125, 6.1875, 6.25, 6.3125, 6.375, 6.4375, 6.5, 6.5625, 6.625,
+ (0,107): 6.6875, 6.75, 6.8125, 6.875, 6.9375, 7, 7.0625, 7.125, 7.1875,
+ (0,116): 7.25, 7.3125, 7.375, 7.4375, 7.5, 7.5625, 7.625, 7.6875, 7.75,
+ (0,125): 7.8125, 7.875, 7.9375,
+ (1,0): 127, 0.0703125, 0.132812, 0.195312, 0.257812, 0.320312,
+ (1,6): 0.382812, 0.445312, 0.507812, 0.570312, 0.632812, 0.695312,
+ (1,12): 0.757812, 0.820312, 0.882812, 0.945312, 1.00781, 1.07031,
+ (1,18): 1.13281, 1.19531, 1.25781, 1.32031, 1.38281, 1.44531, 1.50781,
+ (1,25): 1.57031, 1.63281, 1.69531, 1.75781, 1.82031, 1.88281, 1.94531,
+ (1,32): 2.00781, 2.07031, 2.13281, 2.19531, 2.25781, 2.32031, 2.38281,
+ (1,39): 2.44531, 2.50781, 2.57031, 2.63281, 2.69531, 2.75781, 2.82031,
+ (1,46): 2.88281, 2.94531, 3.00781, 3.07031, 3.13281, 3.19531, 3.25781,
+ (1,53): 3.32031, 3.38281, 3.44531, 3.50781, 3.57031, 3.63281, 3.69531,
+ (1,60): 3.75781, 3.82031, 3.88281, 3.94531, 4.00781, 4.07031, 4.13281,
+ (1,67): 4.19531, 4.25781, 4.32031, 4.38281, 4.44531, 4.50781, 4.57031,
+ (1,74): 4.63281, 4.69531, 4.75781, 4.82031, 4.88281, 4.94531, 5.00781,
+ (1,81): 5.07031, 5.13281, 5.19531, 5.25781, 5.32031, 5.38281, 5.44531,
+ (1,88): 5.50781, 5.57031, 5.63281, 5.69531, 5.75781, 5.82031, 5.88281,
+ (1,95): 5.94531, 6.00781, 6.07031, 6.13281, 6.19531, 6.25781, 6.32031,
+ (1,102): 6.38281, 6.44531, 6.50781, 6.57031, 6.63281, 6.69531, 6.75781,
+ (1,109): 6.82031, 6.88281, 6.94531, 7.00781, 7.07031, 7.13281, 7.19531,
+ (1,116): 7.25781, 7.32031, 7.38281, 7.44531, 7.50781, 7.57031, 7.63281,
+ (1,123): 7.69531, 7.75781, 7.82031, 7.88281, 7.94531,
+ (2,0): 126, 0.078125, 0.140625, 0.203125, 0.265625, 0.328125, 0.390625,
+ (2,7): 0.453125, 0.515625, 0.578125, 0.640625, 0.703125, 0.765625,
+ (2,13): 0.828125, 0.890625, 0.953125, 1.01562, 1.07812, 1.14062,
+ (2,19): 1.20312, 1.26562, 1.32812, 1.39062, 1.45312, 1.51562, 1.57812,
+ (2,26): 1.64062, 1.70312, 1.76562, 1.82812, 1.89062, 1.95312, 2.01562,
+ (2,33): 2.07812, 2.14062, 2.20312, 2.26562, 2.32812, 2.39062, 2.45312,
+ (2,40): 2.51562, 2.57812, 2.64062, 2.70312, 2.76562, 2.82812, 2.89062,
+ (2,47): 2.95312, 3.01562, 3.07812, 3.14062, 3.20312, 3.26562, 3.32812,
+ (2,54): 3.39062, 3.45312, 3.51562, 3.57812, 3.64062, 3.70312, 3.76562,
+ (2,61): 3.82812, 3.89062, 3.95312, 4.01562, 4.07812, 4.14062, 4.20312,
+ (2,68): 4.26562, 4.32812, 4.39062, 4.45312, 4.51562, 4.57812, 4.64062,
+ (2,75): 4.70312, 4.76562, 4.82812, 4.89062, 4.95312, 5.01562, 5.07812,
+ (2,82): 5.14062, 5.20312, 5.26562, 5.32812, 5.39062, 5.45312, 5.51562,
+ (2,89): 5.57812, 5.64062, 5.70312, 5.76562, 5.82812, 5.89062, 5.95312,
+ (2,96): 6.01562, 6.07812, 6.14062, 6.20312, 6.26562, 6.32812, 6.39062,
+ (2,103): 6.45312, 6.51562, 6.57812, 6.64062, 6.70312, 6.76562, 6.82812,
+ (2,110): 6.89062, 6.95312, 7.01562, 7.07812, 7.14062, 7.20312, 7.26562,
+ (2,117): 7.32812, 7.39062, 7.45312, 7.51562, 7.57812, 7.64062, 7.70312,
+ (2,124): 7.76562, 7.82812, 7.89062, 7.95312,
+ (3,0): 125, 0.0859375, 0.148438, 0.210938, 0.273438, 0.335938,
+ (3,6): 0.398438, 0.460938, 0.523438, 0.585938, 0.648438, 0.710938,
+ (3,12): 0.773438, 0.835938, 0.898438, 0.960938, 1.02344, 1.08594,
+ (3,18): 1.14844, 1.21094, 1.27344, 1.33594, 1.39844, 1.46094, 1.52344,
+ (3,25): 1.58594, 1.64844, 1.71094, 1.77344, 1.83594, 1.89844, 1.96094,
+ (3,32): 2.02344, 2.08594, 2.14844, 2.21094, 2.27344, 2.33594, 2.39844,
+ (3,39): 2.46094, 2.52344, 2.58594, 2.64844, 2.71094, 2.77344, 2.83594,
+ (3,46): 2.89844, 2.96094, 3.02344, 3.08594, 3.14844, 3.21094, 3.27344,
+ (3,53): 3.33594, 3.39844, 3.46094, 3.52344, 3.58594, 3.64844, 3.71094,
+ (3,60): 3.77344, 3.83594, 3.89844, 3.96094, 4.02344, 4.08594, 4.14844,
+ (3,67): 4.21094, 4.27344, 4.33594, 4.39844, 4.46094, 4.52344, 4.58594,
+ (3,74): 4.64844, 4.71094, 4.77344, 4.83594, 4.89844, 4.96094, 5.02344,
+ (3,81): 5.08594, 5.14844, 5.21094, 5.27344, 5.33594, 5.39844, 5.46094,
+ (3,88): 5.52344, 5.58594, 5.64844, 5.71094, 5.77344, 5.83594, 5.89844,
+ (3,95): 5.96094, 6.02344, 6.08594, 6.14844, 6.21094, 6.27344, 6.33594,
+ (3,102): 6.39844, 6.46094, 6.52344, 6.58594, 6.64844, 6.71094, 6.77344,
+ (3,109): 6.83594, 6.89844, 6.96094, 7.02344, 7.08594, 7.14844, 7.21094,
+ (3,116): 7.27344, 7.33594, 7.39844, 7.46094, 7.52344, 7.58594, 7.64844,
+ (3,123): 7.71094, 7.77344, 7.83594, 7.89844, 7.96094,
+ (4,0): 124, 0.09375, 0.15625, 0.21875, 0.28125, 0.34375, 0.40625,
+ (4,7): 0.46875, 0.53125, 0.59375, 0.65625, 0.71875, 0.78125, 0.84375,
+ (4,14): 0.90625, 0.96875, 1.03125, 1.09375, 1.15625, 1.21875, 1.28125,
+ (4,21): 1.34375, 1.40625, 1.46875, 1.53125, 1.59375, 1.65625, 1.71875,
+ (4,28): 1.78125, 1.84375, 1.90625, 1.96875, 2.03125, 2.09375, 2.15625,
+ (4,35): 2.21875, 2.28125, 2.34375, 2.40625, 2.46875, 2.53125, 2.59375,
+ (4,42): 2.65625, 2.71875, 2.78125, 2.84375, 2.90625, 2.96875, 3.03125,
+ (4,49): 3.09375, 3.15625, 3.21875, 3.28125, 3.34375, 3.40625, 3.46875,
+ (4,56): 3.53125, 3.59375, 3.65625, 3.71875, 3.78125, 3.84375, 3.90625,
+ (4,63): 3.96875, 4.03125, 4.09375, 4.15625, 4.21875, 4.28125, 4.34375,
+ (4,70): 4.40625, 4.46875, 4.53125, 4.59375, 4.65625, 4.71875, 4.78125,
+ (4,77): 4.84375, 4.90625, 4.96875, 5.03125, 5.09375, 5.15625, 5.21875,
+ (4,84): 5.28125, 5.34375, 5.40625, 5.46875, 5.53125, 5.59375, 5.65625,
+ (4,91): 5.71875, 5.78125, 5.84375, 5.90625, 5.96875, 6.03125, 6.09375,
+ (4,98): 6.15625, 6.21875, 6.28125, 6.34375, 6.40625, 6.46875, 6.53125,
+ (4,105): 6.59375, 6.65625, 6.71875, 6.78125, 6.84375, 6.90625, 6.96875,
+ (4,112): 7.03125, 7.09375, 7.15625, 7.21875, 7.28125, 7.34375, 7.40625,
+ (4,119): 7.46875, 7.53125, 7.59375, 7.65625, 7.71875, 7.78125, 7.84375,
+ (4,126): 7.90625, 7.96875,
+ (5,0): 123, 0.101562, 0.164062, 0.226562, 0.289062, 0.351562, 0.414062,
+ (5,7): 0.476562, 0.539062, 0.601562, 0.664062, 0.726562, 0.789062,
+ (5,13): 0.851562, 0.914062, 0.976562, 1.03906, 1.10156, 1.16406,
+ (5,19): 1.22656, 1.28906, 1.35156, 1.41406, 1.47656, 1.53906, 1.60156,
+ (5,26): 1.66406, 1.72656, 1.78906, 1.85156, 1.91406, 1.97656, 2.03906,
+ (5,33): 2.10156, 2.16406, 2.22656, 2.28906, 2.35156, 2.41406, 2.47656,
+ (5,40): 2.53906, 2.60156, 2.66406, 2.72656, 2.78906, 2.85156, 2.91406,
+ (5,47): 2.97656, 3.03906, 3.10156, 3.16406, 3.22656, 3.28906, 3.35156,
+ (5,54): 3.41406, 3.47656, 3.53906, 3.60156, 3.66406, 3.72656, 3.78906,
+ (5,61): 3.85156, 3.91406, 3.97656, 4.03906, 4.10156, 4.16406, 4.22656,
+ (5,68): 4.28906, 4.35156, 4.41406, 4.47656, 4.53906, 4.60156, 4.66406,
+ (5,75): 4.72656, 4.78906, 4.85156, 4.91406, 4.97656, 5.03906, 5.10156,
+ (5,82): 5.16406, 5.22656, 5.28906, 5.35156, 5.41406, 5.47656, 5.53906,
+ (5,89): 5.60156, 5.66406, 5.72656, 5.78906, 5.85156, 5.91406, 5.97656,
+ (5,96): 6.03906, 6.10156, 6.16406, 6.22656, 6.28906, 6.35156, 6.41406,
+ (5,103): 6.47656, 6.53906, 6.60156, 6.66406, 6.72656, 6.78906, 6.85156,
+ (5,110): 6.91406, 6.97656, 7.03906, 7.10156, 7.16406, 7.22656, 7.28906,
+ (5,117): 7.35156, 7.41406, 7.47656, 7.53906, 7.60156, 7.66406, 7.72656,
+ (5,124): 7.78906, 7.85156, 7.91406, 7.97656,
+ (6,0): 122, 0.109375, 0.171875, 0.234375, 0.296875, 0.359375, 0.421875,
+ (6,7): 0.484375, 0.546875, 0.609375, 0.671875, 0.734375, 0.796875,
+ (6,13): 0.859375, 0.921875, 0.984375, 1.04688, 1.10938, 1.17188,
+ (6,19): 1.23438, 1.29688, 1.35938, 1.42188, 1.48438, 1.54688, 1.60938,
+ (6,26): 1.67188, 1.73438, 1.79688, 1.85938, 1.92188, 1.98438, 2.04688,
+ (6,33): 2.10938, 2.17188, 2.23438, 2.29688, 2.35938, 2.42188, 2.48438,
+ (6,40): 2.54688, 2.60938, 2.67188, 2.73438, 2.79688, 2.85938, 2.92188,
+ (6,47): 2.98438, 3.04688, 3.10938, 3.17188, 3.23438, 3.29688, 3.35938,
+ (6,54): 3.42188, 3.48438, 3.54688, 3.60938, 3.67188, 3.73438, 3.79688,
+ (6,61): 3.85938, 3.92188, 3.98438, 4.04688, 4.10938, 4.17188, 4.23438,
+ (6,68): 4.29688, 4.35938, 4.42188, 4.48438, 4.54688, 4.60938, 4.67188,
+ (6,75): 4.73438, 4.79688, 4.85938, 4.92188, 4.98438, 5.04688, 5.10938,
+ (6,82): 5.17188, 5.23438, 5.29688, 5.35938, 5.42188, 5.48438, 5.54688,
+ (6,89): 5.60938, 5.67188, 5.73438, 5.79688, 5.85938, 5.92188, 5.98438,
+ (6,96): 6.04688, 6.10938, 6.17188, 6.23438, 6.29688, 6.35938, 6.42188,
+ (6,103): 6.48438, 6.54688, 6.60938, 6.67188, 6.73438, 6.79688, 6.85938,
+ (6,110): 6.92188, 6.98438, 7.04688, 7.10938, 7.17188, 7.23438, 7.29688,
+ (6,117): 7.35938, 7.42188, 7.48438, 7.54688, 7.60938, 7.67188, 7.73438,
+ (6,124): 7.79688, 7.85938, 7.92188, 7.98438,
+ (7,0): 121, 0.117188, 0.179688, 0.242188, 0.304688, 0.367188, 0.429688,
+ (7,7): 0.492188, 0.554688, 0.617188, 0.679688, 0.742188, 0.804688,
+ (7,13): 0.867188, 0.929688, 0.992188, 1.05469, 1.11719, 1.17969,
+ (7,19): 1.24219, 1.30469, 1.36719, 1.42969, 1.49219, 1.55469, 1.61719,
+ (7,26): 1.67969, 1.74219, 1.80469, 1.86719, 1.92969, 1.99219, 2.05469,
+ (7,33): 2.11719, 2.17969, 2.24219, 2.30469, 2.36719, 2.42969, 2.49219,
+ (7,40): 2.55469, 2.61719, 2.67969, 2.74219, 2.80469, 2.86719, 2.92969,
+ (7,47): 2.99219, 3.05469, 3.11719, 3.17969, 3.24219, 3.30469, 3.36719,
+ (7,54): 3.42969, 3.49219, 3.55469, 3.61719, 3.67969, 3.74219, 3.80469,
+ (7,61): 3.86719, 3.92969, 3.99219, 4.05469, 4.11719, 4.17969, 4.24219,
+ (7,68): 4.30469, 4.36719, 4.42969, 4.49219, 4.55469, 4.61719, 4.67969,
+ (7,75): 4.74219, 4.80469, 4.86719, 4.92969, 4.99219, 5.05469, 5.11719,
+ (7,82): 5.17969, 5.24219, 5.30469, 5.36719, 5.42969, 5.49219, 5.55469,
+ (7,89): 5.61719, 5.67969, 5.74219, 5.80469, 5.86719, 5.92969, 5.99219,
+ (7,96): 6.05469, 6.11719, 6.17969, 6.24219, 6.30469, 6.36719, 6.42969,
+ (7,103): 6.49219, 6.55469, 6.61719, 6.67969, 6.74219, 6.80469, 6.86719,
+ (7,110): 6.92969, 6.99219, 7.05469, 7.11719, 7.17969, 7.24219, 7.30469,
+ (7,117): 7.36719, 7.42969, 7.49219, 7.55469, 7.61719, 7.67969, 7.74219,
+ (7,124): 7.80469, 7.86719, 7.92969, 7.99219
+ }
+ ATTRIBUTE "DS128BITS" {
+ DATATYPE 128-bit little-endian floating-point 80-bit precision
+ DATASPACE SIMPLE { ( 1024 ) / ( 1024 ) }
+ DATA {
+ (0): 128, 0.0625, 0.125, 0.1875, 0.25, 0.3125, 0.375, 0.4375, 0.5,
+ (9): 0.5625, 0.625, 0.6875, 0.75, 0.8125, 0.875, 0.9375, 1, 1.0625,
+ (18): 1.125, 1.1875, 1.25, 1.3125, 1.375, 1.4375, 1.5, 1.5625,
+ (26): 1.625, 1.6875, 1.75, 1.8125, 1.875, 1.9375, 2, 2.0625, 2.125,
+ (35): 2.1875, 2.25, 2.3125, 2.375, 2.4375, 2.5, 2.5625, 2.625,
+ (43): 2.6875, 2.75, 2.8125, 2.875, 2.9375, 3, 3.0625, 3.125, 3.1875,
+ (52): 3.25, 3.3125, 3.375, 3.4375, 3.5, 3.5625, 3.625, 3.6875, 3.75,
+ (61): 3.8125, 3.875, 3.9375, 4, 4.0625, 4.125, 4.1875, 4.25, 4.3125,
+ (70): 4.375, 4.4375, 4.5, 4.5625, 4.625, 4.6875, 4.75, 4.8125,
+ (78): 4.875, 4.9375, 5, 5.0625, 5.125, 5.1875, 5.25, 5.3125, 5.375,
+ (87): 5.4375, 5.5, 5.5625, 5.625, 5.6875, 5.75, 5.8125, 5.875,
+ (95): 5.9375, 6, 6.0625, 6.125, 6.1875, 6.25, 6.3125, 6.375, 6.4375,
+ (104): 6.5, 6.5625, 6.625, 6.6875, 6.75, 6.8125, 6.875, 6.9375, 7,
+ (113): 7.0625, 7.125, 7.1875, 7.25, 7.3125, 7.375, 7.4375, 7.5,
+ (121): 7.5625, 7.625, 7.6875, 7.75, 7.8125, 7.875, 7.9375, 127,
+ (129): 0.0703125, 0.132812, 0.195312, 0.257812, 0.320312, 0.382812,
+ (135): 0.445312, 0.507812, 0.570312, 0.632812, 0.695312, 0.757812,
+ (141): 0.820312, 0.882812, 0.945312, 1.00781, 1.07031, 1.13281,
+ (147): 1.19531, 1.25781, 1.32031, 1.38281, 1.44531, 1.50781,
+ (153): 1.57031, 1.63281, 1.69531, 1.75781, 1.82031, 1.88281,
+ (159): 1.94531, 2.00781, 2.07031, 2.13281, 2.19531, 2.25781,
+ (165): 2.32031, 2.38281, 2.44531, 2.50781, 2.57031, 2.63281,
+ (171): 2.69531, 2.75781, 2.82031, 2.88281, 2.94531, 3.00781,
+ (177): 3.07031, 3.13281, 3.19531, 3.25781, 3.32031, 3.38281,
+ (183): 3.44531, 3.50781, 3.57031, 3.63281, 3.69531, 3.75781,
+ (189): 3.82031, 3.88281, 3.94531, 4.00781, 4.07031, 4.13281,
+ (195): 4.19531, 4.25781, 4.32031, 4.38281, 4.44531, 4.50781,
+ (201): 4.57031, 4.63281, 4.69531, 4.75781, 4.82031, 4.88281,
+ (207): 4.94531, 5.00781, 5.07031, 5.13281, 5.19531, 5.25781,
+ (213): 5.32031, 5.38281, 5.44531, 5.50781, 5.57031, 5.63281,
+ (219): 5.69531, 5.75781, 5.82031, 5.88281, 5.94531, 6.00781,
+ (225): 6.07031, 6.13281, 6.19531, 6.25781, 6.32031, 6.38281,
+ (231): 6.44531, 6.50781, 6.57031, 6.63281, 6.69531, 6.75781,
+ (237): 6.82031, 6.88281, 6.94531, 7.00781, 7.07031, 7.13281,
+ (243): 7.19531, 7.25781, 7.32031, 7.38281, 7.44531, 7.50781,
+ (249): 7.57031, 7.63281, 7.69531, 7.75781, 7.82031, 7.88281,
+ (255): 7.94531, 126, 0.078125, 0.140625, 0.203125, 0.265625,
+ (261): 0.328125, 0.390625, 0.453125, 0.515625, 0.578125, 0.640625,
+ (267): 0.703125, 0.765625, 0.828125, 0.890625, 0.953125, 1.01562,
+ (273): 1.07812, 1.14062, 1.20312, 1.26562, 1.32812, 1.39062,
+ (279): 1.45312, 1.51562, 1.57812, 1.64062, 1.70312, 1.76562,
+ (285): 1.82812, 1.89062, 1.95312, 2.01562, 2.07812, 2.14062,
+ (291): 2.20312, 2.26562, 2.32812, 2.39062, 2.45312, 2.51562,
+ (297): 2.57812, 2.64062, 2.70312, 2.76562, 2.82812, 2.89062,
+ (303): 2.95312, 3.01562, 3.07812, 3.14062, 3.20312, 3.26562,
+ (309): 3.32812, 3.39062, 3.45312, 3.51562, 3.57812, 3.64062,
+ (315): 3.70312, 3.76562, 3.82812, 3.89062, 3.95312, 4.01562,
+ (321): 4.07812, 4.14062, 4.20312, 4.26562, 4.32812, 4.39062,
+ (327): 4.45312, 4.51562, 4.57812, 4.64062, 4.70312, 4.76562,
+ (333): 4.82812, 4.89062, 4.95312, 5.01562, 5.07812, 5.14062,
+ (339): 5.20312, 5.26562, 5.32812, 5.39062, 5.45312, 5.51562,
+ (345): 5.57812, 5.64062, 5.70312, 5.76562, 5.82812, 5.89062,
+ (351): 5.95312, 6.01562, 6.07812, 6.14062, 6.20312, 6.26562,
+ (357): 6.32812, 6.39062, 6.45312, 6.51562, 6.57812, 6.64062,
+ (363): 6.70312, 6.76562, 6.82812, 6.89062, 6.95312, 7.01562,
+ (369): 7.07812, 7.14062, 7.20312, 7.26562, 7.32812, 7.39062,
+ (375): 7.45312, 7.51562, 7.57812, 7.64062, 7.70312, 7.76562,
+ (381): 7.82812, 7.89062, 7.95312, 125, 0.0859375, 0.148438,
+ (387): 0.210938, 0.273438, 0.335938, 0.398438, 0.460938, 0.523438,
+ (393): 0.585938, 0.648438, 0.710938, 0.773438, 0.835938, 0.898438,
+ (399): 0.960938, 1.02344, 1.08594, 1.14844, 1.21094, 1.27344,
+ (405): 1.33594, 1.39844, 1.46094, 1.52344, 1.58594, 1.64844,
+ (411): 1.71094, 1.77344, 1.83594, 1.89844, 1.96094, 2.02344,
+ (417): 2.08594, 2.14844, 2.21094, 2.27344, 2.33594, 2.39844,
+ (423): 2.46094, 2.52344, 2.58594, 2.64844, 2.71094, 2.77344,
+ (429): 2.83594, 2.89844, 2.96094, 3.02344, 3.08594, 3.14844,
+ (435): 3.21094, 3.27344, 3.33594, 3.39844, 3.46094, 3.52344,
+ (441): 3.58594, 3.64844, 3.71094, 3.77344, 3.83594, 3.89844,
+ (447): 3.96094, 4.02344, 4.08594, 4.14844, 4.21094, 4.27344,
+ (453): 4.33594, 4.39844, 4.46094, 4.52344, 4.58594, 4.64844,
+ (459): 4.71094, 4.77344, 4.83594, 4.89844, 4.96094, 5.02344,
+ (465): 5.08594, 5.14844, 5.21094, 5.27344, 5.33594, 5.39844,
+ (471): 5.46094, 5.52344, 5.58594, 5.64844, 5.71094, 5.77344,
+ (477): 5.83594, 5.89844, 5.96094, 6.02344, 6.08594, 6.14844,
+ (483): 6.21094, 6.27344, 6.33594, 6.39844, 6.46094, 6.52344,
+ (489): 6.58594, 6.64844, 6.71094, 6.77344, 6.83594, 6.89844,
+ (495): 6.96094, 7.02344, 7.08594, 7.14844, 7.21094, 7.27344,
+ (501): 7.33594, 7.39844, 7.46094, 7.52344, 7.58594, 7.64844,
+ (507): 7.71094, 7.77344, 7.83594, 7.89844, 7.96094, 124, 0.09375,
+ (514): 0.15625, 0.21875, 0.28125, 0.34375, 0.40625, 0.46875,
+ (520): 0.53125, 0.59375, 0.65625, 0.71875, 0.78125, 0.84375,
+ (526): 0.90625, 0.96875, 1.03125, 1.09375, 1.15625, 1.21875,
+ (532): 1.28125, 1.34375, 1.40625, 1.46875, 1.53125, 1.59375,
+ (538): 1.65625, 1.71875, 1.78125, 1.84375, 1.90625, 1.96875,
+ (544): 2.03125, 2.09375, 2.15625, 2.21875, 2.28125, 2.34375,
+ (550): 2.40625, 2.46875, 2.53125, 2.59375, 2.65625, 2.71875,
+ (556): 2.78125, 2.84375, 2.90625, 2.96875, 3.03125, 3.09375,
+ (562): 3.15625, 3.21875, 3.28125, 3.34375, 3.40625, 3.46875,
+ (568): 3.53125, 3.59375, 3.65625, 3.71875, 3.78125, 3.84375,
+ (574): 3.90625, 3.96875, 4.03125, 4.09375, 4.15625, 4.21875,
+ (580): 4.28125, 4.34375, 4.40625, 4.46875, 4.53125, 4.59375,
+ (586): 4.65625, 4.71875, 4.78125, 4.84375, 4.90625, 4.96875,
+ (592): 5.03125, 5.09375, 5.15625, 5.21875, 5.28125, 5.34375,
+ (598): 5.40625, 5.46875, 5.53125, 5.59375, 5.65625, 5.71875,
+ (604): 5.78125, 5.84375, 5.90625, 5.96875, 6.03125, 6.09375,
+ (610): 6.15625, 6.21875, 6.28125, 6.34375, 6.40625, 6.46875,
+ (616): 6.53125, 6.59375, 6.65625, 6.71875, 6.78125, 6.84375,
+ (622): 6.90625, 6.96875, 7.03125, 7.09375, 7.15625, 7.21875,
+ (628): 7.28125, 7.34375, 7.40625, 7.46875, 7.53125, 7.59375,
+ (634): 7.65625, 7.71875, 7.78125, 7.84375, 7.90625, 7.96875, 123,
+ (641): 0.101562, 0.164062, 0.226562, 0.289062, 0.351562, 0.414062,
+ (647): 0.476562, 0.539062, 0.601562, 0.664062, 0.726562, 0.789062,
+ (653): 0.851562, 0.914062, 0.976562, 1.03906, 1.10156, 1.16406,
+ (659): 1.22656, 1.28906, 1.35156, 1.41406, 1.47656, 1.53906,
+ (665): 1.60156, 1.66406, 1.72656, 1.78906, 1.85156, 1.91406,
+ (671): 1.97656, 2.03906, 2.10156, 2.16406, 2.22656, 2.28906,
+ (677): 2.35156, 2.41406, 2.47656, 2.53906, 2.60156, 2.66406,
+ (683): 2.72656, 2.78906, 2.85156, 2.91406, 2.97656, 3.03906,
+ (689): 3.10156, 3.16406, 3.22656, 3.28906, 3.35156, 3.41406,
+ (695): 3.47656, 3.53906, 3.60156, 3.66406, 3.72656, 3.78906,
+ (701): 3.85156, 3.91406, 3.97656, 4.03906, 4.10156, 4.16406,
+ (707): 4.22656, 4.28906, 4.35156, 4.41406, 4.47656, 4.53906,
+ (713): 4.60156, 4.66406, 4.72656, 4.78906, 4.85156, 4.91406,
+ (719): 4.97656, 5.03906, 5.10156, 5.16406, 5.22656, 5.28906,
+ (725): 5.35156, 5.41406, 5.47656, 5.53906, 5.60156, 5.66406,
+ (731): 5.72656, 5.78906, 5.85156, 5.91406, 5.97656, 6.03906,
+ (737): 6.10156, 6.16406, 6.22656, 6.28906, 6.35156, 6.41406,
+ (743): 6.47656, 6.53906, 6.60156, 6.66406, 6.72656, 6.78906,
+ (749): 6.85156, 6.91406, 6.97656, 7.03906, 7.10156, 7.16406,
+ (755): 7.22656, 7.28906, 7.35156, 7.41406, 7.47656, 7.53906,
+ (761): 7.60156, 7.66406, 7.72656, 7.78906, 7.85156, 7.91406,
+ (767): 7.97656, 122, 0.109375, 0.171875, 0.234375, 0.296875,
+ (773): 0.359375, 0.421875, 0.484375, 0.546875, 0.609375, 0.671875,
+ (779): 0.734375, 0.796875, 0.859375, 0.921875, 0.984375, 1.04688,
+ (785): 1.10938, 1.17188, 1.23438, 1.29688, 1.35938, 1.42188,
+ (791): 1.48438, 1.54688, 1.60938, 1.67188, 1.73438, 1.79688,
+ (797): 1.85938, 1.92188, 1.98438, 2.04688, 2.10938, 2.17188,
+ (803): 2.23438, 2.29688, 2.35938, 2.42188, 2.48438, 2.54688,
+ (809): 2.60938, 2.67188, 2.73438, 2.79688, 2.85938, 2.92188,
+ (815): 2.98438, 3.04688, 3.10938, 3.17188, 3.23438, 3.29688,
+ (821): 3.35938, 3.42188, 3.48438, 3.54688, 3.60938, 3.67188,
+ (827): 3.73438, 3.79688, 3.85938, 3.92188, 3.98438, 4.04688,
+ (833): 4.10938, 4.17188, 4.23438, 4.29688, 4.35938, 4.42188,
+ (839): 4.48438, 4.54688, 4.60938, 4.67188, 4.73438, 4.79688,
+ (845): 4.85938, 4.92188, 4.98438, 5.04688, 5.10938, 5.17188,
+ (851): 5.23438, 5.29688, 5.35938, 5.42188, 5.48438, 5.54688,
+ (857): 5.60938, 5.67188, 5.73438, 5.79688, 5.85938, 5.92188,
+ (863): 5.98438, 6.04688, 6.10938, 6.17188, 6.23438, 6.29688,
+ (869): 6.35938, 6.42188, 6.48438, 6.54688, 6.60938, 6.67188,
+ (875): 6.73438, 6.79688, 6.85938, 6.92188, 6.98438, 7.04688,
+ (881): 7.10938, 7.17188, 7.23438, 7.29688, 7.35938, 7.42188,
+ (887): 7.48438, 7.54688, 7.60938, 7.67188, 7.73438, 7.79688,
+ (893): 7.85938, 7.92188, 7.98438, 121, 0.117188, 0.179688, 0.242188,
+ (900): 0.304688, 0.367188, 0.429688, 0.492188, 0.554688, 0.617188,
+ (906): 0.679688, 0.742188, 0.804688, 0.867188, 0.929688, 0.992188,
+ (912): 1.05469, 1.11719, 1.17969, 1.24219, 1.30469, 1.36719,
+ (918): 1.42969, 1.49219, 1.55469, 1.61719, 1.67969, 1.74219,
+ (924): 1.80469, 1.86719, 1.92969, 1.99219, 2.05469, 2.11719,
+ (930): 2.17969, 2.24219, 2.30469, 2.36719, 2.42969, 2.49219,
+ (936): 2.55469, 2.61719, 2.67969, 2.74219, 2.80469, 2.86719,
+ (942): 2.92969, 2.99219, 3.05469, 3.11719, 3.17969, 3.24219,
+ (948): 3.30469, 3.36719, 3.42969, 3.49219, 3.55469, 3.61719,
+ (954): 3.67969, 3.74219, 3.80469, 3.86719, 3.92969, 3.99219,
+ (960): 4.05469, 4.11719, 4.17969, 4.24219, 4.30469, 4.36719,
+ (966): 4.42969, 4.49219, 4.55469, 4.61719, 4.67969, 4.74219,
+ (972): 4.80469, 4.86719, 4.92969, 4.99219, 5.05469, 5.11719,
+ (978): 5.17969, 5.24219, 5.30469, 5.36719, 5.42969, 5.49219,
+ (984): 5.55469, 5.61719, 5.67969, 5.74219, 5.80469, 5.86719,
+ (990): 5.92969, 5.99219, 6.05469, 6.11719, 6.17969, 6.24219,
+ (996): 6.30469, 6.36719, 6.42969, 6.49219, 6.55469, 6.61719,
+ (1002): 6.67969, 6.74219, 6.80469, 6.86719, 6.92969, 6.99219,
+ (1008): 7.05469, 7.11719, 7.17969, 7.24219, 7.30469, 7.36719,
+ (1014): 7.42969, 7.49219, 7.55469, 7.61719, 7.67969, 7.74219,
+ (1020): 7.80469, 7.86719, 7.92969, 7.99219
+ }
+ }
+ }
+ DATASET "DS32BITS" {
+ DATATYPE H5T_IEEE_F32LE
+ DATASPACE SIMPLE { ( 8, 32 ) / ( 8, 32 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 1024
+ OFFSET 2048
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ DATA {
+ (0,0): 32, 0.25, 0.5, 0.75, 1, 1.25, 1.5, 1.75, 2, 2.25, 2.5, 2.75, 3,
+ (0,13): 3.25, 3.5, 3.75, 4, 4.25, 4.5, 4.75, 5, 5.25, 5.5, 5.75, 6,
+ (0,25): 6.25, 6.5, 6.75, 7, 7.25, 7.5, 7.75,
+ (1,0): 31, 0.28125, 0.53125, 0.78125, 1.03125, 1.28125, 1.53125,
+ (1,7): 1.78125, 2.03125, 2.28125, 2.53125, 2.78125, 3.03125, 3.28125,
+ (1,14): 3.53125, 3.78125, 4.03125, 4.28125, 4.53125, 4.78125, 5.03125,
+ (1,21): 5.28125, 5.53125, 5.78125, 6.03125, 6.28125, 6.53125, 6.78125,
+ (1,28): 7.03125, 7.28125, 7.53125, 7.78125,
+ (2,0): 30, 0.3125, 0.5625, 0.8125, 1.0625, 1.3125, 1.5625, 1.8125,
+ (2,8): 2.0625, 2.3125, 2.5625, 2.8125, 3.0625, 3.3125, 3.5625, 3.8125,
+ (2,16): 4.0625, 4.3125, 4.5625, 4.8125, 5.0625, 5.3125, 5.5625, 5.8125,
+ (2,24): 6.0625, 6.3125, 6.5625, 6.8125, 7.0625, 7.3125, 7.5625, 7.8125,
+ (3,0): 29, 0.34375, 0.59375, 0.84375, 1.09375, 1.34375, 1.59375,
+ (3,7): 1.84375, 2.09375, 2.34375, 2.59375, 2.84375, 3.09375, 3.34375,
+ (3,14): 3.59375, 3.84375, 4.09375, 4.34375, 4.59375, 4.84375, 5.09375,
+ (3,21): 5.34375, 5.59375, 5.84375, 6.09375, 6.34375, 6.59375, 6.84375,
+ (3,28): 7.09375, 7.34375, 7.59375, 7.84375,
+ (4,0): 28, 0.375, 0.625, 0.875, 1.125, 1.375, 1.625, 1.875, 2.125,
+ (4,9): 2.375, 2.625, 2.875, 3.125, 3.375, 3.625, 3.875, 4.125, 4.375,
+ (4,18): 4.625, 4.875, 5.125, 5.375, 5.625, 5.875, 6.125, 6.375, 6.625,
+ (4,27): 6.875, 7.125, 7.375, 7.625, 7.875,
+ (5,0): 27, 0.40625, 0.65625, 0.90625, 1.15625, 1.40625, 1.65625,
+ (5,7): 1.90625, 2.15625, 2.40625, 2.65625, 2.90625, 3.15625, 3.40625,
+ (5,14): 3.65625, 3.90625, 4.15625, 4.40625, 4.65625, 4.90625, 5.15625,
+ (5,21): 5.40625, 5.65625, 5.90625, 6.15625, 6.40625, 6.65625, 6.90625,
+ (5,28): 7.15625, 7.40625, 7.65625, 7.90625,
+ (6,0): 26, 0.4375, 0.6875, 0.9375, 1.1875, 1.4375, 1.6875, 1.9375,
+ (6,8): 2.1875, 2.4375, 2.6875, 2.9375, 3.1875, 3.4375, 3.6875, 3.9375,
+ (6,16): 4.1875, 4.4375, 4.6875, 4.9375, 5.1875, 5.4375, 5.6875, 5.9375,
+ (6,24): 6.1875, 6.4375, 6.6875, 6.9375, 7.1875, 7.4375, 7.6875, 7.9375,
+ (7,0): 25, 0.46875, 0.71875, 0.96875, 1.21875, 1.46875, 1.71875,
+ (7,7): 1.96875, 2.21875, 2.46875, 2.71875, 2.96875, 3.21875, 3.46875,
+ (7,14): 3.71875, 3.96875, 4.21875, 4.46875, 4.71875, 4.96875, 5.21875,
+ (7,21): 5.46875, 5.71875, 5.96875, 6.21875, 6.46875, 6.71875, 6.96875,
+ (7,28): 7.21875, 7.46875, 7.71875, 7.96875
+ }
+ ATTRIBUTE "DS32BITS" {
+ DATATYPE H5T_IEEE_F32LE
+ DATASPACE SIMPLE { ( 256 ) / ( 256 ) }
+ DATA {
+ (0): 32, 0.25, 0.5, 0.75, 1, 1.25, 1.5, 1.75, 2, 2.25, 2.5, 2.75, 3,
+ (13): 3.25, 3.5, 3.75, 4, 4.25, 4.5, 4.75, 5, 5.25, 5.5, 5.75, 6,
+ (25): 6.25, 6.5, 6.75, 7, 7.25, 7.5, 7.75, 31, 0.28125, 0.53125,
+ (35): 0.78125, 1.03125, 1.28125, 1.53125, 1.78125, 2.03125, 2.28125,
+ (42): 2.53125, 2.78125, 3.03125, 3.28125, 3.53125, 3.78125, 4.03125,
+ (49): 4.28125, 4.53125, 4.78125, 5.03125, 5.28125, 5.53125, 5.78125,
+ (56): 6.03125, 6.28125, 6.53125, 6.78125, 7.03125, 7.28125, 7.53125,
+ (63): 7.78125, 30, 0.3125, 0.5625, 0.8125, 1.0625, 1.3125, 1.5625,
+ (71): 1.8125, 2.0625, 2.3125, 2.5625, 2.8125, 3.0625, 3.3125,
+ (78): 3.5625, 3.8125, 4.0625, 4.3125, 4.5625, 4.8125, 5.0625,
+ (85): 5.3125, 5.5625, 5.8125, 6.0625, 6.3125, 6.5625, 6.8125,
+ (92): 7.0625, 7.3125, 7.5625, 7.8125, 29, 0.34375, 0.59375, 0.84375,
+ (100): 1.09375, 1.34375, 1.59375, 1.84375, 2.09375, 2.34375,
+ (106): 2.59375, 2.84375, 3.09375, 3.34375, 3.59375, 3.84375,
+ (112): 4.09375, 4.34375, 4.59375, 4.84375, 5.09375, 5.34375,
+ (118): 5.59375, 5.84375, 6.09375, 6.34375, 6.59375, 6.84375,
+ (124): 7.09375, 7.34375, 7.59375, 7.84375, 28, 0.375, 0.625, 0.875,
+ (132): 1.125, 1.375, 1.625, 1.875, 2.125, 2.375, 2.625, 2.875,
+ (140): 3.125, 3.375, 3.625, 3.875, 4.125, 4.375, 4.625, 4.875,
+ (148): 5.125, 5.375, 5.625, 5.875, 6.125, 6.375, 6.625, 6.875,
+ (156): 7.125, 7.375, 7.625, 7.875, 27, 0.40625, 0.65625, 0.90625,
+ (164): 1.15625, 1.40625, 1.65625, 1.90625, 2.15625, 2.40625,
+ (170): 2.65625, 2.90625, 3.15625, 3.40625, 3.65625, 3.90625,
+ (176): 4.15625, 4.40625, 4.65625, 4.90625, 5.15625, 5.40625,
+ (182): 5.65625, 5.90625, 6.15625, 6.40625, 6.65625, 6.90625,
+ (188): 7.15625, 7.40625, 7.65625, 7.90625, 26, 0.4375, 0.6875,
+ (195): 0.9375, 1.1875, 1.4375, 1.6875, 1.9375, 2.1875, 2.4375,
+ (202): 2.6875, 2.9375, 3.1875, 3.4375, 3.6875, 3.9375, 4.1875,
+ (209): 4.4375, 4.6875, 4.9375, 5.1875, 5.4375, 5.6875, 5.9375,
+ (216): 6.1875, 6.4375, 6.6875, 6.9375, 7.1875, 7.4375, 7.6875,
+ (223): 7.9375, 25, 0.46875, 0.71875, 0.96875, 1.21875, 1.46875,
+ (230): 1.71875, 1.96875, 2.21875, 2.46875, 2.71875, 2.96875,
+ (236): 3.21875, 3.46875, 3.71875, 3.96875, 4.21875, 4.46875,
+ (242): 4.71875, 4.96875, 5.21875, 5.46875, 5.71875, 5.96875,
+ (248): 6.21875, 6.46875, 6.71875, 6.96875, 7.21875, 7.46875,
+ (254): 7.71875, 7.96875
+ }
+ }
+ }
+ DATASET "DS64BITS" {
+ DATATYPE H5T_IEEE_F64LE
+ DATASPACE SIMPLE { ( 8, 64 ) / ( 8, 64 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 4096
+ OFFSET 6144
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ DATA {
+ (0,0): 64, 0.125, 0.25, 0.375, 0.5, 0.625, 0.75, 0.875, 1, 1.125, 1.25,
+ (0,11): 1.375, 1.5, 1.625, 1.75, 1.875, 2, 2.125, 2.25, 2.375, 2.5,
+ (0,21): 2.625, 2.75, 2.875, 3, 3.125, 3.25, 3.375, 3.5, 3.625, 3.75,
+ (0,31): 3.875, 4, 4.125, 4.25, 4.375, 4.5, 4.625, 4.75, 4.875, 5,
+ (0,41): 5.125, 5.25, 5.375, 5.5, 5.625, 5.75, 5.875, 6, 6.125, 6.25,
+ (0,51): 6.375, 6.5, 6.625, 6.75, 6.875, 7, 7.125, 7.25, 7.375, 7.5,
+ (0,61): 7.625, 7.75, 7.875,
+ (1,0): 63, 0.140625, 0.265625, 0.390625, 0.515625, 0.640625, 0.765625,
+ (1,7): 0.890625, 1.01562, 1.14062, 1.26562, 1.39062, 1.51562, 1.64062,
+ (1,14): 1.76562, 1.89062, 2.01562, 2.14062, 2.26562, 2.39062, 2.51562,
+ (1,21): 2.64062, 2.76562, 2.89062, 3.01562, 3.14062, 3.26562, 3.39062,
+ (1,28): 3.51562, 3.64062, 3.76562, 3.89062, 4.01562, 4.14062, 4.26562,
+ (1,35): 4.39062, 4.51562, 4.64062, 4.76562, 4.89062, 5.01562, 5.14062,
+ (1,42): 5.26562, 5.39062, 5.51562, 5.64062, 5.76562, 5.89062, 6.01562,
+ (1,49): 6.14062, 6.26562, 6.39062, 6.51562, 6.64062, 6.76562, 6.89062,
+ (1,56): 7.01562, 7.14062, 7.26562, 7.39062, 7.51562, 7.64062, 7.76562,
+ (1,63): 7.89062,
+ (2,0): 62, 0.15625, 0.28125, 0.40625, 0.53125, 0.65625, 0.78125,
+ (2,7): 0.90625, 1.03125, 1.15625, 1.28125, 1.40625, 1.53125, 1.65625,
+ (2,14): 1.78125, 1.90625, 2.03125, 2.15625, 2.28125, 2.40625, 2.53125,
+ (2,21): 2.65625, 2.78125, 2.90625, 3.03125, 3.15625, 3.28125, 3.40625,
+ (2,28): 3.53125, 3.65625, 3.78125, 3.90625, 4.03125, 4.15625, 4.28125,
+ (2,35): 4.40625, 4.53125, 4.65625, 4.78125, 4.90625, 5.03125, 5.15625,
+ (2,42): 5.28125, 5.40625, 5.53125, 5.65625, 5.78125, 5.90625, 6.03125,
+ (2,49): 6.15625, 6.28125, 6.40625, 6.53125, 6.65625, 6.78125, 6.90625,
+ (2,56): 7.03125, 7.15625, 7.28125, 7.40625, 7.53125, 7.65625, 7.78125,
+ (2,63): 7.90625,
+ (3,0): 61, 0.171875, 0.296875, 0.421875, 0.546875, 0.671875, 0.796875,
+ (3,7): 0.921875, 1.04688, 1.17188, 1.29688, 1.42188, 1.54688, 1.67188,
+ (3,14): 1.79688, 1.92188, 2.04688, 2.17188, 2.29688, 2.42188, 2.54688,
+ (3,21): 2.67188, 2.79688, 2.92188, 3.04688, 3.17188, 3.29688, 3.42188,
+ (3,28): 3.54688, 3.67188, 3.79688, 3.92188, 4.04688, 4.17188, 4.29688,
+ (3,35): 4.42188, 4.54688, 4.67188, 4.79688, 4.92188, 5.04688, 5.17188,
+ (3,42): 5.29688, 5.42188, 5.54688, 5.67188, 5.79688, 5.92188, 6.04688,
+ (3,49): 6.17188, 6.29688, 6.42188, 6.54688, 6.67188, 6.79688, 6.92188,
+ (3,56): 7.04688, 7.17188, 7.29688, 7.42188, 7.54688, 7.67188, 7.79688,
+ (3,63): 7.92188,
+ (4,0): 60, 0.1875, 0.3125, 0.4375, 0.5625, 0.6875, 0.8125, 0.9375,
+ (4,8): 1.0625, 1.1875, 1.3125, 1.4375, 1.5625, 1.6875, 1.8125, 1.9375,
+ (4,16): 2.0625, 2.1875, 2.3125, 2.4375, 2.5625, 2.6875, 2.8125, 2.9375,
+ (4,24): 3.0625, 3.1875, 3.3125, 3.4375, 3.5625, 3.6875, 3.8125, 3.9375,
+ (4,32): 4.0625, 4.1875, 4.3125, 4.4375, 4.5625, 4.6875, 4.8125, 4.9375,
+ (4,40): 5.0625, 5.1875, 5.3125, 5.4375, 5.5625, 5.6875, 5.8125, 5.9375,
+ (4,48): 6.0625, 6.1875, 6.3125, 6.4375, 6.5625, 6.6875, 6.8125, 6.9375,
+ (4,56): 7.0625, 7.1875, 7.3125, 7.4375, 7.5625, 7.6875, 7.8125, 7.9375,
+ (5,0): 59, 0.203125, 0.328125, 0.453125, 0.578125, 0.703125, 0.828125,
+ (5,7): 0.953125, 1.07812, 1.20312, 1.32812, 1.45312, 1.57812, 1.70312,
+ (5,14): 1.82812, 1.95312, 2.07812, 2.20312, 2.32812, 2.45312, 2.57812,
+ (5,21): 2.70312, 2.82812, 2.95312, 3.07812, 3.20312, 3.32812, 3.45312,
+ (5,28): 3.57812, 3.70312, 3.82812, 3.95312, 4.07812, 4.20312, 4.32812,
+ (5,35): 4.45312, 4.57812, 4.70312, 4.82812, 4.95312, 5.07812, 5.20312,
+ (5,42): 5.32812, 5.45312, 5.57812, 5.70312, 5.82812, 5.95312, 6.07812,
+ (5,49): 6.20312, 6.32812, 6.45312, 6.57812, 6.70312, 6.82812, 6.95312,
+ (5,56): 7.07812, 7.20312, 7.32812, 7.45312, 7.57812, 7.70312, 7.82812,
+ (5,63): 7.95312,
+ (6,0): 58, 0.21875, 0.34375, 0.46875, 0.59375, 0.71875, 0.84375,
+ (6,7): 0.96875, 1.09375, 1.21875, 1.34375, 1.46875, 1.59375, 1.71875,
+ (6,14): 1.84375, 1.96875, 2.09375, 2.21875, 2.34375, 2.46875, 2.59375,
+ (6,21): 2.71875, 2.84375, 2.96875, 3.09375, 3.21875, 3.34375, 3.46875,
+ (6,28): 3.59375, 3.71875, 3.84375, 3.96875, 4.09375, 4.21875, 4.34375,
+ (6,35): 4.46875, 4.59375, 4.71875, 4.84375, 4.96875, 5.09375, 5.21875,
+ (6,42): 5.34375, 5.46875, 5.59375, 5.71875, 5.84375, 5.96875, 6.09375,
+ (6,49): 6.21875, 6.34375, 6.46875, 6.59375, 6.71875, 6.84375, 6.96875,
+ (6,56): 7.09375, 7.21875, 7.34375, 7.46875, 7.59375, 7.71875, 7.84375,
+ (6,63): 7.96875,
+ (7,0): 57, 0.234375, 0.359375, 0.484375, 0.609375, 0.734375, 0.859375,
+ (7,7): 0.984375, 1.10938, 1.23438, 1.35938, 1.48438, 1.60938, 1.73438,
+ (7,14): 1.85938, 1.98438, 2.10938, 2.23438, 2.35938, 2.48438, 2.60938,
+ (7,21): 2.73438, 2.85938, 2.98438, 3.10938, 3.23438, 3.35938, 3.48438,
+ (7,28): 3.60938, 3.73438, 3.85938, 3.98438, 4.10938, 4.23438, 4.35938,
+ (7,35): 4.48438, 4.60938, 4.73438, 4.85938, 4.98438, 5.10938, 5.23438,
+ (7,42): 5.35938, 5.48438, 5.60938, 5.73438, 5.85938, 5.98438, 6.10938,
+ (7,49): 6.23438, 6.35938, 6.48438, 6.60938, 6.73438, 6.85938, 6.98438,
+ (7,56): 7.10938, 7.23438, 7.35938, 7.48438, 7.60938, 7.73438, 7.85938,
+ (7,63): 7.98438
+ }
+ ATTRIBUTE "DS64BITS" {
+ DATATYPE H5T_IEEE_F64LE
+ DATASPACE SIMPLE { ( 512 ) / ( 512 ) }
+ DATA {
+ (0): 64, 0.125, 0.25, 0.375, 0.5, 0.625, 0.75, 0.875, 1, 1.125,
+ (10): 1.25, 1.375, 1.5, 1.625, 1.75, 1.875, 2, 2.125, 2.25, 2.375,
+ (20): 2.5, 2.625, 2.75, 2.875, 3, 3.125, 3.25, 3.375, 3.5, 3.625,
+ (30): 3.75, 3.875, 4, 4.125, 4.25, 4.375, 4.5, 4.625, 4.75, 4.875,
+ (40): 5, 5.125, 5.25, 5.375, 5.5, 5.625, 5.75, 5.875, 6, 6.125,
+ (50): 6.25, 6.375, 6.5, 6.625, 6.75, 6.875, 7, 7.125, 7.25, 7.375,
+ (60): 7.5, 7.625, 7.75, 7.875, 63, 0.140625, 0.265625, 0.390625,
+ (68): 0.515625, 0.640625, 0.765625, 0.890625, 1.01562, 1.14062,
+ (74): 1.26562, 1.39062, 1.51562, 1.64062, 1.76562, 1.89062, 2.01562,
+ (81): 2.14062, 2.26562, 2.39062, 2.51562, 2.64062, 2.76562, 2.89062,
+ (88): 3.01562, 3.14062, 3.26562, 3.39062, 3.51562, 3.64062, 3.76562,
+ (95): 3.89062, 4.01562, 4.14062, 4.26562, 4.39062, 4.51562, 4.64062,
+ (102): 4.76562, 4.89062, 5.01562, 5.14062, 5.26562, 5.39062,
+ (108): 5.51562, 5.64062, 5.76562, 5.89062, 6.01562, 6.14062,
+ (114): 6.26562, 6.39062, 6.51562, 6.64062, 6.76562, 6.89062,
+ (120): 7.01562, 7.14062, 7.26562, 7.39062, 7.51562, 7.64062,
+ (126): 7.76562, 7.89062, 62, 0.15625, 0.28125, 0.40625, 0.53125,
+ (133): 0.65625, 0.78125, 0.90625, 1.03125, 1.15625, 1.28125,
+ (139): 1.40625, 1.53125, 1.65625, 1.78125, 1.90625, 2.03125,
+ (145): 2.15625, 2.28125, 2.40625, 2.53125, 2.65625, 2.78125,
+ (151): 2.90625, 3.03125, 3.15625, 3.28125, 3.40625, 3.53125,
+ (157): 3.65625, 3.78125, 3.90625, 4.03125, 4.15625, 4.28125,
+ (163): 4.40625, 4.53125, 4.65625, 4.78125, 4.90625, 5.03125,
+ (169): 5.15625, 5.28125, 5.40625, 5.53125, 5.65625, 5.78125,
+ (175): 5.90625, 6.03125, 6.15625, 6.28125, 6.40625, 6.53125,
+ (181): 6.65625, 6.78125, 6.90625, 7.03125, 7.15625, 7.28125,
+ (187): 7.40625, 7.53125, 7.65625, 7.78125, 7.90625, 61, 0.171875,
+ (194): 0.296875, 0.421875, 0.546875, 0.671875, 0.796875, 0.921875,
+ (200): 1.04688, 1.17188, 1.29688, 1.42188, 1.54688, 1.67188,
+ (206): 1.79688, 1.92188, 2.04688, 2.17188, 2.29688, 2.42188,
+ (212): 2.54688, 2.67188, 2.79688, 2.92188, 3.04688, 3.17188,
+ (218): 3.29688, 3.42188, 3.54688, 3.67188, 3.79688, 3.92188,
+ (224): 4.04688, 4.17188, 4.29688, 4.42188, 4.54688, 4.67188,
+ (230): 4.79688, 4.92188, 5.04688, 5.17188, 5.29688, 5.42188,
+ (236): 5.54688, 5.67188, 5.79688, 5.92188, 6.04688, 6.17188,
+ (242): 6.29688, 6.42188, 6.54688, 6.67188, 6.79688, 6.92188,
+ (248): 7.04688, 7.17188, 7.29688, 7.42188, 7.54688, 7.67188,
+ (254): 7.79688, 7.92188, 60, 0.1875, 0.3125, 0.4375, 0.5625, 0.6875,
+ (262): 0.8125, 0.9375, 1.0625, 1.1875, 1.3125, 1.4375, 1.5625,
+ (269): 1.6875, 1.8125, 1.9375, 2.0625, 2.1875, 2.3125, 2.4375,
+ (276): 2.5625, 2.6875, 2.8125, 2.9375, 3.0625, 3.1875, 3.3125,
+ (283): 3.4375, 3.5625, 3.6875, 3.8125, 3.9375, 4.0625, 4.1875,
+ (290): 4.3125, 4.4375, 4.5625, 4.6875, 4.8125, 4.9375, 5.0625,
+ (297): 5.1875, 5.3125, 5.4375, 5.5625, 5.6875, 5.8125, 5.9375,
+ (304): 6.0625, 6.1875, 6.3125, 6.4375, 6.5625, 6.6875, 6.8125,
+ (311): 6.9375, 7.0625, 7.1875, 7.3125, 7.4375, 7.5625, 7.6875,
+ (318): 7.8125, 7.9375, 59, 0.203125, 0.328125, 0.453125, 0.578125,
+ (325): 0.703125, 0.828125, 0.953125, 1.07812, 1.20312, 1.32812,
+ (331): 1.45312, 1.57812, 1.70312, 1.82812, 1.95312, 2.07812,
+ (337): 2.20312, 2.32812, 2.45312, 2.57812, 2.70312, 2.82812,
+ (343): 2.95312, 3.07812, 3.20312, 3.32812, 3.45312, 3.57812,
+ (349): 3.70312, 3.82812, 3.95312, 4.07812, 4.20312, 4.32812,
+ (355): 4.45312, 4.57812, 4.70312, 4.82812, 4.95312, 5.07812,
+ (361): 5.20312, 5.32812, 5.45312, 5.57812, 5.70312, 5.82812,
+ (367): 5.95312, 6.07812, 6.20312, 6.32812, 6.45312, 6.57812,
+ (373): 6.70312, 6.82812, 6.95312, 7.07812, 7.20312, 7.32812,
+ (379): 7.45312, 7.57812, 7.70312, 7.82812, 7.95312, 58, 0.21875,
+ (386): 0.34375, 0.46875, 0.59375, 0.71875, 0.84375, 0.96875,
+ (392): 1.09375, 1.21875, 1.34375, 1.46875, 1.59375, 1.71875,
+ (398): 1.84375, 1.96875, 2.09375, 2.21875, 2.34375, 2.46875,
+ (404): 2.59375, 2.71875, 2.84375, 2.96875, 3.09375, 3.21875,
+ (410): 3.34375, 3.46875, 3.59375, 3.71875, 3.84375, 3.96875,
+ (416): 4.09375, 4.21875, 4.34375, 4.46875, 4.59375, 4.71875,
+ (422): 4.84375, 4.96875, 5.09375, 5.21875, 5.34375, 5.46875,
+ (428): 5.59375, 5.71875, 5.84375, 5.96875, 6.09375, 6.21875,
+ (434): 6.34375, 6.46875, 6.59375, 6.71875, 6.84375, 6.96875,
+ (440): 7.09375, 7.21875, 7.34375, 7.46875, 7.59375, 7.71875,
+ (446): 7.84375, 7.96875, 57, 0.234375, 0.359375, 0.484375, 0.609375,
+ (453): 0.734375, 0.859375, 0.984375, 1.10938, 1.23438, 1.35938,
+ (459): 1.48438, 1.60938, 1.73438, 1.85938, 1.98438, 2.10938,
+ (465): 2.23438, 2.35938, 2.48438, 2.60938, 2.73438, 2.85938,
+ (471): 2.98438, 3.10938, 3.23438, 3.35938, 3.48438, 3.60938,
+ (477): 3.73438, 3.85938, 3.98438, 4.10938, 4.23438, 4.35938,
+ (483): 4.48438, 4.60938, 4.73438, 4.85938, 4.98438, 5.10938,
+ (489): 5.23438, 5.35938, 5.48438, 5.60938, 5.73438, 5.85938,
+ (495): 5.98438, 6.10938, 6.23438, 6.35938, 6.48438, 6.60938,
+ (501): 6.73438, 6.85938, 6.98438, 7.10938, 7.23438, 7.35938,
+ (507): 7.48438, 7.60938, 7.73438, 7.85938, 7.98438
+ }
+ }
+ }
+}
+}
diff --git a/tools/testfiles/tfloatsattrs.h5 b/tools/testfiles/tfloatsattrs.h5
new file mode 100644
index 00000000000..9e735424597
Binary files /dev/null and b/tools/testfiles/tfloatsattrs.h5 differ
diff --git a/tools/testfiles/tfloatsattrs.wddl b/tools/testfiles/tfloatsattrs.wddl
new file mode 100644
index 00000000000..38b735f7f24
--- /dev/null
+++ b/tools/testfiles/tfloatsattrs.wddl
@@ -0,0 +1,621 @@
+HDF5 "tfloatsattrs.h5" {
+GROUP "/" {
+ DATASET "DS128BITS" {
+ DATATYPE 128-bit little-endian floating-point 80-bit precision
+ DATASPACE SIMPLE { ( 8, 128 ) / ( 8, 128 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 16384
+ OFFSET 14416
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ DATA {
+ (0,0): 128, 0.0625, 0.125, 0.1875, 0.25, 0.3125, 0.375, 0.4375, 0.5,
+ (0,9): 0.5625, 0.625, 0.6875, 0.75, 0.8125, 0.875, 0.9375, 1, 1.0625,
+ (0,18): 1.125, 1.1875, 1.25, 1.3125, 1.375, 1.4375, 1.5, 1.5625, 1.625,
+ (0,27): 1.6875, 1.75, 1.8125, 1.875, 1.9375, 2, 2.0625, 2.125, 2.1875,
+ (0,36): 2.25, 2.3125, 2.375, 2.4375, 2.5, 2.5625, 2.625, 2.6875, 2.75,
+ (0,45): 2.8125, 2.875, 2.9375, 3, 3.0625, 3.125, 3.1875, 3.25, 3.3125,
+ (0,54): 3.375, 3.4375, 3.5, 3.5625, 3.625, 3.6875, 3.75, 3.8125, 3.875,
+ (0,63): 3.9375, 4, 4.0625, 4.125, 4.1875, 4.25, 4.3125, 4.375, 4.4375,
+ (0,72): 4.5, 4.5625, 4.625, 4.6875, 4.75, 4.8125, 4.875, 4.9375, 5,
+ (0,81): 5.0625, 5.125, 5.1875, 5.25, 5.3125, 5.375, 5.4375, 5.5,
+ (0,89): 5.5625, 5.625, 5.6875, 5.75, 5.8125, 5.875, 5.9375, 6, 6.0625,
+ (0,98): 6.125, 6.1875, 6.25, 6.3125, 6.375, 6.4375, 6.5, 6.5625, 6.625,
+ (0,107): 6.6875, 6.75, 6.8125, 6.875, 6.9375, 7, 7.0625, 7.125, 7.1875,
+ (0,116): 7.25, 7.3125, 7.375, 7.4375, 7.5, 7.5625, 7.625, 7.6875, 7.75,
+ (0,125): 7.8125, 7.875, 7.9375,
+ (1,0): 127, 0.0703125, 0.132813, 0.195313, 0.257813, 0.320313,
+ (1,6): 0.382813, 0.445313, 0.507813, 0.570313, 0.632813, 0.695313,
+ (1,12): 0.757813, 0.820313, 0.882813, 0.945313, 1.00781, 1.07031,
+ (1,18): 1.13281, 1.19531, 1.25781, 1.32031, 1.38281, 1.44531, 1.50781,
+ (1,25): 1.57031, 1.63281, 1.69531, 1.75781, 1.82031, 1.88281, 1.94531,
+ (1,32): 2.00781, 2.07031, 2.13281, 2.19531, 2.25781, 2.32031, 2.38281,
+ (1,39): 2.44531, 2.50781, 2.57031, 2.63281, 2.69531, 2.75781, 2.82031,
+ (1,46): 2.88281, 2.94531, 3.00781, 3.07031, 3.13281, 3.19531, 3.25781,
+ (1,53): 3.32031, 3.38281, 3.44531, 3.50781, 3.57031, 3.63281, 3.69531,
+ (1,60): 3.75781, 3.82031, 3.88281, 3.94531, 4.00781, 4.07031, 4.13281,
+ (1,67): 4.19531, 4.25781, 4.32031, 4.38281, 4.44531, 4.50781, 4.57031,
+ (1,74): 4.63281, 4.69531, 4.75781, 4.82031, 4.88281, 4.94531, 5.00781,
+ (1,81): 5.07031, 5.13281, 5.19531, 5.25781, 5.32031, 5.38281, 5.44531,
+ (1,88): 5.50781, 5.57031, 5.63281, 5.69531, 5.75781, 5.82031, 5.88281,
+ (1,95): 5.94531, 6.00781, 6.07031, 6.13281, 6.19531, 6.25781, 6.32031,
+ (1,102): 6.38281, 6.44531, 6.50781, 6.57031, 6.63281, 6.69531, 6.75781,
+ (1,109): 6.82031, 6.88281, 6.94531, 7.00781, 7.07031, 7.13281, 7.19531,
+ (1,116): 7.25781, 7.32031, 7.38281, 7.44531, 7.50781, 7.57031, 7.63281,
+ (1,123): 7.69531, 7.75781, 7.82031, 7.88281, 7.94531,
+ (2,0): 126, 0.078125, 0.140625, 0.203125, 0.265625, 0.328125, 0.390625,
+ (2,7): 0.453125, 0.515625, 0.578125, 0.640625, 0.703125, 0.765625,
+ (2,13): 0.828125, 0.890625, 0.953125, 1.01563, 1.07813, 1.14063,
+ (2,19): 1.20313, 1.26563, 1.32813, 1.39063, 1.45313, 1.51563, 1.57813,
+ (2,26): 1.64063, 1.70313, 1.76563, 1.82813, 1.89063, 1.95313, 2.01563,
+ (2,33): 2.07813, 2.14063, 2.20313, 2.26563, 2.32813, 2.39063, 2.45313,
+ (2,40): 2.51563, 2.57813, 2.64063, 2.70313, 2.76563, 2.82813, 2.89063,
+ (2,47): 2.95313, 3.01563, 3.07813, 3.14063, 3.20313, 3.26563, 3.32813,
+ (2,54): 3.39063, 3.45313, 3.51563, 3.57813, 3.64063, 3.70313, 3.76563,
+ (2,61): 3.82813, 3.89063, 3.95313, 4.01563, 4.07813, 4.14063, 4.20313,
+ (2,68): 4.26563, 4.32813, 4.39063, 4.45313, 4.51563, 4.57813, 4.64063,
+ (2,75): 4.70313, 4.76563, 4.82813, 4.89063, 4.95313, 5.01563, 5.07813,
+ (2,82): 5.14063, 5.20313, 5.26563, 5.32813, 5.39063, 5.45313, 5.51563,
+ (2,89): 5.57813, 5.64063, 5.70313, 5.76563, 5.82813, 5.89063, 5.95313,
+ (2,96): 6.01563, 6.07813, 6.14063, 6.20313, 6.26563, 6.32813, 6.39063,
+ (2,103): 6.45313, 6.51563, 6.57813, 6.64063, 6.70313, 6.76563, 6.82813,
+ (2,110): 6.89063, 6.95313, 7.01563, 7.07813, 7.14063, 7.20313, 7.26563,
+ (2,117): 7.32813, 7.39063, 7.45313, 7.51563, 7.57813, 7.64063, 7.70313,
+ (2,124): 7.76563, 7.82813, 7.89063, 7.95313,
+ (3,0): 125, 0.0859375, 0.148438, 0.210938, 0.273438, 0.335938,
+ (3,6): 0.398438, 0.460938, 0.523438, 0.585938, 0.648438, 0.710938,
+ (3,12): 0.773438, 0.835938, 0.898438, 0.960938, 1.02344, 1.08594,
+ (3,18): 1.14844, 1.21094, 1.27344, 1.33594, 1.39844, 1.46094, 1.52344,
+ (3,25): 1.58594, 1.64844, 1.71094, 1.77344, 1.83594, 1.89844, 1.96094,
+ (3,32): 2.02344, 2.08594, 2.14844, 2.21094, 2.27344, 2.33594, 2.39844,
+ (3,39): 2.46094, 2.52344, 2.58594, 2.64844, 2.71094, 2.77344, 2.83594,
+ (3,46): 2.89844, 2.96094, 3.02344, 3.08594, 3.14844, 3.21094, 3.27344,
+ (3,53): 3.33594, 3.39844, 3.46094, 3.52344, 3.58594, 3.64844, 3.71094,
+ (3,60): 3.77344, 3.83594, 3.89844, 3.96094, 4.02344, 4.08594, 4.14844,
+ (3,67): 4.21094, 4.27344, 4.33594, 4.39844, 4.46094, 4.52344, 4.58594,
+ (3,74): 4.64844, 4.71094, 4.77344, 4.83594, 4.89844, 4.96094, 5.02344,
+ (3,81): 5.08594, 5.14844, 5.21094, 5.27344, 5.33594, 5.39844, 5.46094,
+ (3,88): 5.52344, 5.58594, 5.64844, 5.71094, 5.77344, 5.83594, 5.89844,
+ (3,95): 5.96094, 6.02344, 6.08594, 6.14844, 6.21094, 6.27344, 6.33594,
+ (3,102): 6.39844, 6.46094, 6.52344, 6.58594, 6.64844, 6.71094, 6.77344,
+ (3,109): 6.83594, 6.89844, 6.96094, 7.02344, 7.08594, 7.14844, 7.21094,
+ (3,116): 7.27344, 7.33594, 7.39844, 7.46094, 7.52344, 7.58594, 7.64844,
+ (3,123): 7.71094, 7.77344, 7.83594, 7.89844, 7.96094,
+ (4,0): 124, 0.09375, 0.15625, 0.21875, 0.28125, 0.34375, 0.40625,
+ (4,7): 0.46875, 0.53125, 0.59375, 0.65625, 0.71875, 0.78125, 0.84375,
+ (4,14): 0.90625, 0.96875, 1.03125, 1.09375, 1.15625, 1.21875, 1.28125,
+ (4,21): 1.34375, 1.40625, 1.46875, 1.53125, 1.59375, 1.65625, 1.71875,
+ (4,28): 1.78125, 1.84375, 1.90625, 1.96875, 2.03125, 2.09375, 2.15625,
+ (4,35): 2.21875, 2.28125, 2.34375, 2.40625, 2.46875, 2.53125, 2.59375,
+ (4,42): 2.65625, 2.71875, 2.78125, 2.84375, 2.90625, 2.96875, 3.03125,
+ (4,49): 3.09375, 3.15625, 3.21875, 3.28125, 3.34375, 3.40625, 3.46875,
+ (4,56): 3.53125, 3.59375, 3.65625, 3.71875, 3.78125, 3.84375, 3.90625,
+ (4,63): 3.96875, 4.03125, 4.09375, 4.15625, 4.21875, 4.28125, 4.34375,
+ (4,70): 4.40625, 4.46875, 4.53125, 4.59375, 4.65625, 4.71875, 4.78125,
+ (4,77): 4.84375, 4.90625, 4.96875, 5.03125, 5.09375, 5.15625, 5.21875,
+ (4,84): 5.28125, 5.34375, 5.40625, 5.46875, 5.53125, 5.59375, 5.65625,
+ (4,91): 5.71875, 5.78125, 5.84375, 5.90625, 5.96875, 6.03125, 6.09375,
+ (4,98): 6.15625, 6.21875, 6.28125, 6.34375, 6.40625, 6.46875, 6.53125,
+ (4,105): 6.59375, 6.65625, 6.71875, 6.78125, 6.84375, 6.90625, 6.96875,
+ (4,112): 7.03125, 7.09375, 7.15625, 7.21875, 7.28125, 7.34375, 7.40625,
+ (4,119): 7.46875, 7.53125, 7.59375, 7.65625, 7.71875, 7.78125, 7.84375,
+ (4,126): 7.90625, 7.96875,
+ (5,0): 123, 0.101563, 0.164063, 0.226563, 0.289063, 0.351563, 0.414063,
+ (5,7): 0.476563, 0.539063, 0.601563, 0.664063, 0.726563, 0.789063,
+ (5,13): 0.851563, 0.914063, 0.976563, 1.03906, 1.10156, 1.16406,
+ (5,19): 1.22656, 1.28906, 1.35156, 1.41406, 1.47656, 1.53906, 1.60156,
+ (5,26): 1.66406, 1.72656, 1.78906, 1.85156, 1.91406, 1.97656, 2.03906,
+ (5,33): 2.10156, 2.16406, 2.22656, 2.28906, 2.35156, 2.41406, 2.47656,
+ (5,40): 2.53906, 2.60156, 2.66406, 2.72656, 2.78906, 2.85156, 2.91406,
+ (5,47): 2.97656, 3.03906, 3.10156, 3.16406, 3.22656, 3.28906, 3.35156,
+ (5,54): 3.41406, 3.47656, 3.53906, 3.60156, 3.66406, 3.72656, 3.78906,
+ (5,61): 3.85156, 3.91406, 3.97656, 4.03906, 4.10156, 4.16406, 4.22656,
+ (5,68): 4.28906, 4.35156, 4.41406, 4.47656, 4.53906, 4.60156, 4.66406,
+ (5,75): 4.72656, 4.78906, 4.85156, 4.91406, 4.97656, 5.03906, 5.10156,
+ (5,82): 5.16406, 5.22656, 5.28906, 5.35156, 5.41406, 5.47656, 5.53906,
+ (5,89): 5.60156, 5.66406, 5.72656, 5.78906, 5.85156, 5.91406, 5.97656,
+ (5,96): 6.03906, 6.10156, 6.16406, 6.22656, 6.28906, 6.35156, 6.41406,
+ (5,103): 6.47656, 6.53906, 6.60156, 6.66406, 6.72656, 6.78906, 6.85156,
+ (5,110): 6.91406, 6.97656, 7.03906, 7.10156, 7.16406, 7.22656, 7.28906,
+ (5,117): 7.35156, 7.41406, 7.47656, 7.53906, 7.60156, 7.66406, 7.72656,
+ (5,124): 7.78906, 7.85156, 7.91406, 7.97656,
+ (6,0): 122, 0.109375, 0.171875, 0.234375, 0.296875, 0.359375, 0.421875,
+ (6,7): 0.484375, 0.546875, 0.609375, 0.671875, 0.734375, 0.796875,
+ (6,13): 0.859375, 0.921875, 0.984375, 1.04688, 1.10938, 1.17188,
+ (6,19): 1.23438, 1.29688, 1.35938, 1.42188, 1.48438, 1.54688, 1.60938,
+ (6,26): 1.67188, 1.73438, 1.79688, 1.85938, 1.92188, 1.98438, 2.04688,
+ (6,33): 2.10938, 2.17188, 2.23438, 2.29688, 2.35938, 2.42188, 2.48438,
+ (6,40): 2.54688, 2.60938, 2.67188, 2.73438, 2.79688, 2.85938, 2.92188,
+ (6,47): 2.98438, 3.04688, 3.10938, 3.17188, 3.23438, 3.29688, 3.35938,
+ (6,54): 3.42188, 3.48438, 3.54688, 3.60938, 3.67188, 3.73438, 3.79688,
+ (6,61): 3.85938, 3.92188, 3.98438, 4.04688, 4.10938, 4.17188, 4.23438,
+ (6,68): 4.29688, 4.35938, 4.42188, 4.48438, 4.54688, 4.60938, 4.67188,
+ (6,75): 4.73438, 4.79688, 4.85938, 4.92188, 4.98438, 5.04688, 5.10938,
+ (6,82): 5.17188, 5.23438, 5.29688, 5.35938, 5.42188, 5.48438, 5.54688,
+ (6,89): 5.60938, 5.67188, 5.73438, 5.79688, 5.85938, 5.92188, 5.98438,
+ (6,96): 6.04688, 6.10938, 6.17188, 6.23438, 6.29688, 6.35938, 6.42188,
+ (6,103): 6.48438, 6.54688, 6.60938, 6.67188, 6.73438, 6.79688, 6.85938,
+ (6,110): 6.92188, 6.98438, 7.04688, 7.10938, 7.17188, 7.23438, 7.29688,
+ (6,117): 7.35938, 7.42188, 7.48438, 7.54688, 7.60938, 7.67188, 7.73438,
+ (6,124): 7.79688, 7.85938, 7.92188, 7.98438,
+ (7,0): 121, 0.117188, 0.179688, 0.242188, 0.304688, 0.367188, 0.429688,
+ (7,7): 0.492188, 0.554688, 0.617188, 0.679688, 0.742188, 0.804688,
+ (7,13): 0.867188, 0.929688, 0.992188, 1.05469, 1.11719, 1.17969,
+ (7,19): 1.24219, 1.30469, 1.36719, 1.42969, 1.49219, 1.55469, 1.61719,
+ (7,26): 1.67969, 1.74219, 1.80469, 1.86719, 1.92969, 1.99219, 2.05469,
+ (7,33): 2.11719, 2.17969, 2.24219, 2.30469, 2.36719, 2.42969, 2.49219,
+ (7,40): 2.55469, 2.61719, 2.67969, 2.74219, 2.80469, 2.86719, 2.92969,
+ (7,47): 2.99219, 3.05469, 3.11719, 3.17969, 3.24219, 3.30469, 3.36719,
+ (7,54): 3.42969, 3.49219, 3.55469, 3.61719, 3.67969, 3.74219, 3.80469,
+ (7,61): 3.86719, 3.92969, 3.99219, 4.05469, 4.11719, 4.17969, 4.24219,
+ (7,68): 4.30469, 4.36719, 4.42969, 4.49219, 4.55469, 4.61719, 4.67969,
+ (7,75): 4.74219, 4.80469, 4.86719, 4.92969, 4.99219, 5.05469, 5.11719,
+ (7,82): 5.17969, 5.24219, 5.30469, 5.36719, 5.42969, 5.49219, 5.55469,
+ (7,89): 5.61719, 5.67969, 5.74219, 5.80469, 5.86719, 5.92969, 5.99219,
+ (7,96): 6.05469, 6.11719, 6.17969, 6.24219, 6.30469, 6.36719, 6.42969,
+ (7,103): 6.49219, 6.55469, 6.61719, 6.67969, 6.74219, 6.80469, 6.86719,
+ (7,110): 6.92969, 6.99219, 7.05469, 7.11719, 7.17969, 7.24219, 7.30469,
+ (7,117): 7.36719, 7.42969, 7.49219, 7.55469, 7.61719, 7.67969, 7.74219,
+ (7,124): 7.80469, 7.86719, 7.92969, 7.99219
+ }
+ ATTRIBUTE "DS128BITS" {
+ DATATYPE 128-bit little-endian floating-point 80-bit precision
+ DATASPACE SIMPLE { ( 1024 ) / ( 1024 ) }
+ DATA {
+ (0): 128, 0.0625, 0.125, 0.1875, 0.25, 0.3125, 0.375, 0.4375, 0.5,
+ (9): 0.5625, 0.625, 0.6875, 0.75, 0.8125, 0.875, 0.9375, 1, 1.0625,
+ (18): 1.125, 1.1875, 1.25, 1.3125, 1.375, 1.4375, 1.5, 1.5625,
+ (26): 1.625, 1.6875, 1.75, 1.8125, 1.875, 1.9375, 2, 2.0625, 2.125,
+ (35): 2.1875, 2.25, 2.3125, 2.375, 2.4375, 2.5, 2.5625, 2.625,
+ (43): 2.6875, 2.75, 2.8125, 2.875, 2.9375, 3, 3.0625, 3.125, 3.1875,
+ (52): 3.25, 3.3125, 3.375, 3.4375, 3.5, 3.5625, 3.625, 3.6875, 3.75,
+ (61): 3.8125, 3.875, 3.9375, 4, 4.0625, 4.125, 4.1875, 4.25, 4.3125,
+ (70): 4.375, 4.4375, 4.5, 4.5625, 4.625, 4.6875, 4.75, 4.8125,
+ (78): 4.875, 4.9375, 5, 5.0625, 5.125, 5.1875, 5.25, 5.3125, 5.375,
+ (87): 5.4375, 5.5, 5.5625, 5.625, 5.6875, 5.75, 5.8125, 5.875,
+ (95): 5.9375, 6, 6.0625, 6.125, 6.1875, 6.25, 6.3125, 6.375, 6.4375,
+ (104): 6.5, 6.5625, 6.625, 6.6875, 6.75, 6.8125, 6.875, 6.9375, 7,
+ (113): 7.0625, 7.125, 7.1875, 7.25, 7.3125, 7.375, 7.4375, 7.5,
+ (121): 7.5625, 7.625, 7.6875, 7.75, 7.8125, 7.875, 7.9375, 127,
+ (129): 0.0703125, 0.132813, 0.195313, 0.257813, 0.320313, 0.382813,
+ (135): 0.445313, 0.507813, 0.570313, 0.632813, 0.695313, 0.757813,
+ (141): 0.820313, 0.882813, 0.945313, 1.00781, 1.07031, 1.13281,
+ (147): 1.19531, 1.25781, 1.32031, 1.38281, 1.44531, 1.50781,
+ (153): 1.57031, 1.63281, 1.69531, 1.75781, 1.82031, 1.88281,
+ (159): 1.94531, 2.00781, 2.07031, 2.13281, 2.19531, 2.25781,
+ (165): 2.32031, 2.38281, 2.44531, 2.50781, 2.57031, 2.63281,
+ (171): 2.69531, 2.75781, 2.82031, 2.88281, 2.94531, 3.00781,
+ (177): 3.07031, 3.13281, 3.19531, 3.25781, 3.32031, 3.38281,
+ (183): 3.44531, 3.50781, 3.57031, 3.63281, 3.69531, 3.75781,
+ (189): 3.82031, 3.88281, 3.94531, 4.00781, 4.07031, 4.13281,
+ (195): 4.19531, 4.25781, 4.32031, 4.38281, 4.44531, 4.50781,
+ (201): 4.57031, 4.63281, 4.69531, 4.75781, 4.82031, 4.88281,
+ (207): 4.94531, 5.00781, 5.07031, 5.13281, 5.19531, 5.25781,
+ (213): 5.32031, 5.38281, 5.44531, 5.50781, 5.57031, 5.63281,
+ (219): 5.69531, 5.75781, 5.82031, 5.88281, 5.94531, 6.00781,
+ (225): 6.07031, 6.13281, 6.19531, 6.25781, 6.32031, 6.38281,
+ (231): 6.44531, 6.50781, 6.57031, 6.63281, 6.69531, 6.75781,
+ (237): 6.82031, 6.88281, 6.94531, 7.00781, 7.07031, 7.13281,
+ (243): 7.19531, 7.25781, 7.32031, 7.38281, 7.44531, 7.50781,
+ (249): 7.57031, 7.63281, 7.69531, 7.75781, 7.82031, 7.88281,
+ (255): 7.94531, 126, 0.078125, 0.140625, 0.203125, 0.265625,
+ (261): 0.328125, 0.390625, 0.453125, 0.515625, 0.578125, 0.640625,
+ (267): 0.703125, 0.765625, 0.828125, 0.890625, 0.953125, 1.01563,
+ (273): 1.07813, 1.14063, 1.20313, 1.26563, 1.32813, 1.39063,
+ (279): 1.45313, 1.51563, 1.57813, 1.64063, 1.70313, 1.76563,
+ (285): 1.82813, 1.89063, 1.95313, 2.01563, 2.07813, 2.14063,
+ (291): 2.20313, 2.26563, 2.32813, 2.39063, 2.45313, 2.51563,
+ (297): 2.57813, 2.64063, 2.70313, 2.76563, 2.82813, 2.89063,
+ (303): 2.95313, 3.01563, 3.07813, 3.14063, 3.20313, 3.26563,
+ (309): 3.32813, 3.39063, 3.45313, 3.51563, 3.57813, 3.64063,
+ (315): 3.70313, 3.76563, 3.82813, 3.89063, 3.95313, 4.01563,
+ (321): 4.07813, 4.14063, 4.20313, 4.26563, 4.32813, 4.39063,
+ (327): 4.45313, 4.51563, 4.57813, 4.64063, 4.70313, 4.76563,
+ (333): 4.82813, 4.89063, 4.95313, 5.01563, 5.07813, 5.14063,
+ (339): 5.20313, 5.26563, 5.32813, 5.39063, 5.45313, 5.51563,
+ (345): 5.57813, 5.64063, 5.70313, 5.76563, 5.82813, 5.89063,
+ (351): 5.95313, 6.01563, 6.07813, 6.14063, 6.20313, 6.26563,
+ (357): 6.32813, 6.39063, 6.45313, 6.51563, 6.57813, 6.64063,
+ (363): 6.70313, 6.76563, 6.82813, 6.89063, 6.95313, 7.01563,
+ (369): 7.07813, 7.14063, 7.20313, 7.26563, 7.32813, 7.39063,
+ (375): 7.45313, 7.51563, 7.57813, 7.64063, 7.70313, 7.76563,
+ (381): 7.82813, 7.89063, 7.95313, 125, 0.0859375, 0.148438,
+ (387): 0.210938, 0.273438, 0.335938, 0.398438, 0.460938, 0.523438,
+ (393): 0.585938, 0.648438, 0.710938, 0.773438, 0.835938, 0.898438,
+ (399): 0.960938, 1.02344, 1.08594, 1.14844, 1.21094, 1.27344,
+ (405): 1.33594, 1.39844, 1.46094, 1.52344, 1.58594, 1.64844,
+ (411): 1.71094, 1.77344, 1.83594, 1.89844, 1.96094, 2.02344,
+ (417): 2.08594, 2.14844, 2.21094, 2.27344, 2.33594, 2.39844,
+ (423): 2.46094, 2.52344, 2.58594, 2.64844, 2.71094, 2.77344,
+ (429): 2.83594, 2.89844, 2.96094, 3.02344, 3.08594, 3.14844,
+ (435): 3.21094, 3.27344, 3.33594, 3.39844, 3.46094, 3.52344,
+ (441): 3.58594, 3.64844, 3.71094, 3.77344, 3.83594, 3.89844,
+ (447): 3.96094, 4.02344, 4.08594, 4.14844, 4.21094, 4.27344,
+ (453): 4.33594, 4.39844, 4.46094, 4.52344, 4.58594, 4.64844,
+ (459): 4.71094, 4.77344, 4.83594, 4.89844, 4.96094, 5.02344,
+ (465): 5.08594, 5.14844, 5.21094, 5.27344, 5.33594, 5.39844,
+ (471): 5.46094, 5.52344, 5.58594, 5.64844, 5.71094, 5.77344,
+ (477): 5.83594, 5.89844, 5.96094, 6.02344, 6.08594, 6.14844,
+ (483): 6.21094, 6.27344, 6.33594, 6.39844, 6.46094, 6.52344,
+ (489): 6.58594, 6.64844, 6.71094, 6.77344, 6.83594, 6.89844,
+ (495): 6.96094, 7.02344, 7.08594, 7.14844, 7.21094, 7.27344,
+ (501): 7.33594, 7.39844, 7.46094, 7.52344, 7.58594, 7.64844,
+ (507): 7.71094, 7.77344, 7.83594, 7.89844, 7.96094, 124, 0.09375,
+ (514): 0.15625, 0.21875, 0.28125, 0.34375, 0.40625, 0.46875,
+ (520): 0.53125, 0.59375, 0.65625, 0.71875, 0.78125, 0.84375,
+ (526): 0.90625, 0.96875, 1.03125, 1.09375, 1.15625, 1.21875,
+ (532): 1.28125, 1.34375, 1.40625, 1.46875, 1.53125, 1.59375,
+ (538): 1.65625, 1.71875, 1.78125, 1.84375, 1.90625, 1.96875,
+ (544): 2.03125, 2.09375, 2.15625, 2.21875, 2.28125, 2.34375,
+ (550): 2.40625, 2.46875, 2.53125, 2.59375, 2.65625, 2.71875,
+ (556): 2.78125, 2.84375, 2.90625, 2.96875, 3.03125, 3.09375,
+ (562): 3.15625, 3.21875, 3.28125, 3.34375, 3.40625, 3.46875,
+ (568): 3.53125, 3.59375, 3.65625, 3.71875, 3.78125, 3.84375,
+ (574): 3.90625, 3.96875, 4.03125, 4.09375, 4.15625, 4.21875,
+ (580): 4.28125, 4.34375, 4.40625, 4.46875, 4.53125, 4.59375,
+ (586): 4.65625, 4.71875, 4.78125, 4.84375, 4.90625, 4.96875,
+ (592): 5.03125, 5.09375, 5.15625, 5.21875, 5.28125, 5.34375,
+ (598): 5.40625, 5.46875, 5.53125, 5.59375, 5.65625, 5.71875,
+ (604): 5.78125, 5.84375, 5.90625, 5.96875, 6.03125, 6.09375,
+ (610): 6.15625, 6.21875, 6.28125, 6.34375, 6.40625, 6.46875,
+ (616): 6.53125, 6.59375, 6.65625, 6.71875, 6.78125, 6.84375,
+ (622): 6.90625, 6.96875, 7.03125, 7.09375, 7.15625, 7.21875,
+ (628): 7.28125, 7.34375, 7.40625, 7.46875, 7.53125, 7.59375,
+ (634): 7.65625, 7.71875, 7.78125, 7.84375, 7.90625, 7.96875, 123,
+ (641): 0.101563, 0.164063, 0.226563, 0.289063, 0.351563, 0.414063,
+ (647): 0.476563, 0.539063, 0.601563, 0.664063, 0.726563, 0.789063,
+ (653): 0.851563, 0.914063, 0.976563, 1.03906, 1.10156, 1.16406,
+ (659): 1.22656, 1.28906, 1.35156, 1.41406, 1.47656, 1.53906,
+ (665): 1.60156, 1.66406, 1.72656, 1.78906, 1.85156, 1.91406,
+ (671): 1.97656, 2.03906, 2.10156, 2.16406, 2.22656, 2.28906,
+ (677): 2.35156, 2.41406, 2.47656, 2.53906, 2.60156, 2.66406,
+ (683): 2.72656, 2.78906, 2.85156, 2.91406, 2.97656, 3.03906,
+ (689): 3.10156, 3.16406, 3.22656, 3.28906, 3.35156, 3.41406,
+ (695): 3.47656, 3.53906, 3.60156, 3.66406, 3.72656, 3.78906,
+ (701): 3.85156, 3.91406, 3.97656, 4.03906, 4.10156, 4.16406,
+ (707): 4.22656, 4.28906, 4.35156, 4.41406, 4.47656, 4.53906,
+ (713): 4.60156, 4.66406, 4.72656, 4.78906, 4.85156, 4.91406,
+ (719): 4.97656, 5.03906, 5.10156, 5.16406, 5.22656, 5.28906,
+ (725): 5.35156, 5.41406, 5.47656, 5.53906, 5.60156, 5.66406,
+ (731): 5.72656, 5.78906, 5.85156, 5.91406, 5.97656, 6.03906,
+ (737): 6.10156, 6.16406, 6.22656, 6.28906, 6.35156, 6.41406,
+ (743): 6.47656, 6.53906, 6.60156, 6.66406, 6.72656, 6.78906,
+ (749): 6.85156, 6.91406, 6.97656, 7.03906, 7.10156, 7.16406,
+ (755): 7.22656, 7.28906, 7.35156, 7.41406, 7.47656, 7.53906,
+ (761): 7.60156, 7.66406, 7.72656, 7.78906, 7.85156, 7.91406,
+ (767): 7.97656, 122, 0.109375, 0.171875, 0.234375, 0.296875,
+ (773): 0.359375, 0.421875, 0.484375, 0.546875, 0.609375, 0.671875,
+ (779): 0.734375, 0.796875, 0.859375, 0.921875, 0.984375, 1.04688,
+ (785): 1.10938, 1.17188, 1.23438, 1.29688, 1.35938, 1.42188,
+ (791): 1.48438, 1.54688, 1.60938, 1.67188, 1.73438, 1.79688,
+ (797): 1.85938, 1.92188, 1.98438, 2.04688, 2.10938, 2.17188,
+ (803): 2.23438, 2.29688, 2.35938, 2.42188, 2.48438, 2.54688,
+ (809): 2.60938, 2.67188, 2.73438, 2.79688, 2.85938, 2.92188,
+ (815): 2.98438, 3.04688, 3.10938, 3.17188, 3.23438, 3.29688,
+ (821): 3.35938, 3.42188, 3.48438, 3.54688, 3.60938, 3.67188,
+ (827): 3.73438, 3.79688, 3.85938, 3.92188, 3.98438, 4.04688,
+ (833): 4.10938, 4.17188, 4.23438, 4.29688, 4.35938, 4.42188,
+ (839): 4.48438, 4.54688, 4.60938, 4.67188, 4.73438, 4.79688,
+ (845): 4.85938, 4.92188, 4.98438, 5.04688, 5.10938, 5.17188,
+ (851): 5.23438, 5.29688, 5.35938, 5.42188, 5.48438, 5.54688,
+ (857): 5.60938, 5.67188, 5.73438, 5.79688, 5.85938, 5.92188,
+ (863): 5.98438, 6.04688, 6.10938, 6.17188, 6.23438, 6.29688,
+ (869): 6.35938, 6.42188, 6.48438, 6.54688, 6.60938, 6.67188,
+ (875): 6.73438, 6.79688, 6.85938, 6.92188, 6.98438, 7.04688,
+ (881): 7.10938, 7.17188, 7.23438, 7.29688, 7.35938, 7.42188,
+ (887): 7.48438, 7.54688, 7.60938, 7.67188, 7.73438, 7.79688,
+ (893): 7.85938, 7.92188, 7.98438, 121, 0.117188, 0.179688, 0.242188,
+ (900): 0.304688, 0.367188, 0.429688, 0.492188, 0.554688, 0.617188,
+ (906): 0.679688, 0.742188, 0.804688, 0.867188, 0.929688, 0.992188,
+ (912): 1.05469, 1.11719, 1.17969, 1.24219, 1.30469, 1.36719,
+ (918): 1.42969, 1.49219, 1.55469, 1.61719, 1.67969, 1.74219,
+ (924): 1.80469, 1.86719, 1.92969, 1.99219, 2.05469, 2.11719,
+ (930): 2.17969, 2.24219, 2.30469, 2.36719, 2.42969, 2.49219,
+ (936): 2.55469, 2.61719, 2.67969, 2.74219, 2.80469, 2.86719,
+ (942): 2.92969, 2.99219, 3.05469, 3.11719, 3.17969, 3.24219,
+ (948): 3.30469, 3.36719, 3.42969, 3.49219, 3.55469, 3.61719,
+ (954): 3.67969, 3.74219, 3.80469, 3.86719, 3.92969, 3.99219,
+ (960): 4.05469, 4.11719, 4.17969, 4.24219, 4.30469, 4.36719,
+ (966): 4.42969, 4.49219, 4.55469, 4.61719, 4.67969, 4.74219,
+ (972): 4.80469, 4.86719, 4.92969, 4.99219, 5.05469, 5.11719,
+ (978): 5.17969, 5.24219, 5.30469, 5.36719, 5.42969, 5.49219,
+ (984): 5.55469, 5.61719, 5.67969, 5.74219, 5.80469, 5.86719,
+ (990): 5.92969, 5.99219, 6.05469, 6.11719, 6.17969, 6.24219,
+ (996): 6.30469, 6.36719, 6.42969, 6.49219, 6.55469, 6.61719,
+ (1002): 6.67969, 6.74219, 6.80469, 6.86719, 6.92969, 6.99219,
+ (1008): 7.05469, 7.11719, 7.17969, 7.24219, 7.30469, 7.36719,
+ (1014): 7.42969, 7.49219, 7.55469, 7.61719, 7.67969, 7.74219,
+ (1020): 7.80469, 7.86719, 7.92969, 7.99219
+ }
+ }
+ }
+ DATASET "DS32BITS" {
+ DATATYPE H5T_IEEE_F32LE
+ DATASPACE SIMPLE { ( 8, 32 ) / ( 8, 32 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 1024
+ OFFSET 2048
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ DATA {
+ (0,0): 32, 0.25, 0.5, 0.75, 1, 1.25, 1.5, 1.75, 2, 2.25, 2.5, 2.75, 3,
+ (0,13): 3.25, 3.5, 3.75, 4, 4.25, 4.5, 4.75, 5, 5.25, 5.5, 5.75, 6,
+ (0,25): 6.25, 6.5, 6.75, 7, 7.25, 7.5, 7.75,
+ (1,0): 31, 0.28125, 0.53125, 0.78125, 1.03125, 1.28125, 1.53125,
+ (1,7): 1.78125, 2.03125, 2.28125, 2.53125, 2.78125, 3.03125, 3.28125,
+ (1,14): 3.53125, 3.78125, 4.03125, 4.28125, 4.53125, 4.78125, 5.03125,
+ (1,21): 5.28125, 5.53125, 5.78125, 6.03125, 6.28125, 6.53125, 6.78125,
+ (1,28): 7.03125, 7.28125, 7.53125, 7.78125,
+ (2,0): 30, 0.3125, 0.5625, 0.8125, 1.0625, 1.3125, 1.5625, 1.8125,
+ (2,8): 2.0625, 2.3125, 2.5625, 2.8125, 3.0625, 3.3125, 3.5625, 3.8125,
+ (2,16): 4.0625, 4.3125, 4.5625, 4.8125, 5.0625, 5.3125, 5.5625, 5.8125,
+ (2,24): 6.0625, 6.3125, 6.5625, 6.8125, 7.0625, 7.3125, 7.5625, 7.8125,
+ (3,0): 29, 0.34375, 0.59375, 0.84375, 1.09375, 1.34375, 1.59375,
+ (3,7): 1.84375, 2.09375, 2.34375, 2.59375, 2.84375, 3.09375, 3.34375,
+ (3,14): 3.59375, 3.84375, 4.09375, 4.34375, 4.59375, 4.84375, 5.09375,
+ (3,21): 5.34375, 5.59375, 5.84375, 6.09375, 6.34375, 6.59375, 6.84375,
+ (3,28): 7.09375, 7.34375, 7.59375, 7.84375,
+ (4,0): 28, 0.375, 0.625, 0.875, 1.125, 1.375, 1.625, 1.875, 2.125,
+ (4,9): 2.375, 2.625, 2.875, 3.125, 3.375, 3.625, 3.875, 4.125, 4.375,
+ (4,18): 4.625, 4.875, 5.125, 5.375, 5.625, 5.875, 6.125, 6.375, 6.625,
+ (4,27): 6.875, 7.125, 7.375, 7.625, 7.875,
+ (5,0): 27, 0.40625, 0.65625, 0.90625, 1.15625, 1.40625, 1.65625,
+ (5,7): 1.90625, 2.15625, 2.40625, 2.65625, 2.90625, 3.15625, 3.40625,
+ (5,14): 3.65625, 3.90625, 4.15625, 4.40625, 4.65625, 4.90625, 5.15625,
+ (5,21): 5.40625, 5.65625, 5.90625, 6.15625, 6.40625, 6.65625, 6.90625,
+ (5,28): 7.15625, 7.40625, 7.65625, 7.90625,
+ (6,0): 26, 0.4375, 0.6875, 0.9375, 1.1875, 1.4375, 1.6875, 1.9375,
+ (6,8): 2.1875, 2.4375, 2.6875, 2.9375, 3.1875, 3.4375, 3.6875, 3.9375,
+ (6,16): 4.1875, 4.4375, 4.6875, 4.9375, 5.1875, 5.4375, 5.6875, 5.9375,
+ (6,24): 6.1875, 6.4375, 6.6875, 6.9375, 7.1875, 7.4375, 7.6875, 7.9375,
+ (7,0): 25, 0.46875, 0.71875, 0.96875, 1.21875, 1.46875, 1.71875,
+ (7,7): 1.96875, 2.21875, 2.46875, 2.71875, 2.96875, 3.21875, 3.46875,
+ (7,14): 3.71875, 3.96875, 4.21875, 4.46875, 4.71875, 4.96875, 5.21875,
+ (7,21): 5.46875, 5.71875, 5.96875, 6.21875, 6.46875, 6.71875, 6.96875,
+ (7,28): 7.21875, 7.46875, 7.71875, 7.96875
+ }
+ ATTRIBUTE "DS32BITS" {
+ DATATYPE H5T_IEEE_F32LE
+ DATASPACE SIMPLE { ( 256 ) / ( 256 ) }
+ DATA {
+ (0): 32, 0.25, 0.5, 0.75, 1, 1.25, 1.5, 1.75, 2, 2.25, 2.5, 2.75, 3,
+ (13): 3.25, 3.5, 3.75, 4, 4.25, 4.5, 4.75, 5, 5.25, 5.5, 5.75, 6,
+ (25): 6.25, 6.5, 6.75, 7, 7.25, 7.5, 7.75, 31, 0.28125, 0.53125,
+ (35): 0.78125, 1.03125, 1.28125, 1.53125, 1.78125, 2.03125, 2.28125,
+ (42): 2.53125, 2.78125, 3.03125, 3.28125, 3.53125, 3.78125, 4.03125,
+ (49): 4.28125, 4.53125, 4.78125, 5.03125, 5.28125, 5.53125, 5.78125,
+ (56): 6.03125, 6.28125, 6.53125, 6.78125, 7.03125, 7.28125, 7.53125,
+ (63): 7.78125, 30, 0.3125, 0.5625, 0.8125, 1.0625, 1.3125, 1.5625,
+ (71): 1.8125, 2.0625, 2.3125, 2.5625, 2.8125, 3.0625, 3.3125,
+ (78): 3.5625, 3.8125, 4.0625, 4.3125, 4.5625, 4.8125, 5.0625,
+ (85): 5.3125, 5.5625, 5.8125, 6.0625, 6.3125, 6.5625, 6.8125,
+ (92): 7.0625, 7.3125, 7.5625, 7.8125, 29, 0.34375, 0.59375, 0.84375,
+ (100): 1.09375, 1.34375, 1.59375, 1.84375, 2.09375, 2.34375,
+ (106): 2.59375, 2.84375, 3.09375, 3.34375, 3.59375, 3.84375,
+ (112): 4.09375, 4.34375, 4.59375, 4.84375, 5.09375, 5.34375,
+ (118): 5.59375, 5.84375, 6.09375, 6.34375, 6.59375, 6.84375,
+ (124): 7.09375, 7.34375, 7.59375, 7.84375, 28, 0.375, 0.625, 0.875,
+ (132): 1.125, 1.375, 1.625, 1.875, 2.125, 2.375, 2.625, 2.875,
+ (140): 3.125, 3.375, 3.625, 3.875, 4.125, 4.375, 4.625, 4.875,
+ (148): 5.125, 5.375, 5.625, 5.875, 6.125, 6.375, 6.625, 6.875,
+ (156): 7.125, 7.375, 7.625, 7.875, 27, 0.40625, 0.65625, 0.90625,
+ (164): 1.15625, 1.40625, 1.65625, 1.90625, 2.15625, 2.40625,
+ (170): 2.65625, 2.90625, 3.15625, 3.40625, 3.65625, 3.90625,
+ (176): 4.15625, 4.40625, 4.65625, 4.90625, 5.15625, 5.40625,
+ (182): 5.65625, 5.90625, 6.15625, 6.40625, 6.65625, 6.90625,
+ (188): 7.15625, 7.40625, 7.65625, 7.90625, 26, 0.4375, 0.6875,
+ (195): 0.9375, 1.1875, 1.4375, 1.6875, 1.9375, 2.1875, 2.4375,
+ (202): 2.6875, 2.9375, 3.1875, 3.4375, 3.6875, 3.9375, 4.1875,
+ (209): 4.4375, 4.6875, 4.9375, 5.1875, 5.4375, 5.6875, 5.9375,
+ (216): 6.1875, 6.4375, 6.6875, 6.9375, 7.1875, 7.4375, 7.6875,
+ (223): 7.9375, 25, 0.46875, 0.71875, 0.96875, 1.21875, 1.46875,
+ (230): 1.71875, 1.96875, 2.21875, 2.46875, 2.71875, 2.96875,
+ (236): 3.21875, 3.46875, 3.71875, 3.96875, 4.21875, 4.46875,
+ (242): 4.71875, 4.96875, 5.21875, 5.46875, 5.71875, 5.96875,
+ (248): 6.21875, 6.46875, 6.71875, 6.96875, 7.21875, 7.46875,
+ (254): 7.71875, 7.96875
+ }
+ }
+ }
+ DATASET "DS64BITS" {
+ DATATYPE H5T_IEEE_F64LE
+ DATASPACE SIMPLE { ( 8, 64 ) / ( 8, 64 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 4096
+ OFFSET 6144
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ DATA {
+ (0,0): 64, 0.125, 0.25, 0.375, 0.5, 0.625, 0.75, 0.875, 1, 1.125, 1.25,
+ (0,11): 1.375, 1.5, 1.625, 1.75, 1.875, 2, 2.125, 2.25, 2.375, 2.5,
+ (0,21): 2.625, 2.75, 2.875, 3, 3.125, 3.25, 3.375, 3.5, 3.625, 3.75,
+ (0,31): 3.875, 4, 4.125, 4.25, 4.375, 4.5, 4.625, 4.75, 4.875, 5,
+ (0,41): 5.125, 5.25, 5.375, 5.5, 5.625, 5.75, 5.875, 6, 6.125, 6.25,
+ (0,51): 6.375, 6.5, 6.625, 6.75, 6.875, 7, 7.125, 7.25, 7.375, 7.5,
+ (0,61): 7.625, 7.75, 7.875,
+ (1,0): 63, 0.140625, 0.265625, 0.390625, 0.515625, 0.640625, 0.765625,
+ (1,7): 0.890625, 1.01563, 1.14063, 1.26563, 1.39063, 1.51563, 1.64063,
+ (1,14): 1.76563, 1.89063, 2.01563, 2.14063, 2.26563, 2.39063, 2.51563,
+ (1,21): 2.64063, 2.76563, 2.89063, 3.01563, 3.14063, 3.26563, 3.39063,
+ (1,28): 3.51563, 3.64063, 3.76563, 3.89063, 4.01563, 4.14063, 4.26563,
+ (1,35): 4.39063, 4.51563, 4.64063, 4.76563, 4.89063, 5.01563, 5.14063,
+ (1,42): 5.26563, 5.39063, 5.51563, 5.64063, 5.76563, 5.89063, 6.01563,
+ (1,49): 6.14063, 6.26563, 6.39063, 6.51563, 6.64063, 6.76563, 6.89063,
+ (1,56): 7.01563, 7.14063, 7.26563, 7.39063, 7.51563, 7.64063, 7.76563,
+ (1,63): 7.89063,
+ (2,0): 62, 0.15625, 0.28125, 0.40625, 0.53125, 0.65625, 0.78125,
+ (2,7): 0.90625, 1.03125, 1.15625, 1.28125, 1.40625, 1.53125, 1.65625,
+ (2,14): 1.78125, 1.90625, 2.03125, 2.15625, 2.28125, 2.40625, 2.53125,
+ (2,21): 2.65625, 2.78125, 2.90625, 3.03125, 3.15625, 3.28125, 3.40625,
+ (2,28): 3.53125, 3.65625, 3.78125, 3.90625, 4.03125, 4.15625, 4.28125,
+ (2,35): 4.40625, 4.53125, 4.65625, 4.78125, 4.90625, 5.03125, 5.15625,
+ (2,42): 5.28125, 5.40625, 5.53125, 5.65625, 5.78125, 5.90625, 6.03125,
+ (2,49): 6.15625, 6.28125, 6.40625, 6.53125, 6.65625, 6.78125, 6.90625,
+ (2,56): 7.03125, 7.15625, 7.28125, 7.40625, 7.53125, 7.65625, 7.78125,
+ (2,63): 7.90625,
+ (3,0): 61, 0.171875, 0.296875, 0.421875, 0.546875, 0.671875, 0.796875,
+ (3,7): 0.921875, 1.04688, 1.17188, 1.29688, 1.42188, 1.54688, 1.67188,
+ (3,14): 1.79688, 1.92188, 2.04688, 2.17188, 2.29688, 2.42188, 2.54688,
+ (3,21): 2.67188, 2.79688, 2.92188, 3.04688, 3.17188, 3.29688, 3.42188,
+ (3,28): 3.54688, 3.67188, 3.79688, 3.92188, 4.04688, 4.17188, 4.29688,
+ (3,35): 4.42188, 4.54688, 4.67188, 4.79688, 4.92188, 5.04688, 5.17188,
+ (3,42): 5.29688, 5.42188, 5.54688, 5.67188, 5.79688, 5.92188, 6.04688,
+ (3,49): 6.17188, 6.29688, 6.42188, 6.54688, 6.67188, 6.79688, 6.92188,
+ (3,56): 7.04688, 7.17188, 7.29688, 7.42188, 7.54688, 7.67188, 7.79688,
+ (3,63): 7.92188,
+ (4,0): 60, 0.1875, 0.3125, 0.4375, 0.5625, 0.6875, 0.8125, 0.9375,
+ (4,8): 1.0625, 1.1875, 1.3125, 1.4375, 1.5625, 1.6875, 1.8125, 1.9375,
+ (4,16): 2.0625, 2.1875, 2.3125, 2.4375, 2.5625, 2.6875, 2.8125, 2.9375,
+ (4,24): 3.0625, 3.1875, 3.3125, 3.4375, 3.5625, 3.6875, 3.8125, 3.9375,
+ (4,32): 4.0625, 4.1875, 4.3125, 4.4375, 4.5625, 4.6875, 4.8125, 4.9375,
+ (4,40): 5.0625, 5.1875, 5.3125, 5.4375, 5.5625, 5.6875, 5.8125, 5.9375,
+ (4,48): 6.0625, 6.1875, 6.3125, 6.4375, 6.5625, 6.6875, 6.8125, 6.9375,
+ (4,56): 7.0625, 7.1875, 7.3125, 7.4375, 7.5625, 7.6875, 7.8125, 7.9375,
+ (5,0): 59, 0.203125, 0.328125, 0.453125, 0.578125, 0.703125, 0.828125,
+ (5,7): 0.953125, 1.07813, 1.20313, 1.32813, 1.45313, 1.57813, 1.70313,
+ (5,14): 1.82813, 1.95313, 2.07813, 2.20313, 2.32813, 2.45313, 2.57813,
+ (5,21): 2.70313, 2.82813, 2.95313, 3.07813, 3.20313, 3.32813, 3.45313,
+ (5,28): 3.57813, 3.70313, 3.82813, 3.95313, 4.07813, 4.20313, 4.32813,
+ (5,35): 4.45313, 4.57813, 4.70313, 4.82813, 4.95313, 5.07813, 5.20313,
+ (5,42): 5.32813, 5.45313, 5.57813, 5.70313, 5.82813, 5.95313, 6.07813,
+ (5,49): 6.20313, 6.32813, 6.45313, 6.57813, 6.70313, 6.82813, 6.95313,
+ (5,56): 7.07813, 7.20313, 7.32813, 7.45313, 7.57813, 7.70313, 7.82813,
+ (5,63): 7.95313,
+ (6,0): 58, 0.21875, 0.34375, 0.46875, 0.59375, 0.71875, 0.84375,
+ (6,7): 0.96875, 1.09375, 1.21875, 1.34375, 1.46875, 1.59375, 1.71875,
+ (6,14): 1.84375, 1.96875, 2.09375, 2.21875, 2.34375, 2.46875, 2.59375,
+ (6,21): 2.71875, 2.84375, 2.96875, 3.09375, 3.21875, 3.34375, 3.46875,
+ (6,28): 3.59375, 3.71875, 3.84375, 3.96875, 4.09375, 4.21875, 4.34375,
+ (6,35): 4.46875, 4.59375, 4.71875, 4.84375, 4.96875, 5.09375, 5.21875,
+ (6,42): 5.34375, 5.46875, 5.59375, 5.71875, 5.84375, 5.96875, 6.09375,
+ (6,49): 6.21875, 6.34375, 6.46875, 6.59375, 6.71875, 6.84375, 6.96875,
+ (6,56): 7.09375, 7.21875, 7.34375, 7.46875, 7.59375, 7.71875, 7.84375,
+ (6,63): 7.96875,
+ (7,0): 57, 0.234375, 0.359375, 0.484375, 0.609375, 0.734375, 0.859375,
+ (7,7): 0.984375, 1.10938, 1.23438, 1.35938, 1.48438, 1.60938, 1.73438,
+ (7,14): 1.85938, 1.98438, 2.10938, 2.23438, 2.35938, 2.48438, 2.60938,
+ (7,21): 2.73438, 2.85938, 2.98438, 3.10938, 3.23438, 3.35938, 3.48438,
+ (7,28): 3.60938, 3.73438, 3.85938, 3.98438, 4.10938, 4.23438, 4.35938,
+ (7,35): 4.48438, 4.60938, 4.73438, 4.85938, 4.98438, 5.10938, 5.23438,
+ (7,42): 5.35938, 5.48438, 5.60938, 5.73438, 5.85938, 5.98438, 6.10938,
+ (7,49): 6.23438, 6.35938, 6.48438, 6.60938, 6.73438, 6.85938, 6.98438,
+ (7,56): 7.10938, 7.23438, 7.35938, 7.48438, 7.60938, 7.73438, 7.85938,
+ (7,63): 7.98438
+ }
+ ATTRIBUTE "DS64BITS" {
+ DATATYPE H5T_IEEE_F64LE
+ DATASPACE SIMPLE { ( 512 ) / ( 512 ) }
+ DATA {
+ (0): 64, 0.125, 0.25, 0.375, 0.5, 0.625, 0.75, 0.875, 1, 1.125,
+ (10): 1.25, 1.375, 1.5, 1.625, 1.75, 1.875, 2, 2.125, 2.25, 2.375,
+ (20): 2.5, 2.625, 2.75, 2.875, 3, 3.125, 3.25, 3.375, 3.5, 3.625,
+ (30): 3.75, 3.875, 4, 4.125, 4.25, 4.375, 4.5, 4.625, 4.75, 4.875,
+ (40): 5, 5.125, 5.25, 5.375, 5.5, 5.625, 5.75, 5.875, 6, 6.125,
+ (50): 6.25, 6.375, 6.5, 6.625, 6.75, 6.875, 7, 7.125, 7.25, 7.375,
+ (60): 7.5, 7.625, 7.75, 7.875, 63, 0.140625, 0.265625, 0.390625,
+ (68): 0.515625, 0.640625, 0.765625, 0.890625, 1.01563, 1.14063,
+ (74): 1.26563, 1.39063, 1.51563, 1.64063, 1.76563, 1.89063, 2.01563,
+ (81): 2.14063, 2.26563, 2.39063, 2.51563, 2.64063, 2.76563, 2.89063,
+ (88): 3.01563, 3.14063, 3.26563, 3.39063, 3.51563, 3.64063, 3.76563,
+ (95): 3.89063, 4.01563, 4.14063, 4.26563, 4.39063, 4.51563, 4.64063,
+ (102): 4.76563, 4.89063, 5.01563, 5.14063, 5.26563, 5.39063,
+ (108): 5.51563, 5.64063, 5.76563, 5.89063, 6.01563, 6.14063,
+ (114): 6.26563, 6.39063, 6.51563, 6.64063, 6.76563, 6.89063,
+ (120): 7.01563, 7.14063, 7.26563, 7.39063, 7.51563, 7.64063,
+ (126): 7.76563, 7.89063, 62, 0.15625, 0.28125, 0.40625, 0.53125,
+ (133): 0.65625, 0.78125, 0.90625, 1.03125, 1.15625, 1.28125,
+ (139): 1.40625, 1.53125, 1.65625, 1.78125, 1.90625, 2.03125,
+ (145): 2.15625, 2.28125, 2.40625, 2.53125, 2.65625, 2.78125,
+ (151): 2.90625, 3.03125, 3.15625, 3.28125, 3.40625, 3.53125,
+ (157): 3.65625, 3.78125, 3.90625, 4.03125, 4.15625, 4.28125,
+ (163): 4.40625, 4.53125, 4.65625, 4.78125, 4.90625, 5.03125,
+ (169): 5.15625, 5.28125, 5.40625, 5.53125, 5.65625, 5.78125,
+ (175): 5.90625, 6.03125, 6.15625, 6.28125, 6.40625, 6.53125,
+ (181): 6.65625, 6.78125, 6.90625, 7.03125, 7.15625, 7.28125,
+ (187): 7.40625, 7.53125, 7.65625, 7.78125, 7.90625, 61, 0.171875,
+ (194): 0.296875, 0.421875, 0.546875, 0.671875, 0.796875, 0.921875,
+ (200): 1.04688, 1.17188, 1.29688, 1.42188, 1.54688, 1.67188,
+ (206): 1.79688, 1.92188, 2.04688, 2.17188, 2.29688, 2.42188,
+ (212): 2.54688, 2.67188, 2.79688, 2.92188, 3.04688, 3.17188,
+ (218): 3.29688, 3.42188, 3.54688, 3.67188, 3.79688, 3.92188,
+ (224): 4.04688, 4.17188, 4.29688, 4.42188, 4.54688, 4.67188,
+ (230): 4.79688, 4.92188, 5.04688, 5.17188, 5.29688, 5.42188,
+ (236): 5.54688, 5.67188, 5.79688, 5.92188, 6.04688, 6.17188,
+ (242): 6.29688, 6.42188, 6.54688, 6.67188, 6.79688, 6.92188,
+ (248): 7.04688, 7.17188, 7.29688, 7.42188, 7.54688, 7.67188,
+ (254): 7.79688, 7.92188, 60, 0.1875, 0.3125, 0.4375, 0.5625, 0.6875,
+ (262): 0.8125, 0.9375, 1.0625, 1.1875, 1.3125, 1.4375, 1.5625,
+ (269): 1.6875, 1.8125, 1.9375, 2.0625, 2.1875, 2.3125, 2.4375,
+ (276): 2.5625, 2.6875, 2.8125, 2.9375, 3.0625, 3.1875, 3.3125,
+ (283): 3.4375, 3.5625, 3.6875, 3.8125, 3.9375, 4.0625, 4.1875,
+ (290): 4.3125, 4.4375, 4.5625, 4.6875, 4.8125, 4.9375, 5.0625,
+ (297): 5.1875, 5.3125, 5.4375, 5.5625, 5.6875, 5.8125, 5.9375,
+ (304): 6.0625, 6.1875, 6.3125, 6.4375, 6.5625, 6.6875, 6.8125,
+ (311): 6.9375, 7.0625, 7.1875, 7.3125, 7.4375, 7.5625, 7.6875,
+ (318): 7.8125, 7.9375, 59, 0.203125, 0.328125, 0.453125, 0.578125,
+ (325): 0.703125, 0.828125, 0.953125, 1.07813, 1.20313, 1.32813,
+ (331): 1.45313, 1.57813, 1.70313, 1.82813, 1.95313, 2.07813,
+ (337): 2.20313, 2.32813, 2.45313, 2.57813, 2.70313, 2.82813,
+ (343): 2.95313, 3.07813, 3.20313, 3.32813, 3.45313, 3.57813,
+ (349): 3.70313, 3.82813, 3.95313, 4.07813, 4.20313, 4.32813,
+ (355): 4.45313, 4.57813, 4.70313, 4.82813, 4.95313, 5.07813,
+ (361): 5.20313, 5.32813, 5.45313, 5.57813, 5.70313, 5.82813,
+ (367): 5.95313, 6.07813, 6.20313, 6.32813, 6.45313, 6.57813,
+ (373): 6.70313, 6.82813, 6.95313, 7.07813, 7.20313, 7.32813,
+ (379): 7.45313, 7.57813, 7.70313, 7.82813, 7.95313, 58, 0.21875,
+ (386): 0.34375, 0.46875, 0.59375, 0.71875, 0.84375, 0.96875,
+ (392): 1.09375, 1.21875, 1.34375, 1.46875, 1.59375, 1.71875,
+ (398): 1.84375, 1.96875, 2.09375, 2.21875, 2.34375, 2.46875,
+ (404): 2.59375, 2.71875, 2.84375, 2.96875, 3.09375, 3.21875,
+ (410): 3.34375, 3.46875, 3.59375, 3.71875, 3.84375, 3.96875,
+ (416): 4.09375, 4.21875, 4.34375, 4.46875, 4.59375, 4.71875,
+ (422): 4.84375, 4.96875, 5.09375, 5.21875, 5.34375, 5.46875,
+ (428): 5.59375, 5.71875, 5.84375, 5.96875, 6.09375, 6.21875,
+ (434): 6.34375, 6.46875, 6.59375, 6.71875, 6.84375, 6.96875,
+ (440): 7.09375, 7.21875, 7.34375, 7.46875, 7.59375, 7.71875,
+ (446): 7.84375, 7.96875, 57, 0.234375, 0.359375, 0.484375, 0.609375,
+ (453): 0.734375, 0.859375, 0.984375, 1.10938, 1.23438, 1.35938,
+ (459): 1.48438, 1.60938, 1.73438, 1.85938, 1.98438, 2.10938,
+ (465): 2.23438, 2.35938, 2.48438, 2.60938, 2.73438, 2.85938,
+ (471): 2.98438, 3.10938, 3.23438, 3.35938, 3.48438, 3.60938,
+ (477): 3.73438, 3.85938, 3.98438, 4.10938, 4.23438, 4.35938,
+ (483): 4.48438, 4.60938, 4.73438, 4.85938, 4.98438, 5.10938,
+ (489): 5.23438, 5.35938, 5.48438, 5.60938, 5.73438, 5.85938,
+ (495): 5.98438, 6.10938, 6.23438, 6.35938, 6.48438, 6.60938,
+ (501): 6.73438, 6.85938, 6.98438, 7.10938, 7.23438, 7.35938,
+ (507): 7.48438, 7.60938, 7.73438, 7.85938, 7.98438
+ }
+ }
+ }
+}
+}
diff --git a/tools/testfiles/tldouble.ddl b/tools/testfiles/tldouble.ddl
new file mode 100644
index 00000000000..2fed52307f9
--- /dev/null
+++ b/tools/testfiles/tldouble.ddl
@@ -0,0 +1,11 @@
+HDF5 "tldouble.h5" {
+GROUP "/" {
+ DATASET "dset" {
+ DATATYPE 128-bit little-endian floating-point 80-bit precision
+ DATASPACE SIMPLE { ( 3 ) / ( 3 ) }
+ DATA {
+ (0): 1, 2, 3
+ }
+ }
+}
+}
diff --git a/tools/testfiles/tldouble_scalar.ddl b/tools/testfiles/tldouble_scalar.ddl
new file mode 100755
index 00000000000..596d8db2ce0
--- /dev/null
+++ b/tools/testfiles/tldouble_scalar.ddl
@@ -0,0 +1,26 @@
+HDF5 "tldouble_scalar.h5" {
+GROUP "/" {
+ DATASET "dset" {
+ DATATYPE H5T_ARRAY { [6] 128-bit little-endian floating-point 80-bit precision }
+ DATASPACE SCALAR
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 96
+ OFFSET 2048
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ DATA {
+ (0): [ 0, 1, 2, 3, 4, 5 ]
+ }
+ }
+}
+}
diff --git a/tools/testfiles/tldouble_scalar.h5 b/tools/testfiles/tldouble_scalar.h5
new file mode 100644
index 00000000000..0344ea0a0c3
Binary files /dev/null and b/tools/testfiles/tldouble_scalar.h5 differ
diff --git a/tools/testfiles/tnbit.ddl b/tools/testfiles/tnbit.ddl
index fd5d1cf6ab1..cf2ac1fdb91 100644
--- a/tools/testfiles/tnbit.ddl
+++ b/tools/testfiles/tnbit.ddl
@@ -1,6 +1,6 @@
HDF5 "tfilters.h5" {
DATASET "nbit" {
- DATATYPE 32-bit little-endian integer
+ DATATYPE 32-bit little-endian integer 3-bit precision
DATASPACE SIMPLE { ( 20, 10 ) / ( 20, 10 ) }
STORAGE_LAYOUT {
CHUNKED ( 10, 5 )
diff --git a/tools/testfiles/treadintfilter.ddl b/tools/testfiles/treadintfilter.ddl
index a2269a6b90f..fbad3f67369 100644
--- a/tools/testfiles/treadintfilter.ddl
+++ b/tools/testfiles/treadintfilter.ddl
@@ -78,7 +78,7 @@ DATASET "fletcher32" {
}
}
DATASET "nbit" {
- DATATYPE 32-bit little-endian integer
+ DATATYPE 32-bit little-endian integer 3-bit precision
DATASPACE SIMPLE { ( 20, 10 ) / ( 20, 10 ) }
DATA {
(0,0): 0, 1, 2, 3, -4, -3, -2, -1, 0, 1,