Code indexing in gitaly is broken and leads to code not being visible to the user. We work on the issue with highest priority.

Skip to content
Snippets Groups Projects
Commit c41bd6ec authored by gsell's avatar gsell
Browse files

Merge branch '21-hdf5-1-12-and-newer-support' into 'master'

Resolve "hdf5 1.12 and newer support"

Closes #21

See merge request !6
parents 5f57c234 a69a88c4
No related branches found
No related tags found
1 merge request!6Resolve "hdf5 1.12 and newer support"
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
# #
# License: see file COPYING in top level of source distribution. # License: see file COPYING in top level of source distribution.
# #
AC_INIT([H5hut], [2.0.0rc6], [h5part@lists.psi.ch], H5hut) AC_INIT([H5hut], [2.0.0rc7], [h5part@lists.psi.ch], H5hut)
AC_PREREQ(2.60) AC_PREREQ(2.60)
AC_CONFIG_HEADERS(config.h) AC_CONFIG_HEADERS(config.h)
AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_MACRO_DIR([m4])
......
...@@ -92,7 +92,7 @@ mpi_init ( ...@@ -92,7 +92,7 @@ mpi_init (
TRY (hdf5_set_fapl_mpiposix_property (f->props->access_prop, TRY (hdf5_set_fapl_mpiposix_property (f->props->access_prop,
f->props->comm, use_gpfs)); f->props->comm, use_gpfs));
} else if ((f->props->flags & H5_VFD_CORE)) { } else if ((f->props->flags & H5_VFD_CORE_IO)) {
h5_info("Selecting CORE VFD"); h5_info("Selecting CORE VFD");
TRY (hdf5_set_fapl_core (f->props->access_prop, TRY (hdf5_set_fapl_core (f->props->access_prop,
f->props->align, 1)); f->props->align, 1));
...@@ -112,7 +112,7 @@ mpi_init ( ...@@ -112,7 +112,7 @@ mpi_init (
} }
#else #else
// VFD_MPIO_POSIX has been removed in HDF5 1.8.13 // VFD_MPIO_POSIX has been removed in HDF5 1.8.13
if ((f->props->flags & H5_VFD_CORE)) { if ((f->props->flags & H5_VFD_CORE_IO)) {
h5_info("Selecting CORE VFD"); h5_info("Selecting CORE VFD");
TRY (hdf5_set_fapl_core (f->props->access_prop, TRY (hdf5_set_fapl_core (f->props->access_prop,
f->props->align, 1)); f->props->align, 1));
...@@ -197,7 +197,7 @@ h5_set_prop_file_mpio_collective ( ...@@ -197,7 +197,7 @@ h5_set_prop_file_mpio_collective (
(long long int)props->class); (long long int)props->class);
} }
#ifdef H5_HAVE_PARALLEL #ifdef H5_HAVE_PARALLEL
props->flags &= ~(H5_VFD_MPIO_POSIX | H5_VFD_MPIO_INDEPENDENT | H5_VFD_CORE); props->flags &= ~(H5_VFD_MPIO_POSIX | H5_VFD_MPIO_INDEPENDENT | H5_VFD_CORE_IO);
props->flags |= H5_VFD_MPIO_COLLECTIVE; props->flags |= H5_VFD_MPIO_COLLECTIVE;
props->comm = *comm; props->comm = *comm;
if (props->throttle > 0) { if (props->throttle > 0) {
...@@ -225,7 +225,7 @@ h5_set_prop_file_mpio_independent ( ...@@ -225,7 +225,7 @@ h5_set_prop_file_mpio_independent (
(long long int)props->class); (long long int)props->class);
} }
#ifdef H5_HAVE_PARALLEL #ifdef H5_HAVE_PARALLEL
props->flags &= ~(H5_VFD_MPIO_COLLECTIVE | H5_VFD_MPIO_POSIX | H5_VFD_CORE); props->flags &= ~(H5_VFD_MPIO_COLLECTIVE | H5_VFD_MPIO_POSIX | H5_VFD_CORE_IO);
props->flags |= H5_VFD_MPIO_INDEPENDENT; props->flags |= H5_VFD_MPIO_INDEPENDENT;
props->comm = *comm; props->comm = *comm;
#else #else
...@@ -250,7 +250,7 @@ h5_set_prop_file_mpio_posix ( ...@@ -250,7 +250,7 @@ h5_set_prop_file_mpio_posix (
(long long int)props->class); (long long int)props->class);
} }
#ifdef H5_HAVE_PARALLEL #ifdef H5_HAVE_PARALLEL
props->flags &= ~(H5_VFD_MPIO_COLLECTIVE | H5_VFD_MPIO_POSIX | H5_VFD_CORE); props->flags &= ~(H5_VFD_MPIO_COLLECTIVE | H5_VFD_MPIO_POSIX | H5_VFD_CORE_IO);
props->flags |= H5_VFD_MPIO_INDEPENDENT; props->flags |= H5_VFD_MPIO_INDEPENDENT;
props->comm = *comm; props->comm = *comm;
#else #else
......
...@@ -99,7 +99,7 @@ h5priv_write_attrib ( ...@@ -99,7 +99,7 @@ h5priv_write_attrib (
attrib_name, attrib_name,
(long long int)attrib_type, (long long int)attrib_type,
attrib_value, attrib_value,
attrib_nelem); (long long unsigned)attrib_nelem);
hid_t space_id; hid_t space_id;
hid_t attrib_id; hid_t attrib_id;
hid_t hdf5_type; hid_t hdf5_type;
...@@ -147,7 +147,7 @@ h5priv_append_attrib ( ...@@ -147,7 +147,7 @@ h5priv_append_attrib (
attrib_name, attrib_name,
(long long int)attrib_type, (long long int)attrib_type,
attrib_value, attrib_value,
attrib_nelem); (long long unsigned)attrib_nelem);
h5_err_t exists; h5_err_t exists;
TRY (exists = hdf5_attribute_exists (id, attrib_name)); TRY (exists = hdf5_attribute_exists (id, attrib_name));
if (exists) { if (exists) {
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
#define H5_VFD_MPIO_POSIX 0x00000010 #define H5_VFD_MPIO_POSIX 0x00000010
#define H5_VFD_MPIO_INDEPENDENT 0x00000020 #define H5_VFD_MPIO_INDEPENDENT 0x00000020
#define H5_VFD_MPIO_COLLECTIVE 0x00000040 #define H5_VFD_MPIO_COLLECTIVE 0x00000040
#define H5_VFD_CORE 0x00000080 #define H5_VFD_CORE_IO 0x00000080
#define H5_FLUSH_FILE 0x00001000 #define H5_FLUSH_FILE 0x00001000
#define H5_FLUSH_ITERATION 0x00002000 #define H5_FLUSH_ITERATION 0x00002000
......
...@@ -110,10 +110,18 @@ iter_op_get_obj_type ( ...@@ -110,10 +110,18 @@ iter_op_get_obj_type (
name); name);
return H5O_TYPE_UNKNOWN; return H5O_TYPE_UNKNOWN;
} }
#if H5_VERSION_GE(1,12,0)
herr = H5Oget_info(obj_id, &objinfo, H5O_INFO_ALL);
#else
herr = H5Oget_info(obj_id, &objinfo); herr = H5Oget_info(obj_id, &objinfo);
#endif
} }
else { // H5L_TYPE_HARD else { // H5L_TYPE_HARD
#if H5_VERSION_GE(1,12,0)
herr = H5Oget_info_by_name(g_id, name, &objinfo, H5O_INFO_BASIC, H5P_DEFAULT);
#else
herr = H5Oget_info_by_name(g_id, name, &objinfo, H5P_DEFAULT); herr = H5Oget_info_by_name(g_id, name, &objinfo, H5P_DEFAULT);
#endif
} }
if (herr < 0) { if (herr < 0) {
...@@ -245,7 +253,8 @@ hdf5_get_name_of_group_by_idx ( ...@@ -245,7 +253,8 @@ hdf5_get_name_of_group_by_idx (
HDF5_WRAPPER_ENTER (h5_err_t, HDF5_WRAPPER_ENTER (h5_err_t,
"loc_id=%lld (%s), idx=%llu, name=%p, len=%llu", "loc_id=%lld (%s), idx=%llu, name=%p, len=%llu",
(long long int)loc_id, hdf5_get_objname (loc_id), (long long int)loc_id, hdf5_get_objname (loc_id),
idx, name, (unsigned long long)len); (long long unsigned)idx,
name, (unsigned long long)len);
op_data_t op_data; op_data_t op_data;
memset (&op_data, 0, sizeof (op_data)); memset (&op_data, 0, sizeof (op_data));
op_data.type = H5O_TYPE_GROUP; op_data.type = H5O_TYPE_GROUP;
...@@ -304,7 +313,8 @@ hdf5_get_name_of_dataset_by_idx ( ...@@ -304,7 +313,8 @@ hdf5_get_name_of_dataset_by_idx (
HDF5_WRAPPER_ENTER (h5_err_t, HDF5_WRAPPER_ENTER (h5_err_t,
"loc_id=%lld (%s), idx=%llu, name=%p, len=%llu", "loc_id=%lld (%s), idx=%llu, name=%p, len=%llu",
(long long int)loc_id, hdf5_get_objname (loc_id), (long long int)loc_id, hdf5_get_objname (loc_id),
idx, name, (unsigned long long)len); (long long unsigned)idx,
name, (unsigned long long)len);
op_data_t op_data; op_data_t op_data;
memset (&op_data, 0, sizeof (op_data)); memset (&op_data, 0, sizeof (op_data));
op_data.type = H5O_TYPE_DATASET; op_data.type = H5O_TYPE_DATASET;
......
...@@ -718,7 +718,7 @@ hdf5_set_dataset_extent ( ...@@ -718,7 +718,7 @@ hdf5_set_dataset_extent (
"dataset_id=%lld (%s), size=%llu", "dataset_id=%lld (%s), size=%llu",
(long long int)dataset_id, (long long int)dataset_id,
hdf5_get_objname(dataset_id), hdf5_get_objname(dataset_id),
*size); (long long unsigned int)*size);
if (H5Dset_extent(dataset_id, size) < 0) { if (H5Dset_extent(dataset_id, size) < 0) {
H5_RETURN_ERROR ( H5_RETURN_ERROR (
H5_ERR_HDF5, H5_ERR_HDF5,
...@@ -873,7 +873,7 @@ static inline hid_t ...@@ -873,7 +873,7 @@ static inline hid_t
hdf5_create_string_type( hdf5_create_string_type(
const hsize_t len const hsize_t len
) { ) {
HDF5_WRAPPER_ENTER (hid_t, "len = %llu", len); HDF5_WRAPPER_ENTER (hid_t, "len = %llu", (long long unsigned)len);
hid_t type_id = H5Tcopy (H5T_C_S1); hid_t type_id = H5Tcopy (H5T_C_S1);
if (type_id < 0) if (type_id < 0)
H5_RETURN_ERROR ( H5_RETURN_ERROR (
...@@ -1003,7 +1003,7 @@ hdf5_set_chunk_property ( ...@@ -1003,7 +1003,7 @@ hdf5_set_chunk_property (
) { ) {
HDF5_WRAPPER_ENTER (h5_err_t, HDF5_WRAPPER_ENTER (h5_err_t,
"plist=%lld, rank=%d, dims[0]=%llu ...", "plist=%lld, rank=%d, dims[0]=%llu ...",
(long long int)plist, rank, dims[0]); (long long int)plist, rank, (long long unsigned)dims[0]);
if (H5Pset_chunk (plist, rank, dims) < 0) if (H5Pset_chunk (plist, rank, dims) < 0)
H5_RETURN_ERROR ( H5_RETURN_ERROR (
H5_ERR_HDF5, H5_ERR_HDF5,
...@@ -1146,7 +1146,8 @@ hdf5_set_btree_ik_property ( ...@@ -1146,7 +1146,8 @@ hdf5_set_btree_ik_property (
) { ) {
HDF5_WRAPPER_ENTER (h5_err_t, HDF5_WRAPPER_ENTER (h5_err_t,
"fapl_id=%lld, btree_ik=%llu", "fapl_id=%lld, btree_ik=%llu",
(long long int)fcpl_id, btree_ik); (long long int)fcpl_id,
(long long unsigned)btree_ik);
if (H5Pset_istore_k (fcpl_id, btree_ik) < 0) if (H5Pset_istore_k (fcpl_id, btree_ik) < 0)
H5_RETURN_ERROR ( H5_RETURN_ERROR (
H5_ERR_HDF5, H5_ERR_HDF5,
...@@ -1164,13 +1165,16 @@ hdf5_set_alignment_property ( ...@@ -1164,13 +1165,16 @@ hdf5_set_alignment_property (
) { ) {
HDF5_WRAPPER_ENTER (h5_err_t, HDF5_WRAPPER_ENTER (h5_err_t,
"plist=%lld, threshold=%llu, alignment=%llu", "plist=%lld, threshold=%llu, alignment=%llu",
(long long int)plist, threshold, alignment); (long long int)plist,
(long long unsigned)threshold,
(long long unsigned)alignment);
if (H5Pset_alignment (plist, threshold, alignment) < 0) if (H5Pset_alignment (plist, threshold, alignment) < 0)
H5_RETURN_ERROR ( H5_RETURN_ERROR (
H5_ERR_HDF5, H5_ERR_HDF5,
"Cannot set alignment property to %llu " "Cannot set alignment property to %llu "
"and threshold %llu", "and threshold %llu",
alignment, threshold); (long long unsigned)alignment,
(long long unsigned)threshold);
H5_RETURN (H5_SUCCESS); H5_RETURN (H5_SUCCESS);
} }
...@@ -1181,12 +1185,13 @@ hdf5_set_meta_block_size ( ...@@ -1181,12 +1185,13 @@ hdf5_set_meta_block_size (
) { ) {
HDF5_WRAPPER_ENTER (h5_err_t, HDF5_WRAPPER_ENTER (h5_err_t,
"fapl_id=%lld, size=%llu", "fapl_id=%lld, size=%llu",
(long long int)fapl_id, size); (long long int)fapl_id,
(long long unsigned)size);
if (H5Pset_meta_block_size (fapl_id, size) < 0) if (H5Pset_meta_block_size (fapl_id, size) < 0)
H5_RETURN_ERROR ( H5_RETURN_ERROR (
H5_ERR_HDF5, H5_ERR_HDF5,
"Cannot set meta block size property to %llu", "Cannot set meta block size property to %llu",
size); (long long unsigned)size);
H5_RETURN (H5_SUCCESS); H5_RETURN (H5_SUCCESS);
} }
...@@ -1292,9 +1297,15 @@ hdf5_close_file ( ...@@ -1292,9 +1297,15 @@ hdf5_close_file (
for (ssize_t i = 0; i < max_objs; i++) { for (ssize_t i = 0; i < max_objs; i++) {
hid_t object_id = obj_id_list [i]; hid_t object_id = obj_id_list [i];
h5_debug ("Open object: %lld", (long long)object_id); h5_debug ("Open object: %lld", (long long)object_id);
#if H5_VERSION_GE(1,12,0)
H5O_info_t object_info;
if (H5Oget_info (object_id, &object_info, H5O_INFO_ALL) < 0)
continue;
#else
H5O_info_t object_info; H5O_info_t object_info;
if (H5Oget_info (object_id, &object_info) < 0) if (H5Oget_info (object_id, &object_info) < 0)
continue; continue;
#endif
switch (object_info.type) { switch (object_info.type) {
case H5O_TYPE_GROUP: case H5O_TYPE_GROUP:
case H5O_TYPE_DATASET: case H5O_TYPE_DATASET:
......
...@@ -13,7 +13,8 @@ ...@@ -13,7 +13,8 @@
INTEGER*8, PARAMETER :: H5_VFD_MPIPOSIX = Z'00000010' INTEGER*8, PARAMETER :: H5_VFD_MPIPOSIX = Z'00000010'
INTEGER*8, PARAMETER :: H5_VFD_MPIIO_IND = Z'00000020' INTEGER*8, PARAMETER :: H5_VFD_MPIIO_IND = Z'00000020'
INTEGER*8, PARAMETER :: H5_VFD_CORE = Z'00000040' INTEGER*8, PARAMETER :: H5_VFD_MPIIO_COL = Z'00000040'
INTEGER*8, PARAMETER :: H5_VFD_CORE_IO = Z'00000080'
INTEGER*8, PARAMETER :: H5_PROP_DEFAULT = 0 INTEGER*8, PARAMETER :: H5_PROP_DEFAULT = 0
......
...@@ -658,7 +658,11 @@ test_open_objects(h5_file_t file, int max_objects) ...@@ -658,7 +658,11 @@ test_open_objects(h5_file_t file, int max_objects)
H5O_info_t info; H5O_info_t info;
int i; int i;
for (i=0; i<nopen; i++) { for (i=0; i<nopen; i++) {
H5Oget_info(list[i], &info); #if H5_VERSION_GE(1,12,0)
H5Oget_info(list[i], &info, H5O_INFO_BASIC);
#else
H5Oget_info(list[i], &info);
#endif
switch (info.type) { switch (info.type) {
case H5O_TYPE_GROUP: case H5O_TYPE_GROUP:
TestErrPrintf("obj%d has type GROUP\n", i); TestErrPrintf("obj%d has type GROUP\n", i);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment