Performance¶
This page reports the performance of hippoLBM v1.0 on a simple benchmark, measured on the CCRT/Topaze supercomputer. These results are bound to improve over time as the code is optimized.
LBM Couette¶
Input file:
Overall performance on a CCRT node¶
The benchmarks were performed on a system composed of two types of nodes:
- 864 standard compute nodes, each with 2 AMD EPYC Milan 7763 CPUs at 2.45 GHz (128 cores per node) and 256 GB of RAM, connected via InfiniBand HDR-100 (12.5 GB/s);
- 48 hybrid compute nodes, with the same CPUs, 512 GB of RAM and 4 NVIDIA A100 GPUs per node, connected via InfiniBand HDR (25 GB/s).
Five parallelization strategies are compared:
Seq: one MPI process with one OpenMP thread (baseline);OMP: one MPI process with 128 OpenMP threads;MPI: 128 MPI processes with one OpenMP thread each;Hybrid: 16 MPI processes with 16 OpenMP threads each (one NUMA node per MPI process);GPU: one GPU and 32 cores per MPI process.
The throughput is measured in MLUPS (million lattice updates per second) for 4 domain sizes: 64³, 128³, 256³ and
512³ (compute_loop only, without ParaView output).
The same results with a log scale:
Comments:
- No Z-order or Hilbert-type ordering is used, and no cache blocking for the OpenMP version on several NUMA nodes: this partly explains the poor performance of the OMP version. The target is the Hybrid strategy, which avoids NUMA effects.
- The MPI version suffers from a large number of MPI communications during the streaming phase compared with the workload, a phenomenon partly reduced by the Hybrid version, and from the memory bandwidth limit of the streaming phase (2 × 9 memory swaps per node).
- A certain domain size is required to use the GPU at full power (64³ and 128³ versus 256³ and 512³).
- Comparing a full GPU node with a full CPU node, the speedup is 23.3 for a 512³ domain, and much lower for small domains.
Strong scaling on GPUs¶
hippoLBM uses CUDA-aware MPI. Performance as a function of the number of MPI processes (one GPU each) at fixed domain size:
Note
512³ = 134,217,728 nodes; 1024³ = 1,073,741,824 nodes; 2048³ = 8,589,934,592 nodes.
- MPI communications are inexpensive for these domain sizes.
- The memory of the A100 GPUs (80 GB) is reached for some points: beyond it, unified memory goes back and forth to the CPU RAM, and these points were skipped.
- A 4096³ domain (68.7 billion nodes) ran on 192 GPUs at 2.48 × 10⁵ MLUPS (248 BLUPS).
Trace on GPU¶
Nsight Systems command line:
Trace of one time step for a 256³ domain:
- Each time step calls
macro_variables, the BGK collision, the streaming (two steps with a ghost update) and the Neumann conditions. Only the periodic images are copied into the ghost zones here. - Pure-GPU LBM codes can fuse the 4 steps in a single kernel; hippoLBM keeps separate kernels so that the operators can be reordered.
- The Neumann kernel is negligible; the streaming takes 50-55 % of a time step.
Roofline¶
Nsight Compute command line:
The kernels are point-wise and memory-bound: reducing the precision of some arrays could speed them up. The Neumann kernel only works on a surface (1/256 of the nodes) and stays far from the roof, but takes less than 1 % of the time. The streaming kernels only swap memory and have no arithmetic intensity. Speed-of-light analysis:
| Kernel | Compute (SM) throughput [%] | Memory [%] |
|---|---|---|
| Macro_Variables | 26.47 | 80.26 |
| BGK (collision) | 46.31 | 71.97 |
| Streaming (step 1) | 5.19 | 81.55 |
| Streaming (step 2) | 12.57 | 74.85 |
| Neumann | 7.82 | 39.35 |
In practice, 70-80 % of memory throughput is good, and over 80 % very good.