-
-
Notifications
You must be signed in to change notification settings - Fork 26
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
I have an HDF5 file that structured like below:
sample.h5
|-- 1
|-- a
|-- 2
|-- a
|-- 3
|-- a
...
where "/1/a", "/2/a", "/3/a" and so on contain string scalar values, like "MA", "blk"... no more than 3 chars.
When reading these values with h5fortran, it crashes at 3rd or 4th read. Here is the code:
program test_my
use h5fortran, only: hdf5_file, h5write, h5read
implicit none
type(hdf5_file) :: rstFile
character(len=5) :: buffer1
call rstFile % open("/root/Desktop/h5fortran_example.h5", action='r')
call rstFile % read('/1/a', buffer1)
print *,buffer1
call rstFile % read('/2/a', buffer1)
call rstFile % read('/3/a', buffer1)
call rstFile % read('/4/a', buffer1) ! throws exception
call rstFile % read('/5/a', buffer1)
call rstFile % read('/6/a', buffer1)
end program
I'm using Intel oneAPI Fortran compiler version 2021.5, Ubuntu 20.04.
Attached the file I created for reproducing the issue.
h5fortran_example.zip
And, here is the call stack snapshot.
Thank you!
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working