<div dir="ltr"><div class="gmail_default" style="font-family:monospace,monospace;font-size:small">Dear Runfeng,</div><div class="gmail_default" style="font-family:monospace,monospace;font-size:small"><br></div><div class="gmail_default" style="font-family:monospace,monospace;font-size:small">In your example code, the lines with INCLUDE are not needed. Check the attached file (edited your file and included instructions).</div><div class="gmail_default" style="font-family:monospace,monospace;font-size:small">! For compilation with gfortran on LINUX:<br>! gfortran HDF5.F90 -L/usr/lib64 -lhdf5_fortran -lhdf5hl_fortran -I/usr/lib64/gfortran/modules<br>! For compilation with mpif90 on LINUX:<br>! mpif90 HDF5.F90 -L/usr/lib64 -lhdf5_fortran -lhdf5hl_fortran -I/usr/lib64/gfortran/modules<br>! Explanation:<br>! 1. Following part is required for compiler to find hdf5 libraries<br>! -L/usr/lib64 -lhdf5_fortran -lhdf5hl_fortran<br>! 2. Following part is required for compiler to find hdf5 modules<br>! -I/usr/lib64/gfortran/modules<br>! 3. Note that depending on your operating system, the location of hdf5 libraries and modules may be different.<br></div><div class="gmail_default" style="font-family:monospace,monospace;font-size:small"><br></div><div class="gmail_default" style="font-family:monospace,monospace;font-size:small">I hope this helps.</div><div class="gmail_default" style="font-family:monospace,monospace;font-size:small"><br></div><div class="gmail_default" style="font-family:monospace,monospace;font-size:small">Cheers</div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><div><font size="2"><span style="font-family:monospace,monospace">Naveen Yadav<br></span></font></div><font size="2"><span style="font-family:monospace,monospace">Post-doctoral Researcher,<br></span></font></div><font size="2"><span style="font-family:monospace,monospace">Max Planck Institute For Astrophysics,<br></span></font></div><font size="2"><span style="font-family:monospace,monospace">Garching, Germany.</span></font><br></div></div><div dir="ltr"><font size="2"><span style="font-family:monospace,monospace"><br></span></font></div><div dir="ltr"><font face="monospace">"The purpose of (scientific) computing is insight, not numbers" -- Richard Hamming.</font><font size="2"><span style="font-family:monospace,monospace"><br></span></font></div></div></div></div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Jan 8, 2022 at 7:44 PM Luo, Runfeng <<a href="mailto:runfeng.luo18@imperial.ac.uk">runfeng.luo18@imperial.ac.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Hi,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
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. </div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
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.</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
kind regards,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Runfeng</div>
</div>
</blockquote></div>