arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2412.01695cond-mat.mtrl-sci
收藏

一种用于赝势平面波密度泛函理论代码的备选GPU加速方案及其在金属体系中的应用

An alternative GPU acceleration for a pseudopotential plane-waves density functional theory code with applications to metallic systems

Xuejun Gong, Andrea Dal Corso

AI总结:

针对小晶胞、多k点的金属等体系,提出重写哈密顿量作用子程序的GPU加速方案,采用CUDA Fortran实现,对比CPU及Quantum ESPRESSO现有GPU方案,在适用场景下实现显著性能提升。

摘要:

我们提出了一种用于平面波赝势电子结构代码的备选GPU加速方案,该方案专为小晶胞但需要大量k点采样布里渊区的体系(例如金属体系)设计。我们讨论了Kohn-Sham方程的对角化,以及密度泛函微扰理论中推导得到的线性方程组的求解。这两个问题都得益于对将哈密顿量作用于布洛赫波函数的子程序的重写,使其能在GPU线程上并行处理不同波矢k的波函数,处理数量以GPU显存允许的上限为限。我们的实现采用CUDA Fortran编写,大量使用在GPU上运行的内核子程序(GLOBAL子程序),以及可在GPU线程内部调用的子程序(DEVICE子程序)。我们将本方法与仅使用CPU的计算、以及Quantum ESPRESSO中当前实现的方案进行了对比,后者使用GPU加速库完成快速傅里叶变换(FFT)和矩阵乘法等线性代数任务,并通过OpenACC指令实现循环并行化。我们通过一个实际算例表明,本方法在其设计适用的场景中可实现显著的性能提升。

英文摘要:

We present an alternative GPU acceleration for plane waves pseudopotentials electronic structure codes designed for systems that have small unit cells but require a large number of k points to sample the Brillouin zone as happens, for instance, in metals. We discuss the diagonalization of the Kohn and Sham equations and the solution of the linear system derived in density functional perturbation theory. Both problems take advantage from a rewriting of the routine that applies the Hamiltonian to the Bloch wave-functions to work simultaneously (in parallel on the GPU threads) on the wave-functions with different wave-vectors k, as many as allowed by the GPU memory. Our implementation is written in CUDA Fortran and makes extensive use of kernel routines that run on the GPU (GLOBAL routines) or can be called from inside the GPU threads (DEVICE routines). We compare our method with the CPUs only calculation and with the approach currently implemented in Quantum ESPRESSO that uses GPU accelerated libraries for the FFT and for the linear algebra tasks such as the matrix-matrix multiplications as well as OpenACC directives for loop parallelization. We show in a realistic example that our method can give a significant improvement in the cases for which it has been designed.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑