Nils Rottstegge
← All projects

Project · ALPS supercomputer

Multi-GPU HPCG

HPCG solves a 3D Poisson problem with a preconditioned conjugate gradient method and stresses memory bandwidth and interconnect rather than peak FLOPs. I started from an existing single-GPU implementation that stores the 27-point stencil matrix in the DIA format and parallelises symmetric Gauss-Seidel (SymGS) with box colouring, and ported it to multiple GPUs and nodes. The first port was slower than the original even on a single GPU: the ghost cells needed for the halo exchange broke coalesced memory access. Step by step I reworked indexing and data layout until the multi-GPU code, run on one GPU, was faster than the single-GPU code it came from: 1.50× for SpMV and 1.78× for SymGS. Then I scaled it out to 512 nodes and 2,048 GH200 GPUs on ALPS.

My contribution

  • Ported the DIA-based single-GPU HPCG to multiple GPUs and nodes: SpMV, SymGS, multigrid, CG, dot products and WAXPBY.
  • Halo exchange over a 3D domain decomposition with up to 26 neighbours, using MPI (host and CUDA-aware) and NCCL.
  • SpMV: locality-optimised indexing and column-major DIA storage, so consecutive threads read consecutive memory (84.6% memory utilisation efficiency).
  • SymGS: colour-wise storage, so all coefficients of one box colour are contiguous and no colour offsets are computed at run time (92.0% memory utilisation efficiency).

Results

  • On one GH200, the multi-GPU code beats the original single-GPU code: 1.50× faster SpMV and 1.78× faster SymGS (from 0.32× and 0.68× after the naive port).
  • Verified on up to 512 nodes, 2,048 NVIDIA GH200 GPUs, on the ALPS supercomputer.
  • Ported to the AMD cluster Beverin.
  • Lesson: a data layout that is best for one kernel can be the worst for another; colour-wise storage speeds up SymGS but slows SpMV to 0.72×.

Technologies

  • C++
  • CUDA
  • NCCL
  • MPI
  • Slurm
  • ALPS

Links