Make; make test -- passed; then seg-fault in H5_gen.F90(6715)

Hi

I’m having the following problem. I have downloaded and compiled hdf5-1.10.5 with configure options

./configure --enable-parallel --enable-fortran [–enable-build-mode=debug]

on ubuntu 18.04, (mpich 3.3~a2-4, GNU Fortran 7.4.0).

Now running make; make test goes through without any errors (although certain tests like t_cach_image take a very long time… so I ran the make check over night). In any case, now I wanted to compile and run the parallel ph5example.f90 on your website. I compiled wilth

mpif90 -g -fbounds-check -fbacktrace -I/[hdf5-dir]/hdf5//lib -I/[hdf5-dir]/hdf5//include -c ph5example.f90
mpif90 ph5example.o -g -fbounds-check -fbacktrace -I/[hdf5-dir]/hdf5//lib -I/[hdf5-dir]/hdf5//include -g -fbounds-check -fbacktrace -L/[hdf5-dir]//lib -lhdf5 -lhdf5_fortran -lz -ldl -o ph5example

when running the code, I get the following error message (segmenation fault):

At line 6715 of file H5_gen.F90
Fortran runtime error: Index ‘1’ of dimension 2 of array ‘buf’ above upper bound of -1

Error termination. Backtrace:
#0 0x7fee31c442da in ???
#1 0x7fee31c44ec5 in ???
#2 0x7fee31c45297 in ???
#3 0x7fee32275c38 in __h5_gen_MOD_h5dwrite_ikind_4_rank_2
at /home/sam/Progs/hdf5/hdf5-1.10.5/fortran/src/H5_gen.F90:6715
#4 0x5612316a1c43 in dataset
at /home/sam/Progs/hdf5/Fortran_test/ph5example.f90:117
#5 0x5612316a1d4a in main
at /home/sam/Progs/hdf5/Fortran_test/ph5example.f90:19

Do you maybe have an idea of what I’m doing wrong here? Thanks!

Sam

Hm, I must have gotten the flags wrong… with the h5pfc helper tool, the code compiles and runs fine! I’ve tried h5pfc -echo (…) to see what exactly the helper tool is using to compile. I think, I’ll manage it from here.