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

计算机工程与科学 ›› 2021, Vol. 43 ›› Issue (05): 820-829.

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

基于申威众核处理器的圣维南求解程序的并行与优化

丁哲昭,储根深,胡长军,李扬   

  1. ( 北京科技大学计算机与通信工程学院,北京 100083 ) 

  • 收稿日期:2020-12-29 修回日期:2021-03-03 接受日期:2021-05-25 出版日期:2021-05-25 发布日期:2021-05-19
  • 基金资助:
    国家重点研发计划(2017YFB0203100)

Parallelization and optimization of Saint-Venant solver on Sunway many-core processor

DING Zhe-zhao,CHU Gen-shen,HU Chang-jun,LI Yang#br#   

  1. (School of Computer and Communication Engineering,University of Science and Technology Beijing,Beijing 100083,China)

  • Received:2020-12-29 Revised:2021-03-03 Accepted:2021-05-25 Online:2021-05-25 Published:2021-05-19

摘要: 圣维南方程组可用于描述明渠非恒定流的汇流过程,在大规模水文模拟软件中,求该方程组的数值解是制约程序运行时间的最大瓶颈。
通过分析串行程序结构及其计算热点,挖掘计算密集型程序中单步模拟循环计算段和指令排列等的可并行性,针对“神威·太湖之光”超级计算机的异构众核架构设计主从核异步并行方案,基于MPI和athread库对求解程序进行移植、并行和加速,采用SIMD技术将从核计算段向量化,使用双缓冲等策略对通信瓶颈进行优化。测试表明,计算热点函数的性能较优化前平均可提高3倍以上,在百万控制单元规模内,众核级优化后的并行程序加速比可保持近线性增长,在神威多结点上具有很好的可扩展性。


关键词: 并行计算, 异构众核, 圣维南方程, 数值模拟

Abstract: The Saint-Venant equations can be used to describe the confluence process of unsteady flows in open channels. In large-scale hydrological simulation software, solving the numerical solution of the equations is the biggest bottleneck restricting the running time of the program. This paper analyzes the structure of the serial solving program and the hotspots of calculation, and explores the parallelism of the single-step simulation loop calculation section and instruction arrangement in the calculation- intensive program. A master-slave asynchronous parallel scheme is designed for the heterogeneous many-core architecture of the Sunway-TaihuLight supercomputer. The solver is ported, paralleled and accelerated based on MPI and athread libraries. SIMD technology is used to vectorize the slave-core’s calculation section, and double buffering strategies are used to optimize the communication process. The tests show that the performance of hot functions can be increased by more than 3 times on average compared with the computation before optimization. Within a million-unit scale, the speedup of parallel programs using many-core optimization can maintain growing linearly, which shows strong scalability in Sunway’s multi-nodes.



Key words: parallel computing, heterogeneous many-core processor, Saint-Venant equation, numerical simulation ,