TAPSpMV: Topology-Aware Parallel Sparse Matrix Vector Multiplication

Amanda Bienz, William D. Gropp, Luke N. OlsonarXiv 2016

Abstract

Sparse matrix-vector multiplication (SpMV) is a fundamental operation in scientific computing, yet it often serves as a primary bottleneck in parallel environments due to high communication costs. This paper presents TAPSpMV (Topology-Aware Parallel SpMV), a node-aware algorithm designed to mitigate network congestion by aggregating data locally within physical nodes before performing inter-node transfers. By trading low-latency intra-node communication for high-latency inter-node traffic, TAPSpMV achieves significant speedups, particularly in scenarios with high communication-to-computation ratios.

Introduction

Scientific simulations, ranging from climate modeling to structural analysis, rely heavily on Sparse Matrix-Vector Multiplication (SpMV). As high-performance computing (HPC) systems scale toward the exascale regime, the performance of SpMV is increasingly dominated not by floating-point operations, but by the "communication tax"—the time spent moving data between thousands of distributed processors.

Standard parallel SpMV implementations often ignore the physical topology of the underlying hardware. They treat every message equally, whether it is destined for a neighboring core on the same CPU socket or a processor located across multiple network switches. This "topology-blind" approach leads to an explosion of small messages, causing network interface congestion and limiting parallel scalability.

The Communication Bottleneck

In many HPC applications, such as Algebraic Multigrid (AMG) solvers, the problem becomes more acute as the grid is coarsened. In these coarse levels, the matrices become smaller but relatively denser, leading to a situation where processors spend more time communicating than computing.

Communication overhead increases as the workload per core decreases, a common issue in coarse-level AMG operations.

As shown in the figure above, the percentage of time spent in communication rises sharply as the number of non-zeros per core decreases. This phenomenon, often referred to as being "injection limited," occurs when the network interface cannot process the high volume of small messages generated by standard SpMV algorithms.

Methodology: Node-Aware Aggregation

TAPSpMV addresses this bottleneck by exploiting the hierarchical structure of modern supercomputers, where multiple processors share a physical node and high-speed local memory. The algorithm introduces a three-step communication protocol:

  1. Local Aggregation: Instead of every process sending its data directly to remote destinations, processes on a physical node first send their required vector values to a designated "aggregator" process on the same node.
  2. Inter-node Transfer: The aggregator bundles these values into a single, larger message and sends it across the network to a corresponding aggregator on the destination node.
  3. Local Redistribution: The receiving aggregator then distributes the data to the local processes that require it for their computation.
Node-aware partitioning of the matrix A and vectors w and v, where colors represent distinct physical nodes and dashed lines represent individual processes.

This strategy effectively trades "cheap" intra-node communication for "expensive" inter-node communication. By reducing the total number of messages injected into the network, TAPSpMV clears the traffic congestion at the network interface. To prevent the aggregator from becoming a computational bottleneck, the algorithm employs a load-balancing strategy that distributes aggregation duties across multiple processes.

Performance Evaluation

The researchers evaluated TAPSpMV on the Blue Waters supercomputer using a variety of benchmarks, including AMG hierarchies, synthetic random matrices, and the SuiteSparse Matrix Collection.

Key Results

  • Random Matrices: For synthetic matrices designed to stress-test communication, TAPSpMV outperformed standard implementations by up to two orders of magnitude.
  • Real-World Applications: On the SuiteSparse collection, which includes diverse real-world matrix structures, the algorithm achieved speedups ranging from 1.5x to over 30x.
  • Scalability: TAPSpMV demonstrated superior strong and weak scaling, maintaining efficiency even as the number of processors increased.

The algorithm proved particularly effective for the coarse levels of AMG solvers. In these scenarios, the reduction in message count allowed the solver to bypass the typical performance collapse seen in standard parallel SpMV implementations.

Conclusion and Future Work

TAPSpMV demonstrates that node-awareness is critical for the next generation of parallel algorithms. By acknowledging the physical hierarchy of HPC systems, it significantly reduces the communication overhead that plagues standard SpMV.

Future work will focus on extending this hierarchy. Modern chips often have multiple levels of shared memory (e.g., L3 caches, NUMA zones, and multiple sockets). A "socket-aware" implementation could further optimize performance by distinguishing between different levels of intra-node communication. Additionally, integrating this node-aware logic into heterogeneous CPU-GPU environments remains a promising avenue for research, as data movement between host and device memory presents similar hierarchical challenges.

Summary updated

BibTeX
@misc{bienz2016tapspmv,
  author = {Amanda Bienz and William D. Gropp and Luke N. Olson},
  title = {{TAPSpMV: Topology-Aware Parallel Sparse Matrix Vector Multiplication}},
  year = {2016},
  eprint = {1612.08060},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1612.08060},
}
Figure