Hi All,
I am facing an issue while compiling WRF-DA code (Code is attached.)
da_radiance.f (297.8 KB)
The compilation line which fails -
ftn -c -ip -O3 -w -ftz -fno-alias -align all -FR -convert big_endian -r8 -real-size `expr 8 \* 8` -i4 -I../external/crtm_2.2.3/libsrc -I/opt/cray/pe/hdf5/1.10.0.3/INTEL/16.0/include -L/opt/cray/pe/hdf5/1.10.0.3/INTEL/16.0/lib/ -lhdf5hl_fortran -lhdf5_fortran -lhdf5 da_radiance.f
da_radiance.f(5884): error #6285: There is no matching specific subroutine for this generic subroutine call. [H5DREAD_F]
call H5Dread_f(dhnd1, &
-----------^
I tried searching relevant symbol in library, and as expected the symbol was not present (h5dread_f_c is present instead).
nm /opt/cray/pe/hdf5/1.10.0.3/INTEL/16.0/lib/libhdf5*|grep -i h5dread_f
nm: /opt/cray/pe/hdf5/1.10.0.3/INTEL/16.0/lib/libhdf5.settings: File format not recognized
nm: /opt/cray/pe/hdf5/1.10.0.3/INTEL/16.0/lib/libhdf5_cpp_intel_160.la: File format not recognized
U h5dread_f_c
U h5dread_f_c
0000000000001290 T h5dread_f_c
0000000000035320 T h5dread_f_c
U h5dread_f_c
U h5dread_f_c
0000000000001290 T h5dread_f_c
0000000000035320 T h5dread_f_c
U h5dread_f_c
U h5dread_f_c
0000000000001290 T h5dread_f_c
0000000000035320 T h5dread_f_c
0000000000035320 T h5dread_f_c
0000000000035320 T h5dread_f_c
I tried compiling hdf5-1.10.2. With a quick peek at the code, I saw that the function seems to have been declared (& commented) in fortran/src/H5Dff.F90 as -
! M. Scot Breitenfeld
! September 17, 2011
!
! Fortran2003 Interface:
!! SUBROUTINE h5dread_f(dset_id, mem_type_id, buf, hdferr, &
!! mem_space_id, file_space_id, xfer_prp)
!! INTEGER(HID_T), INTENT(IN) :: dset_id
!! INTEGER(HID_T), INTENT(IN) :: mem_type_id
!! TYPE(C_PTR) , INTENT(INOUT) :: buf
!! INTEGER , INTENT(OUT) :: hdferr
!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: mem_space_id
!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: file_space_id
!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: xfer_prp
!*****
SUBROUTINE h5dread_ptr(dset_id, mem_type_id, buf, hdferr, &
mem_space_id, file_space_id, xfer_prp)
Nonetheless, i tried compiling hdf 1.10.2 with fortran (2003?) flag as -
CC="icc" FC="ifort" CXX="icpc" CFLAGS="-fPIC" FCFLAGS="-fPIC" CXXFLAGS="-fPIC" ./configure --prefix=$PWD/INSTALL --enable-fortran
Configure logs for fortran section -
Fortran: yes
Fortran Compiler: /opt/intel/compilers_and_libraries_2017.5.239/linux/bin/intel64/ifort ( Intel(R) Fortran Intel(R) 64 Compiler Version 17.0.5.239 Build 20170817)
Fortran Flags: -fPIC
H5 Fortran Flags: -O3
AM Fortran Flags:
Shared Fortran Library: yes
Static Fortran Library: yes
again , i am unable to see the h5dread_f symbol in hdf5 library -
user@machine$ nm INSTALL/lib/libhdf5_fortran.*|grep -i h5dread_f
U h5dread_f_c
U h5dread_f_c
0000000000001240 T h5dread_f_c
nm: INSTALL/lib/libhdf5_fortran.la: File format not recognized
000000000003c870 T h5dread_f_c
000000000003c870 T h5dread_f_c
000000000003c870 T h5dread_f_c
Is this function unsupported/phased out in latest versions of HDF5?
If yes then please share an appropriate (older) version of library & relevant compilation flags to get the symbol in library.
Please let me know if i can provide you with any further information.