Closed jwguo59 closed 3 months ago
Hi,
It is because you are not fully editing your makefile to give the path for includes/libraries of the external libraries needed by SCPC (dl_mg and pspfft). Please check
https://github.com/aradi/SCPC-Method/blob/main/VASP/INSTALLATION.md
(1) First of all you need to install the 2 external libraries needed by SCPC (dl_mg and pspfft) using the same compilers that you are using for compiling VASP - in your case 'intel compiler'. After a clean installation you need to have something
-- for DL_MG
/somewhere/dl_mg/include
/somewhere/dl_mg/lib
-- for PSPFFT
/somewhere/pspfft/include
/somewhere/pspfft/lib
(2) After, you need to follow the compilation hints to edit your makefile properly to include those external libraries path to the compilation procedure
(b) edition of makefiles (probably added after the MKL/FFTW part of Makefile.include)
-- check the makefile.include to add the right path
for the external libraries for the Poisson and Isolate potential
solver. The user should install the external solver libraries previously.
-- edit the variables at makefile.include to point your own
installation
#SCPC METHOD
LIBEXT = /somewhere
DLMGROOT = $(LIBEXT)/dl_mg_2.0.2
PSPFFTROOT = $(LIBEXT)/pspfft-1.0
INCS +=-I$(DLMGROOT)/lib
INCS +=-I$(PSPFFTROOT)/include
LLIBS +=-Wl,--start-group $(DLMGROOT)/lib/libdlmg.a -Wl,--end-group
LLIBS +=-Wl,--start-group $(PSPFFTROOT)/lib/libpspfft.a -Wl,--end-group
#SCPC METHOD
Hi,
It is because you are not fully editing your makefile to give the path for includes/libraries of the external libraries needed by SCPC (dl_mg and pspfft). Please check
https://github.com/aradi/SCPC-Method/blob/main/VASP/INSTALLATION.md
(1) First of all you need to install the 2 external libraries needed by SCPC (dl_mg and pspfft) using the same compilers that you are using for compiling VASP - in your case 'intel compiler'. After a clean installation you need to have something
-- for DL_MG /somewhere/dl_mg/include /somewhere/dl_mg/lib -- for PSPFFT /somewhere/pspfft/include /somewhere/pspfft/lib
(2) After, you need to follow the compilation hints to edit your makefile properly to include those external libraries path to the compilation procedure
(b) edition of makefiles (probably added after the MKL/FFTW part of Makefile.include)
-- check the makefile.include to add the right path for the external libraries for the Poisson and Isolate potential solver. The user should install the external solver libraries previously. -- edit the variables at makefile.include to point your own installation #SCPC METHOD LIBEXT = /somewhere DLMGROOT = $(LIBEXT)/dl_mg_2.0.2 PSPFFTROOT = $(LIBEXT)/pspfft-1.0 INCS +=-I$(DLMGROOT)/lib INCS +=-I$(PSPFFTROOT)/include LLIBS +=-Wl,--start-group $(DLMGROOT)/lib/libdlmg.a -Wl,--end-group LLIBS +=-Wl,--start-group $(PSPFFTROOT)/lib/libpspfft.a -Wl,--end-group #SCPC METHOD
I greatly appreciate your response to my question. When I compiled and installed DL_MG and PSP’s FFT, I did not find the folders you mentioned after the compilation was completed, including:
For DL_MG: /somewhere/dl_mg/include /somewhere/dl_mg/lib For PSPFFT: /somewhere/pspfft/include /somewhere/pspfft/lib Could you help me resolve these issues or provide more detailed installation steps for these library files? If possible, I would be very grateful. Below are the Makefile for DL_MG and Makefile.Config for PSPFFT that I used for installation: Makefile for DL_MG: THIS_MAKEFILE := $(lastword $(MAKEFILE_LIST))
MG_ROOTDIR = $(CURDIR)
ifndef EXE EXE := dl_mg_test.exe endif
OBJDIR ?= $(MG_ROOTDIR)/o LIBDIR ?= $(MG_ROOTDIR)/lib
vpath %.F90 src:utils vpath %.inc src:utils vpath %.h src
ifdef PLATFORM ifeq (,$(wildcard $(MG_ROOTDIR)/platforms/$(PLATFORM).inc)) $(error platforms/$(PLATFORM).inc does not exist !!!) endif include $(MG_ROOTDIR)/platforms/$(PLATFORM).inc endif
line_aux := $(shell $(FC) --version | sed '/^$$/d' | head -1)
COMPILER_NAME := $(shell echo "$(line_aux)" | cut -f1 -d' ')
COMPILER_VERSION := $(shell echo "$(line_aux)" | sed 's/^[^0-9]//' | sed 's/ .$$//') $(info compiler $(COMPILER_NAME) $(COMPILER_VERSION))
ifeq ($(COMPILER_NAME),ifx) FFLAGS_LOW_OPT := $(patsubst -O%,-O1,$(FFLAGS)) else ifeq ($(COMPILER_NAME),IFX) FFLAGS_LOW_OPT := $(patsubst -O%,-O1,$(FFLAGS)) else FFLAGS_LOW_OPT := endif
$(info low_opt $(FFLAGS_LOW_OPT))
CP_MOD ?=
MG_SOLVER_F90 := dl_mg_params.F90 dl_mg_types.F90 dl_mg_common_data.F90 dl_mg_mpi_header.F90 dl_mg_timer.F90 dl_mg_grids.F90 dl_mg_mpi_utils.F90 dl_mg_mpi_halo_ex.F90 dl_mg_info.F90 dl_mg_stencil_coefficients.F90 dl_mg_kernels.F90 dl_mg_multigrid_method.F90 dl_mg.F90 dl_mg_nonlinear_model.F90 dl_mg_errors.F90 dl_mg_defco_mod.F90 dl_mg_defco_fd_mod.F90 dl_mg_defco_utils_mod.F90 dl_mg_convergence_params.F90 dl_mg_utils.F90 dl_mg_neutralisation_with_ions.F90 dl_mg_newton_method.F90 dl_mg_second_order_solvers.F90 dl_mg_conjugate_gradient_method.F90 dl_mg_alloc.F90 dl_mg_omp.F90 MG_SOLVER_INC := dl_mg_common_params.inc
TEST_F90 := mg_utils.F90 mg_tests.F90 main_mg.F90
MG_SOLVER_OBJ := $(addprefix $(OBJDIR)/, $(MG_SOLVER_F90:.F90=.o)) TEST_OBJ := $(addprefix $(OBJDIR)/, $(TEST_F90:.F90=.o))
MG_SOLVER_INC := $(addprefix $(OBJDIR)/, $(MG_SOLVER_INC))
default : $(LIBDIR)/libdlmg.a
$(LIBDIR)/libdlmg.a : checkplatform $(MG_SOLVER_OBJ) $(MG_SOLVER_INC) | $(LIBDIR) $(PLATFORM_ERR) ar -cr $(LIBDIR)/libdlmg.a $(MG_SOLVER_OBJ) && \ if [ -f $(OBJDIR)/dl_mg.mod ] ; then mv $(OBJDIR)/dl_mg.mod $(LIBDIR) ; fi
test : checkplatform $(TEST_OBJ) $(MG_SOLVER_OBJ) $(MG_SOLVER_INC) $(LOAD_MODULES) $(FC) -o $(EXE) $(INCPATHS) $(FFLAGS) $(TEST_OBJ) $(MG_SOLVER_OBJ)
testlib : checkplatform $(LIBDIR)/libdlmg.a $(TEST_OBJ) $(LOAD_MODULES) $(FC) -o $(EXE) $(INCPATHS) $(FFLAGS) $(TEST_OBJ) -I$(LIBDIR) $(LIBDIR)/libdlmg.a
test_onetep_ls : checkplatform $(OBJDIR)/test_onetep_ls.o $(MG_SOLVER_OBJ) $(MG_SOLVER_INC) $(LOAD_MODULES) $(FC) -o $@.exe $(INCPATHS) $(FFLAGS) $(OBJDIR)/test_onetep_ls.o $(MG_SOLVER_OBJ)
test_onetep_num : checkplatform $(OBJDIR)/test_onetep_num.o $(MG_SOLVER_OBJ) $(MG_SOLVER_INC) $(LOAD_MODULES) $(FC) -o $@.exe $(INCPATHS) $(FFLAGS) $(OBJDIR)/test_onetep_num.o $(MG_SOLVER_OBJ)
obj_for_onetep : checkplatform $(MG_SOLVER_OBJ) $(MG_SOLVER_INC)
.PHONY : clean vclean clean_onetep obj_for_onetep doc docdev checkplatform release doc docdev
DOCTYPE := _user VERSION_OPT := -no-hash docdev : DOCTYPE = _developer docdev : VERSION_OPT=-with-date docdev : doc doc : VERSION_OPT=-with-date doc: $$(sh utils/get_version_string.sh $(VERSION_OPT) > VERSION) doxygen $(MG_ROOTDIR)/docs/doxygen_doc/Doxyfile$(DOCTYPE)
release: doc if [ $$(git rev-parse --abbrev-ref HEAD) != master ] ; then \ echo "release task should be used only on master branch. Quitting ..."; exit 3 ;\ else cd docs/doxygen_doc/latex && $(MAKE) clean && $(MAKE) && \ mv refman.pdf $(MG_ROOTDIR)/docs/dl_mg.pdf && cd $(MG_ROOTDIR) && \ vs=$$(sh utils/get_version_string.sh) && \ git archive -o dlmg$${vs}.tar --prefix=dlmg$${vs}/ HEAD && \ tar --xform='s,^,dlmg'$${vs}'/,' -r -f dlmg$${vs}.tar docs/dl_mg.pdf ; \ fi
export FC FFLAGS MG_ROOTDIR LIBDIR cntion_test: checkplatform $(OBJDIR)/dl_mg_utils.o cd utils/pbc-counterions-tests && $(MAKE)
export MG_SOLVER_OBJ OBJDIR unit_test: checkplatform $(MG_SOLVER_OBJ) cd src/tests/unit_tests && $(MAKE)
clean_onetep: @rm -f dl_mg.o dl_mg.mod
clean : @rm -fr $(OBJDIR) vclean : clean @rm -fr *.exe $(LIBDIR)
checkplatform : @if [ -z "$(PLATFORM)" ] ; then echo "PLATFORM needs to be defined! See ./platforms folder and the build documetation"; exit 2 ; fi
$(OBJDIR)/dl_mg_grids.o: FFLAGS := $(if $(FFLAGS_LOW_OPT),$(FFLAGS_LOW_OPT),$(FFLAGS))
$(OBJDIR)/%.o: %.F90 | $(MG_SOLVER_INC) $(LOAD_MODULES) ${FC} -o $@ -c $(INCPATHS) ${FFLAGS} $< ifneq ($(strip $(CP_MOD)),) @($(CP_MOD)) endif
$(OBJDIR)/%.inc: %.inc cp $< $@
$(MG_SOLVER_OBJ) $(TEST_OBJ) $(MG_SOLVER_INC) : | $(OBJDIR)
$(OBJDIR) : mkdir -p $(OBJDIR)
ifneq ($(strip $(OBJDIR)),$(strip $(LIBDIR))) $(LIBDIR) : mkdir -p $(LIBDIR) else $(LIBDIR) : endif
depend : cd src && makedepf90 -u mpi -u omplib -b '$$(OBJDIR)' $(MG_SOLVER_F90) $(MG_SOLVER_INC) implementations/*.inc > depend.mk
-include src/depend.mk
$(OBJDIR)/main_mg.o : main_mg.F90 $(addprefix $(OBJDIR)/, \ dl_mg.o \ dl_mg_params.o \ dl_mg_mpi_header.o \ mg_tests.o \ mg_utils.o ) $(OBJDIR)/mg_tests.o : mg_tests.F90 $(addprefix $(OBJDIR)/, \ dl_mg.o \ dl_mg_params.o \ dl_mg_mpi_header.o \ mg_utils.o \ dl_mg_nonlinear_model.o )
$(OBJDIR)/mg_utils.o : mg_utils.F90 $(addprefix $(OBJDIR)/, dl_mg_mpi_header.o) $(OBJDIR)/test_onetep_ls.o : test_onetep_ls.F90 $(addprefix $(OBJDIR)/, dl_mg.o) $(OBJDIR)/test_onetep_num.o : test_onetep_num.F90 $(addprefix $(OBJDIR)/, dl_mg.o dl_mg_params.o)
Makefile.Config for PSPFFT:
C_COMPILE = mpicc -c C_DEBUG = -g -Wall C_OPTIMIZE = -O3
FORTRAN_COMPILE = mpif90 -c FORTRAN_DEBUG = -g -gdwarf-2 -ffpe-trap=invalid,zero,overflow -Wall FORTRAN_OPTIMIZE = -O3
LINK = mpif90
INCLUDE_FFTW = -I /usr/include LIBRARY_FFTW = -L /usr/lib64 -lfftw3
INCLUDE_SILO = -I /usr/local/silo/4.7.2/gcc/include LIBRARY_SILO = -L /usr/local/silo/4.7.2/gcc/lib -lsilo
INSTALL = /home/jwguo/pspfft/1.0/${PE}
Dear Mr. Mauricio Chagas da Silva,
Thank you very much for replying to my email. I have encountered a new issue: after downloading version DL_MG-4.2.1 from the website and compiling it on the cluster, I did not find the /somewhere/dl_mg/include folder you mentioned, but instead, there is a /somewhere/dl_mg/o folder. I am not sure what the reason is. Below are my Makefile and the Platform variable file intel.inc used for compiling DL_MG. Could you please help me understand the cause of this issue?
Additionally, I noticed on GitHub that the version of the patch embedded in VASP might not be the latest one and contains some errors. Could you provide me with the latest SCPC file? I would be very grateful if you could.
(Attached are my Makefile and intel.inc files)
isobestico @.***> 于2024年8月23日周五 19:13写道:
Hi,
It is because you are not fully editing your makefile to give the path for includes/libraries of the external libraries needed by SCPC (dl_mg and pspfft). Please check
https://github.com/aradi/SCPC-Method/blob/main/VASP/INSTALLATION.md
(1) First of all you need to install the 2 external libraries needed by SCPC (dl_mg and pspfft) using the same compilers that you are using for compiling VASP - in your case 'intel compiler'. After a clean installation you need to have something
-- for DL_MG /somewhere/dl_mg/include /somewhere/dl_mg/lib
-- for PSPFFT /somewhere/pspfft/include /somewhere/pspfft/lib
(2) After, you need to follow the compilation hints to edit your makefile properly to include those external libraries path to the compilation procedure
(b) edition of makefiles (probably added after the MKL/FFTW part of Makefile.include)
-- check the makefile.include to add the right path for the external libraries for the Poisson and Isolate potential solver. The user should install the external solver libraries previously.
-- edit the variables at makefile.include to point your own installation
#SCPC METHOD LIBEXT = /somewhere DLMGROOT = $(LIBEXT)/dl_mg_2.0.2 PSPFFTROOT = $(LIBEXT)/pspfft-1.0 INCS +=-I$(DLMGROOT)/lib INCS +=-I$(PSPFFTROOT)/include LLIBS +=-Wl,--start-group $(DLMGROOT)/lib/libdlmg.a -Wl,--end-group LLIBS +=-Wl,--start-group $(PSPFFTROOT)/lib/libpspfft.a -Wl,--end-group #SCPC METHOD
— Reply to this email directly, view it on GitHub https://github.com/aradi/SCPC-Method/issues/15#issuecomment-2306867210, or unsubscribe https://github.com/notifications/unsubscribe-auth/BEBHYIO4WRF5Y4JBXBFZHFLZS4KL7AVCNFSM6AAAAABM7V3L56VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMBWHA3DOMRRGA . You are receiving this because you authored the thread.Message ID: @.***>
Hello,
For the DL_MG, you will need to create the folders include and lib and copy the module and library inside them, or you can use the /somewhere/dl_mg/o instead. I will send you the patch and the external libraries sources - I think the last version of DL_MG is not working anymore with SCPC.
If this is possible, I would be very grateful. I‘m looking forward to your continued correspondence and assistance in providing me with the SCPC patch and the external libraries sources which work properly with SCPC. Thank you again for your reply and help!
isobestico @.***> 于2024年8月24日周六 19:58写道:
Hello,
For the DL_MG, you will need to create the folders include and lib and copy the module and library inside them, or you can use the /somewhere/dl_mg/o instead. I will send you the patch and the external libraries sources - I think the last version of DL_MG is not working anymore with SCPC.
— Reply to this email directly, view it on GitHub https://github.com/aradi/SCPC-Method/issues/15#issuecomment-2308369471, or unsubscribe https://github.com/notifications/unsubscribe-auth/BEBHYINO5KLFP6DMQPI5JVTZTBYP5AVCNFSM6AAAAABM7V3L56VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMBYGM3DSNBXGE . You are receiving this because you authored the thread.Message ID: @.***>
Hello,
I have already sent you (in your email) :
-- the last vasp-scpc path for vasp6; -- the external libraries; and, -- the configuration makefiles for dl_mg-2.0.2, pspfft-1.0 and vasp-scpc using intel mpi compilers.
hopefully those files will help you with the setup of your local installations.
Hello,
I apologize, but it seems I did not receive any files from the email you sent. Could you please resend those files to me at @.***? I would be very grateful.
isobestico @.***> 于2024年8月24日周六 21:11写道:
Hello,
I have already sent you (in your email) :
-- the last vasp-scpc path for vasp6; -- the external libraries; and, -- the configuration makefiles for dl_mg-2.0.2, pspfft-1.0 and vasp-scpc using intel mpi compilers.
hopefully those files will help you with the setup of your local installations.
— Reply to this email directly, view it on GitHub https://github.com/aradi/SCPC-Method/issues/15#issuecomment-2308391344, or unsubscribe https://github.com/notifications/unsubscribe-auth/BEBHYIN3DHYCJFLZEBBOY6TZTCA7VAVCNFSM6AAAAABM7V3L56VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMBYGM4TCMZUGQ . You are receiving this because you authored the thread.Message ID: @.***>
Hello,
I already answered you in your gmail account. Please check your spam box too, since I attached some file GMail may tag this type of email as spam.
Before you opened this issue, you wrote to me using your GMail account with your makefile and a image of the error/issue; hence, I answered to you using that email.
**Hello,
while trying to compile VASP.6.2.0 using the -DSCPC tag, the following error is generated: mpiifort -free -names lowercase -assume byterecl -w -xHOST -O2 -I/opt/intel/compilers_and_libraries_2020.4.304/linux/mkl/include/fftw -c scpc.f90 scpc.F(1159): error #7002: Error in opening the compiled module file. Check INCLUDE paths. [PSPFFT] use pspfft ----------^ scpc.F(1164): error #6457: This derived type name has not been declared. [ARRAYREAL_3D_BASE] type(arrayReal_3d_base) :: ar(3) -----------^ scpc.F(1166): error #6457: This derived type name has not been declared. [VARIABLEARRAYREAL_3D_GROUPBASE] type(variableArrayReal_3d_groupBase) :: var(1) -----------^ scpc.F(1168): error #6683: A kind type parameter must be a compile-time constant. [KR] real(kr) :: cellWidth(3) -----------^ scpc.F(1169): error #6457: This derived type name has not been declared. [PSPFFT_FORM] type(pspfft_form), pointer :: ps -----------^ scpc.F(1207): error #7002: Error in opening the compiled module file. Check INCLUDE paths. [DL_MG] use DL_mg ----------^ scpc.F(1171): error #6458: This name must be the name of a variable with a derived type (structure type). [AR] allocate(ar(1)%data(scpc_set%mgx, scpc_set%mgy, scpc_set%mgz)) ---------------^ scpc.F(1172): error #6458: This name must be the name of a variable with a derived type (structure type). [AR] allocate(ar(2)%data(scpc_set%mgx, scpc_set%mgy, scpc_set%mgz)) ---------------^ scpc.F(1173): error #6458: This name must be the name of a variable with a derived type (structure type). [AR] allocate(ar(3)%data(scpc_set%mgx, scpc_set%mgy, scpc_set%mgz)) ---------------^ scpc.F(1175): error #6458: This name must be the name of a variable with a derived type (structure type). [AR] ar(1)%data = myrho ------^ scpc.F(1175): error #6366: The shapes of the array expressions do not conform. ar(1)%data = myrho ------^ scpc.F(1176): error #6458: This name must be the name of a variable with a derived type (structure type). [AR] ar(2)%data = 0.0_q ------^ scpc.F(1177): error #6458: This name must be the name of a variable with a derived type (structure type). [AR] ar(3)%data = 0.0_q ------^ scpc.F(1185): error #6404: This name does not have a type, and must have an explicit type. [VAR] call initialize(var(1), ar, variableOption = variablename) ----------------------^ scpc.F(1185): error #6632: Keyword arguments are invalid without an explicit interface. [VARIABLEOPTION] call initialize(var(1), ar, variableOption = variablename) ----------------------------------^ scpc.F(1187): error #6515: This function, which is specified as the left side of an assignment statement, is invalid. [VAR] var(1)%data(3)%data = var(1)%data(1)%data ------^ scpc.F(1187): error #6837: The leftmost part-ref in a data-ref can not be a function reference. [VAR] var(1)%data(3)%data = var(1)%data(1)%data ----------------------------^ scpc.F(1187): error #6158: The structure-name is invalid or is missing. [VAR] var(1)%data(3)%data = var(1)%data(1)%data ----------------------------^ scpc.F(1189): error #6404: This name does not have a type, and must have an explicit type. [PS] call create(ps, cellWidth, ntotalCells, MPI_comm_self) ------------------^ scpc.F(1191): error #6837: The leftmost part-ref in a data-ref can not be a function reference. [VAR] call solve(ps, var(1)%data(3:3)) ---------------------^ scpc.F(1191): error #6158: The structure-name is invalid or is missing. [VAR] call solve(ps, var(1)%data(3:3)) ---------------------^ scpc.F(1194): error #6837: The leftmost part-ref in a data-ref can not be a function reference. [VAR] mypot = var(1)%data(3)%data --------------^ scpc.F(1194): error #6158: The structure-name is invalid or is missing. [VAR] mypot = var(1)%data(3)%data --------------^ scpc.F(1198): error #6837: The leftmost part-ref in a data-ref can not be a function reference. [AR] if (allocated(ar(1)%data)) deallocate(ar(1)%data) --------------------^ scpc.F(1198): error #6158: The structure-name is invalid or is missing. [AR] if (allocated(ar(1)%data)) deallocate(ar(1)%data) --------------------^ scpc.F(1198): error #6830: The argument of the ALLOCATED intrinsic cannot be a constant or an expression. if (allocated(ar(1)%data)) deallocate(ar(1)%data) --------------------^ scpc.F(1198): error #6515: This function, which is specified as the left side of an assignment statement, is invalid. [AR] if (allocated(ar(1)%data)) deallocate(ar(1)%data) --------------------------------------------^ scpc.F(1199): error #6837: The leftmost part-ref in a data-ref can not be a function reference. [AR] if (allocated(ar(2)%data)) deallocate(ar(2)%data) --------------------^ scpc.F(1199): error #6158: The structure-name is invalid or is missing. [AR] if (allocated(ar(2)%data)) deallocate(ar(2)%data) --------------------^ scpc.F(1199): error #6830: The argument of the ALLOCATED intrinsic cannot be a constant or an expression. if (allocated(ar(2)%data)) deallocate(ar(2)%data) --------------------^ scpc.f90(1941): catastrophic error: Too many errors, exiting compilation aborted for scpc.f90 (code 1) make[2]: ** [scpc.o] Error 1 make[2]: Leaving directory `/home/jwguo/vasp.6.4.3/build/std' cp: cannot stat ‘vasp’: No such file or directory make[1]: [all] Error 1 make[1]: Leaving directory `/home/jwguo/vasp.6.4.3/build/std' make: *** [std] Error 2
### And the makefile.include is:
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 \ -DSCPC
CPP = fpp -f_com=no -free -w0 $$(FUFFIX) $$(SUFFIX) $(CPP_OPTIONS)
FC = mpiifort FCL = mpiifort
FREE = -free -names lowercase
FFLAGS = -assume byterecl -w
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 = 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 += -mkl=sequential MKLROOT ?= /path/to/your/mkl/installation 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 ?= /path/to/your/hdf5/installation
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
And the makefile is:
optional: use a custom build directory
ifdef PREFIX VASP_BUILD_DIR=$(PREFIX) else VASP_BUILD_DIR=build endif
VERSIONS = std gam ncl .PHONY: all veryclean test test_all versions $(VERSIONS) all: std gam ncl versions: $(VERSIONS) $(VERSIONS): if [ ! -d $(VASP_BUILD_DIR)/$@ ] ; then mkdir -p $(VASP_BUILD_DIR)/$@ ; fi cp src/makefile src/.objects src/makedeps.awk makefile.include $(VASP_BUILD_DIR)/$@
ifdef DEPS $(MAKE) -C $(VASP_BUILD_DIR)/$@ VERSION=$@ dependencies -j1 else $(MAKE) -C $(VASP_BUILD_DIR)/$@ VERSION=$@ cleandependencies -j1 endif
ifdef MODS $(MAKE) -C $(VASP_BUILD_DIR)/$@ VERSION=$@ modfiles -j1 endif $(MAKE) -C $(VASP_BUILD_DIR)/$@ VERSION=$@ all
veryclean: rm -rf $(VASP_BUILD_DIR)/std rm -rf $(VASP_BUILD_DIR)/gam rm -rf $(VASP_BUILD_DIR)/ncl
test: $(MAKE) -C testsuite test
test_all: $(MAKE) -C testsuite test_all
What could lead to this problem and what should I do to compile it successfully? Thanks a lot for your kind help!