VASP多节点并行参数设置
VASP currently offers parallelization and data distribution over bands and/or over plane wave coefficients (see NCORE and NPAR), and parallelization over k-points (no data distribution, see KPAR).
To obtain high efficiency on massively parallel systems or modern multi-core machines, it is strongly recommended to use all at the same time.
以下假设计算总核心数为N,单节点计算核心数为n
- NPAR与NCORE
- 两者相关:NCORE*NPAR=N/KPAR, 取其一设置即可,vaspwiki上建议优先设置NPAR,但NCORE更为方便 (NCORE is available from VASP.5.2.13 on, and is more handy than the previous parameter NPAR)
- NPAR决定能带并行策略(NPAR determines the number of bands that are treated in parallel)
- NCORE决定轨道并行策略(NCORE determines the number of compute cores that work on an individual orbital)
- 大规模并行,vaspwiki上建议NPAR≈Sqrt(N) or NCORE = n. 若N开方非整数,则取开方结果附近的整数,这里需要注意:NPAR需要适当选取,使得NCORE=N/NPAR是n的factor,以减小节点间通信的overhead,否则VASP会采用默认设置,即NPAR=N or NCORE=1,默认值适用于小核数(8核以内)和小的通信带宽
- NCORE的最佳值取决于一个unit cell中的具体原子数,对于100个原子左右的unit cell, NCORE∼4;对于大的unit cell (more than 400 atoms), NCORE∼12-16
- KPAR
- The set of k-points is distributed over KPAR groups
- KPAR决定K点并行策略(KPAR determines the number of k-points that are to be treated in parallel)
- choose KPAR such that it is an integer divisor of N
- the data is not distributed additionally over k-points
总结:
以上源于vaspwiki的一般性总结,具体请以实际测试为准!
特别在超算上,一定要花时间测试!否则可能吃(算)力不讨好!
计算测试从单节点开始,不要一上来就做多节点测试,确保每一次增加节点后要比之前快!
个人实践测试经验
VASP针对k点和能带做了并行计算处理,可以从vasp刚开始输出的结果看出
running on N total cores
distrk: each k-point on N/KPAR cores, KPAR groups
distr: one band NCORE cores, NPAR groups
其中NCORE需要为n的factor. 相对于NPAR,设置NCORE更为方便,因为直接设NPAR还要验证NCORE=N/NPAR是否是n的factor. vaspwiki建议对于100个原子左右的unit cell, NCORE∼4;对于大的unit cell (more than 400 atoms), NCORE∼12-16. 因此,可根据自己的体系和资源合理选取.