arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1302.7193math.NAcs.DCcs.NA
收藏

各向异性椭圆偏微分方程的预条件共轭梯度求解器的无矩阵GPU实现

Matrix-free GPU implementation of a preconditioned conjugate gradient solver for anisotropic elliptic PDEs

University of Bath(巴斯大学);The University of Edinburgh(爱丁堡大学)

Eike Mueller, Xu Guo, Robert Scheichl, Sinan Shi

AI总结:

针对数值天气预报中的各向异性椭圆偏微分方程,提出了一种无矩阵GPU实现的预条件共轭梯度算法,通过避免显式存储矩阵并利用循环融合减少全局内存访问,显著提升了性能。

摘要:

地球物理和大气建模中的许多问题需要快速求解“扁平”三维几何中的椭圆偏微分方程。特别是在许多数值天气预报模型的动力核心中,每个时间步都必须求解用于压力校正的各向异性椭圆偏微分方程,全球海洋模型、地下流模拟以及油气藏建模中也出现结构非常相似的方程。椭圆求解通常是预报的瓶颈,必须使用算法上最优的方法并高效实现。图形处理单元已被证明在科学计算的广泛应用中非常高效,最近迭代求解器已在这些架构上并行化。我们描述了用于求解NWP中三维各向异性椭圆压力校正偏微分方程的预条件共轭梯度算法的GPU实现和优化。我们的实现利用了椭圆算子的强垂直各向异性来构造合适的预条件子。由于算法受内存限制,通过减少全局内存访问量可以显著提高性能。我们通过使用无矩阵实现来实现这一点,该实现不需要显式存储矩阵,而是重新计算局部模板。通过使用循环融合重写算法,也可以减少全局内存访问,我们表明这进一步减少了GPU上的运行时间。我们通过将无矩阵GPU代码与顺序CPU实现以及使用现有库的显式矩阵GPU代码进行比较,展示了其性能。针对不同问题大小的算法绝对性能通过浮点吞吐量和全局内存带宽进行量化。

英文摘要:

Many problems in geophysical and atmospheric modelling require the fast solution of elliptic partial differential equations (PDEs) in "flat" three dimensional geometries. In particular, an anisotropic elliptic PDE for the pressure correction has to be solved at every time step in the dynamical core of many numerical weather prediction models, and equations of a very similar structure arise in global ocean models, subsurface flow simulations and gas and oil reservoir modelling. The elliptic solve is often the bottleneck of the forecast, and an algorithmically optimal method has to be used and implemented efficiently. Graphics Processing Units have been shown to be highly efficient for a wide range of applications in scientific computing, and recently iterative solvers have been parallelised on these architectures. We describe the GPU implementation and optimisation of a Preconditioned Conjugate Gradient (PCG) algorithm for the solution of a three dimensional anisotropic elliptic PDE for the pressure correction in NWP. Our implementation exploits the strong vertical anisotropy of the elliptic operator in the construction of a suitable preconditioner. As the algorithm is memory bound, performance can be improved significantly by reducing the amount of global memory access. We achieve this by using a matrix-free implementation which does not require explicit storage of the matrix and instead recalculates the local stencil. Global memory access can also be reduced by rewriting the algorithm using loop fusion and we show that this further reduces the runtime on the GPU. We demonstrate the performance of our matrix-free GPU code by comparing it to a sequential CPU implementation and to a matrix-explicit GPU code which uses existing libraries. The absolute performance of the algorithm for different problem sizes is quantified in terms of floating point throughput and global memory bandwidth.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑