1. Ready to install package VASP 5.4.4
2. Preparations before VASP installation
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 installation
extract and patch
Open the folder where the vasp compressed package is located, and follow the four steps
tar -zxvf vasp.5.4.4.tar.gz
gunzip patch.5.4.4.16052018.gz
cd vasp.5.4.4/
patch -p0 < ../patch.5.4.4.16052018
modify file
In the subdirectory, copy the makefile.include.linux_intel in the arch folder to the upper directory and rename it to makefile.include. Open this file and add -xhost to the OFLAG parameter.
The full makefile.include looks like this
# Precompiler options
CPP_OPTIONS= -DHOST=\"LinuxIFC\"\
-DMPI -DMPI_BLOCK=8000 \
-Duse_collective \
-DscaLAPACK \
-DCACHE_SIZE=4000 \
-Davoidalloc \
-Duse_bse_te \
-Dtbdyn \
-Duse_shmem
CPP = fpp -f_com=no -free -w0 $*$(FUFFIX) $*$(SUFFIX) $(CPP_OPTIONS)
FC = mpiifort
FCL = mpiifort -mkl=sequential -lstdc++
FREE = -free -names lowercase
FFLAGS = -assume byterecl -w
OFLAG = -O2 -mtune=native -m64
OFLAG_IN = $(OFLAG)
DEBUG = -O0
MKL_PATH = $(MKLROOT)/lib/intel64
BLAS =
LAPACK =
BLACS = -lmkl_blacs_intelmpi_lp64
SCALAPACK = $(MKL_PATH)/libmkl_scalapack_lp64.a $(BLACS)
OBJECTS = fftmpiw.o fftmpi_map.o fft3dlib.o fftw3d.o
INCS =-I$(MKLROOT)/include/fftw
LLIBS = $(SCALAPACK) $(LAPACK) $(BLAS)
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 getshmem.o
# For the parser library
CXX_PARS = icpc
LIBS += parser
LLIBS += -Lparser -lparser -lstdc++
# Normally no need to change this
SRCDIR = ../../src
BINDIR = ../../bin
#================================================
# GPU Stuff
CPP_GPU = -DCUDA_GPU -DRPROMU_CPROJ_OVERLAP -DUSE_PINNED_MEMORY -DCUFFT_MIN=28 -UscaLAPACK
OBJECTS_GPU = fftmpiw.o fftmpi_map.o fft3dlib.o fftw3d_gpu.o fftmpiw_gpu.o
CC = icc
CXX = icpc
CFLAGS = -fPIC -DADD_ -Wall -openmp -DMAGMA_WITH_MKL -DMAGMA_SETAFFINITY -DGPUSHMEM=300 -DHAVE_CUBLAS
CUDA_ROOT ?= /usr/local/cuda/
NVCC := $(CUDA_ROOT)/bin/nvcc -ccbin=icc
CUDA_LIB := -L$(CUDA_ROOT)/lib64 -lnvToolsExt -lcudart -lcuda -lcufft -lcublas
GENCODE_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/
Compile, build std, gam and ncl of VASP
Run in the following directory:
make all
or
make std gam ncl
long running time
modify path
After running, three files appear in the bin folder, among which you can choose to modify vasp_std to vasp, which is not modified here.
Modify the system environment:
vim ~/.bashrc
add path
export PATH="$PATH:/home/xxxx/vasp.5.4.4/bin";
Copy the vasp path, here is: /home/xxxx/vasp.5.4.4/bin
Save .bachrc, and update
source ~/.bashrc
run vasp
Put INCAR, KPOINTS, POSCAR and POTCAR in any folder
Input: Among them, if vasp_std is changed to vasp, vasp_std in the code should be changed to vasp, nohup means that the terminal does not output process information, and 4 is the number of cpu.
nohup mpirun -np 4 vasp_std INCAR
4. finish
5. Install vaspkit
Download the compressed package from the official website
Unzip the installation , modify the path (.bashrc and .vaspkit)
run
Go to INCAR, KPOINTS, POSCAR in the running file to generate POTCAR
vaspkit 103
or
vaspkit 1
103
reference:
http://bbs.keinsci.com/thread-28200-1-1.html
https://zhuanlan.zhihu.com/p/436435793
http://bbs.keinsci.com/thread-31193-1-1.html