化学学报 ›› 2022, Vol. 80 ›› Issue (10): 1401-1409.DOI: 10.6023/A22070313 上一篇    下一篇

研究论文

基于图形处理单元与密度拟合近似的单精度耦合簇CCSD和CCSD(T)程序

王治钒a,*(), 何冰a, 路艳朝b, 王繁b   

  1. a 成都师范学院 化学与生命科学学院/功能分子结构优化与应用四川省高校重点实验室 成都 611130
    b 四川大学 原子与分子物理研究所 成都 610064
  • 投稿日期:2022-07-17 发布日期:2022-08-17
  • 通讯作者: 王治钒
  • 基金资助:
    四川省自然科学基金(2022NSFSC1262); 国家自然科学基金(21973063); 国家自然科学基金(21703020); 成都师范学院人才引进项目(2021YJRC202020)

Single-precision CCSD and CCSD(T) Calculations with Density Fitting Approximations on Graphics Processing Units

Zhifan Wanga(), Bing Hea, Yanzhao Lub, Fan Wangb   

  1. a College of Chemistry and Life Science/Sichuan Provincial Key Laboratory for Structural Optimization and Application of Functional Molecules, Chengdu Normal University, Chengdu 611130, China
    b Institute of Atomic and Molecular Physics, Sichuan University, Chengdu 610064, China
  • Received:2022-07-17 Published:2022-08-17
  • Contact: Zhifan Wang
  • Supported by:
    Natrual Science Foundation of Sichuan Province(2022NSFSC1262); National Natural Science Foundation of China(21973063); National Natural Science Foundation of China(21703020); Foundation of Chengdu Normal University Talent Introduction Research Funding(2021YJRC202020)

作者此前工作表明, 在耦合簇CCSD (Coupled-Cluster approaches within the singles and doubles approximation)与CCSD(T) (CCSD approaches augmented by a perturbative treatment of triple excitations)计算中结合单精度数与消费型图形处理单元(GPU), 可以显著提高计算速度. 然而由于CCSD(T)计算对内存的巨大需求以及消费型GPU的内存限制, 在利用消费型GPU进行加速时, 不考虑利用空间对称性的情况下, 此前开发的CCSD(T)程序仅能用于计算300~400个基函数的体系. 利用密度拟合(Density-Fitting, DF)处理双电子积分可以显著降低CCSD(T)计算过程中的内存需求, 本工作发展了基于密度拟合近似并结合单精度数进行运算的DF-CCSD(T)程序, 该程序可用于包含700个基函数的无对称性体系的单点能计算, 以及包含1700个基函数的有对称性体系. 本工作所使用的计算节点配置了型号为Intel I9-10900k的CPU和型号为RTX3090的GPU, 与用双精度数在CPU上的计算相比, 利用单精度数结合GPU进行运算可以将CCSD的计算速度提升16倍, (T)部分可提升40倍左右, 而使用单精度数引入的误差可忽略不计. 在程序开发过程中, 作者发展了一套可利用GPU或CPU结合单精度数或双精度数进行含空间对称性的矩阵操作代码库. 基于该套代码库, 可以显著降低开发含空间对称性的耦合簇代码的难度.

关键词: 耦合簇, 密度拟合, 图形处理单元(GPU), 单精度

It has been reported by our group that using single-precision data and consumer graphics processing units (GPUs) can significantly improve computation speed of CCSD (Coupled-Cluster approaches within the singles and doubles approximation) and CCSD(T) (CCSD approaches augmented by a perturbative treatment of triple excitations). However, CCSD(T) can only be employed for small molecules with about 300~400 basis functions when using consumer GPUs for acceleration without spatial symmetry due to the memory limitation of GPU. Using density-fitting approximation can significantly reduce the memory requirements in CCSD(T) calculations. In this paper, DF-CCSD(T) codes based on the density fitting approximation together with single precision data was developed. All the matrix contractions were performed employing GEMM in CUBLAS on GPU or in Intel MKL on CPU. The other operations such as matrix expansion and transpose were performed using OpenACC on GPU or OpenMP on CPU. Those codes can be applied to single point energies for systems with around 700 basis functions without spatial symmetry and to molecules with about 1700 basis functions with symmetry on a GPU with 24 Gb memory. The server employed in this work has an Intel I9-10900k CPU and a RTX3090 GPU. CCSD calculations with single-precision data on GPU are about 16 times faster and it is about 40 times faster for the (T) part compared with the calculations on CPU using double precision data on this server. Error introduced by single precision data is negligible. A code library that can employ GPU or CPU using either single precision or double precision data to perform matrix operations with spatial symmetry was also reported in this work. Direct product decomposition (DPD) method was employed to deal with spatial symmetry. Complexity of developing coupled cluster codes with spatial symmetry can be significantly reduced with this library. The computational accuracy of single precision DF-CCSD(T) was compared with CCSD(T)-F12a and DLPNO-CCSD(T). The results shown that DF-CCSD(T) would be more stable than the other two approaches in describing chemical properties.

Key words: coupled-cluster, density fitting, graphics processing units (GPU), single precision