基于Python的单GPU浸没边界法数值模拟流动求解器
A Python-based flow solver for numerical simulations using an immersed boundary method on single GPUs
AI总结:
该研究提出基于Python和CUDA的单GPU浸没边界法流动求解器,通过优化GPU网格架构和内存管理避免通信瓶颈,其峰值性能比96-128核CPU求解器快34-54倍,且在仿生空气动力学和心血管流动应用中表现出强缩放性。
摘要:
我们提出了一种基于Nvidia CUDA(通过Numba和Python实现)的高效方法,用于在单GPU上运行流固耦合问题的三维数值模拟。本框架中,运动物体周围的不可压缩流动通过专为GPU定制的浸没边界法(Immersed Boundary Method)求解,其中利用不同的GPU网格架构优化整体性能。通过针对单GPU,我们避免了GPU-CPU和GPU-GPU通信瓶颈,因为所有模拟数据始终存储在GPU的全局内存中。我们提供了数值方法、GPU中算法的实现以及内存管理的详细信息,这些在单GPU实现中至关重要。此外,我们通过与类似的基于CPU的并行求解器比较验证了结果,并根据不同操作的相对计算时间以及CPU代码与单GPU情况的缩放比例,令人满意地评估了代码的效率。总体而言,我们的测试表明,单GPU代码的峰值性能比CPU求解器(96-128个CPU核心)快34到54倍。这种加速主要来自线性方程组求解方法的改变,而CPU和GPU实现中等效的算法部分的加速则更为温和(例如,非线性项计算中的1.6-3倍加速)。最后,我们展示了这种新的GPU实现在两个感兴趣的应用中的性能:一个用于外流(即仿生空气动力学),另一个用于内流(即心血管流动),并在两种不同的GPU卡(硬件)上证明了代码的强缩放性。
英文摘要:
We present an efficient implementation for running three-dimensional numerical simulations of fluid-structure interaction problems on single GPUs, based on Nvidia CUDA through Numba and Python. The incompressible flow around moving bodies is solved in this framework through an implementation of the Immersed Boundary Method tailored for the GPU, where different GPU grid architectures are exploited to optimize the overall performance. By targeting a single-GPU, we avoid GPU-CPU and GPU-GPU communication bottlenecks, since all the simulation data is always in the global memory of the GPU. We provide details about the numerical methodology, the implementation of the algorithm in the GPU and the memory management, critical in single-GPU implementations. Additionally, we verify the results comparing with our analogous CPU-based parallel solver and assess satisfactorily the efficiency of the code in terms of the relative computing time of the different operations and the scaling of the CPU code compared to a single GPU case. Overall, our tests show that the single-GPU code is between 34 to 54 times faster than the CPU solver in peak performance (96-128 CPU cores). This speedup mainly comes from the change in the method of solution of the linear systems of equations, while the speedup in sections of the algorithm that are equivalent in the CPU and GPU implementations is more modest (i.e., $\times 1.6-3$ speedup in the computation of the non-linear terms). Finally, we showcase the performance of this new GPU implementation in two applications of interest, one for external flows (i.e., bioinspired aerodynamics) and one for internal flows (i.e., cardiovascular flows), demonstrating the strong scaling of the code in two different GPU cards (hardware).%\red{for both single and double precision.}
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。