计算化学公社

 找回密码 Forget password
 注册 Register
Views: 85773|回复 Reply: 33
打印 Print 上一主题 Last thread 下一主题 Next thread

[VASP] vasp.6.1.0 更新介绍/安装/测试

  [复制链接 Copy URL]

119

帖子

2

威望

2144

eV
积分
2303

Level 5 (御坂)

本帖最后由 啦啦黑还黑 于 2020-2-1 11:48 编辑

未经作者授权禁止转载
============================vasp6.1.0 更新介绍===================================
2020年1月29号,vasp.at 官网终于正式发布vasp6.1.0版本。并没有从6.0开始


如果直接维也纳原厂购买的已经可以下载了,从代理处(materials design账号)购买的可能还需要再等几天才能下载。

先来看一下vasp6值得期待的功能,从vasp开发者那里得知vasp6中更新的最强功能是,机器学习分子动力学和三阶GW计算。

更新的VASP6版本有一些重大更新:
(1)支持OpenMP和MPI混编。这有利于提高内存使用效率,而且对于大规模并行加速明显。VASP5一般使用200核并行效率就很难继续提高了。但是用OpenMP和MPI混编的方式可以进行更大规模的并行计算。
(2)支持libxc,这样可以选择的泛函就非常多了。VASP5只有有限的一些泛函可以用。
(3)新方法机器学习力场,这个功能也是最值得期待的,(Machine Learned Force Fields),具体使用的方法是On-the-fly machine learning force field generation using Bayesian linear regression.
(4)电声耦合计算(Electron-phonon interactions)
(5)X-ray absorption near-edge spectroscopy (XANES)计算,目前支持Super-cell core-hole (SCH) method计算方法。
(6)constrained Random Phase Approximation(CRPA)
(7)支持OpenACC的GPU加速计算,可以使用Adaptively compressed exchange使得杂化泛函计算速度提高2-3倍。

具体更新项目见:https://www.vasp.at/wiki/index.php/Category:VASP6

另外国外一些提前拿到源码的人已经经行了一些测试:
推荐一篇文章:On the use of OpenMP in VASP: threading and SIMD,文中详细介绍了openmp+mpi混编加速的优势,以及avx2,avx512对计算的加速。
摘要如下:
VASP is a widely used electronic structure code that originally exploits process-level parallelism through the Message Passing Interface (MPI) for work distribution within and across compute nodes. Architectural changes of modern parallel processors, however, urge programmers to address thread-level and data-level parallelism as well to benefit most from the available compute resources within a node. We describe for the VASP code how to approach for an MPI + OpenMP parallelization including SingleInstruction Multiple-Data (SIMD) parallelism through OpenMP SIMD constructs together with a generic high-level vector coding scheme. As a result of our adaptations, we can demonstrate an improved scalability of VASP and more than 20% gain over the MPI-only version. We found the multiple-endpoint MPI feature be key to performance for (collective) operations on large messages from within multi-threaded contexts: we see about 2x reduced execution times for MPI collectives. With our high-level vector coding scheme applied to VASP’s general gradient approximation routine, we achieve  about 3x and up to about 9x performance gain on AVX2 and AVX512 platforms, respectively, with the Intel 18 (update 1) compiler, and a 2x-3x performance gain across AVX2 and AVX512 platforms with the GNU 7.2 compiler. Our adaptations are generic and can serve as a reference for the modernization of other (MPI-only) codes.

混编测试方法:https://www.vasp.at/wiki/index.php/Hybrid_openMPI/openMP_parallelization


Intel 也对新版vasp做了测试:

可见拥有avx512指令集的gold 6149(18核,2.3GHz-3.7GHz) 比 avx2指令集的2697v4(18核,2.3GHz-3.6GHz) 快了1.58倍
============================vasp6.1.0 更新介绍 END===================================


============================vasp6.1.0 安装===================================
MPI-only版的编译过程和vasp544是一样的。

第一步:编译intel编译器,这个有好多贴子都讲过了。编译完成后,加载intel fortran编译器和intel mpi:
  1. source /opt/intel/parallel_studio_xe_2018.1.038/bin/psxevars.sh
复制代码

  1. source /opt/intel/compilers_and_libraries_2018.1.163/linux/bin/compilervars.sh intel64
  2. source /opt/intel/compilers_and_libraries_2018.1.163/linux/mpi/bin64/mpivars.sh intel64
复制代码


第二步:准备makefile.include文件,在./arch文件里有一些离子文件,其默认参数不用修改即可直接编译。
  1. cp arch/makefile.include.linux_intel ./makefile.include
复制代码
  1. make all
  2. (等待编译,大约20分钟)
  3. make test
复制代码
vasp6 新增了make test 功能,在编译之后可以运行make test测试编辑好的二进制文件是否能用。测试各个功能的例子文件,这一步时间较长。

建议用的makefile.include文件是:
makefile.include.linux_intel (intel编译器,mpi-only版)
或 makefile.include.linux_intel_omp(intel编译器,mpi和openmp混编版)
如果是单节点机器,建议用mpi-only版就行了,
如果是想大规模多节点并行,用mpi和openmp混编版,此时如果在提交任务的时候用-x OMP_NUM_THREADS=1和mpi-only版效果是一样的。(这里我并不确定,请大家指正)

注意:https://www.vasp.at/wiki/index.php/Installing_VASP网站上的编译参数还是针对vasp544的,如果要修改编译参数建议直接阅读README.md文件

以下是默认的makefile.include.linux_intel 文件,值得注意的是CPP_OPTIONS里有-Dfock_dblbuf选项,这个是加速计算杂化泛函用的。
FFLAGS = -assume byterecl -w -xHOST 里vasp6已经默认加上xHOST可以适用于当前编译节点所支持的最高指令集。(vasp544是没有默认添加的,注意:如果计算节点和编辑节点CPU不一样需要手动指定指令集)
也可以修改 OFLAG = -O3 -xHOST 进一步优化编译。
  1. # Precompiler options
  2. CPP_OPTIONS= -DHOST="LinuxIFC"\
  3.              -DMPI -DMPI_BLOCK=8000 -Duse_collective \
  4.              -DscaLAPACK \
  5.              -DCACHE_SIZE=4000 \
  6.              -Davoidalloc \
  7.              -Dvasp6 \
  8.              -Duse_bse_te \
  9.              -Dtbdyn \
  10.              -Dfock_dblbuf

  11. CPP        = fpp -f_com=no -free -w0  $*$(FUFFIX) $*$(SUFFIX) $(CPP_OPTIONS)

  12. FC         = mpiifort
  13. FCL        = mpiifort -mkl=sequential

  14. FREE       = -free -names lowercase

  15. <span style="background-color: yellow;">FFLAGS     = -assume byterecl -w -xHOST
  16. OFLAG      = -O2</span>
  17. OFLAG_IN   = $(OFLAG)
  18. DEBUG      = -O0

  19. MKL_PATH   = $(MKLROOT)/lib/intel64
  20. BLAS       =
  21. LAPACK     =
  22. BLACS      = -lmkl_blacs_intelmpi_lp64
  23. SCALAPACK  = $(MKL_PATH)/libmkl_scalapack_lp64.a $(BLACS)

  24. OBJECTS    = fftmpiw.o fftmpi_map.o fft3dlib.o fftw3d.o

  25. INCS       =-I$(MKLROOT)/include/fftw

  26. LLIBS      = $(SCALAPACK) $(LAPACK) $(BLAS)


  27. OBJECTS_O1 += fftw3d.o fftmpi.o fftmpiw.o
  28. OBJECTS_O2 += fft3dlib.o

  29. # For what used to be vasp.5.lib
  30. CPP_LIB    = $(CPP)
  31. FC_LIB     = $(FC)
  32. CC_LIB     = icc
  33. CFLAGS_LIB = -O
  34. FFLAGS_LIB = -O1
  35. FREE_LIB   = $(FREE)

  36. OBJECTS_LIB= linpack_double.o getshmem.o

  37. # For the parser library
  38. CXX_PARS   = icpc
  39. LLIBS      += -lstdc++

  40. # Normally no need to change this
  41. SRCDIR     = ../../src
  42. BINDIR     = ../../bin
复制代码

第三步:准备提交脚本测试如果用的mpi-only版
  1. mpirun -np 24 ~/opt/vasp.6.1.0/bin/vasp_gam  > LOG
复制代码

如果用mpi和openmp混编版
  1. mpirun -np 24 ~/opt/vasp.6.1.0-openmp/bin/vasp_gam -x OMP_NUM_THREADS=1  > LOG
复制代码
OMP_NUM_THREADS=1 的数值需要测试,当前我测试的单节点计算用OMP_NUM_THREADS=1用最快,和mpi-only版速度一样。
估计只有当节点数多了混编策略才有用。 (这里我并不确定,请大家指正)
============================vasp6.1.0 安装 END===================================


============================vasp6.1.0 测试===================================
这部分以后慢慢补充,目前的结果看vasp6同样用-O2 -xHOST 和 -O3 -xHOST 速度基本差不多。如果把-xHOST参数去掉,速度会掉不少。
对于GGA-PBE计算,vasp544(-O3 -xHOST)和vasp6(-O3 -xHOST)速度几乎一样,CPU用的Intel(R) Xeon(R) Gold 6126 CPU @ 2.60GHz,双路24核
============================vasp6.1.0 测试 END===================================

评分 Rate

参与人数
Participants 21
eV +92 收起 理由
Reason
zhuquexj + 3
CJW + 5
GEEK + 8 赞!
JamesBourbon + 4 好物!
moria + 3 谢谢
ezez + 5 赞!
snljty + 5
Picardo + 4
tanyazhi + 4 好物!
corei70715 + 5 谢谢
physics_xw + 4 赞!
KevinLee + 5 赞!
阿锋001 + 3 赞!
wypkdhd + 4 谢谢
juanshenghuang + 5
fallleave + 5 赞!
obaica + 5
hellojwx + 4 谢谢分享
ABetaCarw + 3 谢谢分享
Soul + 4 谢谢分享

查看全部评分 View all ratings

3

帖子

0

威望

31

eV
积分
34

Level 2 能力者

33#
发表于 Post on 2024-3-21 14:09:12 | 只看该作者 Only view this author
想问一下,我用vasp5.4.4优化的结果能用来跑vtst编译后的vasp6.4.1的neb计算吗

8

帖子

0

威望

1412

eV
积分
1420

Level 4 (黑子)

32#
发表于 Post on 2022-2-24 18:22:00 | 只看该作者 Only view this author
请问编译完后运行失败,提示forrtl: severe (168): Program Exception - illegal instruction是什么原因

157

帖子

0

威望

2105

eV
积分
2262

Level 5 (御坂)

31#
发表于 Post on 2021-11-4 10:29:09 | 只看该作者 Only view this author
你好,因为Intel Parallel Studio XE 2019 Update 1不支持centos8 stream,所以不能按sob老师编译VASP 5.4的那个方法, 我是安装 Intel® oneAPI Base Toolkit 和 Intel® oneAPI HPC来替代,运行ifort -V,可以编译器的版本,但是在vasp里make all 进行一半,提示错误如下图,我不清楚bashrc里要怎么设置,试了很多次,可否请教一下怎么设置,是哪里出错了

157

帖子

0

威望

2105

eV
积分
2262

Level 5 (御坂)

30#
发表于 Post on 2021-11-4 09:23:31 | 只看该作者 Only view this author
昨天编译6.1 6.2 都出现问题中断,今晚试试你这个方法

2

帖子

0

威望

7

eV
积分
9

Level 1 能力者

29#
发表于 Post on 2021-9-4 03:28:16 | 只看该作者 Only view this author
Quantum198907 发表于 2020-5-29 21:06
可以用分别用make gam/make std/make ncl 命令逐个编译,(强迫症)就看不到错误啦¥%¥#%哈哈,也就是说 ...

感谢,这个方法可行,分开编译,没有报错。Make test也过了

2

帖子

0

威望

7

eV
积分
9

Level 1 能力者

28#
发表于 Post on 2021-9-4 03:25:15 | 只看该作者 Only view this author
Quantum198907 发表于 2020-5-29 21:06
可以用分别用make gam/make std/make ncl 命令逐个编译,(强迫症)就看不到错误啦¥%¥#%哈哈,也就是说 ...

确实分开 make gam/make std/make ncl, make test能过没有报错

9

帖子

0

威望

135

eV
积分
144

Level 2 能力者

27#
发表于 Post on 2021-5-31 09:18:48 | 只看该作者 Only view this author
abin 发表于 2021-5-30 21:37
买。

如果是练习用,

谢谢指教

2407

帖子

1

威望

5950

eV
积分
8377

Level 6 (一方通行)

26#
发表于 Post on 2021-5-30 21:37:35 | 只看该作者 Only view this author
大公子扶苏 发表于 2021-5-30 20:03
哪能得到vasp安装包呀

买。

如果是练习用,
那么换一个工具,
比如 duckduckgo。

如果中间三行,没有看懂,
就当我没说。

另,材料人有 vasp从头编译演示,可免费随便看。
High-Performance Computing for You
为您专属定制的高性能计算解决方案

更多讯息,请访问:
https://labitc.top
http://tophpc.top:8080
电邮: ask@hpc4you.top

9

帖子

0

威望

135

eV
积分
144

Level 2 能力者

25#
发表于 Post on 2021-5-30 20:03:57 | 只看该作者 Only view this author
哪能得到vasp安装包呀

2407

帖子

1

威望

5950

eV
积分
8377

Level 6 (一方通行)

24#
发表于 Post on 2021-4-18 09:58:15 | 只看该作者 Only view this author
搞理论的 发表于 2020-9-24 22:49
文章好像说反了,OPENMP是用于节点内并行的,所以单节点计算的话,应该用OPENMP编译更好。

openMP 更加适合用于intel Phi这类芯片, 比如KNL.
对于纯CPU核心, intelMPI会快一些.
AMD的处理器核心, 另说.
High-Performance Computing for You
为您专属定制的高性能计算解决方案

更多讯息,请访问:
https://labitc.top
http://tophpc.top:8080
电邮: ask@hpc4you.top

21

帖子

0

威望

292

eV
积分
313

Level 3 能力者

23#
发表于 Post on 2021-4-1 14:08:17 | 只看该作者 Only view this author
planet5460 发表于 2020-7-21 10:38
想请教一下,vasp6.1支持vaspsol插件吗?我尝试用以前的编译方法编译了下,不成功。

https://mp.weixin.qq.com/s/pWLNZknUvLcYKw5IAlSaZg
可以尝试下这个

70

帖子

1

威望

437

eV
积分
529

Level 4 (黑子)

22#
发表于 Post on 2021-3-17 15:19:06 | 只看该作者 Only view this author
今天也尝试着编译了一下,开始在gpu处出错,后来用make std进行编译,一瞬间就编译好了。貌似也能用。这么快正常吗么?

119

帖子

2

威望

2144

eV
积分
2303

Level 5 (御坂)

21#
 楼主 Author| 发表于 Post on 2020-9-25 14:05:16 | 只看该作者 Only view this author
搞理论的 发表于 2020-9-24 22:49
文章好像说反了,OPENMP是用于节点内并行的,所以单节点计算的话,应该用OPENMP编译更好。

用openmp或者 mpi + openmp混编的方法都不如直接用 intelmpi速度快。。除非并行的核数非常的多混编可能会快一点

22

帖子

0

威望

179

eV
积分
201

Level 3 能力者

20#
发表于 Post on 2020-9-24 22:49:52 | 只看该作者 Only view this author
文章好像说反了,OPENMP是用于节点内并行的,所以单节点计算的话,应该用OPENMP编译更好。

14

帖子

0

威望

1806

eV
积分
1820

Level 5 (御坂)

19#
发表于 Post on 2020-8-20 20:21:56 | 只看该作者 Only view this author
老师,请问GPU版本编译失败,显示nvcc fatal   : Unsupported gpu architecture 'compute_30'怎么解决?是不是我的显卡不行?我的GPU是两个RTX2080-S,CUDA安装的是11.0版的
惟天下之至拙能胜天下之至巧。

手机版 Mobile version|北京科音自然科学研究中心 Beijing Kein Research Center for Natural Sciences|京公网安备 11010502035419号|计算化学公社 — 北京科音旗下高水平计算化学交流论坛 ( 京ICP备14038949号-1 )|网站地图

GMT+8, 2025-8-14 00:56 , Processed in 0.224878 second(s), 31 queries , Gzip On.

快速回复 返回顶部 返回列表 Return to list