Cargando…
Cross-platform programming model for many-core lattice Boltzmann simulations
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 libr...
Autores principales: | , , |
---|---|
Formato: | Online Artículo Texto |
Lenguaje: | English |
Publicado: |
Public Library of Science
2021
|
Materias: | |
Acceso en línea: | https://www.ncbi.nlm.nih.gov/pmc/articles/PMC8084255/ https://www.ncbi.nlm.nih.gov/pubmed/33914788 http://dx.doi.org/10.1371/journal.pone.0250306 |
_version_ | 1783686119748009984 |
---|---|
author | Latt, Jonas Coreixas, Christophe Beny, Joël |
author_facet | Latt, Jonas Coreixas, Christophe Beny, Joël |
author_sort | Latt, Jonas |
collection | PubMed |
description | 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. |
format | Online Article Text |
id | pubmed-8084255 |
institution | National Center for Biotechnology Information |
language | English |
publishDate | 2021 |
publisher | Public Library of Science |
record_format | MEDLINE/PubMed |
spelling | pubmed-80842552021-05-06 Cross-platform programming model for many-core lattice Boltzmann simulations Latt, Jonas Coreixas, Christophe Beny, Joël PLoS One Research Article 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. Public Library of Science 2021-04-29 /pmc/articles/PMC8084255/ /pubmed/33914788 http://dx.doi.org/10.1371/journal.pone.0250306 Text en © 2021 Latt et al https://creativecommons.org/licenses/by/4.0/This is an open access article distributed under the terms of the Creative Commons Attribution License (https://creativecommons.org/licenses/by/4.0/) , which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited. |
spellingShingle | Research Article Latt, Jonas Coreixas, Christophe Beny, Joël Cross-platform programming model for many-core lattice Boltzmann simulations |
title | Cross-platform programming model for many-core lattice Boltzmann simulations |
title_full | Cross-platform programming model for many-core lattice Boltzmann simulations |
title_fullStr | Cross-platform programming model for many-core lattice Boltzmann simulations |
title_full_unstemmed | Cross-platform programming model for many-core lattice Boltzmann simulations |
title_short | Cross-platform programming model for many-core lattice Boltzmann simulations |
title_sort | cross-platform programming model for many-core lattice boltzmann simulations |
topic | Research Article |
url | https://www.ncbi.nlm.nih.gov/pmc/articles/PMC8084255/ https://www.ncbi.nlm.nih.gov/pubmed/33914788 http://dx.doi.org/10.1371/journal.pone.0250306 |
work_keys_str_mv | AT lattjonas crossplatformprogrammingmodelformanycorelatticeboltzmannsimulations AT coreixaschristophe crossplatformprogrammingmodelformanycorelatticeboltzmannsimulations AT benyjoel crossplatformprogrammingmodelformanycorelatticeboltzmannsimulations |