|
本帖最后由 lindlar 于 2024-4-10 13:24 编辑
Rocky linux 9.3利用intel oneAPI 2024.1编译vasp6.4.2
1、Intel oneapi 2024.1.0最新版下载,根据实际情况选择官网免费下载并安装,下面两个均需要安装,
Intel oneAPI Base Toolkit,https://www.intel.cn/content/www/cn/zh/developer/tools/oneapi/base-toolkit-download.html
Intel® HPC Toolkit,High-Performance Computing,https://www.intel.cn/content/www/cn/zh/developer/tools/oneapi/hpc-toolkit-download.html
安装完成后,在
vi ~/.bashrc
source /opt/intel/oneapi/setvars.sh intel64
2、vasp.6.4.2 编译
解压缩:tar -zxvf vasp.6.4.2.tar.gz
把arch/makefile.include.linux_intel拷到上一级目录下改名为makefile.include,然后修改如下几个位置:
PP = fpp -f_com=no -free -w0 $*$(FUFFIX) $*$(SUFFIX) $(CPP_OPTIONS)
FC = mpiifx
FCL = mpiifx
# 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)
# For the parser library
CXX_PARS = icpx
LLIBS = -lstdc++
# 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 (前面+不能去掉,否则编译会出错,奇怪?vasp /bin/sh: line 1: -o: command not found )
MKLROOT = /opt/intel/oneapi/mkl/2024.0
LLIBS += -L$(MKLROOT)/lib/intel64 -lmkl_scalapack_lp64 -lmkl_blacs_intelmpi_lp64
INCS =-I$(MKLROOT)/include/fftw
修改后,make all
将vasp加入到
vi ~/.bashrc
export PATH=$PATH:/opt/vasp.6.4.2/bin
mpirun -np 48 vasp
测试成功。
|
评分 Rate
-
查看全部评分 View all ratings
|