Skip to main content
U.S. Department of Energy
Office of Scientific and Technical Information

A supernodal all-pairs shortest path algorithm

Conference ·

We show how to exploit graph sparsity in the Floyd-Warshall algorithm for the all-pairs shortest path (Apsp) problem. Floyd-Warshall is an attractive choice for Apsp on high-performing systems due to its structural similarity to solving dense linear systems and matrix multiplication. However, if sparsity of the input graph is not properly exploited, Floyd-Warshall will perform unnecessary asymptotic work and thus may not be a suitable choice for many input graphs. To overcome this limitation, the key idea in our approach is to use the known algebraic relationship between Floyd-Warshall and Gaussian elimination, and import several algorithmic techniques from sparse Cholesky factorization, namely, fill-in reducing ordering, symbolic analysis, supernodal traversal, and elimination tree parallelism. When combined, these techniques reduce computation, improve locality and enhance parallelism. We implement these ideas in an efficient shared memory parallel prototype that is orders of magnitude faster than an efficient multi-threaded baseline Floyd-Warshall that does not exploit sparsity. Our experiments suggest that the Floyd-Warshall algorithm can compete with Dijkstra's algorithm (the algorithmic core of Johnson's algorithm) for several classes sparse graphs.

Research Organization:
Oak Ridge National Laboratory (ORNL), Oak Ridge, TN (United States)
Sponsoring Organization:
USDOE
DOE Contract Number:
AC05-00OR22725
OSTI ID:
1648874
Country of Publication:
United States
Language:
English

References (27)

Fast Algorithms for Shortest Paths in Planar Graphs, with Applications journal December 1987
Communication complexity of PRAMs journal March 1990
A Communication-Avoiding 3D LU Factorization Algorithm for Sparse Matrices conference May 2018
Faster All-Pairs Shortest Paths via Circuit Complexity journal January 2018
A Separator Theorem for Planar Graphs journal April 1979
Regular Algebra Applied to Path-finding Problems journal January 1975
A CPU–GPU hybrid approach for the unsymmetric multifrontal method journal December 2011
An Algebra for Network Routing Problems journal January 1971
Spectral partitioning works: planar graphs and finite element meshes conference January 1996
Taking Advantage of Hybrid Systems for Sparse Direct Solvers via Task-Based Runtimes conference May 2014
All-Pairs Shortest Path algorithms for planar graph for GPU-accelerated clusters journal November 2015
Computing the Girth of a Planar Graph in $O(n \logn)$ Time journal January 2010
All-Pairs Shortest Paths Computation in the BSP Model book January 2001
Multifrontal Factorization of Sparse SPD Matrices on GPUs conference May 2011
Programming parallel algorithms journal March 1996
Highly scalable parallel algorithms for sparse matrix factorization journal May 1997
New Scheduling Strategies and Hybrid Programming for a Parallel Right-looking Sparse LU Factorization Algorithm on Multicore Cluster Systems conference May 2012
Expander graphs and their applications journal August 2006
Nested Dissection of a Regular Finite Element Mesh journal April 1973
Scheduling a Parallel Sparse Direct Solver to Multiple GPUs conference May 2013
Parallel Algorithms for Sparse Linear Systems journal September 1991
Subcubic Equivalences between Path, Matrix and Triangle Problems conference October 2010
Minimizing Communication in All-Pairs Shortest Paths report February 2013
On the dimension of a graph journal December 1965
A Distributed CPU-GPU Sparse Direct Solver book January 2014
High-speed graph analytics with the galois system conference February 2014
Solving path problems on the GPU journal June 2010

Similar Records

Scalable All-pairs Shortest Paths for Huge Graphs on Multi-GPU Clusters
Conference · Mon Jun 01 00:00:00 EDT 2020 · OSTI ID:1814306

On finding supernodes for sparse matrix computations
Technical Report · Fri Jun 01 00:00:00 EDT 1990 · OSTI ID:6756314

Supernodal symbolic Cholesky factorization on a local-memory multiprocessor
Journal Article · Thu Aug 14 00:00:00 EDT 2003 · Parallel Computing · OSTI ID:5456424

Related Subjects