VASP 安装教程
VASP 是维也纳大学 Hafner 小组开发的进行电子结构计算和量子力学-分子动力学模拟软件包。它是材料模拟和计算物质科学研究中最流行的软件之一。
本教程基于 Ubuntu 进行演示,以 VASP-6.4.2 为例。
Requirements
| Bash |
|---|
| sudo apt update
sudo apt upgrade
sudo apt install build-essential
sudo apt install gfortran
sudo apt install vim # optional
|
Get the Intel® oneAPI Base Toolkit
https://www.intel.cn/content/www/cn/zh/developer/tools/oneapi/base-toolkit-download.html
Install only: Math Kernel Library
Get the Intel® HPC Toolkit
https://www.intel.cn/content/www/cn/zh/developer/tools/oneapi/hpc-toolkit-download.html?operatingsystem=linux&linux-install-type=offline
Install only: Intel MPI Library, Intel oneAPI DPC++/C++ Complier, Intel Fortran Complier
Install VASP
Download VASP
Download VASP installation package from the Internet.
Activate Intel oneAPI
| Bash |
|---|
| # Install as user
source ~/intel/oneapi/setvars.sh
# Install as root
source /opt/intel/oneapi/setvars.sh
|
Prepare for compilation
| Bash |
|---|
| cd <your_vasp_installation_folder>
cp arch/makefile.include.intel makefile.include
|
Modify the following sections in makefile.include :
| Text Only |
|---|
| CC_LIB = icx
CXX_PARS = icpx
MKLROOT ?=
OFLAG = -O2 -xhost
|
Build VASP
| Bash |
|---|
| # normal
make all
# parallel mode
# where `DEPS=1 -jN` is optional and selects the parallel mode of make with `N` being the number of jobs you want to run
make DEPS=1 -jN
|
Test VASP
Add the following line to ~/.bashrc and activate it:
| Bash |
|---|
| export PATH=$PATH:/<your_vasp_folder>/bin
|
Run the task with 12 processes and export the logs to the vasp.log file:
| Bash |
|---|
| cd <your_vasp_test_folder>
mpirun -np 12 vasp_std > vasp.log
|