arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2603.09528physics.comp-ph
收藏

基于GEMM的直接求解器用于非均匀网格中的有限差分泊松问题

A fast incompressible Navier-Stokes solver for non-uniform grids

Delft University of Technology(代尔夫特理工大学);NVIDIA Corporation(英伟达公司);Gran Sasso Science Institute(格兰萨索科学研究所)

Pedro Costa, Duarte Palancha, Joshua Romero, Roberto Verzicco, Massimiliano Fatica

AI总结:

本文提出了一种基于GEMM的直接求解器,用于高效求解非均匀网格中的有限差分泊松问题,结合FFT与GEMM变换,提升大规模并行计算性能。

摘要:

我们提出了一种直接求解泊松方程的求解器,用于在三维Cartesian网格上进行大规模并行模拟,其中网格间距是非均匀的。该方法采用张量形式,在两个方向上通过一维特征分解数值对算子进行对角化,而第三个方向则直接求解。所得到的密集变换通过GEMM(通用矩阵-矩阵乘法)高效评估,允许许多独立的一维操作组合成矩阵-矩阵乘积,这些乘积能很好地映射到现代CPU和GPU硬件上。对于均匀网格,该方法退化为经典的特征函数展开方法,并自然支持根据网格均匀性混合FFT基和GEMM基的变换。在将求解器耦合到不可压缩纳维-斯托克斯代码后,我们将其精度和性能与几何多网格和基于FFT的块循环减少方法进行了评估。结果表明,所提出的方法具有鲁棒性,并且始终达到最佳的求解时间。在强标度情况下,更计算密集的GEMM基变体通过更好地摊薄通信成本而获得更高的并行效率,而弱标度则突显了FFT基和密集变换形式之间的预期权衡。总体而言,该方法在现代异构系统上实现了高效的高分辨率拉伸网格模拟。

英文摘要:

We present a scalable incompressible Navier--Stokes solver for three-dimensional Cartesian grids with non-uniform spacing. A direct tensor-product--Thomas method solves the constant-coefficient Poisson and Helmholtz equations arising from pressure projection and implicit diffusion, without approximate factorization. On uniform grids, the method recovers the classical eigenfunction-expansion method evaluated with fast Fourier transforms (FFTs). On stretched grids, diagonal scaling symmetrizes the one-dimensional Laplace operators, and the resulting numerical eigenbasis transforms are evaluated as general matrix--matrix multiplications (GEMMs). FFTs and GEMMs can be selected independently in each diagonalized direction while retaining the pencil decomposition, collective transposes, and tridiagonal machinery of an established FFT-based solver. The elliptic solver is verified to round-off accuracy, and the complete flow solver is validated against benchmark flows. Against geometric multigrid and block cyclic reduction with FFT diagonalization, the present method achieves the lowest time-to-solution among the tested approaches; at fixed grid dimensions, its cost is insensitive to grid stretching. CPU and multi-GPU tests show that GEMM-rich variants attain higher strong-scaling efficiency by better amortizing communication. On a single GPU, the fully GEMM-based variant increases the Poisson cost by $2.8\times$ but the complete Navier--Stokes step cost by only $1.8\times$. Weak scaling exposes the trade-off: dense-transform costs grow with the global transform dimension, whereas non-uniform meshes can reduce the required number of grid points. The resulting open-source solver, \texttt{CaNS-EIGEN}, extends an FFT-based Navier--Stokes solver to large-scale simulations on grids stretched in multiple directions.

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

↑