[FLASH-USERS] first model: hdf5 error
Klaus Weide
klaus at flash.uchicago.edu
Wed Oct 11 12:35:17 EDT 2017
On Tue, 10 Oct 2017, Peter Woitke wrote:
> I tried to install hdf5 without --enable-parallel, according to
>
> ./configure --prefix=/home/star/pw31/software/hdf5 --enable-fortran
Note: whether one uses --enable-parallel in configuring hdf5 or not
should not be relevant for FLASH, as long as your FLASH configuration
just uses serial IO. Serial IO is the default if you do not use
something like +parallelIO on the setup command line and do not force
parallel IO in some other way in your Config file.
> That did work but the error still is
>
>
> ... Finished with Grid_initDomain, no restart
> Ready to call Hydro_init
> Hydro initialized
> Gravity initialized
> Initial dt verified
> HDF5-DIAG: Error detected in HDF5 (1.10.1) thread 0:
> #000: H5Ddeprec.c line 128 in H5Dcreate1(): not a location ID
> major: Invalid arguments to routine
> minor: Inappropriate type
> #001: H5Gloc.c line 251 in H5G_loc(): invalid object ID
> major: Invalid arguments to routine
> minor: Bad value
> flash4: io_h5create_dataset.c:57: io_h5create_dataset: Assertion `dataset >= 0' failed.
At appears that the current FLASH code has two kind of compatibility
problems with HDF5 versions 1.10.x :
1) Code in the FLASH IO unit is written to the HDF5 Release 1.6.x library
(C language) API. The HDF5 API has changed in some incompatible
ways from 1.6.x to 1.8.x, and now again 1.8.x -> 1.10.x.
The solution to this is using the compatibility macros provided by
HDF5. That means your Makefile.h for compiling FLASH should have
-DH5_USE_16_API in appropriate places, something like this:
CFLAGS_HDF5 = -I${HDF5_PATH}/include -DH5_USE_16_API
(There are other ways to use the 1.6 API with HDF5 version 1.10.x
libraries; this seems to be the simplest and the one that most
commonly works.)
One also has to make sure that the HDF5 library has not been configured
with --disable-deprecated-symbols.
This is not a new problem but already affected HDF5 versions 1.8.x,
and the solution remains the same.
See https://support.hdfgroup.org/HDF5/doc/RM/APICompatMacros.html for
more background.
2) Some Fortran code in the FLASH IO unit passes around HDF5 File IDs in
INTEGER variables. These are declared as 'hid_t' in HFD5 (C language
interface).
As per https://support.hdfgroup.org/HDF5/doc/ADGuide/Changes.html ,
========================================================================
Release 1.10.0 of March 2016 versus Release 1.8.16
This section lists interface-level changes and other user-visible changes
in behavior in the transition from HDF5 Release 1.8.16 to Release 1.10.0.
Changed Type
hid_t
Changed from a 32-bit to a 64-bit value.
========================================================================
A Fortran INTEGER (of default KIND) is usually implemented as a 32-bit
quantity (on may current systems, with default configuration of FLASH,
at least), and therefore too small to hold a handle of type hid_t.
Note that defining H5_USE_16_API will not fix this incompatibility.
We will fix this in the next FLASH release.
Klaus
More information about the flash-users
mailing list