Compilation issues with Libxc and DFTD4
Posted: Sat Mar 23, 2024 5:33 pm
Dear Developers,
I am trying to compile VASP with Libxc (as I want to use meta-GGA functionals) and DFT-D4. I followed instructions from https://www.vasp.at/wiki/index.php/Makefile.include. Below is my makefile.include:
The following error occurs:
with libxc:
with dftd4:
Could you please help?
Thanks!
I am trying to compile VASP with Libxc (as I want to use meta-GGA functionals) and DFT-D4. I followed instructions from https://www.vasp.at/wiki/index.php/Makefile.include. Below is my makefile.include:
Code: Select all
# Default precompiler options
CPP_OPTIONS = -DHOST=\"LinuxIFC\" \
-DMPI -DMPI_BLOCK=8000 -Duse_collective \
-DscaLAPACK \
-DCACHE_SIZE=4000 \
-Davoidalloc \
-Dvasp6 \
-Duse_bse_te \
-Dtbdyn \
-Dfock_dblbuf
CPP = fpp -f_com=no -free -w0 $*$(FUFFIX) $*$(SUFFIX) $(CPP_OPTIONS)
FC = mpiifort
FCL = mpiifort
FREE = -free -names lowercase
FFLAGS = -assume byterecl -w
OFLAG = -O3
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 = icc
CFLAGS_LIB = -O
FFLAGS_LIB = -O1
FREE_LIB = $(FREE)
OBJECTS_LIB = linpack_double.o
# For the parser library
CXX_PARS = icpc
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=sequential
MKLROOT ?= /home/intel/oneapi/mkl/2022.0.2/
LLIBS += -L$(MKLROOT)/lib/intel64 -lmkl_scalapack_lp64 -lmkl_blacs_intelmpi_lp64
INCS =-I$(MKLROOT)/include/fftw
# HDF5-support (optional but strongly recommended)
CPP_OPTIONS+= -DVASP_HDF5
HDF5_ROOT ?= /home/soft/vasp/hdf5/hdf5-1.14.3/hdf5/
LLIBS += -L$(HDF5_ROOT)/lib/ -lhdf5_fortran
INCS += -I$(HDF5_ROOT)/include/
# For the VASP-2-Wannier90 interface (optional)
CPP_OPTIONS += -DVASP2WANNIER90
WANNIER90_ROOT ?= /home/soft/wannier/wannier90-3.1.0/
LLIBS += -L$(WANNIER90_ROOT) -lwannier
#LIBXC
CPP_OPTIONS += -DUSELIBXC
LIBXC_ROOT ?=/home/soft/vasp/libxc-6.2.2/build/
LLIBS += -L$(LIBXC_ROOT)/lib64/ -lxcf03 -lxc
INCS += -I$(LIBXC_ROOT)/include/
#Libbeef
CPP_OPTIONS += -Dlibbeef
LIBBEEF_ROOT ?=/home/soft/vasp/libbeef
LLIBS += -L$(LIBBEEF_ROOT)/lib/ -lbeef
#libMBD
CPP_OPTIONS += -DLIBMBD
LIBMBD_ROOT ?= /home/soft/vasp/libmbd
LLIBS += -L$(LIBMBD_ROOT)/build/lib64/ -lmbd
INCS += -I$(LIBMBD_ROOT)/build/include/modules/mbd/
#DFT-D4
CPP_OPTIONS += -DDFTD4
LLIBS += $(shell pkg-config --libs dftd4)
INCS += $(shell pkg-config --cflags dftd4)
with libxc:
Code: Select all
setex_struct.F(5): error #7002: Error in opening the compiled module file. Check INCLUDE paths. [XC_F03_LIB_M]
USE xc_f03_lib_m
----------^
setex_struct.F(114): error #6457: This derived type name has not been declared. [XC_F03_FUNC_T]
TYPE (xc_f03_func_t), SAVE :: LIBXC_FUNC_NSP(2),LIBXC_FUNC_SPN(2)
------------^
setex_struct.F(115): error #6457: This derived type name has not been declared. [XC_F03_FUNC_INFO_T]
TYPE (xc_f03_func_info_t), SAVE :: LIBXC_INFO_NSP(2),LIBXC_INFO_SPN(2)
------------^
compilation aborted for setex_struct.f90 (code 1)
make[2]: *** [setex_struct.o] Error 1
make[2]: Leaving directory `/home/soft/vasp/vasp.6.4.1/build/std'
cp: cannot stat ‘vasp’: No such file or directory
make[1]: *** [all] Error 1
make[1]: Leaving directory `/home/soft/vasp/vasp.6.4.1/build/std'
make: *** [std] Error 2
Code: Select all
subdftd4.F(12): error #7002: Error in opening the compiled module file. Check INCLUDE paths. [CLASS_SET]
use class_set, only: dftd_options
-------^
subdftd4.F(13): error #7002: Error in opening the compiled module file. Check INCLUDE paths. [CLASS_PARAM]
use class_param, only: dftd_parameter
-------^
subdftd4.F(33): error #6457: This derived type name has not been declared. [DFTD_OPTIONS]
type(dftd_options) options
-----------^
subdftd4.F(34): error #6406: Conflicting attributes or multiple declaration of name. [DFTD_PARAMETER]
type(dftd_parameter) parameters
-----------^
subdftd4.F(61): error #7002: Error in opening the compiled module file. Check INCLUDE paths. [CLASS_MOLECULE]
use class_molecule, only: molecule
Thanks!