Closed ErikP94 closed 1 month ago
Here is a minimal example to reproduce the (maybe?) bug. hdf5_test_min.f90.txt
Since it is expecting something to be returned, try passing a variable of type(C_PTR) instead:
TYPE(C_PTR) :: f_ptr
f_ptr = C_LOC(element_orig(1))
call h5dread_f(dataset_id, dtype_id, f_ptr, err)
Hi @brtnfld, thanks for the quick reply. This indeed seems to solve my problem!
Glad it works now.
Problem I can't compile a minimal Fortran example with HDF5. The Problem is one specific function call - h5dread_f:
I compiled with: gfortran -o hdf5_test hdf5_test_min.f90 -I/usr/local/hdf5/include/ -L/usr/local/hdf5/lib/ -lhdf5_fortran -lhdf5
The minimal example contains a simple process, in which dummy data is created, then written to a hdf5 file (which works) and then the data shall be read. Please note, that the h5dwrite_f function call works. I suspect, that the input arguments are okay, since the same example works under MacOS and also because the h5dwrite_f call works.
Platform