• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

计算机工程与科学 ›› 2024, Vol. 46 ›› Issue (09): 1566-1575.

• 高性能计算 • 上一篇    下一篇

基于OpenMP的硅晶体分子动力学模拟的空间分解着色及向量化研究#br#

傅游1,韩昊1,孙月娇1,梁建国2,叶雨曦3,花嵘1   

  1. (1.山东科技大学计算机科学与工程学院,山东 青岛 266590;
    2.曲阜师范大学计算机学院,山东 日照 276826;3.龙芯中科技术股份有限公司,北京 100095)

  • 收稿日期:2023-11-14 修回日期:2023-12-21 接受日期:2024-09-25 出版日期:2024-09-25 发布日期:2024-09-19
  • 基金资助:
    山东省自然科学基金(ZR2022MF274,ZR2021LZH004)

Spatial decomposition coloring and vectorization of molecular dynamics simulation of silicon crystal based on OpenMP

FU You1,HAN Hao1,SUN Yue-jiao1,LIANG Jian-guo2,YE Yu-xi3,HUA Rong1   

  1. (1.College of Computer Science and Engineering,Shandong University of Science and Technology,Qingdao 266590;
    2.School of Computer,Qufu Normal University,Rizhao 276826;
    3.Loongson Technology Corporation Limited,Beijing 100095,China)
  • Received:2023-11-14 Revised:2023-12-21 Accepted:2024-09-25 Online:2024-09-25 Published:2024-09-19

摘要: 作为材料领域虚拟过程工程研究的热点之一,硅晶体分子动力学采用Tersoff多体势进行模拟;多体势中粒子间相互作用计算量大,且数据之间存在依赖关系,在并行架构上高效、准确地进行大规模模拟面临写冲突和计算效率低2个挑战。为了解决以上问题,在OpenMP共享内存编程模型的基础上,结合硅晶体粒子特性实施了一系列面向硅晶体分子动力学应用的优化方法,以提高模拟效率:(1) 在大规模线程级并行模拟过程中,利用空间分解图着色思想消除粒子之间的数据依赖,从而有效解决写冲突问题;(2) 针对核心计算程序段,采用整体向量化的方式提高核心计算效率,并利用级数估计实现超越函数,以实现Tersoff多体势在多核处理器上的并行优化。实验结果表明,在X86平台上Tersoff多体势具有很好的优化潜力,空间分解图着色和向量化方法在硅晶体应用上具有可行性和可扩展性,能够有效地解决由数据交叉导致的写冲突以及计算密集型优化问题,最终加速比可达23.17。

关键词: 硅晶体, 分子动力学模拟, 空间分解着色, 向量化, OpenMP

Abstract: As one of the hot spots in virtual process engineering research in materials, the molecular dynamics of silicon crystal is simulated using Tersoff multi-body potential. In the multi-body potential, the interaction between particles is computationally intensive, and there are dependencies between data. Efficient and accurate large-scale simulation on parallel architectures faces two challenges: write conflict and low computational efficiency. To address these issues, a series of optimization methods tailored for silicon crystal molecular dynamics applications have been implemented based on the OpenMP shared-memory programming model to enhance simulation efficiency: (1)In the process of large-scale thread-level parallel simulation, the spatial decomposition graph coloring idea is used to eliminate the data dependence between particles and effectively solve the problem of write conflict; (2)For the core computing program segment, the overall vectorization is used to improve the computational efficiency, and the series estimation is used to realize the transcendental function to achieve the parallel optimization of multi-body potential Tersoff on multi-core processors. The experimental results show that the Tersoff potential has good optimization potential on the X86 platform, and the spatial decomposition graph coloring and vectorization are feasible and scalable for silicon crystal application, which can effectively solve the write conflict caused by data intersection and computationally intensive optimization problems, and the speedup of final result can reach 23.17. 

Key words: silicon crystal, molecular dynamics simulation, spatial decomposition coloring, vectorization, OpenMP