I am trying to compile VASP 6.6.0 with simple-dftd4 4.0.2, mctc 0.5.1, and simple-dftd3 1.2.1. As stated in the instructions, I built mctc first and then built simple-dftd3 and simple-dftd4. They reported finding mctc during compilation. I then went to compile VASP 6.6.0 but am having compilation issues like the following. Note this only happens when I try to compile VASP with all 3 modules. If I exclude simple-dftd3, it works fine. It also works fine if I exclude simple-dftd4.
Code: Select all
ld: /home/ROSENGROUP/software/dftd4/4.0.2/lib64/libdftd4.a(ncoord.f90.o): in function `dftd4_ncoord_mp_get_coordination_number_':
/home/ROSENGROUP/software/dftd4/4.0.2/src/dftd4/ncoord.f90:66: undefined reference to `mctc_ncoord_mp_new_ncoord_'
ld: /home/ROSENGROUP/software/dftd4/4.0.2/lib64/libdftd4.a(ncoord.f90.o): in function `dftd4_ncoord_mp_add_coordination_number_derivs_':
/home/ROSENGROUP/software/dftd4/4.0.2/src/dftd4/ncoord.f90:108: undefined reference to `mctc_ncoord_mp_new_ncoord_'
ld: /home/ROSENGROUP/software/dftd4/4.0.2/lib64/libmulticharge.a(charge.f90.o): in function `multicharge_charge_mp_get_charges_':
/home/ROSENGROUP/software/dftd4/4.0.2/subprojects/multicharge/src/multicharge/charge.f90:70: undefined reference to `mctc_cutoff_mp_get_lattice_points_cutoff_'
ld: /home/ROSENGROUP/software/dftd4/4.0.2/lib64/libmulticharge.a(param.f90.o): in function `multicharge_param_mp_new_eeq2019_model_':
/home/ROSENGROUP/software/dftd4/4.0.2/subprojects/multicharge/src/multicharge/param.f90:65: undefined reference to `mctc_data_covrad_mp_get_covalent_rad_num_'
ld: /home/ROSENGROUP/software/dftd4/4.0.2/lib64/libmulticharge.a(param.f90.o): in function `multicharge_param_mp_new_eeqbc2025_model_':My makefile.include is below:
# Default precompiler options
CPP_OPTIONS = -DHOST=\"LinuxIFC\" \
-DMPI -DMPI_BLOCK=8000 -Duse_collective \
-DscaLAPACK \
-DCACHE_SIZE=4000 \
-Davoidalloc \
-Dvasp6 \
-Dtbdyn \
-Dfock_dblbuf \
-D_OPENMP \
-DSDFTD3
CPP = fpp -f_com=no -free -w0 $*$(FUFFIX) $*$(SUFFIX) $(CPP_OPTIONS)
FC = mpiifort -fc=ifx -qopenmp
FCL = mpiifort -fc=ifx
FREE = -free -names lowercase
FFLAGS = -assume byterecl -w
OFLAG = -O2
OFLAG_IN = $(OFLAG)
DEBUG = -O0
# For what used to be vasp.5.lib
CPP_LIB = $(CPP)
FC_LIB = $(FC)
CC_LIB = icx
CFLAGS_LIB = -O
FFLAGS_LIB = -O1
FREE_LIB = $(FREE)
OBJECTS_LIB = linpack_double.o
# For the parser library
CXX_PARS = icpx
LLIBS = -lstdc++
##
## 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 ?= -xHOST
FFLAGS += $(VASP_TARGET_CPU)
# Intel MKL (FFTW, BLAS, LAPACK, and scaLAPACK)
# (Note: for Intel Parallel Studio's MKL use -mkl instead of -qmkl)
FCL += -qmkl
MKLROOT ?= /opt/intel/oneapi/mkl/2024.2
LLIBS += -L$(MKLROOT)/lib/intel64 -lmkl_scalapack_lp64 -lmkl_blacs_intelmpi_lp64
INCS =-I$(MKLROOT)/include/fftw
# HDF5-support (optional but strongly recommended, and mandatory for some features)
CPP_OPTIONS+= -DVASP_HDF5
HDF5_ROOT ?= /usr/local/hdf5/oneapi-2024.2/intel-mpi/1.14.4
LLIBS += -L$(HDF5_ROOT)/lib -lhdf5_fortran
INCS += -I$(HDF5_ROOT)/include
# For the VASP-2-Wannier90 interface (optional)
#CPP_OPTIONS += -DVASP2WANNIER90
#WANNIER90_ROOT ?= /path/to/your/wannier90/installation
#LLIBS += -L$(WANNIER90_ROOT)/lib -lwannier
# For the fftlib library (hardly any benefit in combination with MKL's FFTs)
#FCL = mpiifort fftlib.o -qmkl
#CXX_FFTLIB = icpc -qopenmp -std=c++11 -DFFTLIB_USE_MKL -DFFTLIB_THREADSAFE
#INCS_FFTLIB = -I./include -I$(MKLROOT)/include/fftw
#LIBS += fftlib
# For machine learning library VASPml (experimental)
#CPP_OPTIONS += -Dlibvaspml
#CXX_ML = mpic++ -qopenmp
#CXXFLAGS_ML = -O3 -std=c++17 -Wall
#INCLUDE_ML =
# DFTD4
CPP_OPTIONS += -DDFTD4
DFTD4_ROOT ?= /home/ROSENGROUP/software/dftd4/4.0.2
LLIBS += -L$(DFTD4_ROOT)/lib64 -ldftd4 -lmulticharge
INCS += -I$(DFTD4_ROOT)/include
INCS += -I$(DFTD4_ROOT)/_build/include
# simple-DFT-D3
CPP_OPTIONS += -DSDFTD3
SDFTD3_ROOT ?= /home/ROSENGROUP/software/dftd3/1.2.1
LLIBS += -L$(SDFTD3_ROOT)/lib64 -ls-dftd3
INCS += -I$(SDFTD3_ROOT)/include
INCS += -I$(SDFTD3_ROOT)/_build/include
# mctc-lib
MCTC_ROOT ?= /home/ROSENGROUP/software/mctc/0.5.1
LLIBS += -L$(MCTC_ROOT)/lib64 -lmctc-lib
INCS += -I$(MCTC_ROOT)/include
INCS += -I$(MCTC_ROOT)/_build/include

