论文标题

使用OpenFOAM在计算流体动力学中的浮点精度上

On floating point precision in computational fluid dynamics using OpenFOAM

论文作者

Brogi, F., Bnà, S., Boga, G., Amati, G., Ongaro, T. Esposti, Cerminara, M.

论文摘要

得益于现代集群机的计算能力,数值模拟可以提供空前的细节水平,这是对流体力学的新见解。但是,由于数据通信仍然是达到峰值表演的重要瓶颈,因此充分利用了该硬件仍然具有挑战性。降低浮点精度是减少数据移动并提高大多数应用程序计算速度的简单有效方法。然而,需要特别注意确保计算解决方案的质量和收敛性,尤其是在处理复杂的流体模拟时。在这项工作中,我们分析了降低(与双重)精度对计算流体动力学的计算性能和准确性的影响。使用开源库OpenFOAM,我们考虑不可压缩,可压缩和多相溶解器,以测试相关的基准测试层层和湍流状态以及在存在冲击波的情况下。还讨论了以降低精度的计算增益和应用程序可伸缩性的变化。特别是,强尺度的临时理论模型使我们能够解释和理解观察到的行为,这是浮点精度和硬件细节的函数。最后,我们展示了降低的精度如何显着加快最近提供给OpenFoam最终用户的混合CPU-GPU实现,该实现仅依赖于硬件供应商开发的GPU线性代数求解器。

Thanks to the computational power of modern cluster machines, numerical simulations can provide, with an unprecedented level of details, new insights into fluid mechanics. However, taking full advantage of this hardware remains challenging since data communication remains a significant bottleneck to reaching peak performances. Reducing floating point precision is a simple and effective way to reduce data movement and improve the computational speed of most applications. Nevertheless, special care needs to be taken to ensure the quality and convergence of computed solutions, especially when dealing with complex fluid simulations. In this work, we analyse the impact of reduced (single and mixed compared to double) precision on computational performance and accuracy for computational fluid dynamics. Using the open source library OpenFOAM, we consider incompressible, compressible, and multiphase fluid solvers for testing on relevant benchmarks for flows in the laminar and turbulent regime and in the presence of shock waves. Computational gain and changes in the scalability of applications in reduced precision are also discussed. In particular, an ad hoc theoretical model for the strong scaling allows us to interpret and understand the observed behaviors, as a function of floating point precision and hardware specifics. Finally, we show how reduced precision can significantly speed up a hybrid CPU-GPU implementation, made available to OpenFOAM end-users recently, that simply relies on a GPU linear algebra solver developed by hardware vendors.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源