Abstract
Sparse Matrix-Matrix Multiplication (SpGEMM) is a fundamental operation for high-performance graph algorithms and linear solvers. However, traditional 1D parallel approaches fail to scale on modern supercomputers due to exploding communication costs and memory overheads. This paper introduces the first parallel SpGEMM algorithms that scale to thousands of processors. By combining a 2D block data distribution with a novel "hypersparse" sequential kernel and the Doubly Compressed Sparse Column (DCSC) data structure, the authors overcome the fundamental scalability bottlenecks of previous methods.
Introduction
Sparse Matrix-Matrix Multiplication (SpGEMM) is critical for tasks such as finding shortest paths, cycle detection, and algebraic multigrid solvers. Despite its importance, achieving high performance on parallel supercomputers is notoriously difficult. Traditional "1D" parallel approaches, which partition matrices by rows or columns, hit a scalability wall early. As the number of processors increases, communication costs grow disproportionately, and the memory overhead of standard data structures like Compressed Sparse Column (CSC) or Compressed Sparse Row (CSR) begins to dominate.
The Scalability Crisis and Hypersparsity
When a large matrix is partitioned among many processors, the resulting submatrices become "hypersparse." A matrix is hypersparse if it has fewer non-zero elements than it has rows or columns ($nnz < n$). Standard formats like CSC waste significant time and space scanning empty rows or columns, preventing the algorithm from speeding up as more hardware is added. The authors identify an $O(n/\sqrt{p})$ overhead in standard formats that becomes a critical bottleneck at scale.
Methods: Overcoming the Bottleneck
The researchers propose two primary innovations to solve the scalability crisis:
1. Doubly Compressed Sparse Columns (DCSC)
DCSC is a new data structure designed specifically for hypersparse matrices. Unlike standard CSC, which uses an array of size $n$ to index columns, DCSC only stores information for columns that actually contain non-zero elements. This ensures that storage and processing time are proportional to the number of non-zeros ($nnz$), effectively eliminating the $n$-dependency that plagues traditional formats in parallel settings.
2. 2D Parallel Algorithms
Instead of 1D partitioning, the authors utilize a 2D block decomposition, adapting classic dense matrix algorithms like Cannon and SUMMA for sparse data. 2D decomposition is mathematically superior for SpGEMM because it minimizes the volume of data moved between processors.
3. Hypersparse Sequential Kernel
A new sequential multiplication kernel was developed based on an outer-product formulation and multiway merging. This kernel serves as the high-performance engine running on each individual processor within the 2D grid, optimized for the hypersparse nature of local submatrices.
Key Results
The implementation was evaluated on the TACC Ranger cluster using synthetic R-MAT graphs, Erdős-Rényi graphs, and regular 3D grids.
- Unbounded Scaling: The 2D algorithms achieved increasing speedups on up to 4,096 processors. In contrast, 1D algorithms typically stop scaling after approximately 50 processors.
- Kernel Efficiency: The hypersparse sequential kernel outperformed classical kernels by 10x-15x when dealing with the extremely sparse submatrices found in large-scale parallel runs.
- Real-world Performance: Tests with scale-free R-MAT matrices demonstrated that the theoretical benefits of 2D decomposition and DCSC translate directly into significant wall-clock time savings.
Conclusion
This work demonstrates that hypersparsity is an inevitable consequence of extreme-scale parallelism. By designing data structures and algorithms that account for this property, it is possible to achieve unprecedented scalability for sparse matrix operations. Future work includes improving load balancing for highly skewed power-law distributions and better overlapping of communication with computation.
Summary updated