赞
踩
目录
2. VASP安装前的准备 Install GNU Compiler
接上一章,今天我们来讲VASP的安装。
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-de
打开vasp压缩包所在文件夹,进行一下四步
- 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
在子目录下把arch文件夹中的makefile.include.linux_intel拷到上一级目录下改名为makefile.include。打开此文件,把其中的OFLAG参数里加入-xhost。
附上完整makefile.include:
- # 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/

在如下图目录中运行:
make all
或
make std gam ncl
运行完后在bin文件夹中出现三个文件,其中可以选择修改vasp_std 为vasp,这里没修改。
修改系统环境:
vim ~/.bashrc
添加路径
export PATH="$PATH:/home/xxxx/vasp.5.4.4/bin";
记得替换XXX
保存.bachrc,并更新
source ~/.bashrc
最后运行VASP,到此,安装过程就完成了。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。