Skip to main content
QUICK REVIEW

[Paper Review] Improving strong scaling of the Conjugate Gradient method for solving large linear systems using global reduction pipelining

Siegfried Cools, J. Cornelis|arXiv (Cornell University)|May 15, 2019
Matrix Theory and AlgorithmsComputer Science5 citations
TL;DR

This paper proposes deep pipelined Conjugate Gradient (p(l)-CG) methods to improve strong scaling on distributed-memory HPC systems by overlapping global reductions with computation and communication. By staggering asynchronous MPI_Iallreduce calls across iterations, p(l)-CG achieves up to O(l) theoretical speedup over classic CG, demonstrated on 1024 nodes with 16 ranks per node using PETSc, showing significant performance gains in communication-bound regimes.

ABSTRACT

This paper presents performance results comparing MPI-based implementations of the popular Conjugate Gradient (CG) method and several of its communication hiding (or 'pipelined') variants. Pipelined CG methods are designed to efficiently solve SPD linear systems on massively parallel distributed memory hardware, and typically display significantly improved strong scaling compared to classic CG. This increase in parallel performance is achieved by overlapping the global reduction phase (MPI_Iallreduce) required to compute the inner products in each iteration by (chiefly local) computational work such as the matrix-vector product as well as other global communication. This work includes a brief introduction to the deep pipelined CG method for readers that may be unfamiliar with the specifics of the method. A brief overview of implementation details provides the practical tools required for implementation of the algorithm. Subsequently, easily reproducible strong scaling results on the US Department of Energy (DoE) NERSC machine 'Cori' (Phase I - Haswell nodes) on up to 1024 nodes with 16 MPI ranks per node are presented using an implementation of p(l)-CG that is available in the open source PETSc library. Observations on the staggering and overlap of the asynchronous, non-blocking global communication phases with communication and computational kernels are drawn from the experiments.

Motivation & Objective

  • Address the strong scaling bottleneck in classic Conjugate Gradient (CG) methods caused by global synchronization in dot product and norm computations on distributed-memory systems.
  • Overcome the performance degradation of classic CG at scale by reducing the impact of global communication overhead through algorithmic redesign.
  • Demonstrate that pipelined CG variants (p(l)-CG) can achieve superior strong scaling by overlapping global reductions with computation and communication.
  • Validate the effectiveness of pipelined CG in real-world HPC workloads using the NERSC Cori system with up to 1024 nodes.
  • Highlight the practical benefits of MPI3's non-blocking, asynchronous communication for implementing scalable, communication-hiding Krylov solvers.

Proposed method

  • Implement p(l)-CG using MPI non-blocking collectives (MPI_Iallreduce) to initiate global reductions early and overlap them with subsequent computational and communication phases.
  • Structure the algorithm so that global reduction operations from one iteration are overlapped with matrix-vector products (spmv) and vector updates (axpy) in later iterations.
  • Use a pipeline length l to allow l+1 iterations to be in flight simultaneously, enabling communication and computation to be staggered across multiple iterations.
  • Leverage the deep pipelining technique to hide latency of global reductions by overlapping them with both local computation and other global communications.
  • Utilize the open-source PETSc library to implement and benchmark p(l)-CG, ensuring reproducibility and practical relevance.
  • Analyze performance using strong scaling experiments on the NERSC Cori (Haswell) system with up to 1024 nodes and 16 MPI ranks per node.

Experimental results

Research questions

  • RQ1To what extent can pipelined CG methods improve strong scaling compared to classic CG on large-scale distributed-memory systems?
  • RQ2How effective is the overlap of global reductions with computation and communication in reducing synchronization bottlenecks?
  • RQ3What performance gains are achievable with increasing pipeline length l in communication-bound workloads?
  • RQ4In what regimes does the 'communication staggering' effect significantly improve performance over classic CG and shorter pipelines?
  • RQ5How does the use of non-blocking MPI calls (MPI_Iallreduce) contribute to the scalability and efficiency of pipelined CG?

Key findings

  • On the NERSC Cori system with up to 1024 nodes, p(l)-CG with l ≥ 2 achieves significantly better strong scaling than classic CG, demonstrating the effectiveness of communication hiding.
  • A theoretical speedup of O(l) over classic CG is achievable when global reductions are optimally overlapped with computation and communication.
  • For communication-bound problems like a diagonal system with 4M unknowns, p(2)-CG achieves a notable performance gain over p(1)-CG due to overlapping global communication phases.
  • The performance benefit of longer pipelines (l ≥ 3) diminishes in less communication-bound scenarios, such as the 2D Laplacian problem, where glred and spmv times are comparable.
  • The 'staggering' of global communication phases across iterations enables robustness to runtime variance in glred and improves overall load balancing.
  • The use of MPI_Iallreduce for non-blocking global reductions is critical for enabling effective overlap, and the authors observe significant performance gains when this overlap is realized.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.