基于GNU编译器编译VASP

时间:2020-10-16
本文章向大家介绍基于GNU编译器编译VASP,主要包括基于GNU编译器编译VASP使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。

基于Intel编译器编译VASP 参考

 

系统: Centos7.6 x86_64 

 

1、安装编译器

# yum install -y gcc gcc-g++ gcc-gfortran

 

2、安装数学库

# yum install -y blas-devel lapack-devel fftw-devel openmpi3-devel scalapack-openmpi3-devel rsync

 配置mpif90环境

# export PATH=$PATH:/usr/lib64/openmpi3/bin
# echo "export PATH=$PATH:/usr/lib64/openmpi3/bin" > ~/.bashrc

 

3、配置VASP编译参数

# wget http://202.120.44.6:108/files/vasp.5.4.4.tar.gz
# tar xf vasp.5.4.4.tar.gz
# cd vasp.5.4.4
# cp arch/makefile.include.linux_gnu ./makefile.include
# sed -i 's#-DCACHE_SIZE.*#-DCACHE_SIZE=16000 \\#' makefile.include
# sed -i 's#^LIBDIR.*#LIBDIR = /usr/lib64#' makefile.include
# sed -i 's#^BLAS.*#BLAS = -L$(LIBDIR) -lblas#' makefile.include
# sed -i 's#^LAPACK.*#LAPACK = -L$(LIBDIR) -llapack#' makefile.include
# sed -i 's#^SCALAPACK.*#SCALAPACK = -L/usr/lib64/openmpi3/lib/ -lscalapack#' makefile.include
# sed -i 's/^FFTW.*/#&/' makefile.include
# sed -i 's#^LLIBS += -L$(FFTW)/lib -lfftw3#LLIBS += -L$(LIBDIR) -lfftw3#' makefile.include
# sed -i 's#^INCS.*#INCS = -I/usr/include#' makefile.include

 

4、编译VASP

# make all

  

5、VASP测试

# export PATH=$PATH:/software/vasp.5.4.4/bin
# wget https://files.cnblogs.com/files/liu-shaobo/benchmark.Hg.tar.gz
# tar -xzf benchmark.Hg.tar.gz
# cd vasp.Hg
# mv IN-short INCAR
# mpirun -np 4 vasp_std

 查看输出文件OUTCAR

$flag 上一页 下一页