Hi,
I am trying to compile VASP 6.5.1 with HDF5 support (-DVASP_HDF5) using the NVIDIA HPC SDK compiler suite (nvfortran 25.3).
I have tested multiple versions of HDF5, built with --enable-fortran and --enable-parallel, using mpifort and mpicc from the NVIDIA toolchain.
With HDF5 1.14.x or 1.12.x, compilation fails in vhdf5_base.F with errors such as:
NVFORTRAN-S-0079-Keyword form of argument illegal in this context
NVFORTRAN-S-0038-Symbol, c_loc, has not been explicitly declared
I then tried older HDF5 versions:
HDF5 1.8.21 builds fine with nvfortran, but fails in VASP 6.5.1 because vhdf5_base.F still calls c_loc and expects iso_c_binding to be available from HDF5.
hdf5-1.8.21-nvhpc/include -c minimax_functions2D.f90
NVFORTRAN-S-0079-Keyword form of argument illegal in this context for use_file_locking (vhdf5_base.F: 378)
NVFORTRAN-S-0079-Keyword form of argument illegal in this context for ignore_disabled_locks (vhdf5_base.F: 378)
NVFORTRAN-S-0079-Keyword form of argument illegal in this context for hdferr (vhdf5_base.F: 378)
0 inform, 0 warnings, 3 severes, 0 fatal for vh5_file_access_swmr
NVFORTRAN-S-0079-Keyword form of argument illegal in this context for use_file_locking (vhdf5_base.F: 378)
NVFORTRAN-S-0079-Keyword form of argument illegal in this context for ignore_disabled_locks (vhdf5_base.F: 378)
NVFORTRAN-S-0079-Keyword form of argument illegal in this context for hdferr (vhdf5_base.F: 378)
0 inform, 0 warnings, 3 severes, 0 fatal for vh5_file_access_swmr
NVFORTRAN-S-0079-Keyword form of argument illegal in this context for use_file_locking (vhdf5_base.F: 378)
NVFORTRAN-S-0079-Keyword form of argument illegal in this context for ignore_disabled_locks (vhdf5_base.F: 378)
NVFORTRAN-S-0079-Keyword form of argument illegal in this context for hdferr (vhdf5_base.F: 378)
0 inform, 0 warnings, 3 severes, 0 fatal for vh5_file_access_swmr
mpif90 -mp -Mfree -Mbackslash -Mlarge_arrays -tp host -fast -I/opt/nvidia/hpc_sdk/Linux_x86_64/25.3/compilers/extras/qd/include/qd -I/usr/lib/x86_64-linux-gnu//include -I/home/zhyin/hdf5-1.8.21-nvhpc/include -c ml_ff_logfile.f90
There appears to be a mismatch: older HDF5 avoids Fortran 2003, but VASP requires it; newer HDF5 provides it, but nvfortran rejects it.