Multi-GPU acceleration of PALABOS fluid solver using C++ standard parallelism

This article presents the principles, software architecture, and performance analysis of the GPU port of the lattice Boltzmann software library Palabos [J. Latt et al., “Palabos: Parallel lattice Boltzmann solver”, Comput. Math. Appl. 81, 334–350, (2021)] . A hybrid CPU-GPU execution model is adopted, in which numerical components are selectively assigned to either the CPU or the GPU, depending on considerations of performance or convenience. This design enables a progressive porting strategy, allowing most features of the original CPU-based codebase to be gradually and seamlessly adapted to GPU execution. The new architecture builds upon two complementary paradigms: a classical object-oriented structure for CPU execution, and a data-oriented counterpart for GPUs, which reproduces the modularity of the original code while eliminating object-oriented overhead detrimental to GPU performance. Central to this approach is the use of modern C++, including standard parallel algorithms and template metaprogramming techniques, which permit the generation of hardware-agnostic computational kernels. This facilitates the development of user-defined, GPU-accelerated components such as collision operators or boundary conditions, while preserving compatibility with the existing codebase and avoiding the need for external libraries or non-standard language extensions. The correctness and performance of the GPU-enabled Palabos are demonstrated through a series of three-dimensional multiphysics benchmarks, including the laminar–turbulent transition in a Taylor–Green vortex, lid-driven cavity flow, and pore-scale flow in Berea sandstone. Despite the high-level abstraction of the implementation, the single-GPU performance is similar to CUDA-native solvers, and multi-GPU tests exhibit good weak and strong scaling across all test cases. Beyond the specific context of Palabos, the porting methodology illustrated here provides a generalizable framework for adapting large, complex C++ simulation codes to GPU architectures, while maintaining extensibility, maintainability, and high computational performance. Program Title: Palabos: Parallel Lattice Boltzmann Solver CPC Library link to program files: https://doi.org/10.17632/cx7j83pr69.1 Developer’s repository link: https://gitlab.com/unigespc/palabos Licensing provisions: AGPLv3 Programming language: C++17, using C++ parallel algorithms Supplementary material: A compressed file containing a snapshot of the described code version Nature of problem: The lattice Boltzmann method (LBM) is a widely used approach in computational fluid dynamics (CFD) for simulating flows in complex geometries, turbulence, multiphase systems, and thermal transport. The Palabos library was designed to provide the scientific community with a flexible and efficient parallel LBM platform, implementing a broad range of physical and numerical models. Until now, Palabos has been CPU-based, relying on distributed-memory parallelism through MPI. However, with modern simulation platforms and supercomputers increasingly dominated by GPU accelerators, a CPU-only implementation no longer provides competitive performance. This work presents a complete redesign of the Palabos architecture to run efficiently on multi-GPU systems. The new code supports hybrid execution: legacy CPU components remain functional, new GPU-optimized modules can be developed within a compatible programming model, and both can interact seamlessly. This version supersedes the original CPU-only implementation and will serve as the basis for all future development of Palabos. Solution method: The GPU version of Palabos introduces a new data container, the AcceleratedLattice , designed specifically for accelerator execution. It preserves the user interface of the CPU-based MultiBlockLattice , but replaces its array-of-structures layout and virtual-function polymorphism with a structure-of-arrays layout, thread-safe collision–streaming schemes, and integer tags for model selection. These changes enable efficient memory access, fine-grained parallelism, and compatibility with GPU execution models, while maintaining backward compatibility and supporting hybrid CPU/GPU workflows. Parallelism is expressed through C++17 standard parallel algorithms, compiled with the NVIDIA HPC SDK. Fundamental parallel algorithms such as for_each , transform_reduce , and exclusive_scan are used to implement the essential building blocks of the lattice Boltzmann method, including linear processing, reductions, and data packing for MPI communication. This data-oriented design yields a portable and maintainable GPU implementation, preserves modularity, and ensures that existing Palabos applications can be ported to GPU with minimal modifications. Additional comments including restrictions and unusual features: The GPU version currently relies on the platform-independent framework of C++ parallel algorithms but has, as of now, only been tested with NVIDIA GPUs (compiled with nvc++) supports NVIDIA architectures with CUDA-compatible compilers (tested with nvc++). The current version of the code does not compile with the 25.X series of the nvc++ compiler.

Authors

Institutions

Publication Details

Journal
Computer Physics Communications
Published
2026-02-25
DOI
https://doi.org/10.1016/j.cpc.2026.110094
Citations
2
Primary Topic
Embedded Systems Design Techniques
Type
article
Field-Weighted Citation Impact
194.94
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Multi-GPU acceleration of PALABOS fluid solver using C++ standard parallelism

Christophe Coreixas, Jonas Latt
2 citations
Computer Physics Communications
Embedded Systems Design Techniques
194.94
article

Multi-GPU acceleration of PALABOS fluid solver using C++ standard parallelism

Christophe Coreixas, Jonas Latt
article en
2 citations

Abstract

This article presents the principles, software architecture, and performance analysis of the GPU port of the lattice Boltzmann software library Palabos [J. Latt et al., “Palabos: Parallel lattice Boltzmann solver”, Comput. Math. Appl. 81, 334–350, (2021)] . A hybrid CPU-GPU execution model is adopted, in which numerical components are selectively assigned to either the CPU or the GPU, depending on considerations of performance or convenience. This design enables a progressive porting strategy, allowing most features of the original CPU-based codebase to be gradually and seamlessly adapted to GPU execution. The new architecture builds upon two complementary paradigms: a classical object-oriented structure for CPU execution, and a data-oriented counterpart for GPUs, which reproduces the modularity of the original code while eliminating object-oriented overhead detrimental to GPU performance. Central to this approach is the use of modern C++, including standard parallel algorithms and template metaprogramming techniques, which permit the generation of hardware-agnostic computational kernels. This facilitates the development of user-defined, GPU-accelerated components such as collision operators or boundary conditions, while preserving compatibility with the existing codebase and avoiding the need for external libraries or non-standard language extensions. The correctness and performance of the GPU-enabled Palabos are demonstrated through a series of three-dimensional multiphysics benchmarks, including the laminar–turbulent transition in a Taylor–Green vortex, lid-driven cavity flow, and pore-scale flow in Berea sandstone. Despite the high-level abstraction of the implementation, the single-GPU performance is similar to CUDA-native solvers, and multi-GPU tests exhibit good weak and strong scaling across all test cases. Beyond the specific context of Palabos, the porting methodology illustrated here provides a generalizable framework for adapting large, complex C++ simulation codes to GPU architectures, while maintaining extensibility, maintainability, and high computational performance. Program Title: Palabos: Parallel Lattice Boltzmann Solver CPC Library link to program files: https://doi.org/10.17632/cx7j83pr69.1 Developer’s repository link: https://gitlab.com/unigespc/palabos Licensing provisions: AGPLv3 Programming language: C++17, using C++ parallel algorithms Supplementary material: A compressed file containing a snapshot of the described code version Nature of problem: The lattice Boltzmann method (LBM) is a widely used approach in computational fluid dynamics (CFD) for simulating flows in complex geometries, turbulence, multiphase systems, and thermal transport. The Palabos library was designed to provide the scientific community with a flexible and efficient parallel LBM platform, implementing a broad range of physical and numerical models. Until now, Palabos has been CPU-based, relying on distributed-memory parallelism through MPI. However, with modern simulation platforms and supercomputers increasingly dominated by GPU accelerators, a CPU-only implementation no longer provides competitive performance. This work presents a complete redesign of the Palabos architecture to run efficiently on multi-GPU systems. The new code supports hybrid execution: legacy CPU components remain functional, new GPU-optimized modules can be developed within a compatible programming model, and both can interact seamlessly. This version supersedes the original CPU-only implementation and will serve as the basis for all future development of Palabos. Solution method: The GPU version of Palabos introduces a new data container, the AcceleratedLattice , designed specifically for accelerator execution. It preserves the user interface of the CPU-based MultiBlockLattice , but replaces its array-of-structures layout and virtual-function polymorphism with a structure-of-arrays layout, thread-safe collision–streaming schemes, and integer tags for model selection. These changes enable efficient memory access, fine-grained parallelism, and compatibility with GPU execution models, while maintaining backward compatibility and supporting hybrid CPU/GPU workflows. Parallelism is expressed through C++17 standard parallel algorithms, compiled with the NVIDIA HPC SDK. Fundamental parallel algorithms such as for_each , transform_reduce , and exclusive_scan are used to implement the essential building blocks of the lattice Boltzmann method, including linear processing, reductions, and data packing for MPI communication. This data-oriented design yields a portable and maintainable GPU implementation, preserves modularity, and ensures that existing Palabos applications can be ported to GPU with minimal modifications. Additional comments including restrictions and unusual features: The GPU version currently relies on the platform-independent framework of C++ parallel algorithms but has, as of now, only been tested with NVIDIA GPUs (compiled with nvc++) supports NVIDIA architectures with CUDA-compatible compilers (tested with nvc++). The current version of the code does not compile with the 25.X series of the nvc++ compiler.

Computer Physics CommunicationsVol. 323
University of Geneva (CH), Beijing Normal-Hong Kong Baptist University (CN), Hong Kong Baptist University (HK), Institution Genevoise de Maintien à Domicile (CH), ID Quantique (Switzerland) (CH), Institute for Advanced Study (DE)
Affordable and clean energy
Openalex Percentile: Top 0%
Embedded Systems Design Techniques
194.94
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.