oneAPI编译VASP 中 icx icpx和ifx设置 适用于icc和ifort Command not found
在安装VASP或其他第一性原理计算软件时默认使用Intel编译器作为基本安装环境之一,如今主要安装包为Intel oneapi,下载地址为https://www.intel.com/content/www/us/en/developer/tools/oneapi/toolkits.html#gs.0rsz28
最新版的安装包将不再支持旧版命令,比如笔者在以前帖子中已经提到过的icc,icpc的问题
oneAPI2024编译VASP报错icc Command not found
后续也更新过ifort Command not found的问题
安装Intel-oneapi后 ifort : command not found,附2023版链接
近期VASP更新出6.5版本,在6.5.0的安装包中,makefile.include已更新出适用于新版oneapi的版本makefile.include.oneapi,同时还包括openmpi版本的makefile.include.oneapi_omp
在此makefile.include中,调整了对于ifx和icx icpx的设置
分别为
FC = mpiifort -fc=ifxFCL = mpiifort -fc=ifx
和
# For what used to be vasp.5.libCPP_LIB = $(CPP)FC_LIB = $(FC)CC_LIB = icxCFLAGS_LIB = -OFFLAGS_LIB = -O1FREE_LIB = $(FREE)OBJECTS_LIB = linpack_double.o# For the parser libraryCXX_PARS = icpxLLIBS = -lstdc++
可根据实际安装环境来适应性调整以此来编译不同版本的vasp
附makefile.include.oneapi
https://www.vasp.at/wiki/index.php/Makefile.include.oneapi
# Default precompiler optionsCPP_OPTIONS = -DHOST=\"LinuxIFC\" \-DMPI -DMPI_BLOCK=8000 -Duse_collective \-DscaLAPACK \-DCACHE_SIZE=4000 \-Davoidalloc \-Dvasp6 \-Dtbdyn \-Dfock_dblbufCPP = fpp -f_com=no -free -w0 $*$(FUFFIX) $*$(SUFFIX) $(CPP_OPTIONS)FC = mpiifort -fc=ifxFCL = mpiifort -fc=ifxFREE = -free -names lowercaseFFLAGS = -assume byterecl -wOFLAG = -O2OFLAG_IN = $(OFLAG)DEBUG = -O0# For what used to be vasp.5.libCPP_LIB = $(CPP)FC_LIB = $(FC)CC_LIB = icxCFLAGS_LIB = -OFFLAGS_LIB = -O1FREE_LIB = $(FREE)OBJECTS_LIB = linpack_double.o# For the parser libraryCXX_PARS = icpxLLIBS = -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 architectureVASP_TARGET_CPU ?= -xHOSTFFLAGS += $(VASP_TARGET_CPU)# Intel MKL (FFTW, BLAS, LAPACK, and scaLAPACK)# (Note: for Intel Parallel Studio's MKL use -mkl instead of -qmkl)FCL += -qmkl=sequentialMKLROOT ?= /path/to/your/mkl/installationLLIBS += -L$(MKLROOT)/lib/intel64 -lmkl_scalapack_lp64 -lmkl_blacs_intelmpi_lp64INCS =-I$(MKLROOT)/include/fftw# HDF5-support (optional but strongly recommended, and mandatory for some features)#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# For machine learning library vaspml (experimental)#CPP_OPTIONS += -Dlibvaspml#CPP_OPTIONS += -DVASPML_USE_CBLAS#CPP_OPTIONS += -DVASPML_USE_MKL#CPP_OPTIONS += -DVASPML_DEBUG_LEVEL=3#CXX_ML = mpiicpc -cxx=icpx#CXXFLAGS_ML = -O3 -std=c++17 -Wall#INCLUDE_ML =
