HDF5-DIAG: Error detected in HDF5 (1.10.3), major: Error API

I am running a simulation using hdf5 output in parallel using mpirun, built with CXX=g+±8.

Everything compiles and runs fine right until the end, where I get this error:

HDF5-DIAG: Error detected in HDF5 (1.10.3) MPI-process 1:
#000: H5E.c line 1619 in H5Eget_auto2(): wrong API function, H5Eset_auto1 has been called
major: Error API
minor: Can’t get value
[myproc1] *** Process received signal ***
[myproc1] Signal: Abort trap: 6 (6)
[myproc1] Signal code: (0)
[myproc1] [ 0] 0 libsystem_platform.dylib 0x00007fff60037f5a _sigtramp + 26
[myproc1] [ 1] 0 ??? 0x0000000000000000 0x0 + 0
[myproc1] [ 2] 0 libsystem_c.dylib 0x00007fff5fdd51ae abort + 127

… with further stack trace.

The error message is output once for each processor i.e. twice for -np 2.

Does anybody know whether this is a bug I can fix, or whether it is a problem with hdf5? Please let me know if you need any more info.

Thanks,
Amelia

Hello Amelia,

From this error, it looks like H5Eset_auto1 was used, so H5Eget_auto1 should then be used to return the error stack information:

#000: H5E.c line 1619 in H5Eget_auto2(): wrong API function, H5Eset_auto1 has been called

There are two versions of H5Eget_auto (H5Eget_auto1 and H5Eget_auto2), and two versions of H5Eset_auto (H5Eset_auto1 and H5Eset_auto2). H5Eset_auto and H5Eget_auto are macros that are set to one or the other, depending on how the library was built.

The H5Eget_auto2/H5Eset_auto2 APIs were introduced in HDF5-1.8.

The H5Eget_auto1/H5Eset_auto1 APIs have one less parameter.

Here are the signatures of the functions:

herr_t H5Eget_auto1( H5E_auto1_t * func, void **client_data )
herr_t H5Eget_auto2( hid_t estack_id, H5E_auto2_t * func, void **client_data )

herr_t H5Eset_auto1( H5E_auto1_t func, void *client_data )
herr_t H5Eset_auto2( hid_t estack_id, H5E_auto2_t func, void *client_data )

Documentation can be found here:

https://portal.hdfgroup.org/display/HDF5/H5E_GET_AUTO
https://portal.hdfgroup.org/display/HDF5/H5E_SET_AUTO

-Barbara
help@hdfgroup.org

Hello Barbara,

Thank you for getting back to me on this, apologies for the delay in response. This is useful and I may try and use an older version of hdf5 to see if it fixes the problem (I am not able to edit the source code). However, I am still confused why this error only appears when I am using MPI?

Many thanks,

Amelia

Hello again,

I have found the fix for this - I was compiling with the -DH5_USE_16_API flag. Removing it fixed the problem.

Many thanks,

Amelia