Los puntos clave no están disponibles para este artículo en este momento.
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ₑach, transformᵣeduce, and exclusiveₛcan 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.
Latt et al. (Wed,) studied this question.