Issue with VASP HDF5 Compilation
Posted: Tue Feb 13, 2024 11:10 am
Dear Development Team.
I am trying to install VASP in the HPC Kelvin-2, in the NI-HPC.
It installs properly including all the libraries except HDF5:
- BLAS
- LAPACK
- ScaLAPACK
- FFTW
- Wannier90
But if you include the HDF5 library, it gives an error. I attach the error and the makefile.include file.
The operative system is a Centos 7, and we compile it with GNU-GCC 9.3.0 and OpenMPI 4.0.4. The hdf5 library we intend to include is version 1.12.2.
hdf5 should take the glibc library on the file of the compiler loaded with a module
${GCC_ROOT}/lib64/libstdc++.so
But it is taking the system library
/usr/lib64/libstdc++.so.6
So it is not reading properly the library path.
Thanks for your help.
Luis.
----- makefile.include ----------------
# Default precompiler options
CPP_OPTIONS = -DHOST=\'LinuxGNU\' \
-DMPI -DMPI_BLOCK=8000 -Duse_collective \
-DscaLAPACK \
-DCACHE_SIZE=4000 \
-Davoidalloc \
-Dvasp6 \
-Duse_bse_te \
-Dtbdyn \
-Dfock_dblbuf \
-D_OPENMP \
-DLAPACK36
CPP = /opt/gridware/depots/54e7fb3c/el7/pkg/compilers/gcc/9.3.0/bin/gcc -E -C -w $*$(FUFFIX) $*$(SUFFIX) $(CPP_OPTIONS)
FC = /opt/gridware/depots/54e7fb3c/el7/pkg/mpi/openmpi/4.0.4/gcc-9.3.0+ucx-1.8.0/bin/mpif90 -fopenmp
FCL = /opt/gridware/depots/54e7fb3c/el7/pkg/mpi/openmpi/4.0.4/gcc-9.3.0+ucx-1.8.0/bin/mpif90 -fopenmp
FREE = -ffree-form -ffree-line-length-none
FFLAGS = -w -ffpe-summary=none
OFLAG = -O2
OFLAG_IN = $(OFLAG)
DEBUG = -O0
OBJECTS = fftmpiw.o fftmpi_map.o fftw3d.o fft3dlib.o
OBJECTS_O1 += fftw3d.o fftmpi.o fftmpiw.o
OBJECTS_O2 += fft3dlib.o
# For what used to be vasp.5.lib
CPP_LIB = $(CPP)
FC_LIB = $(FC)
CC_LIB = gcc
CFLAGS_LIB = -O
FFLAGS_LIB = -O1
FREE_LIB = $(FREE)
OBJECTS_LIB = linpack_double.o
# For the parser library
CXX_PARS = g++
#LLIBS = -lstdc++
GCC_ROOT = /opt/gridware/depots/54e7fb3c/el7/pkg/compilers/gcc/9.3.0
LLIBS = ${GCC_ROOT}/lib64/libstdc++.so ${GCC_ROOT}/lib64/libgcc_s.so ${GCC_ROOT}/lib64/libgfortran.so
##
## Customize as of this point! Of course you may change the preceding
## part of this file as well if you like, but it should rarely be
## necessary ...
##
# When compiling on the target machine itself, change this to the
# relevant target when cross-compiling for another architecture
VASP_TARGET_CPU ?= -march=native
FFLAGS += $(VASP_TARGET_CPU)
# For gcc-10 and higher (comment out for older versions)
#FFLAGS += -fallow-argument-mismatch
FFLAGS += -Wno-argument-mismatch
# BLAS (mandatory)
#AMDBLIS_ROOT ?= /path/to/your/amdblis/installation
#BLAS = -L${AMDBLIS_ROOT}/lib -lblis-mt
BLAS_ROOT ?= /opt/gridware/depots/54e7fb3c/el7/pkg/libs/blas/3.8.0/gcc-9.3.0
BLAS = ${BLAS_ROOT}/libblas.a
# LAPACK (mandatory)
#AMDLIBFLAME_ROOT ?= /path/to/your/amdlibflame/installation
#LAPACK = -L${AMDLIBFLAME_ROOT}/lib -lflame
LAPACK_ROOT ?= /opt/gridware/depots/54e7fb3c/el7/pkg/libs/lapack/3.9.0/gcc-9.3.0
LAPACK = ${LAPACK_ROOT}/lib64/liblapack.a
# scaLAPACK (mandatory)
#AMDSCALAPACK_ROOT ?= /path/to/your/amdscalapack/installation
#SCALAPACK = -L${AMDSCALAPACK_ROOT}/lib -lscalapack
SCALAPACK_ROOT ?= /opt/gridware/depots/54e7fb3c/el7/pkg/libs/scalapack_atlasshared/2.2.0/gcc-9.3.0+openmpi-4.0.4+atlas-3.10.3
SCALAPACK = ${SCALAPACK_ROOT}/lib/libscalapack.so
ATLAS_ROOT = /opt/gridware/depots/54e7fb3c/el7/pkg/libs/atlas/3.10.3/gcc-9.3.0+shared
ATLAS = ${ATLAS_ROOT}/lib/libatlas.a ${ATLAS_ROOT}/lib/libsatlas.so
LLIBS += ${ATLAS} $(SCALAPACK) $(LAPACK) $(BLAS)
# FFTW (mandatory)
#AMDFFTW_ROOT ?= /path/to/your/amdfftw/installation
#LLIBS += -L$(AMDFFTW_ROOT)/lib -lfftw3 -lfftw3_omp
#INCS += -I$(AMDFFTW_ROOT)/include
FFTW_ROOT ?= /opt/gridware/depots/54e7fb3c/el7/pkg/libs/fftw3_double/3.3.10/gcc-9.3.0+openmpi-4.0.4
FFTWF_ROOT ?= /opt/gridware/depots/54e7fb3c/el7/pkg/libs/fftw3_float/3.3.10/gcc-9.3.0+openmpi-4.0.4
LLIBS += $(FFTW_ROOT)/lib/libfftw3.a $(FFTW_ROOT)/lib/libfftw3_mpi.a $(FFTW_ROOT)/lib/libfftw3_omp.a $(FFTWF_ROOT)/lib/libfftw3f.a $(FFTWF_ROOT)/lib/libfftw3f_mpi.a $(FFTWF_ROOT)/lib/libfftw3f_omp.a
INCS += -I$(FFTW_ROOT)/include -I$(FFTWF_ROOT)/include
# HDF5-support (optional but strongly recommended)
#CPP_OPTIONS+= -DVASP_HDF5
#HDF5_ROOT ?= /path/to/your/hdf5/installation
#LLIBS += -L$(HDF5_ROOT)/lib -lhdf5_fortran
#INCS += -I$(HDF5_ROOT)/include
CPP_OPTIONS+= -DVASP_HDF5
HDF5_ROOT ?= /opt/gridware/depots/54e7fb3c/el7/pkg/apps/hdf5_mpi/1.12.2/gcc-9.3.0+openmpi-4.0.4
#HDF5_ROOT ?= /opt/gridware/depots/54e7fb3c/el7/pkg/apps/hdf5_serial/1.12.2/gcc-9.3.0
LLIBS += ${HDF5_ROOT}/lib/libhdf5_fortran.a ${HDF5_ROOT}/lib/libhdf5.a
INCS += -I${HDF5_ROOT}/include
# For the VASP-2-Wannier90 interface (optional)
CPP_OPTIONS += -DVASP2WANNIER90
WANNIER90_ROOT ?= /opt/apps/wannier90/3.1.0/gcc-9.3.0+openmpi-4.0.4+blas-3.8.0+lapack-3.9.0
#LLIBS += -L$(WANNIER90_ROOT)/lib -lwannier
LLIBS += ${WANNIER90_ROOT}/lib/libwannier.a
# For the fftlib library (recommended)
#CPP_OPTIONS+= -Dsysv
#FCL += fftlib.o
#CXX_FFTLIB = g++ -fopenmp -std=c++11 -DFFTLIB_THREADSAFE
#INCS_FFTLIB = -I./include -I$(AMDFFTW_ROOT)/include
#LIBS += fftlib
#LLIBS += -ldl
SRCDIR = /mnt/scratch2/users/3052157/vasp/VASP_K2/NEW/vasp.6.4.2/src
BINDIR = /opt/apps/vasp/6.4.2/gcc-9.3.0+openmpi-4.0.4+blas-3.8.0+lapack-3.9.0+scalapack-2.2.0+fftw3-3.3.10+hdf5_mpi-1.12.2+wannier90-3.1.0/bin
-------------------------------------------------------------------------
----- error of compilation ---------
/usr/bin/ld: /opt/gridware/depots/54e7fb3c/el7/pkg/apps/hdf5_mpi/1.12.2/gcc-9.3.0+openmpi-4.0.4/lib/libhdf5.a(H5PLint.o): undefined reference to symbol 'dlclose@@GLIBC_2.2.5'
/usr/lib64/libdl.so.2: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [vasp] Error 1
make[2]: Leaving directory `/mnt/scratch2/users/3052157/vasp/VASP_K2/NEW/vasp.6.4.2/build/std'
cp: cannot stat 'vasp': No such file or directory
make[1]: *** [all] Error 1
make[1]: Leaving directory `/mnt/scratch2/users/3052157/vasp/VASP_K2/NEW/vasp.6.4.2/build/std'
make: *** [std] Error 2
----------------------------------------------
I am trying to install VASP in the HPC Kelvin-2, in the NI-HPC.
It installs properly including all the libraries except HDF5:
- BLAS
- LAPACK
- ScaLAPACK
- FFTW
- Wannier90
But if you include the HDF5 library, it gives an error. I attach the error and the makefile.include file.
The operative system is a Centos 7, and we compile it with GNU-GCC 9.3.0 and OpenMPI 4.0.4. The hdf5 library we intend to include is version 1.12.2.
hdf5 should take the glibc library on the file of the compiler loaded with a module
${GCC_ROOT}/lib64/libstdc++.so
But it is taking the system library
/usr/lib64/libstdc++.so.6
So it is not reading properly the library path.
Thanks for your help.
Luis.
----- makefile.include ----------------
# Default precompiler options
CPP_OPTIONS = -DHOST=\'LinuxGNU\' \
-DMPI -DMPI_BLOCK=8000 -Duse_collective \
-DscaLAPACK \
-DCACHE_SIZE=4000 \
-Davoidalloc \
-Dvasp6 \
-Duse_bse_te \
-Dtbdyn \
-Dfock_dblbuf \
-D_OPENMP \
-DLAPACK36
CPP = /opt/gridware/depots/54e7fb3c/el7/pkg/compilers/gcc/9.3.0/bin/gcc -E -C -w $*$(FUFFIX) $*$(SUFFIX) $(CPP_OPTIONS)
FC = /opt/gridware/depots/54e7fb3c/el7/pkg/mpi/openmpi/4.0.4/gcc-9.3.0+ucx-1.8.0/bin/mpif90 -fopenmp
FCL = /opt/gridware/depots/54e7fb3c/el7/pkg/mpi/openmpi/4.0.4/gcc-9.3.0+ucx-1.8.0/bin/mpif90 -fopenmp
FREE = -ffree-form -ffree-line-length-none
FFLAGS = -w -ffpe-summary=none
OFLAG = -O2
OFLAG_IN = $(OFLAG)
DEBUG = -O0
OBJECTS = fftmpiw.o fftmpi_map.o fftw3d.o fft3dlib.o
OBJECTS_O1 += fftw3d.o fftmpi.o fftmpiw.o
OBJECTS_O2 += fft3dlib.o
# For what used to be vasp.5.lib
CPP_LIB = $(CPP)
FC_LIB = $(FC)
CC_LIB = gcc
CFLAGS_LIB = -O
FFLAGS_LIB = -O1
FREE_LIB = $(FREE)
OBJECTS_LIB = linpack_double.o
# For the parser library
CXX_PARS = g++
#LLIBS = -lstdc++
GCC_ROOT = /opt/gridware/depots/54e7fb3c/el7/pkg/compilers/gcc/9.3.0
LLIBS = ${GCC_ROOT}/lib64/libstdc++.so ${GCC_ROOT}/lib64/libgcc_s.so ${GCC_ROOT}/lib64/libgfortran.so
##
## Customize as of this point! Of course you may change the preceding
## part of this file as well if you like, but it should rarely be
## necessary ...
##
# When compiling on the target machine itself, change this to the
# relevant target when cross-compiling for another architecture
VASP_TARGET_CPU ?= -march=native
FFLAGS += $(VASP_TARGET_CPU)
# For gcc-10 and higher (comment out for older versions)
#FFLAGS += -fallow-argument-mismatch
FFLAGS += -Wno-argument-mismatch
# BLAS (mandatory)
#AMDBLIS_ROOT ?= /path/to/your/amdblis/installation
#BLAS = -L${AMDBLIS_ROOT}/lib -lblis-mt
BLAS_ROOT ?= /opt/gridware/depots/54e7fb3c/el7/pkg/libs/blas/3.8.0/gcc-9.3.0
BLAS = ${BLAS_ROOT}/libblas.a
# LAPACK (mandatory)
#AMDLIBFLAME_ROOT ?= /path/to/your/amdlibflame/installation
#LAPACK = -L${AMDLIBFLAME_ROOT}/lib -lflame
LAPACK_ROOT ?= /opt/gridware/depots/54e7fb3c/el7/pkg/libs/lapack/3.9.0/gcc-9.3.0
LAPACK = ${LAPACK_ROOT}/lib64/liblapack.a
# scaLAPACK (mandatory)
#AMDSCALAPACK_ROOT ?= /path/to/your/amdscalapack/installation
#SCALAPACK = -L${AMDSCALAPACK_ROOT}/lib -lscalapack
SCALAPACK_ROOT ?= /opt/gridware/depots/54e7fb3c/el7/pkg/libs/scalapack_atlasshared/2.2.0/gcc-9.3.0+openmpi-4.0.4+atlas-3.10.3
SCALAPACK = ${SCALAPACK_ROOT}/lib/libscalapack.so
ATLAS_ROOT = /opt/gridware/depots/54e7fb3c/el7/pkg/libs/atlas/3.10.3/gcc-9.3.0+shared
ATLAS = ${ATLAS_ROOT}/lib/libatlas.a ${ATLAS_ROOT}/lib/libsatlas.so
LLIBS += ${ATLAS} $(SCALAPACK) $(LAPACK) $(BLAS)
# FFTW (mandatory)
#AMDFFTW_ROOT ?= /path/to/your/amdfftw/installation
#LLIBS += -L$(AMDFFTW_ROOT)/lib -lfftw3 -lfftw3_omp
#INCS += -I$(AMDFFTW_ROOT)/include
FFTW_ROOT ?= /opt/gridware/depots/54e7fb3c/el7/pkg/libs/fftw3_double/3.3.10/gcc-9.3.0+openmpi-4.0.4
FFTWF_ROOT ?= /opt/gridware/depots/54e7fb3c/el7/pkg/libs/fftw3_float/3.3.10/gcc-9.3.0+openmpi-4.0.4
LLIBS += $(FFTW_ROOT)/lib/libfftw3.a $(FFTW_ROOT)/lib/libfftw3_mpi.a $(FFTW_ROOT)/lib/libfftw3_omp.a $(FFTWF_ROOT)/lib/libfftw3f.a $(FFTWF_ROOT)/lib/libfftw3f_mpi.a $(FFTWF_ROOT)/lib/libfftw3f_omp.a
INCS += -I$(FFTW_ROOT)/include -I$(FFTWF_ROOT)/include
# HDF5-support (optional but strongly recommended)
#CPP_OPTIONS+= -DVASP_HDF5
#HDF5_ROOT ?= /path/to/your/hdf5/installation
#LLIBS += -L$(HDF5_ROOT)/lib -lhdf5_fortran
#INCS += -I$(HDF5_ROOT)/include
CPP_OPTIONS+= -DVASP_HDF5
HDF5_ROOT ?= /opt/gridware/depots/54e7fb3c/el7/pkg/apps/hdf5_mpi/1.12.2/gcc-9.3.0+openmpi-4.0.4
#HDF5_ROOT ?= /opt/gridware/depots/54e7fb3c/el7/pkg/apps/hdf5_serial/1.12.2/gcc-9.3.0
LLIBS += ${HDF5_ROOT}/lib/libhdf5_fortran.a ${HDF5_ROOT}/lib/libhdf5.a
INCS += -I${HDF5_ROOT}/include
# For the VASP-2-Wannier90 interface (optional)
CPP_OPTIONS += -DVASP2WANNIER90
WANNIER90_ROOT ?= /opt/apps/wannier90/3.1.0/gcc-9.3.0+openmpi-4.0.4+blas-3.8.0+lapack-3.9.0
#LLIBS += -L$(WANNIER90_ROOT)/lib -lwannier
LLIBS += ${WANNIER90_ROOT}/lib/libwannier.a
# For the fftlib library (recommended)
#CPP_OPTIONS+= -Dsysv
#FCL += fftlib.o
#CXX_FFTLIB = g++ -fopenmp -std=c++11 -DFFTLIB_THREADSAFE
#INCS_FFTLIB = -I./include -I$(AMDFFTW_ROOT)/include
#LIBS += fftlib
#LLIBS += -ldl
SRCDIR = /mnt/scratch2/users/3052157/vasp/VASP_K2/NEW/vasp.6.4.2/src
BINDIR = /opt/apps/vasp/6.4.2/gcc-9.3.0+openmpi-4.0.4+blas-3.8.0+lapack-3.9.0+scalapack-2.2.0+fftw3-3.3.10+hdf5_mpi-1.12.2+wannier90-3.1.0/bin
-------------------------------------------------------------------------
----- error of compilation ---------
/usr/bin/ld: /opt/gridware/depots/54e7fb3c/el7/pkg/apps/hdf5_mpi/1.12.2/gcc-9.3.0+openmpi-4.0.4/lib/libhdf5.a(H5PLint.o): undefined reference to symbol 'dlclose@@GLIBC_2.2.5'
/usr/lib64/libdl.so.2: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [vasp] Error 1
make[2]: Leaving directory `/mnt/scratch2/users/3052157/vasp/VASP_K2/NEW/vasp.6.4.2/build/std'
cp: cannot stat 'vasp': No such file or directory
make[1]: *** [all] Error 1
make[1]: Leaving directory `/mnt/scratch2/users/3052157/vasp/VASP_K2/NEW/vasp.6.4.2/build/std'
make: *** [std] Error 2
----------------------------------------------