Did you also compile the HDF5 library with FCFLAGS = -fdefault-real-8 ? The problem is the native double in HDF5 does not match the native double in your program because you promoted real to double precision in your program but not in the HDF5 library. Try building the HDF5 library with FCFLAGS =-fdefault-real-8.
You might also want to look at the example h5ex_d_rdwr_kind_F03.f90 at https://www.hdfgroup.org/HDF5/examples/api18-fortran.html , which uses the newer F2003 APIs. This example shows you how to automatically determine the correct data type for a given REAL. This is important for robustness if you are going to be changing the size of REALs with compiler flags. Scot > On Sep 3, 2015, at 10:06 AM, chinchi <[email protected]> wrote: > > Hi, > > I have on problem by compiling hdf5 with fortran90. I tried to follow the > examples on the tutorial page of the hdf5 group, but i got the following > error by compiling the fortran module: > > " > call h5dwrite_f(dat_id, H5T_NATIVE_DOUBLE,m,dim_ension, error) > 1 > Error: There is no specific subroutine for the generic 'h5dwrite_f' at (1) > makelinalg:54: recipe for target 'reading.o' failed > > " > I also ensured to link the right linking path for the hdf5 library with > export LD_LIBRARY_PATH:/usr/lib/x86_64-linux-gnu/hdf5/serial/lib into > my ~/.bashrc but id doesn't work. > > it only works by removing the compiler flag -fdefault-real-8 in my makefile > FC =h5fc > FCFLAGGS = -fdefault-real-8 -g -Wall -llapack > | 21 > FFLAGGS += -I/usr/include > > it has something to do with the HFT_NATIVE_DOUBLE but what am I doing exactly > wrong > > thank you for any help and advice in advance, > Vanessa > > > > _______________________________________________ > Hdf-forum is for HDF software users discussion. > [email protected] > http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org > Twitter: https://twitter.com/hdf5 _______________________________________________ Hdf-forum is for HDF software users discussion. [email protected] http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org Twitter: https://twitter.com/hdf5
