数据与计算发展前沿 ›› 2024, Vol. 6 ›› Issue (2): 134-144.

CSTR: 32002.14.jfdc.CN10-1649/TP.2024.02.012

doi: 10.11871/jfdc.issn.2096-742X.2024.02.012

• 技术与应用 • 上一篇    下一篇

面向国产加速卡的OpenFOAM线程并行加速研究

尚小敏1(),李强1,*(),高凌云2,3,陶顺安1,周全1,袁武2,3,陆忠华2,3   

  1. 1.青岛大学计算机科学技术学院,山东 青岛 266071
    2.中国科学院计算机网络信息中心,北京 100083
    3.中国科学院大学,北京 100049
  • 收稿日期:2023-04-28 出版日期:2024-04-20 发布日期:2024-04-26
  • 通讯作者: *李强(E-mail: lq.sxt@163.com
  • 作者简介:尚小敏,青岛大学计算机科学技术学院,硕士研究生,主要研究方向为高性能计算。硕士期间发表EI会议论文1篇。
    本文中负责代码调试,实验验证以及论文的编写。
    SHANG Xiaomin is a master’s student in the School of Computer Science and Technology at Qingdao University Her main research interests include high-performance computing. During her master's program, she published one conference paper in EI.
    In this paper, she was responsible for code debugging, experimental verification, and paper writing.
    E-mail: 1415470940@qq.com|李强,青岛大学计算机科学技术学院,博士,讲师,2012年于美国明尼苏达大学访问工作半年,《Hydrology Research》期刊审稿人。主要研究方向为高性能计算、异构并行计算、水循环模拟等。参与国家自然科学基金3项,发表学术论文5篇,其中2篇被SCI检索,专利1项,译著1部。
    本文中负责论文实验指导、文章润色。
    LI Qiang, Ph.D., is a lecturer at the School of Computer Science and Technology of Qingdao University. In 2012, he worked as a visiting scholar at the University of Minnesota in the United States for six months and served as a reviewer for the journal “Hydrology Research”. His main research fields/directions include high-performance computing, heterogeneous parallel computing, and water cycle simulation. He has participated in three projects funded by the National Natural Science Foundation, published five academic papers, of which two have been indexed by SCI, obtained one patent, and translated one book.
    In this paper, he is responsible for guiding the experimental work and revising the article.
    E-mail: lq.sxt@163.com
  • 基金资助:
    国家重点研发计划(2020YFB1709500);山东省自然科学基金面上项目(ZR201910310143)

Research on Parallel Acceleration of OpenFOAM Threads for Domestic Accelerator

SHANG Xiaomin1(),LI Qiang1,*(),GAO Lingyun2,3,TAO Shunan1,ZHOU Quan1,YUAN Wu2,3,LU Zhonghua2,3   

  1. 1. School of Computer Science and Technology, Qingdao University, Qingdao, Shandong 266071, China
    2. Computer Network Information Center, Chinese Academy of Sciences, Beijing 100083, China
    3. University of Chinese Academy of Sciences, Beijing 100049, China
  • Received:2023-04-28 Online:2024-04-20 Published:2024-04-26

摘要:

【背景】随着流体力学模拟的精细化,CFD流体模拟软件OpenFOAM对算力的需求持续增加,新型东方超级计算系统是国产自研的新型异构超算。【目的】以新型东方超级计算系统为平台移植OpenFOAM,实现OpenFOAM的国产超算适配与加速。【方法】首先,通过分析“东方”超级计算系统和OpenFOAM的功能架构,本文制定了适用于国产加速卡的求解器,通过使用本文移植后的CUSP来调用国产加速卡底层代码从而实现稀疏存储格式矩阵向量乘以及diagonal矩阵预处理。其次,在此基础上,实现了单节点多国产加速卡的并行SpMV。【结果】本文使用了OpenFOAM自带的pitzDaily算例进行算法验证,并通过多种加速性能的对比方法对测试性能进行分析,取得了19.7倍的加速效果。【局限】本研究只实现了单节点的OpenFOAM并行优化。【结论】本研究结果对于发挥OpenFOAM在流体力学方面的优势和扩大超算软件适应面具有重要意义。

关键词: OpenFOAM, 并行计算, 异构计算, 国产加速卡, 移植优化

Abstract:

[Background] With the refinement of computational fluid dynamics simulations, the demand for computing power from CFD software OpenFOAM continues to increase. The new “East” supercomputing system is a new type of home-grown heterogeneous supercomputer to satisfy the demand. [Purpose] OpenFOAM is optimized and accelerated by porting it to the Oriental Supercomputer. [Methods] Firstly, by analyzing the functional architecture of the “East” supercomputing system and OpenFOAM, a solver for the domestic accelerator is developed and the ported CUSP is used to call the underlying code of the domestic accelerator to realize the sparse storage format matrix vector multiplication and diagonal matrix preprocessing. Secondly, a parallel SpMV (matrix-vector multiplication) on a single-node card with multiple domestic accelerators is implemented. [Results] The work introduced in this paper is verified by the pitzDaily example provided by OpenFOAM, and the performance is evaluated through comparison with several comparative methods of acceleration, which shows our approach achieves a 19.7 times speedup. [Limitations] This study only realizes a parallel optimization of OpenFOAM on a single-node. [Conclusions] The results of this study are of great significance for unleashing the advantages of OpenFOAM in fluid mechanics and expanding the scope of the application of supercomputer software.

Key words: OpenFOAM, parallel computing, heterogeneous computing, domestic accelerator, porting optimization