CentOS 7 环境安装Lammps,VASP等软件

CentOS 7 环境安装Lammps,VASP等软件

一、编译环境

使用CentOS 7Intel oneAPI 2021

  1. 安装基础的开发工具包,需要root权限,一般用于计算的工作站都已经包含了这些软件
sudo yum -y update
sudo yum -y install wget cmake pkgconfig
sudo yum -y groupinstall "Development Tools"
  1. 下载和安装Intel® oneAPI Base ToolkitIntel® oneAPI HPC Toolkit,其实也就是以前的Intel Parallel Studio XE,如果下载较慢可以先用迅雷下载再运行,注意磁盘空间,下载需要 3.5 GB,安装需要 23.3 GB。
wget -c https://registrationcenter-download.intel.com/akdlm/irc_nas/17431/l_BaseKit_p_2021.1.0.2659_offline.sh
wget -c https://registrationcenter-download.intel.com/akdlm/irc_nas/17427/l_HPCKit_p_2021.1.0.2684_offline.sh
sh l_BaseKit_p_2021.1.0.2659_offline.sh -f /tmp -s -a --silent --eula accept
sh l_HPCKit_p_2021.1.0.2684_offline.sh -f /tmp -s -a --silent --eula accept

使用普通用户将会安装到$HOME/intel/oneapi目录,使用root用户将会安装到/opt/intel/oneapi目录,使用普通用户即可,安装完成可以看到如下目录结构

[vagrant@localhost oneapi]$ pwd
/home/vagrant/intel/oneapi
[vagrant@localhost oneapi]$ tree -L 1
.
├── advisor
├── ccl
├── clck
├── common.sh
├── compiler
├── conda_channel
├── dal
├── debugger
├── dev-utilities
├── dnnl
├── dpcpp-ct
├── dpl
├── etc
├── inspector
├── installer
├── intelpython
├── ipp
├── ippcp
├── itac
├── licensing
├── logs
├── mkl
├── modulefiles-setup.sh
├── mpi
├── readme-get-started-linux-base-kit.html
├── readme-get-started-linux-hpc-kit.html
├── setvars.sh
├── support.txt
├── sys_check.sh
├── tbb
├── vpl
└── vtune

25 directories, 7 files

二、Lammps

LAMMPSLarge-scale Atomic/Molecular Massively Parallel Simulator,可以翻译为大规模原子分子并行模拟器,主要用于分子动力学相关的一些计算和模拟工作。

cd $HOME && source ~/intel/oneapi/setvars.sh
wget -c https://github.com/lammps/lammps/archive/stable_29Oct2020.tar.gz && tar xvf stable_29Oct2020.tar.gz && cd lammps-stable_29Oct2020/src
make yes-USER-REAXC
make intel_cpu_intelmpi -j8

Benchmark

## benchmark
cd $HOME/lammps-stable_29Oct2020/bench && mpirun -np 16 ../src/lmp_intel_cpu_intelmpi -var x 2 -var y 2 -var z 4 -in in.lj
cd $HOME/lammps-stable_29Oct2020/examples/reax && mpirun -np 16 ../../src/lmp_intel_cpu_intelmpi -in in.reaxc.rdx

三、VASP

VASP是维也纳大学Hafner小组开发的进行电子结构计算和量子力学-分子动力学模拟软件包。它是目前材料模拟和计算物质科学研究中最流行的商用软件之一。

cd $HOME && source ~/intel/oneapi/setvars.sh
wget -c http://img3.betajie.com/scikit/vasp.5.4.1.24Jun15.tar.gz && tar xvf vasp.5.4.1.24Jun15.tar.gz && cd vasp.5.4.1

cp arch/makefile.include.linux_intel makefile.include
sed -i -e 's/= mpif90/= mpiifort/g' makefile.include
sed -i -e 's/-lmkl_blacs_openmpi_lp64/-lmkl_blacs_intelmpi_lp64/g' makefile.include

if [ ! -f $MKLROOT/interfaces/fftw3xf/libfftw3xf_intel.a ]; then
	cp -r $MKLROOT/interfaces/fftw3xf $HOME && cd $HOME/fftw3xf && make libintel64
	cd $HOME/vasp.5.4.1 && sed -i -e 's/$(MKLROOT)/interfaces/fftw3xf/libfftw3xf_intel.a/$(HOME)/fftw3xf/libfftw3xf_intel.a/g' makefile.include
fi

make veryclean
# !!! VASP makefile is not support multiprocessor compiler, do not add -j flag
make all
ls -alh bin

Benchmark

wget -c https://www.vasp.at/wiki/images/1/19/H2o_on_tio2.tgz && tar xvf H2o_on_tio2.tgz && cd h2o_on_tio2/constrMD_microcanonical
mpirun -genv I_MPI_DEBUG 5 -np 8  -ppn 1 -host localhost ~/vasp.5.4.1/bin/vasp_std
[vagrant@localhost constrMD_microcanonical]$ mpirun -genv I_MPI_DEBUG 5 -np 8  -ppn 1 -host localhost ~/vasp.5.4.1/bin/vasp_std 
[0] MPI startup(): Intel(R) MPI Library, Version 2021.1  Build 20201112 (id: b9c9d2fc5)
[0] MPI startup(): Copyright (C) 2003-2020 Intel Corporation.  All rights reserved.
[0] MPI startup(): library kind: release
[0] MPI startup(): libfabric version: 1.11.0-impi
[0] MPI startup(): libfabric provider: tcp;ofi_rxm
[0] MPI startup(): Rank    Pid      Node name              Pin cpu
[0] MPI startup(): 0       21638    localhost.localdomain  0
[0] MPI startup(): 1       21639    localhost.localdomain  1
[0] MPI startup(): 2       21640    localhost.localdomain  2
[0] MPI startup(): 3       21641    localhost.localdomain  3
[0] MPI startup(): 4       21642    localhost.localdomain  0
[0] MPI startup(): 5       21643    localhost.localdomain  1
[0] MPI startup(): 6       21644    localhost.localdomain  2
[0] MPI startup(): 7       21645    localhost.localdomain  3
[0] MPI startup(): I_MPI_ROOT=/home/vagrant/intel/oneapi/mpi/2021.1.1
[0] MPI startup(): I_MPI_MPIRUN=mpirun
[0] MPI startup(): I_MPI_HYDRA_TOPOLIB=hwloc
[0] MPI startup(): I_MPI_INTERNAL_MEM_POLICY=default
[0] MPI startup(): I_MPI_DEBUG=5
 running on    8 total cores
 distrk:  each k-point on    8 cores,    1 groups
 distr:  one band on    1 cores,    8 groups
 using from now: INCAR     
 vasp.5.4.1 24Jun15 (build Jan 14 2021 01:54:48) complex                        
  
 POSCAR found type information on POSCAR  Ti O  H 
 POSCAR found :  3 types and       9 ions
 scaLAPACK will be used

 ----------------------------------------------------------------------------- 
|                                                                             |
|           W    W    AA    RRRRR   N    N  II  N    N   GGGG   !!!           |
|           W    W   A  A   R    R  NN   N  II  NN   N  G    G  !!!           |
|           W    W  A    A  R    R  N N  N  II  N N  N  G       !!!           |
|           W WW W  AAAAAA  RRRRR   N  N N  II  N  N N  G  GGG   !            |
|           WW  WW  A    A  R   R   N   NN  II  N   NN  G    G                |
|           W    W  A    A  R    R  N    N  II  N    N   GGGG   !!!           |
|                                                                             |
|      For optimal performance we recommend to set                            |
|        NCORE= 4 - approx SQRT( number of cores)                             |
|      NCORE specifies how many cores store one orbital (NPAR=cpu/NCORE).     |
|      This setting can  greatly improve the performance of VASP for DFT.     |
|      The default, NPAR=number of cores might be grossly inefficient         |
|      on modern multi-core architectures or massively parallel machines.     |
|      Do your own testing !!!!                                               |
|      Unfortunately you need to use the default for GW and RPA calculations. |
|      (for HF NCORE is supported but not extensively tested yet)             |
|                                                                             |
 ----------------------------------------------------------------------------- 

 LDA part: xc-table for Pade appr. of Perdew

 ----------------------------------------------------------------------------- 
|                                                                             |
|           W    W    AA    RRRRR   N    N  II  N    N   GGGG   !!!           |
|           W    W   A  A   R    R  NN   N  II  NN   N  G    G  !!!           |
|           W    W  A    A  R    R  N N  N  II  N N  N  G       !!!           |
|           W WW W  AAAAAA  RRRRR   N  N N  II  N  N N  G  GGG   !            |
|           WW  WW  A    A  R   R   N   NN  II  N   NN  G    G                |
|           W    W  A    A  R    R  N    N  II  N    N   GGGG   !!!           |
|                                                                             |
|      VASP found     18 degrees of freedom                                   |
|      the temperature will equal 2*E(kin)/ (degrees of freedom)              |
|      this differs from previous releases, where T was 2*E(kin)/(3 NIONS).   |
|      The new definition is more consistent                                  |
|                                                                             |
 ----------------------------------------------------------------------------- 
 POSCAR, INCAR and KPOINTS ok, starting setup
 WARNING: small aliasing (wrap around) errors must be expected
 FFT: planning ...
 WAVECAR not read
 prediction of wavefunctions initialized - no I/O
 entering main loop
       N       E                     dE             d eps       ncg     rms          rms(c)
DAV:   1     0.365928404142E+03    0.36593E+03   -0.13247E+04   832   0.808E+02
DAV:   2    -0.471497687791E+01   -0.37064E+03   -0.35445E+03  1304   0.218E+02
DAV:   3    -0.835496235250E+02   -0.78835E+02   -0.78061E+02  1040   0.124E+02
DAV:   4    -0.857147612524E+02   -0.21651E+01   -0.21637E+01   920   0.271E+01
DAV:   5    -0.857782211221E+02   -0.63460E-01   -0.63451E-01  1120   0.436E+00    0.347E+01
DAV:   6    -0.676314972968E+02    0.18147E+02   -0.13418E+02  1216   0.547E+01    0.300E+01
DAV:   7    -0.679648482636E+02   -0.33335E+00   -0.15612E+02  1288   0.762E+01    0.168E+01
posted @ 2021-01-14 11:12  HiroSyu  阅读(3150)  评论(3编辑  收藏  举报