[FLASH-USERS] Including HDF5 data as input parameters
Naveen Yadav
naveen.phys at gmail.com
Sat Jan 8 19:58:50 EST 2022
Dear Runfeng,
In your example code, the lines with INCLUDE are not needed. Check the
attached file (edited your file and included instructions).
! For compilation with gfortran on LINUX:
! gfortran HDF5.F90 -L/usr/lib64 -lhdf5_fortran -lhdf5hl_fortran
-I/usr/lib64/gfortran/modules
! For compilation with mpif90 on LINUX:
! mpif90 HDF5.F90 -L/usr/lib64 -lhdf5_fortran -lhdf5hl_fortran
-I/usr/lib64/gfortran/modules
! Explanation:
! 1. Following part is required for compiler to find hdf5 libraries
! -L/usr/lib64 -lhdf5_fortran -lhdf5hl_fortran
! 2. Following part is required for compiler to find hdf5 modules
! -I/usr/lib64/gfortran/modules
! 3. Note that depending on your operating system, the location of hdf5
libraries and modules may be different.
I hope this helps.
Cheers
Naveen Yadav
Post-doctoral Researcher,
Max Planck Institute For Astrophysics,
Garching, Germany.
"The purpose of (scientific) computing is insight, not numbers" -- Richard
Hamming.
On Sat, Jan 8, 2022 at 7:44 PM Luo, Runfeng <runfeng.luo18 at imperial.ac.uk>
wrote:
> Hi,
>
> I am trying to include HDF5 data as my input. I am new to Fortran, so I am
> not entirely sure how this can be achieved. I found an example script on
> Stack overflow, and HDF5.f90 is my modified test problem to load HDF5 data.
> When I used mpif90 to run the test problem, I got the error message saying,
> 'kind type parameter must be a compile-time constant' and
> that H5F_ACC_RDWR_F is undefined.
>
> run_output contains the error message, and test.py shows the module I
> loaded. Has anyone tried to use HDF5 data before? Could you please point me
> in the right direction? Thanks in advance.
>
> kind regards,
> Runfeng
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20220109/9690ae97/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: HDF5.F90
Type: text/x-fortran
Size: 2194 bytes
Desc: not available
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20220109/9690ae97/attachment-0001.bin>
More information about the flash-users
mailing list