经验首页 前端设计 程序设计 Java相关 移动开发 数据库/运维 软件/图像 大数据/云计算 其他经验
当前位置:技术经验 » 数据库/运维 » Linux/Shell » 查看文章
CentOS 7 环境安装Lammps,VASP等软件
来源:cnblogs  作者:HiroSyu  时间:2021/1/18 16:04:23  对本文有异议

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

一、编译环境

使用CentOS 7Intel oneAPI 2021

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

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

  1. [vagrant@localhost oneapi]$ pwd
  2. /home/vagrant/intel/oneapi
  3. [vagrant@localhost oneapi]$ tree -L 1
  4. .
  5. ├── advisor
  6. ├── ccl
  7. ├── clck
  8. ├── common.sh
  9. ├── compiler
  10. ├── conda_channel
  11. ├── dal
  12. ├── debugger
  13. ├── dev-utilities
  14. ├── dnnl
  15. ├── dpcpp-ct
  16. ├── dpl
  17. ├── etc
  18. ├── inspector
  19. ├── installer
  20. ├── intelpython
  21. ├── ipp
  22. ├── ippcp
  23. ├── itac
  24. ├── licensing
  25. ├── logs
  26. ├── mkl
  27. ├── modulefiles-setup.sh
  28. ├── mpi
  29. ├── readme-get-started-linux-base-kit.html
  30. ├── readme-get-started-linux-hpc-kit.html
  31. ├── setvars.sh
  32. ├── support.txt
  33. ├── sys_check.sh
  34. ├── tbb
  35. ├── vpl
  36. └── vtune
  37. 25 directories, 7 files

二、Lammps

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

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

Benchmark

  1. ## benchmark
  2. 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
  3. cd $HOME/lammps-stable_29Oct2020/examples/reax && mpirun -np 16 ../../src/lmp_intel_cpu_intelmpi -in in.reaxc.rdx

三、VASP

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

  1. cd $HOME && source ~/intel/oneapi/setvars.sh
  2. 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
  3. cp arch/makefile.include.linux_intel makefile.include
  4. sed -i -e 's/= mpif90/= mpiifort/g' makefile.include
  5. sed -i -e 's/-lmkl_blacs_openmpi_lp64/-lmkl_blacs_intelmpi_lp64/g' makefile.include
  6. if [ ! -f $MKLROOT/interfaces/fftw3xf/libfftw3xf_intel.a ]; then
  7. cp -r $MKLROOT/interfaces/fftw3xf $HOME && cd $HOME/fftw3xf && make libintel64
  8. cd $HOME/vasp.5.4.1 && sed -i -e 's/$(MKLROOT)/interfaces/fftw3xf/libfftw3xf_intel.a/$(HOME)/fftw3xf/libfftw3xf_intel.a/g' makefile.include
  9. fi
  10. make veryclean
  11. # !!! VASP makefile is not support multiprocessor compiler, do not add -j flag
  12. make all
  13. ls -alh bin

Benchmark

  1. 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
  2. mpirun -genv I_MPI_DEBUG 5 -np 8 -ppn 1 -host localhost ~/vasp.5.4.1/bin/vasp_std
  1. [vagrant@localhost constrMD_microcanonical]$ mpirun -genv I_MPI_DEBUG 5 -np 8 -ppn 1 -host localhost ~/vasp.5.4.1/bin/vasp_std
  2. [0] MPI startup(): Intel(R) MPI Library, Version 2021.1 Build 20201112 (id: b9c9d2fc5)
  3. [0] MPI startup(): Copyright (C) 2003-2020 Intel Corporation. All rights reserved.
  4. [0] MPI startup(): library kind: release
  5. [0] MPI startup(): libfabric version: 1.11.0-impi
  6. [0] MPI startup(): libfabric provider: tcp;ofi_rxm
  7. [0] MPI startup(): Rank Pid Node name Pin cpu
  8. [0] MPI startup(): 0 21638 localhost.localdomain 0
  9. [0] MPI startup(): 1 21639 localhost.localdomain 1
  10. [0] MPI startup(): 2 21640 localhost.localdomain 2
  11. [0] MPI startup(): 3 21641 localhost.localdomain 3
  12. [0] MPI startup(): 4 21642 localhost.localdomain 0
  13. [0] MPI startup(): 5 21643 localhost.localdomain 1
  14. [0] MPI startup(): 6 21644 localhost.localdomain 2
  15. [0] MPI startup(): 7 21645 localhost.localdomain 3
  16. [0] MPI startup(): I_MPI_ROOT=/home/vagrant/intel/oneapi/mpi/2021.1.1
  17. [0] MPI startup(): I_MPI_MPIRUN=mpirun
  18. [0] MPI startup(): I_MPI_HYDRA_TOPOLIB=hwloc
  19. [0] MPI startup(): I_MPI_INTERNAL_MEM_POLICY=default
  20. [0] MPI startup(): I_MPI_DEBUG=5
  21. running on 8 total cores
  22. distrk: each k-point on 8 cores, 1 groups
  23. distr: one band on 1 cores, 8 groups
  24. using from now: INCAR
  25. vasp.5.4.1 24Jun15 (build Jan 14 2021 01:54:48) complex
  26. POSCAR found type information on POSCAR Ti O H
  27. POSCAR found : 3 types and 9 ions
  28. scaLAPACK will be used
  29. -----------------------------------------------------------------------------
  30. | |
  31. | W W AA RRRRR N N II N N GGGG !!! |
  32. | W W A A R R NN N II NN N G G !!! |
  33. | W W A A R R N N N II N N N G !!! |
  34. | W WW W AAAAAA RRRRR N N N II N N N G GGG ! |
  35. | WW WW A A R R N NN II N NN G G |
  36. | W W A A R R N N II N N GGGG !!! |
  37. | |
  38. | For optimal performance we recommend to set |
  39. | NCORE= 4 - approx SQRT( number of cores) |
  40. | NCORE specifies how many cores store one orbital (NPAR=cpu/NCORE). |
  41. | This setting can greatly improve the performance of VASP for DFT. |
  42. | The default, NPAR=number of cores might be grossly inefficient |
  43. | on modern multi-core architectures or massively parallel machines. |
  44. | Do your own testing !!!! |
  45. | Unfortunately you need to use the default for GW and RPA calculations. |
  46. | (for HF NCORE is supported but not extensively tested yet) |
  47. | |
  48. -----------------------------------------------------------------------------
  49. LDA part: xc-table for Pade appr. of Perdew
  50. -----------------------------------------------------------------------------
  51. | |
  52. | W W AA RRRRR N N II N N GGGG !!! |
  53. | W W A A R R NN N II NN N G G !!! |
  54. | W W A A R R N N N II N N N G !!! |
  55. | W WW W AAAAAA RRRRR N N N II N N N G GGG ! |
  56. | WW WW A A R R N NN II N NN G G |
  57. | W W A A R R N N II N N GGGG !!! |
  58. | |
  59. | VASP found 18 degrees of freedom |
  60. | the temperature will equal 2*E(kin)/ (degrees of freedom) |
  61. | this differs from previous releases, where T was 2*E(kin)/(3 NIONS). |
  62. | The new definition is more consistent |
  63. | |
  64. -----------------------------------------------------------------------------
  65. POSCAR, INCAR and KPOINTS ok, starting setup
  66. WARNING: small aliasing (wrap around) errors must be expected
  67. FFT: planning ...
  68. WAVECAR not read
  69. prediction of wavefunctions initialized - no I/O
  70. entering main loop
  71. N E dE d eps ncg rms rms(c)
  72. DAV: 1 0.365928404142E+03 0.36593E+03 -0.13247E+04 832 0.808E+02
  73. DAV: 2 -0.471497687791E+01 -0.37064E+03 -0.35445E+03 1304 0.218E+02
  74. DAV: 3 -0.835496235250E+02 -0.78835E+02 -0.78061E+02 1040 0.124E+02
  75. DAV: 4 -0.857147612524E+02 -0.21651E+01 -0.21637E+01 920 0.271E+01
  76. DAV: 5 -0.857782211221E+02 -0.63460E-01 -0.63451E-01 1120 0.436E+00 0.347E+01
  77. DAV: 6 -0.676314972968E+02 0.18147E+02 -0.13418E+02 1216 0.547E+01 0.300E+01
  78. DAV: 7 -0.679648482636E+02 -0.33335E+00 -0.15612E+02 1288 0.762E+01 0.168E+01

原文链接:http://www.cnblogs.com/edifyX/p/14276199.html

 友情链接:直通硅谷  点职佳  北美留学生论坛

本站QQ群:前端 618073944 | Java 606181507 | Python 626812652 | C/C++ 612253063 | 微信 634508462 | 苹果 692586424 | C#/.net 182808419 | PHP 305140648 | 运维 608723728

W3xue 的所有内容仅供测试,对任何法律问题及风险不承担任何责任。通过使用本站内容随之而来的风险与本站无关。
关于我们  |  意见建议  |  捐助我们  |  报错有奖  |  广告合作、友情链接(目前9元/月)请联系QQ:27243702 沸活量
皖ICP备17017327号-2 皖公网安备34020702000426号