EpetraExt HDF5 interface fails at runtime with HDF5 1.10
Created by: bavier
With Trilinos 12.6.3 configured with EpetraExt and HDF5 1.10.0, the epetraext/example/inout/HDF5_IO.cpp
example fails with the following output:
Writing objects to HDF5 file myfile.h5...
HDF5-DIAG: Error detected in HDF5 (1.10.0) MPI-process 0:
#000: H5D.c line 123 in H5Dcreate2(): not a datatype ID
major: Invalid arguments to routine
minor: Inappropriate type
HDF5-DIAG: Error detected in HDF5 (1.10.0) MPI-process 0:
#000: H5D.c line 375 in H5Dget_space(): not a dataset
major: Invalid arguments to routine
minor: Inappropriate type
HDF5-DIAG: Error detected in HDF5 (1.10.0) MPI-process 0HDF5-DIAG: Error detected in HDF5 (1.10.0) MPI-process 3:
#000: H5D.c line 123 in H5Dcreate2(): not a datatype ID
major: Invalid arguments to routine
HDF5-DIAG: Error detected in HDF5 (1.10.0) MPI-process 2:
#000: H5D.c line 123 in H5Dcreate2(): not a datatype ID
major: Invalid arguments to routine
HDF5-DIAG: Error detected in HDF5 (1.10.0) MPI-process 1:
#000: H5D.c line 123 in H5Dcreate2(): not a datatype ID
major: Invalid arguments to routine
...
HDF5 1.10 changed the definition of its hid_t
type: https://www.hdfgroup.org/HDF5/doc/ADGuide/Changes.html
It seems there are a few places in the EpetraExt interface that use the int
type, which worked with HDF5 1.8, but is no longer appropriate. Better is to use the hid_t
type directly, which the attached patch does.
trilinos-epetraext-hdf5-1.10-compat.patch.txt