International Journal of Parallel Programming

, Volume 43, Issue 5, pp 918–938 | Cite as

Comprehensive Evaluation of a New GPU-based Approach to the Shortest Path Problem

  • Hector Ortega-Arranz
  • Yuri Torres
  • Arturo Gonzalez-Escribano
  • Diego R. Llanos
Article

Abstract

The single-source shortest path (SSSP) problem arises in many different fields. In this paper, we present a GPU SSSP algorithm implementation. Our work significantly speeds up the computation of the SSSP, not only with respect to a CPU-based version, but also to other state-of-the-art GPU implementations based on Dijkstra. Both GPU implementations have been evaluated using the latest NVIDIA architectures. The graphs chosen as input sets vary in nature, size, and fan-out degree, in order to evaluate the behavior of the algorithms for different data classes. Additionally, we have enhanced our GPU algorithm implementation using two optimization techniques: The use of a proper choice of threadblock size; and the modification of the GPU L1 cache memory state of NVIDIA devices. These optimizations lead to performance improvements of up to 23 % with respect to the non-optimized versions. In addition, we have made a platform comparison of several NVIDIA boards in order to distinguish which one is better for each class of graphs, depending on their features. Finally, we compare our results with an optimized sequential implementation of Dijkstra’s algorithm included in the reference Boost library, obtaining an improvement ratio of up to 19\(\times \) for some graph families, using less memory space.

Keywords

Dijkstra GPGPU Kernel characterization NVIDIA platform comparison Optimization techniques SSSP  Boost library 

Notes

Acknowledgments

This research has been partially supported by the Ministerio de Economía y Competitividad (Spain) and ERDF program of the European Union: CAPAP-H5 network (TIN2014-53522-REDT), MOGECOPP project (TIN2011-25639); Junta de Castilla y León (Spain): ATLAS project (VA172A12-2); and the COST Program Action IC1305: NESUS.

References

  1. 1.
    Bast, H., Delling, D., Goldberg, A., Muller-Hannemann, M., Pajor, T., Sanders, P., Wagner, D., Werneck, R.: Route planning in transportation networks. In: Microsoft Research, Techical Report MSR-TR-2014-4 (2014)Google Scholar
  2. 2.
    Papadias, D., Zhang, J., Mamoulis, N., Tao, Y.: Query Processing in Spatial Network Databases, in VLDB’03, pp. 802–813. VLDB Endowment, Berlin (2003)Google Scholar
  3. 3.
    Barrett, C., Jacob, R., Marathe, M.: Formal-language-constrained path problems. SIAM J. Comput. 30, 809–837 (2000)Google Scholar
  4. 4.
    Dijkstra, E.W.: A note on two problems in connexion with graphs. Numerische Mathematik 1, 269–271 (1959)MathSciNetCrossRefMATHGoogle Scholar
  5. 5.
    Siek, J.G., Lee, L.-Q., Lumsdaine, A.: The Boost Graph Library: User Guide and Reference Manual. Addison-Wesley Longman, Boston, MA (2002)Google Scholar
  6. 6.
    Martín, P., Torres, R., Gavilanes, A.: CUDA Solutions for the SSSP Problem. In: Allen, G., Nabrzyski, J., Seidel, E., van Albada, G., Dongarra, J., Sloot, P. (eds.) In Computational Science—ICCS 2009, ser. LNCS. vol. 5544, pp. 904–913. Springer, Berlin (2009)Google Scholar
  7. 7.
    Harish, P., Vineet, V., Narayanan, P.J.: Large graph algorithms for massively multithreaded architectures, Centre for Visual Information Technology, International Institute of IT, Hyderabad, India, Techical Report IIIT/TR/2009/74 (2009)Google Scholar
  8. 8.
    Kirk, D.B., Hwu, W.W.: Programming Massively Parallel Processors: A Hands-on Approach. Morgan Kaufmann, San Francisco, CA (2010)Google Scholar
  9. 9.
    Crauser, A., Mehlhorn, K., Meyer, U., Sanders, P.: A parallelization of Dijkstra’s shortest path algorithm. In: Brim, L., Gruska, J., Zlatuška, J. (eds.) In Mathematical Foundations of Computer Science 1998, ser. LNCS, vol. 1450, pp. 722–731. Springer, Berlin (1998)Google Scholar
  10. 10.
    Cormen, T.H., Stein, C., Rivest, R.L., Leiserson, C.E.: Introduction to Algorithms, 2nd ed. Burr Ridge, Il 60521: McGraw-Hill Higher Education (2001)Google Scholar
  11. 11.
    Fredman, M.L., Tarjan, R.E.: Fibonacci heaps and their uses in improved network optimization algorithms. J. ACM 34, 596–615 (1987)MathSciNetCrossRefGoogle Scholar
  12. 12.
    Singh, D.P., Khare, N.: A study of different parallel implementations of single source shortest path algorithms. Int. J. Comput. Appl. 54(10), 26–30 (2012)Google Scholar
  13. 13.
    Papaefthymiou, M., Rodrigue, J.: Implementing Parallel Shortest-paths Algorithms, ser. DIMACS Series in Discrete Mathematics and Theoretical Computer Science. vol. 30, pp. 59–68. American Mathematical Society, Providence (1994)Google Scholar
  14. 14.
    Meyer, U., Sanders, P.: \(\Delta \)-Stepping: a parallelizable shortest path algorithm. J. Algorithms 49(1), 114–152 (2003) [Online]. Available: http://www.sciencedirect.com/science/article/pii/S0196677403000762
  15. 15.
    Davidson, A., Baxter, S., Garland, M., Owens, J.: Work-Efficient Parallel GPU Methods for Single-Source Shortest Paths, in Parallel and Distributed Processing Symposium, 2014 IEEE 28th International, pp. 349–359 (2014)Google Scholar
  16. 16.
    Harris, M.: Optimizing Parallel Reduction in CUDA, developer.download.nvidia.com/assets/cuda/files/reduction.pdf, nVidia (2008)Google Scholar
  17. 17.
    Ortega, H., Torres, Y., Gonzalez-Escribano, A., Llanos, D.R.: Optimizing an APSP implementation for NVIDIA GPUs using Kernel characterization criteria. J. Supercomput. 70(2), 786–798 (2014)Google Scholar
  18. 18.
    Nobari, S., Lu, X., Karras, P., Bressan, S.: Fast random graph generation, In: Proceedings of the 14th International Conference on Extending Database Technology, ser. EDBT/ICDT ’11. pp. 331–342. ACM, New York, NY (2011)Google Scholar
  19. 19.
    DIMACS implementation challenge, (2012). [Online]. Available: http://www.cise.ufl.edu/research/sparse/dimacs10
  20. 20.
    Gleich, D.F.: Graph of flickr photo-sharing social network crawled in may 2006, (2012). [Online]. Available: https://purr.purdue.edu/publications/1002

Copyright information

© Springer Science+Business Media New York 2015

Authors and Affiliations

  • Hector Ortega-Arranz
    • 1
  • Yuri Torres
    • 1
  • Arturo Gonzalez-Escribano
    • 1
  • Diego R. Llanos
    • 1
  1. 1.Departamento de InformáticaUniversidad de ValladolidValladolidSpain

Personalised recommendations