VASP 5.4.4 保姆级安装全过程 (附带vaspkit)

服务器 0

1. 准备好安装包 VASP 5.4.4

2. VASP安装前的准备

  Install GNU Compiler

sudo apt-get install make build-essential g++ gfortran

  Install required VASP libraries (lapack, scalapack, openmpi, and fftw)

sudo apt-get install libblas-dev liblapack-dev libopenmpi-dev libscalapack-mpi-dev libfftw3-dev

3. VASP安装

   提取并修补

    打开vasp压缩包所在文件夹,进行一下四步

tar -zxvf vasp.5.4.4.tar.gzgunzip patch.5.4.4.16052018.gzcd vasp.5.4.4/patch -p0 < ../patch.5.4.4.16052018

修改文件

在子目录下把arch文件夹中的makefile.include.linux_intel拷到上一级目录下改名为makefile.include。打开此文件,把其中的OFLAG参数里加入-xhost。

 

 完整makefile.include如下所示

# Precompiler optionsCPP_OPTIONS= -DHOST=/"LinuxIFC/"/             -DMPI -DMPI_BLOCK=8000 /             -Duse_collective /             -DscaLAPACK /             -DCACHE_SIZE=4000 /             -Davoidalloc /             -Duse_bse_te /             -Dtbdyn /             -Duse_shmemCPP        = fpp -f_com=no -free -w0  $*$(FUFFIX) $*$(SUFFIX) $(CPP_OPTIONS)FC         = mpiifortFCL        = mpiifort -mkl=sequential -lstdc++FREE       = -free -names lowercaseFFLAGS     = -assume byterecl -wOFLAG      = -O2 -mtune=native -m64OFLAG_IN   = $(OFLAG)DEBUG      = -O0MKL_PATH   = $(MKLROOT)/lib/intel64BLAS       =LAPACK     =BLACS      = -lmkl_blacs_intelmpi_lp64SCALAPACK  = $(MKL_PATH)/libmkl_scalapack_lp64.a $(BLACS)OBJECTS    = fftmpiw.o fftmpi_map.o fft3dlib.o fftw3d.oINCS       =-I$(MKLROOT)/include/fftwLLIBS      = $(SCALAPACK) $(LAPACK) $(BLAS)OBJECTS_O1 += fftw3d.o fftmpi.o fftmpiw.oOBJECTS_O2 += fft3dlib.o# For what used to be vasp.5.libCPP_LIB    = $(CPP)FC_LIB     = $(FC)CC_LIB     = iccCFLAGS_LIB = -OFFLAGS_LIB = -O1FREE_LIB   = $(FREE)OBJECTS_LIB= linpack_double.o getshmem.o# For the parser libraryCXX_PARS   = icpcLIBS       += parserLLIBS      += -Lparser -lparser -lstdc++# Normally no need to change thisSRCDIR     = ../../srcBINDIR     = ../../bin#================================================# GPU StuffCPP_GPU    = -DCUDA_GPU -DRPROMU_CPROJ_OVERLAP -DUSE_PINNED_MEMORY -DCUFFT_MIN=28 -UscaLAPACKOBJECTS_GPU = fftmpiw.o fftmpi_map.o fft3dlib.o fftw3d_gpu.o fftmpiw_gpu.oCC         = iccCXX        = icpcCFLAGS     = -fPIC -DADD_ -Wall -openmp -DMAGMA_WITH_MKL -DMAGMA_SETAFFINITY -DGPUSHMEM=300 -DHAVE_CUBLASCUDA_ROOT  ?= /usr/local/cuda/NVCC       := $(CUDA_ROOT)/bin/nvcc -ccbin=iccCUDA_LIB   := -L$(CUDA_ROOT)/lib64 -lnvToolsExt -lcudart -lcuda -lcufft -lcublasGENCODE_ARCH    := -gencode=arch=compute_30,code=/"sm_30,compute_30/" /                   -gencode=arch=compute_35,code=/"sm_35,compute_35/" /                   -gencode=arch=compute_60,code=/"sm_60,compute_60/"MPI_INC    = $(I_MPI_ROOT)/include64/

编译,构建VASP的std、gam和ncl

在如下图目录中运行:

make all

 或者

make std gam ncl

 运行时间较长

修改路径 

运行完后在bin文件夹中出现三个文件,其中可以选择修改vasp_std 为vasp,这里没修改。

修改系统环境:

vim ~/.bashrc

 添加路径

export PATH="$PATH:/home/xxxx/vasp.5.4.4/bin";

 复制vasp路径,我这里是:/home/xxxx/vasp.5.4.4/bin

 

 保存.bachrc,并更新

source ~/.bashrc

 运行vasp

在任意文件夹下放入INCAR、KPOINTS、POSCAR和POTCAR

输入:其中,如果改了vasp_std为vasp,代码中vasp_std要改成vasp,nohup意思为终端不输出过程信息,4为cpu数。

nohup mpirun -np 4 vasp_std INCAR

4. 完成

5. 安装vaspkit

官网下载压缩包

解压安装,修改路径(.bashrc和.vaspkit)

运行

到运行文件中INCAR、KPOINTS、POSCAR,生成POTCAR

vaspkit 103or vaspkit 1103

参考:

http://bbs.keinsci.com/thread-28200-1-1.html

https://zhuanlan.zhihu.com/p/436435793

http://bbs.keinsci.com/thread-31193-1-1.html 

https://www.bilibili.com/read/cv18613187 

https://zhuanlan.zhihu.com/p/435820148​​​​​​​ 

也许您对下面的内容还感兴趣: