Performance and Scalability Analysis of the Parallel Floyd–Warshall Algorithm in High-Performance Computing Using OpenMP
The all-pairs shortest-path problem is a fundamental operation in network analysis. The Floyd–Warshall algorithm provides a regular computational structure but requires cubic work, making its execution time sensitive to graph size. This study compares a sequential C++ implementation with a shared-memory OpenMP implementation that assigns matrix rows to threads and synchronizes after every intermediate vertex. Synthetic directed graphs of 128–2048 vertices were generated with approximately 50% edge density and positive integer weights. A total of 84 timed runs were completed using one, two and four threads in a CPU-limited virtual environment. Full distance matrices matched the sequential reference in every completed run. Four threads achieved a maximum median speedup of 2.37 at 1024 vertices, whereas at 128 vertices the parallel configurations were slower than the serial baseline. At 2048 vertices, the median runtime decreased from 1.660 s to 0.849 s with four threads. The findings illustrate the trade-off between available parallel work and synchronization overhead; they are specific to the implementation and experimental environment, rather than evidence of universal scaling. The source code and raw timings accompany the manuscript.
Authors
- Yersultan Uzenbek
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-12-02
- DOI
- https://doi.org/10.5281/zenodo.24740784
- Primary Topic
- Parallel Computing and Optimization Techniques
- Type
- preprint