The issue is compilers/systems have different behaviors for handling promotion of reals; some will not promote real*8 to real*16 and some will. It might be the case that your system does not have real*16? Which version of gcc and what system/OS are you using?
We’ve change the behavior in v1.10.0 release so that we create an interface for all valid KINDs of both REALs and INTEGERs. That way you should never have an interface that does not have a matching valid KIND associated with it.
···
On Sep 8, 2015, at 4:27 AM, Vanessa Stimpel <chinchi@physik.tu-berlin.de<mailto:chinchi@physik.tu-berlin.de>> wrote:
On 09/07/2015 11:00 AM, Pierre de Buyl wrote:
Hi,
By default, HDF5 supports several integer and real types. Is there any reason it
should not find the appropriate type?
What cannot be done, I guess, is request "H5T_NATIVE_INTEGER" or
"H5T_NATIVE_DOUBLE" if the option "-fdefault-real-8" is given. Then, one must
pick the datatype depending on the combination of library, compile options, etc.
Another possible issue is the integer type of the variable "error" (or for that
matter, the dimensions, etc) that also come into play.
Regards,
Pierre
On Thu, Sep 03, 2015 at 09:00:57PM +0000, Scot Breitenfeld wrote:
You can download the current source from:
https://www.hdfgroup.org/HDF5/release/obtainsrc.html
The installation instructions are also on that page under “building HDF5 with configure”, but in a nutshell it should be simply:
./configure —enable-fortran —enable-fortran2003 CC=gcc FC=gfortran FCFLAGS=-fdefault-real-8 —disable-hl
Scot
On Sep 3, 2015, at 1:15 PM, chinchi <chinchi@physik.tu-berlin.de<mailto:chinchi@physik.tu-berlin.de><mailto:chinchi@physik.tu-berlin.de>> wrote:
Hallo,
thank you for your fast answer, but I'm not an expert how to build the hdf5 library with this kind of Flag,
i just made:
sudo apt-get install libhdf5-serial-dev
Am 03.09.2015 um 18:55 schrieb Scot Breitenfeld:
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 <chinchi@physik.tu-berlin.de<mailto:chinchi@physik.tu-berlin.de>><mailto:chinchi@physik.tu-berlin.de> 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.
Hdf-forum@lists.hdfgroup.org<mailto:Hdf-forum@lists.hdfgroup.org><mailto:Hdf-forum@lists.hdfgroup.org>
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5
_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@lists.hdfgroup.org<mailto:Hdf-forum@lists.hdfgroup.org><mailto:Hdf-forum@lists.hdfgroup.org>
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5
_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@lists.hdfgroup.org<mailto:Hdf-forum@lists.hdfgroup.org><mailto:Hdf-forum@lists.hdfgroup.org>
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5
_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@lists.hdfgroup.org<mailto:Hdf-forum@lists.hdfgroup.org>
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5
_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@lists.hdfgroup.org<mailto:Hdf-forum@lists.hdfgroup.org>
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5