Segfault when calling H5Pset_fapl_mpio (C++)


#1

Hi,

I am new to the community and try my best:
I am trying to build a parallel I/O with HDF5 according to the documentation and to the code snippets provided by the HDFgroup. However, when I execute the program, all MPI processes crash with a segmentation fault exactly at the point, where they call H5Pset_fapl_mpio:

#include <H5Cpp.h>
MPI_Comm comm = MPI_COMM_WORLD;
MPI_Info info = MPI_INFO_NULL;

auto fapl_id = H5Pcreate(H5P_FILE_ACCESS);
H5Pset_fapl_mpio(fapl_id, comm, info);

I am using the prebuilt MPI and HDF5 libraries on our cluster, namely:
HDF5 1.10.2 and OpenMPI 2.1.2, compiled by gcc7.2.

Compiling the program works just fine.

Running the program with 4 processes results in 4 times this error message:

[mpp2r04c06s09:04364] *** Process received signal ***
[mpp2r04c06s09:04364] Signal: Segmentation fault (11)
[mpp2r04c06s09:04364] Signal code: Address not mapped (1)
[mpp2r04c06s09:04364] Failing at address: 0x14e12170
[mpp2r04c06s09:04364] [ 0] /lib64/libpthread.so.0(+0x10c10)[0x2b05158a5c10]
[mpp2r04c06s09:04364] [ 1] /lrz/sys/parallel/openmpi/2.1.2/gcc72_cmuc3_slurm/lib/libmpi.so.20(MPI_Info_dup+0x65)[0x2b0514b7eaf5]
[mpp2r04c06s09:04364] [ 2] /lrz/mnt/sys.x86_sles12/spack/18.2/opt/x86_avx2/hdf5/1.10.2-gcc-lf6plj2/lib/libhdf5.so.101(H5FD_mpi_comm_info_dup+0x206)[0x2b05155bfdf6]
[mpp2r04c06s09:04364] [ 3] /lrz/mnt/sys.x86_sles12/spack/18.2/opt/x86_avx2/hdf5/1.10.2-gcc-lf6plj2/lib/libhdf5.so.101(+0x32defd)[0x2b05155c1efd]
[mpp2r04c06s09:04364] [ 4] /lrz/mnt/sys.x86_sles12/spack/18.2/opt/x86_avx2/hdf5/1.10.2-gcc-lf6plj2/lib/libhdf5.so.101(+0x208271)[0x2b051549c271]
[mpp2r04c06s09:04364] [ 5] /lrz/mnt/sys.x86_sles12/spack/18.2/opt/x86_avx2/hdf5/1.10.2-gcc-lf6plj2/lib/libhdf5.so.101(+0x2085a0)[0x2b051549c5a0]
[mpp2r04c06s09:04364] [ 6] /lrz/mnt/sys.x86_sles12/spack/18.2/opt/x86_avx2/hdf5/1.10.2-gcc-lf6plj2/lib/libhdf5.so.101(+0x219b83)[0x2b05154adb83]
[mpp2r04c06s09:04364] [ 7] /lrz/mnt/sys.x86_sles12/spack/18.2/opt/x86_avx2/hdf5/1.10.2-gcc-lf6plj2/lib/libhdf5.so.101(+0x21a720)[0x2b05154ae720]
[mpp2r04c06s09:04364] [ 8] /lrz/mnt/sys.x86_sles12/spack/18.2/opt/x86_avx2/hdf5/1.10.2-gcc-lf6plj2/lib/libhdf5.so.101(H5P_set+0x82)[0x2b05154b25a6]
[mpp2r04c06s09:04364] [ 9] /lrz/mnt/sys.x86_sles12/spack/18.2/opt/x86_avx2/hdf5/1.10.2-gcc-lf6plj2/lib/libhdf5.so.101(H5P_set_driver+0xb4)[0x2b051549e91c]
[mpp2r04c06s09:04364] [10] /lrz/mnt/sys.x86_sles12/spack/18.2/opt/x86_avx2/hdf5/1.10.2-gcc-lf6plj2/lib/libhdf5.so.101(H5Pset_fapl_mpio+0xae)[0x2b05155c2ac2]
[mpp2r04c06s09:04364] [11] /home/hpc/pr27ke/ge34cay5/test_hybrid_build/writer-hdf5/libwriter-hdf5.so(_ZNK7mbsolve11writer_hdf55writeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorISt10shared_ptrINS_6resultEESaISC_EESA_IKNS_6deviceEESA_IKNS_8scenarioEE+0x190)[0x2b051490d1c0]
[mpp2r04c06s09:04364] [12] /home/hpc/pr27ke/ge34cay5/test_hybrid_build/mbsolve-lib/libmbsolve-lib.so(_ZNK7mbsolve6writer5writeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorISt10shared_ptrINS_6resultEESaISC_EESA_IKNS_6deviceEESA_IKNS_8scenarioEE+0x271)[0x2b0514e26561]
[mpp2r04c06s09:04364] [13] mbsolve-tool/mbsolve-tool[0x40a225]
[mpp2r04c06s09:04364] [14] /lib64/libc.so.6(__libc_start_main+0xf5)[0x2b051699e725]
[mpp2r04c06s09:04364] [15] mbsolve-tool/mbsolve-tool[0x40cb59]
[mpp2r04c06s09:04364] *** End of error message ***

This error message suggests to me, that the library is not able to duplicate the MPI_Info, for whatever reason. Do you have an idea what could have gone wrong and how I could try to solve this problem?

Thanks in advance and kind regards

Chris