This research explores the challenges and solutions for scaling Breadth-First Search (BFS) to massive supercomputing environments. By reimagining graph partitioning and integrating message-passing with multithreading, the authors achieved record-breaking performance on tens of thousands of cores, addressing the inherent difficulties of irregular, memory-bound graph processing.
The Challenge of Parallel BFS
Breadth-First Search is a fundamental building block for graph analysis, essential for applications ranging from social network mining to network routing. However, it is notoriously difficult to parallelize efficiently. Unlike regular numerical simulations, BFS is characterized by:
- Memory-bound constraints: The algorithm spends significantly more time moving data than performing calculations.
- Irregular access patterns: Memory access depends entirely on the graph's structure, which is often skewed (e.g., "hub" nodes with massive connectivity).
- High communication overhead: In distributed systems, checking if a neighbor has been visited often requires high-latency network communication between processors.
As supercomputers grow in core count, traditional "1D" partitioning—where each processor owns a subset of vertices—becomes a massive communication bottleneck due to all-to-all patterns.
Methodology: 2D Partitioning and Hybridization
The authors propose a shift from 1D to 2D Partitioning. In this approach, the graph is treated as a sparse adjacency matrix and partitioned using a checkerboard grid. This method is mathematically equivalent to a Sparse Matrix-Sparse Vector multiplication (SpMSV).
The primary advantage of 2D partitioning is that communication is restricted to processors within the same row or column of the grid. This reduces the number of participants in collective operations from $p$ to $\sqrt{p}$, where $p$ is the total number of processors.
To further optimize performance, the authors implemented a hybrid approach, using MPI for communication between nodes and OpenMP multithreading within a node. This allows the system to treat a multi-core node as a single entity, significantly reducing the total number of network messages.
Key Insights and Trade-offs
Communication Complexity
The transition to 2D partitioning fundamentally changes the communication scaling law. By limiting communication partners, the 2D approach remains viable at massive scales where 1D partitioning would be overwhelmed by network traffic.
The SPA vs. Heap Trade-off
For local computation, the authors utilized a polyalgorithm that switches between a Sparse Accumulator (SPA) and a Heap. While the SPA is generally faster, it has a larger memory footprint ($O(n/\sqrt{p})$). As the core count increases, the memory efficiency of the Heap becomes critical.
As shown in the performance data, the SPA's advantage diminishes as the system scales. At extreme scales (above 20,000 cores), the memory-efficient Heap becomes the superior choice despite its logarithmic overhead.
Performance Results
The algorithms were evaluated using R-MAT graphs (mimicking social networks) and the uk-union web crawl dataset. Key findings include:
- Peak Performance: On the Hopper supercomputer, the hybrid 2D algorithm reached 17.8 billion edge visits per second (GTEPS) using 40,000 cores.
- Efficiency Gains: The 2D hybrid approach reduced communication time by up to 3.5x compared to standard 1D vertex-based approaches.
- Robustness: On high-diameter graphs like
uk-union(diameter ~140), communication remained a small fraction of total execution time, proving the algorithm's stability across different graph topologies.
Conclusion and Future Work
This work demonstrates that through algorithmic innovation in data partitioning and hybrid programming models, graph processing can scale to the world's largest supercomputers. Future research directions include exploiting symmetry in undirected graphs to save memory and exploring Partitioned Global Address Space (PGAS) languages to simplify implementation without sacrificing performance.
Summary updated