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

用于正则流体流动的并行直接数值模拟的CaNS的GPU加速

GPU acceleration of CaNS for massively-parallel direct numerical simulations of canonical fluid flows

Pedro Costa, Everett Phillips, Luca Brandt, Massimiliano Fatica

摘要:

这项工作提出了GPU加速的开源代码CaNS非常快速的并行模拟正则流体流动。CANS中多CPU Navier-Stokes方程求解器的显著特点是基于特征函数展开法的二阶有限差分Poisson方程的快速直接求解器。求解器在一个统一的框架中实现了对这类问题有效的所有边界条件。在这里,我们使用CUDA Fortran扩展了GPU加速集群的求解器。移植广泛使用了CUF内核,并通过CUDA Fortran的统一内存功能大大简化,该功能处理主机(CPU)和设备(GPU)之间的数据迁移,而无需在源代码中定义新的数组。整体实现已根据湍流通道流的基准数据进行了验证,并在NVIDIA DGX-2系统(16 Tesla V100 32 Gb,通过NVSwitch与NVLink连接)上评估了其性能。与最先进的多CPU集群上的CPU实现相比,GPU加速实现的每个时间步长的挂钟时间非常小,只要域分区足够小,数据主要驻留在GPU上。该实现已根据MIT许可证的条款免费提供和开源。

英文摘要:

This work presents the GPU acceleration of the open-source code CaNS for very fast massively-parallel simulations of canonical fluid flows. The distinct feature of the many-CPU Navier-Stokes solver in CaNS is its fast direct solver for the second-order finite-difference Poisson equation, based on the method of eigenfunction expansions. The solver implements all the boundary conditions valid for this type of problems in a unified framework. Here, we extend the solver for GPU-accelerated clusters using CUDA Fortran. The porting makes extensive use of CUF kernels and has been greatly simplified by the unified memory feature of CUDA Fortran, which handles the data migration between host (CPU) and device (GPU) without defining new arrays in the source code. The overall implementation has been validated against benchmark data for turbulent channel flow and its performance assessed on a NVIDIA DGX-2 system (16 Tesla V100 32Gb, connected with NVLink via NVSwitch). The wall-clock time per time step of the GPU-accelerated implementation is impressively small when compared to its CPU implementation on state-of-the-art many-CPU clusters, as long as the domain partitioning is sufficiently small that the data resides mostly on the GPUs. The implementation has been made freely available and open-source under the terms of an MIT license.

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

↑