Page 60 - 《软件学报》2021年第8期
P. 60

2342                                   Journal of Software  软件学报 Vol.32, No.8,  August 2021

                 Abstract:    HPCG benchmark is a new standard for supercomputer ranking. This benchmark is used mainly for evaluating how fast a
                 supercomputer is able to solve a large scale sparse linear system, which is closer to real applications, and has attracted extensive attention
                 recently. Research of parallel HPCG on domestic heterogeneous many-core supercomputers is very important, not only to improve the
                 HPCG ranking of  Chinese supercomputers, but  also to provide reference of parallel  algorithm  and optimization techniques for  many
                 applications.  This work studies parallelization  and  optimization of  HPCG on  a domestically produced complex heterogeneous
                 supercomputer, leveraging blocked graph coloring algorithm for parallelism exploration for the first time on this system, and proposes a
                 graph  coloring  algorithm for structured grids.  The parallelism  produced by this  algorithm  is higher  than  the traditional JPL  and CC
                 algorithm, with better coloring quality. With this algorithm, successfully reduced the iteration number of HPCG by 3 times, and the total
                 performance is improved by 6%. This study also analyzes the data transfer cost of each component in the complex heterogeneous system,
                 providing a task partitioning method, which is more suitable for HPCG, and the neighbor communication cost in SpMV and SymGS is
                 hidden by inner-outer region partitioning. In the whole-system test, an HPCG performance of 1.67% of the peek GFLOPS of the system is
                 achieved, compared to single-node performance, the weak-scaling efficiency on the whole system has reached 92%.
                 Key words:    HPCG; domestic supercomputer; graph coloring; SpMV; SymGS


                                                                                                [1]
                    HPCG(high performance conjugate gradients)基准测试程序是一种新的超级计算机排名度量标准 .该测试
                                                                                                  [2]
                 基准主要用于衡量超级计算机解决大规模稀疏线性系统的能力,相比于 HPL(high performance Linpack) ,其计
                 算、访存与通信模式与当前主流高性能计算机应用程序更为契合,能够更全面地反映系统的访存带宽和延迟的
                                                              [3]
                                                                                     [4]
                 性能.HPL 和 HPCG 排名每年发布两次,一次在德国的 ISC 大会上,另一次在美国的 SC 大会上.位于世界前列
                 的超级计算机均提交 HPL 和 HPCG 两个基准测试程序的结果,2019 年德国举办的 ISC 大会同时发布了 HPL
                 和 HPCG 结果.越来越多的应用研究人员开始关注 HPCG 的测试结果,期望从中可以了解超级计算机访存、通
                 信等的特点,一些 HPCG 并行和优化方法也可能对某些应用有所启示.
                    目前超级计算机的体系结构日趋复杂,早已从同构转向异构,且同节点异构部件的运算性能差异越来越大,
                 这对异构并行算法的设计将有很大的影响.本文主要面向一类国产复杂异构系统研究 HPCG 并行算法和高效
                 实现方法.目前 Dongarra 教授课题组研究了 HPL-AI 混合精度算法             [5,6] ,我们也正在关注该方向的研究.
                    本文工作是在国产超级计算机研制方大力支持下完成的,在此表示感谢.
                 1    HPCG 简介

                    HPCG 来源于半结构网格上的三维热传导应用,其核心是在三维规则区域上对 Poisson 方程进行有限差分
                 离散化后,转换成一个稀疏线性方程组的求解问题.其方程如式(1)所示.采用如图 1 所示的 27 点 stencil 格式进
                 行离散化.
                                                              ( , , )i j k′ =
                                           coef ×  x (, , ) 1.0i j k −  ×  ∑ x ′′  b ( , , )i j k     (1)
                 其中,每个网格点的更新都依赖其周围紧邻的点.由于参与计算的点只能在三维网格区域范围内,所以每个网格
                                                       点最多依赖 26 个邻点,具体的邻点的个数,分别为 26(内部点,
                                                       邻点都在域内)、17(边界面上的点,某一邻面上的 9 个点都在
                                                       域外)、11(边界线上的点,比边界面上的点又少了 2/3 个面的
                                                       点,即又少了 6 个点)和 7(边界顶点,仅有一个小立方体上的 8
                                                       个点在域内,即图 1的 1/8,包括其自身).最终得到的稀疏矩阵 A
                                                       是由 27 条对角线组成,并且是一个对称正定矩阵.
                                                           在大规模并行环境中,HPCG 使用三维区域分解策略,也
                                                       就是按照 3 个维度将整个计算区域划分成若干个子区域,每

                                                       个子区域被分配一个 MPI 进程,其规模由输入参数指定.每个
                       Fig.1    3D 27-point stencil in HPCG
                                                       MPI 进程处理的计算区域中的内部点所依赖的 26 个邻点,全
                      图 1   HPCG 三维 27 点 stencil 格式
                                                       部来自于该计算区域,而对于计算区域边界上的点,其依赖的
                 邻点一部分来自于该计算区域内部,一部分则来自于邻居进程所处理的子区域.不妨称计算区域为内区,其对应
   55   56   57   58   59   60   61   62   63   64   65