CentOS 7 环境安装Lammps,VASP等软件
<h1 id="centos-7-环境安装lammpsvasp等软件">CentOS 7 环境安装Lammps,VASP等软件</h1><h2 id="一编译环境">一、编译环境</h2>
<p>使用<code>CentOS 7</code> 和 <code>Intel oneAPI 2021</code></p>
<ol>
<li>安装基础的开发工具包,需要<code>root</code>权限,一般用于计算的工作站都已经包含了这些软件</li>
</ol>
<pre><code class="language-shell">sudo yum -y update
sudo yum -y install wget cmake pkgconfig
sudo yum -y groupinstall "Development Tools"
</code></pre>
<ol start="2">
<li>下载和安装Intel® oneAPI Base Toolkit、Intel® oneAPI HPC Toolkit,其实也就是以前的<code>Intel Parallel Studio XE</code>,如果下载较慢可以先用迅雷下载再运行,注意磁盘空间,下载需要 3.5 GB,安装需要 23.3 GB。</li>
</ol>
<pre><code class="language-shell">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
</code></pre>
<p>使用普通用户将会安装到<code>$HOME/intel/oneapi</code>目录,使用root用户将会安装到<code>/opt/intel/oneapi</code>目录,使用普通用户即可,安装完成可以看到如下目录结构</p>
<pre><code class="language-sh">$ pwd
/home/vagrant/intel/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
</code></pre>
<h2 id="二lammps">二、Lammps</h2>
<p><code>LAMMPS</code>即<code>Large-scale Atomic/Molecular Massively Parallel Simulator</code>,可以翻译为<code>大规模原子分子并行模拟器</code>,主要用于分子动力学相关的一些计算和模拟工作。</p>
<pre><code class="language-shell">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
</code></pre>
<p>Benchmark</p>
<pre><code class="language-sh">## 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
</code></pre>
<h2 id="三vasp">三、VASP</h2>
<p>VASP是维也纳大学Hafner小组开发的进行电子结构计算和量子力学-分子动力学模拟软件包。它是目前材料模拟和计算物质科学研究中最流行的商用软件之一。</p>
<pre><code class="language-shell">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
</code></pre>
<p>Benchmark</p>
<pre><code class="language-sh">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
</code></pre>
<pre><code class="language-sh">$ mpirun -genv I_MPI_DEBUG 5 -np 8-ppn 1 -host localhost ~/vasp.5.4.1/bin/vasp_std
MPI startup(): Intel(R) MPI Library, Version 2021.1Build 20201112 (id: b9c9d2fc5)
MPI startup(): Copyright (C) 2003-2020 Intel Corporation.All rights reserved.
MPI startup(): library kind: release
MPI startup(): libfabric version: 1.11.0-impi
MPI startup(): libfabric provider: tcp;ofi_rxm
MPI startup(): Rank Pid Node name Pin cpu
MPI startup(): 0 21638 localhost.localdomain0
MPI startup(): 1 21639 localhost.localdomain1
MPI startup(): 2 21640 localhost.localdomain2
MPI startup(): 3 21641 localhost.localdomain3
MPI startup(): 4 21642 localhost.localdomain0
MPI startup(): 5 21643 localhost.localdomain1
MPI startup(): 6 21644 localhost.localdomain2
MPI startup(): 7 21645 localhost.localdomain3
MPI startup(): I_MPI_ROOT=/home/vagrant/intel/oneapi/mpi/2021.1.1
MPI startup(): I_MPI_MPIRUN=mpirun
MPI startup(): I_MPI_HYDRA_TOPOLIB=hwloc
MPI startup(): I_MPI_INTERNAL_MEM_POLICY=default
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 POSCARTi OH
POSCAR found :3 types and 9 ions
scaLAPACK will be used
-----------------------------------------------------------------------------
| |
| W W AA RRRRR N NIIN N GGGG !!! |
| W W AA R RNN NIINN NG G!!! |
| W WA AR RN NNIIN NNG !!! |
| W WW WAAAAAARRRRR NN NIINN NGGGG ! |
| WWWWA AR R N NNIIN NNG G |
| W WA AR RN NIIN 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 cangreatly 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 NIIN N GGGG !!! |
| W W AA R RNN NIINN NG G!!! |
| W WA AR RN NNIIN NNG !!! |
| W WW WAAAAAARRRRR NN NIINN NGGGG ! |
| WWWWA AR R N NNIIN NNG G |
| W WA AR RN NIIN 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+031304 0.218E+02
DAV: 3 -0.835496235250E+02 -0.78835E+02 -0.78061E+021040 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-011120 0.436E+00 0.347E+01
DAV: 6 -0.676314972968E+02 0.18147E+02 -0.13418E+021216 0.547E+01 0.300E+01
DAV: 7 -0.679648482636E+02 -0.33335E+00 -0.15612E+021288 0.762E+01 0.168E+01
</code></pre>
</div>
<div id="MySignature" role="contentinfo">
<img alt="知识共享许可协议" style="border-width:0" src="https://i.creativecommons.org/l/by-sa/4.0/88x31.png" /><br />本作品采用知识共享署名-相同方式共享 4.0 国际许可协议进行许可,转载时请注明原文链接,图片在使用时请保留全部内容,可适当缩放并在引用处附上图片所在的文章链接。<br><br>
来源:https://www.cnblogs.com/edifyX/p/14276199.html
頁:
[1]