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

多核格子Boltzmann模拟的跨平台编程模型

Cross-platform programming model for many-core lattice Boltzmann simulations

Jonas Latt, Christophe Coreixas, Joël Beny

摘要:

我们提出了一种新的,硬件不可知的实现策略格子玻尔兹曼(LB)模拟,产生大量的性能同质和异构的众核平台。完全基于C++17并行算法,我们的方法不依赖于任何语言扩展,外部库,特定于供应商的代码注释或预编译步骤。特别是由于最近提出的GPU后端C++17并行算法,它表明,一个单一的代码可以编译和达到最先进的性能在众核CPU和GPU环境的解决方案的一个给定的非平凡的流体动力学问题。所提出的策略进行了测试,六种不同的,常用的实现方案,以测试不同平台上的内存访问模式的性能影响。九种不同的LB碰撞模型被包括在测试中,并表现出良好的性能,证明了我们的并行方法的多功能性。这项工作表明,它是比以往任何时候都不需要画一个研究和生产软件之间的区别,作为一个简洁和通用的LB实现产生的性能相比,在硬件特定的编程语言。结果还突出了现代众核CPU所实现的性能增益,以及它们缩小与传统上速度更快的GPU平台之间差距的明显能力。所有代码都以开源项目“stlbm”的形式提供给社区,该项目既可以作为独立的模拟软件,也可以作为可重用模式的集合,用于加速预先存在的LB代码。

英文摘要:

We present a novel, hardware-agnostic implementation strategy for lattice Boltzmann (LB) simulations, which yields massive performance on homogeneous and heterogeneous many-core platforms. Based solely on C++17 Parallel Algorithms, our approach does not rely on any language extensions, external libraries, vendor-specific code annotations, or pre-compilation steps. Thanks in particular to a recently proposed GPU back-end to C++17 Parallel Algorithms, it is shown that a single code can compile and reach state-of-the-art performance on both many-core CPU and GPU environments for the solution of a given non trivial fluid dynamics problem. The proposed strategy is tested with six different, commonly used implementation schemes to test the performance impact of memory access patterns on different platforms. Nine different LB collision models are included in the tests and exhibit good performance, demonstrating the versatility of our parallel approach. This work shows that it is less than ever necessary to draw a distinction between research and production software, as a concise and generic LB implementation yields performances comparable to those achievable in a hardware specific programming language. The results also highlight the gains of performance achieved by modern many-core CPUs and their apparent capability to narrow the gap with the traditionally massively faster GPU platforms. All code is made available to the community in form of the open-source project "stlbm", which serves both as a stand-alone simulation software and as a collection of reusable patterns for the acceleration of pre-existing LB codes.

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

↑