|
本帖最后由 啦啦黑还黑 于 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:
- source /opt/intel/parallel_studio_xe_2018.1.038/bin/psxevars.sh
复制代码 或
- source /opt/intel/compilers_and_libraries_2018.1.163/linux/bin/compilervars.sh intel64
- source /opt/intel/compilers_and_libraries_2018.1.163/linux/mpi/bin64/mpivars.sh intel64
复制代码
第二步:准备makefile.include文件,在./arch文件里有一些离子文件,其默认参数不用修改即可直接编译。
- cp arch/makefile.include.linux_intel ./makefile.include
复制代码- make all
- (等待编译,大约20分钟)
- 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 进一步优化编译。
- # Precompiler options
- CPP_OPTIONS= -DHOST="LinuxIFC"\
- -DMPI -DMPI_BLOCK=8000 -Duse_collective \
- -DscaLAPACK \
- -DCACHE_SIZE=4000 \
- -Davoidalloc \
- -Dvasp6 \
- -Duse_bse_te \
- -Dtbdyn \
- -Dfock_dblbuf
- CPP = fpp -f_com=no -free -w0 $*$(FUFFIX) $*$(SUFFIX) $(CPP_OPTIONS)
- FC = mpiifort
- FCL = mpiifort -mkl=sequential
- FREE = -free -names lowercase
- <span style="background-color: yellow;">FFLAGS = -assume byterecl -w -xHOST
- OFLAG = -O2</span>
- OFLAG_IN = $(OFLAG)
- DEBUG = -O0
- MKL_PATH = $(MKLROOT)/lib/intel64
- BLAS =
- LAPACK =
- BLACS = -lmkl_blacs_intelmpi_lp64
- SCALAPACK = $(MKL_PATH)/libmkl_scalapack_lp64.a $(BLACS)
- OBJECTS = fftmpiw.o fftmpi_map.o fft3dlib.o fftw3d.o
- INCS =-I$(MKLROOT)/include/fftw
- LLIBS = $(SCALAPACK) $(LAPACK) $(BLAS)
- OBJECTS_O1 += fftw3d.o fftmpi.o fftmpiw.o
- OBJECTS_O2 += fft3dlib.o
- # For what used to be vasp.5.lib
- CPP_LIB = $(CPP)
- FC_LIB = $(FC)
- CC_LIB = icc
- CFLAGS_LIB = -O
- FFLAGS_LIB = -O1
- FREE_LIB = $(FREE)
- OBJECTS_LIB= linpack_double.o getshmem.o
- # For the parser library
- CXX_PARS = icpc
- LLIBS += -lstdc++
- # Normally no need to change this
- SRCDIR = ../../src
- BINDIR = ../../bin
复制代码
第三步:准备提交脚本测试如果用的mpi-only版
- mpirun -np 24 ~/opt/vasp.6.1.0/bin/vasp_gam > LOG
复制代码
如果用mpi和openmp混编版
- 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
-
查看全部评分 View all ratings
|