Corrupt or Old Module file /opt/hdf5_gpu/include/hdf5.mod

Questions regarding the compilation of VASP on various platforms: hardware, compilers and libraries, etc.


Moderators: Global Moderator, Moderator

Post Reply
Message
Author
User avatar
paulfons
Jr. Member
Jr. Member
Posts: 85
Joined: Sun Nov 04, 2012 2:40 am
License Nr.: 5-1405
Location: Yokohama, Japan
Contact:

Corrupt or Old Module file /opt/hdf5_gpu/include/hdf5.mod

#1 Post by paulfons » Fri Feb 16, 2024 8:27 am

I have a Nvidia ampere card and while I have successfully compiled and have been using the gpu (ACC) version of Vasp 6.4.2 for a while, I am having trouble adding HDF5 support. I am using nvfortran 23.9-0

Code: Select all

nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2023 NVIDIA Corporation
Built on Tue_Jun_13_19:16:58_PDT_2023
Cuda compilation tools, release 12.2, V12.2.91
Build cuda_12.2.r12.2/compiler.32965470_0
I have built the latest (as of this writing) version of hdf 1.14.3 using the flags

Code: Select all

./configure --prefix=/opt/hdf5_gpu  --enable-fortran 
I should note here that I have also built the same version of hdf5 with Intel oneapi for the cpus in my cluster that runs without problem.

The reason I am compiling a different copy of hdf with the cuda tools is that when I attempted to recompile the gpu version of Vasp with the oneapi version, there was an error in compilation due to a mod file. As mod files tend to be compiler specific, I then recompiled HDF5 with the cuda tools and installed it in /opt/hdf5_gpu. This occurred without problem. I then compiled the gpu version of Vasp 6.4.2. I have included the makefiles used for the compilation in the attachments, but in short, I simply changed the path to the gpu cuda compiled version installation location (/opt/hdf5_gpu). The compilation of vasp fails, however, wit the error

Code: Select all

mpif90 -acc -gpu=cc60,cc70,cc80,cuda12.2 -Mfree -Mbackslash -Mlarge_arrays -tp host -fast -I/opt/nvidia/hpc_sdk/Linux_x86_64/23.9/compilers/extras/qd/include/qd -I/opt/fftw3/include -I/opt/hdf5_gpu/include  -c vhdf5_base.f90
NVFORTRAN-F-0004-Corrupt or Old Module file /opt/hdf5_gpu/include/hdf5.mod (vhdf5_base.F: 9)
NVFORTRAN/x86-64 Linux 23.9-0: compilation aborted
make[2]: *** [makefile:167: vhdf5_base.o] Error 2
make[2]: Leaving directory '/data/Software/Vasp/vasp.6.4.2_gpu/build/std'
cp: cannot stat 'vasp': No such file or directory
make[1]: *** [makefile:129: all] Error 1
make[1]: Leaving directory '/data/Software/Vasp/vasp.6.4.2_gpu/build/std'
make: *** [makefile:17: std] Error 2
I am confused why nvfortran thinks the hdf5.mod file is corrupt when it was compiled using the same compiler tools a few moments earlier. Do you have any suggestions as to how to address this?
You do not have the required permissions to view the files attached to this post.

ferenc_karsai
Global Moderator
Global Moderator
Posts: 460
Joined: Mon Nov 04, 2019 12:44 pm

Re: Corrupt or Old Module file /opt/hdf5_gpu/include/hdf5.mod

#2 Post by ferenc_karsai » Fri Feb 16, 2024 9:47 am

Most likely the problem is that "./configure" step chooses the wrong compiler.

You have to give the right compiler names, but they are environment dependent. Please try:

Code: Select all

 ./configure CC="my_compiler" FC="mpi_fortran_compiler"
Here my_compiler is the C compiler and FC is the fortran compiler.
To check which compiler you are using please type:

Code: Select all

mpi_fortran_compiler -v
The "mpi_fortran_compiler" is usually "mpif90" and the "my_compiler" is "mpi_cc".

Post Reply