Compilation and Installation
Basic Installation Procedure
- Use PuTTY to log in to the server as the root user.
- Decompress the VASP installation package.
cd /path/to/VASP tar -xvf vasp.5.4.4.tar.gz
- Go to the directory generated after the decompression.
cd vasp.5.4.4
- If the environment configuration has been loaded, skip this step. Configure the compiler, Hyper MPI, and precompilation environment based on the actual installation paths. For example:
export INCLUDE=/path/to/hypermpi/hmpi/include export PATH=/path/to/hypermpi/hmpi/bin:/path/to/hypermpi/ucx/bin:$PATH export OPAL_PREFIX=/path/to/hypermpi/hmpi/ export LD_LIBRARY_PATH=/path/to/hypermpi/hmpi/lib:/path/to/hypermpi/ucx/lib:$LD_LIBRARY_PATH export PATH=/opt/compiler/bisheng-compiler-1.3.3-aarch64-linux/bin:$PATH export LD_LIBRARY_PATH=/opt/compiler/bisheng-compiler-1.3.3-aarch64-linux/lib:$LD_LIBRARY_PATH export LD_LIBRARY_PATH=/path/to/OPENBLAS/lib:/path/to/SCALAPACK:/path/to/FFTW/lib:$LD_LIBRARY_PATH
Set the environment variables of the BiSheng Compiler and Hyper MPI before you configure the compilation environment.
- Create and edit the makefile.include file.
- Create a makefile.include file.
vi makefile.include
- Press i to enter the insert mode and add the following content to the makefile.include file:
##Precompiler options CPP_OPTIONS= -DHOST=\"LinuxGNU\" \ -DMPI -DMPI_BLOCK=8000 \ -Duse_collective \ -DscaLAPACK \ -DCACHE_SIZE=5000 \ -Davoidalloc \ -Duse_bse_te \ -Dtbdyn \ -Duse_shmem CPP = flang -E -P -C -w $*$(FUFFIX) >$*$(SUFFIX) $(CPP_OPTIONS) FC = mpif90 FCL = mpif90 FREE = -ffree-form -ffree-line-length-none FFLAGS = -w OFLAG = -O1 -ffp-contract=fast -ffpe-trap=invalid,zero,overflow OFLAG_IN = $(OFLAG) DEBUG = -O0 LLIBS = -L/path/to/SCALAPACK -lscalapack -L/path/to/OPENBLAS/lib -lopenblas FFTW ?= /path/to/FFTW LLIBS += -L$(FFTW)/lib -lfftw3 INCS = -I$(FFTW)/include 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 = clang CFLAGS_LIB = -O FFLAGS_LIB = -O1 FREE_LIB = $(FREE) OBJECTS_LIB= linpack_double.o getshmem.o # For the parser library CXX_PARS = clang++ LIBS += parser LLIBS += -Lparser -lparser -lstdc++ # Normally no need to change this SRCDIR = ../../src BINDIR = ../../bin - Press Esc, type :wq!, and press Enter to save the file and exit.
- Create a makefile.include file.
- Perform the compilation and installation.
make std
To generate vasp_gam and vasp_ncl, run the following command:
make all
(Optional) Extended Installation Procedure
Install the VTST transition state tool.
- Use PuTTY to log in to the server as the root user.
- Upload the VTSTcode installation package to the directory where VASP is installed.
- Decompress the VTSTcode installation package.
cd /path/to/VASP tar -xvf vtstcode-179.tgz
- Back up the chain.F file in the src directory of the VASP installation package.
cp vasp.5.4.4/src/chain.F vasp.5.4.4/src/chain.F_bak
- Copy files of the vtstcode-179 directory to the src directory.
cp vtstcode-179/* vasp.5.4.4/src/
- Modify the src/main.F file.
- Open the test case file.
vi vasp.5.4.4/src/main.F
- Press i to enter the insert mode and change the statements in lines 3146 and 3147 in the src/main.F file to the following:
CALL CHAIN_FORCE(T_INFO%NIONS,DYN%POSION,TOTEN,TIFOR, & TSIF,LATT_CUR%A,LATT_CUR%B,IO%IU6)
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open the test case file.
- Modify the compilation configuration file.
- Open the test case file.
vi vasp.5.4.4/src/.objects
- Press i to enter the insert mode and add the following content between line 71 and line 72:
bfgs.o dynmat.o instanton.o lbfgs.o sd.o cg.o dimer.o bbm.o \ fire.o lanczos.o neb.o qm.o opt.o \
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open the test case file.
- Perform the compilation and installation.
make std
To generate vasp_gam and vasp_ncl, run the following command:
make all
(Optional) Extended Installation Procedure
Installing the VASPsol Tool
- Use PuTTY to log in to the server as the root user.
- Download and decompress the VASPsol installation package.
cd /path/to/VASP wget https://github.com/henniggroup/VASPsol/archive/refs/tags/V1.0.tar.gz tar -xvf V1.0.tar.gz
- Copy files of the VASPsol directory to the src directory.
cp VASPsol-1.0/src/solvation.F vasp.5.4.4/src/
- Modify the makefile.include file in step 5 of Basic Installation Procedure.
- Open the makefile.include file.
vi makefile.include
- Press i to enter the insert mode and add -Dsol_compat to CPP_OPTIONS.
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open the makefile.include file.
- Perform the compilation and installation.
make std
To generate vasp_gam and vasp_ncl, run the following command:
make all
Procedure for Installing the Wannier90 Interface
- Use PuTTY to log in to the server as the root user.
- Decompress the wannier90-1.2 installation package in the directory where VASP is installed.
cd /path/to/VASP tar -xvf wannier90-1.2.tar.gz
- Replace make.sys with make.sys.gfort.
cd wannier90-1.2 cp config/make.sys.gfort make.sys
- Modify the make.sys file.
- Open the test case file.
vi make.sys
- Press i to enter the insert mode and modify the content in line 4.
F90 = flang
Add the following content to the end of the make.sys file.LIBS = -L/path/to/SCALAPACK -L/path/to/OPENBLAS/lib -lscalapack -lopenblas
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open the test case file.
- Perform the installation.
make wannier lib test
The libwannnier.a function library is generated, which needs to be added to the VASP installation and compilation.
- Modify the makefile.include file.
cd /path/to/VASP/vasp.5.4.4 vi makefile.include
- Press i to enter the insert mode and modify the makefile.include file.
Modify line 10 as follows:
-Duse_shmem -Dtbdyn -DVASP2WANNIER90
Add the following content between line 18 and line 19.
WANNIER90 = /path/to/VASP/wannier90-1.2/libwannier.a
Modify line 20: Add Wannier interface parameters to LLIBS.
LLIBS = $(WANNIER90) -L/path/to/SCALAPACK -lscalapack -L/path/to/OPENBLAS/lib -lopenblas
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Perform the compilation.
make std
Parent topic: VASP 5.4.4 Porting Guide (openEuler 21.03)