openmc-dev / openmc

OpenMC Monte Carlo Code
https://docs.openmc.org
Other
742 stars 476 forks source link

Issue compiling with HDF5 v1.8.16 #509

Closed leehwansoo closed 8 years ago

leehwansoo commented 8 years ago

I've been working with @wbinventor to build openmc. We have run into an issue compiling the code with gfortran and the latest v1.8.16 of HDF5 (not parallel). In particular, I see the following compilation error:

[ 70%] Building Fortran object CMakeFiles/openmc.dir/src/hdf5_interface.F90.o
/home/parallels/openmc/src/hdf5_interface.F90:1892.61:

    call h5dread_f(dset, hdf5_tallyresult_t, f_ptr, hdf5_err)
                                                             1
Error: There is no specific subroutine for the generic 'h5dread_f' at (1)
/home/parallels/openmc/src/hdf5_interface.F90:1865.61:

    call h5dread_f(dset, hdf5_tallyresult_t, f_ptr, hdf5_err)
                                                             1
Error: There is no specific subroutine for the generic 'h5dread_f' at (1)
/home/parallels/openmc/src/hdf5_interface.F90:1833.62:

    call h5dwrite_f(dset, hdf5_tallyresult_t, f_ptr, hdf5_err)
                                                              1
Error: There is no specific subroutine for the generic 'h5dwrite_f' at (1)
/home/parallels/openmc/src/hdf5_interface.F90:1802.62:

    call h5dwrite_f(dset, hdf5_tallyresult_t, f_ptr, hdf5_err)
                                                              1
Error: There is no specific subroutine for the generic 'h5dwrite_f' at (1)
/home/parallels/openmc/src/hdf5_interface.F90:1748.73:

      call h5dread_f(dset, memtype, f_ptr, hdf5_err, mem_space_id=dspace)
                                                                         1
Error: There is no specific subroutine for the generic 'h5dread_f' at (1)
/home/parallels/openmc/src/hdf5_interface.F90:1664.64:

      if (n > 0) call h5dwrite_f(dset, memtype, f_ptr, hdf5_err)
                                                                1
Error: There is no specific subroutine for the generic 'h5dwrite_f' at (1)
/home/parallels/openmc/src/hdf5_interface.F90:1586.73:

      call h5dread_f(dset, memtype, f_ptr, hdf5_err, mem_space_id=dspace)
                                                                         1
Error: There is no specific subroutine for the generic 'h5dread_f' at (1)
/home/parallels/openmc/src/hdf5_interface.F90:1519.64:

      if (n > 0) call h5dwrite_f(dset, memtype, f_ptr, hdf5_err)
                                                                1
Error: There is no specific subroutine for the generic 'h5dwrite_f' at (1)
/home/parallels/openmc/src/hdf5_interface.F90:1461.60:

      call h5dread_f(dset, hdf5_integer8_t, f_ptr, hdf5_err)
                                                            1
Error: There is no specific subroutine for the generic 'h5dread_f' at (1)
/home/parallels/openmc/src/hdf5_interface.F90:1419.61:

      call h5dwrite_f(dset, hdf5_integer8_t, f_ptr, hdf5_err)
                                                             1
Error: There is no specific subroutine for the generic 'h5dwrite_f' at (1)
/home/parallels/openmc/src/hdf5_interface.F90:1374.63:

      call h5dread_f(dset, H5T_NATIVE_INTEGER, f_ptr, hdf5_err)
                                                               1
Error: There is no specific subroutine for the generic 'h5dread_f' at (1)
/home/parallels/openmc/src/hdf5_interface.F90:1315.64:

      call h5dwrite_f(dset, H5T_NATIVE_INTEGER, f_ptr, hdf5_err)
                                                                1
Error: There is no specific subroutine for the generic 'h5dwrite_f' at (1)
/home/parallels/openmc/src/hdf5_interface.F90:1254.63:

      call h5dread_f(dset, H5T_NATIVE_INTEGER, f_ptr, hdf5_err)
                                                               1
Error: There is no specific subroutine for the generic 'h5dread_f' at (1)
/home/parallels/openmc/src/hdf5_interface.F90:1195.64:

      call h5dwrite_f(dset, H5T_NATIVE_INTEGER, f_ptr, hdf5_err)
                                                                1
Error: There is no specific subroutine for the generic 'h5dwrite_f' at (1)
/home/parallels/openmc/src/hdf5_interface.F90:1134.63:

      call h5dread_f(dset, H5T_NATIVE_INTEGER, f_ptr, hdf5_err)
                                                               1
Error: There is no specific subroutine for the generic 'h5dread_f' at (1)
/home/parallels/openmc/src/hdf5_interface.F90:1075.64:

      call h5dwrite_f(dset, H5T_NATIVE_INTEGER, f_ptr, hdf5_err)
                                                                1
Error: There is no specific subroutine for the generic 'h5dwrite_f' at (1)
/home/parallels/openmc/src/hdf5_interface.F90:1014.63:

      call h5dread_f(dset, H5T_NATIVE_INTEGER, f_ptr, hdf5_err)
                                                               1
Error: There is no specific subroutine for the generic 'h5dread_f' at (1)
/home/parallels/openmc/src/hdf5_interface.F90:955.64:

      call h5dwrite_f(dset, H5T_NATIVE_INTEGER, f_ptr, hdf5_err)
                                                                1
Error: There is no specific subroutine for the generic 'h5dwrite_f' at (1)
/home/parallels/openmc/src/hdf5_interface.F90:894.63:

      call h5dread_f(dset, H5T_NATIVE_INTEGER, f_ptr, hdf5_err)
                                                               1
Error: There is no specific subroutine for the generic 'h5dread_f' at (1)
/home/parallels/openmc/src/hdf5_interface.F90:852.64:

      call h5dwrite_f(dset, H5T_NATIVE_INTEGER, f_ptr, hdf5_err)
                                                                1
Error: There is no specific subroutine for the generic 'h5dwrite_f' at (1)
/home/parallels/openmc/src/hdf5_interface.F90:807.62:

      call h5dread_f(dset, H5T_NATIVE_DOUBLE, f_ptr, hdf5_err)
                                                              1
Error: There is no specific subroutine for the generic 'h5dread_f' at (1)
/home/parallels/openmc/src/hdf5_interface.F90:748.63:

      call h5dwrite_f(dset, H5T_NATIVE_DOUBLE, f_ptr, hdf5_err)
                                                               1
Error: There is no specific subroutine for the generic 'h5dwrite_f' at (1)
/home/parallels/openmc/src/hdf5_interface.F90:687.62:

      call h5dread_f(dset, H5T_NATIVE_DOUBLE, f_ptr, hdf5_err)
                                                              1
Error: There is no specific subroutine for the generic 'h5dread_f' at (1)
/home/parallels/openmc/src/hdf5_interface.F90:628.63:

      call h5dwrite_f(dset, H5T_NATIVE_DOUBLE, f_ptr, hdf5_err)
                                                               1
Error: There is no specific subroutine for the generic 'h5dwrite_f' at (1)
/home/parallels/openmc/src/hdf5_interface.F90:567.62:

      call h5dread_f(dset, H5T_NATIVE_DOUBLE, f_ptr, hdf5_err)
                                                              1
Error: There is no specific subroutine for the generic 'h5dread_f' at (1)
Fatal Error: Error count reached limit of 25.
make[3]: *** [CMakeFiles/openmc.dir/src/hdf5_interface.F90.o] Error 1
make[2]: *** [CMakeFiles/openmc.dir/src/hdf5_interface.F90.o.provides] Error 2
make[1]: *** [CMakeFiles/openmc.dir/all] Error 2
make: *** [all] Error 2

We were able to compile with v1.8.15 just fine, so this appears to be related to the latest version of HDF5 only.

paulromano commented 8 years ago

When you're building HDF5, you need to make sure to configure with --enable-fortran2003. Otherwise, any F2003 features in the HDF5 API will be missing, including the ability to pass type(C_PTR) variables to HDF5 functions. I've just built version 1.8.16 and confirmed that OpenMC will build against it.