Skip to main content

SPMD IR: Unifying SPMD and Multi-value IR Showcased for Static Verification of Collectives

  • Conference paper
  • First Online:
Recent Advances in the Message Passing Interface (EuroPVM/MPI 2024)

Abstract

To effectively utilize modern HPC clusters, inter-node communication and related single program, multiple data (SPMD) parallel programming models such as mpi are inevitable. Current tools and compilers that employ analyses of SPMD models often have the limitation of only supporting one model or implementing the necessary abstraction internally. This makes the analysis and effort for the abstraction neither reusable nor the tool extensible to other models without extensive changes to the tool itself.

This work proposes an spmd ir as part of a multi-layer program representation and accompanying compiler passes to explicitly express the results of abstraction and multi-value analysis. The spmd ir makes the executing processes of operations explicit and differentiates between static and dynamic cases. It is implemented as a prototype in the mlir llvm infrastructure and is comprised of the spmd dialect and two compiler passes, supporting mpi, shmem, and nccl, including hybrid cases.

To evaluate the proposed IR, verification of collective communication was chosen as a use case. For that, this work reimplements and extends parcoach’s static approach on the spmd ir and assesses it by an expanded micro-benchmark suite in mpi, shmem, and nccl. Achieving similar detection accuracy, the evaluation shows that the spmd ir’s level of abstraction is strong enough for parcoach’s analyses and generic enough for increased extensibility. The prototype also constitutes the first collectives verification of shmem, nccl, and their combinations (with mpi).

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

Notes

  1. 1.

    The original mpi codes from parcoach constituting the micro-benchmark suite can be found at: https://github.com/parcoach/microbenchmarks.

  2. 2.

    All test cases, including individual results, and the implementation of the spmd ir as a dialect, transformations, analyses, and collectives verification can be found at: https://github.com/RWTH-HPC/SPMD-IR-Paper-Code-Base.

  3. 3.

    The sources are available at https://github.com/burakSemih/Polygeist/tree/spmd-ir-paper-eurompi-2024 (commit 49c2abd) for Polygeist and at https://github.com/burakSemih/llvm-project/tree/spmd-ir-paper-eurompi-2024 (commit 376bfa4) for the llvm project.

References

  1. Aiken, A., Gay, D.: Barrier inference. In: POPL 1998 (1998)

    Google Scholar 

  2. GASPI Forum: GASPI: Global Address Space Programming Interface, Version 17.1 (2017). https://raw.githubusercontent.com/GASPI-Forum/GASPI-Forum.github.io/master/standards/GASPI-17.1.pdf. Accessed 26 July 2024

  3. Hammond, J.R., Ghosh, S., Chapman, B.M.: Implementing OpenSHMEM using MPI-3 one-sided communication. In: OpenSHMEM 2014 (2014)

    Google Scholar 

  4. Hilbrich, T., Schulz, M., de Supinski, B.R., Müller, M.S.: MUST: a scalable approach to runtime error detection in MPI programs. In: Müller, M., Resch, M., Schulz, A., Nagel, W. (eds.) Tools for High Performance Computing 2009, pp. 53–66. Springer, Heidelberg (2010). https://doi.org/10.1007/978-3-642-11261-4_5

  5. Huchant, P., Saillard, E., Barthou, D., Carribault, P.: Multi-valued expression analysis for collective checking. In: Yahyapour, R. (ed.) Euro-Par 2019. LNCS, vol. 11725, pp. 29–43. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-29400-7_3

    Chapter  Google Scholar 

  6. INRIA Researchers: PARCOACH - Git Repository, Release Version 2.42. https://github.com/parcoach/parcoach. Accessed 26 July 2024

  7. Lattner, C., Adve, V.: LLVM: a compilation framework for lifelong program analysis & transformation. In: CGO 2004 (2004)

    Google Scholar 

  8. Lattner, C., Amini, M., Bondhugula, U., Cohen, A., et al.: MLIR: scaling compiler infrastructure for domain specific computation. In: CGO 2021 (2021)

    Google Scholar 

  9. Lydike, A.: RFC of an MPI Dialect in the LLVM Forum (2023). https://discourse.llvm.org/t/rfc-mpi-dialect/74705. Accessed 26 July 2024

  10. Message Passing Interface Forum: MPI: A Message-passing Interface Standard, Version 4.1 (2023). https://mpi-forum.org/docs/mpi-4.1/mpi41-report.pdf. Accessed 26 July 2024

  11. Moses, W.S., Chelini, L., Zhao, R., Zinenko, O.: Polygeist: raising C to polyhedral MLIR. In: PACT 2021 (2021)

    Google Scholar 

  12. Nguyen, V.M., Saillard, E., Jaeger, J., et al.: PARCOACH extension for static MPI nonblocking and persistent communication validation. In: Correctness 2020 (2020)

    Google Scholar 

  13. NVIDIA: NVIDIA Collective Communications Library (NCCL) Documentation, Version 2.19.3 (2023). https://docs.nvidia.com/deeplearning/nccl/archives/nccl_2193/user-guide/docs/index.html. Accessed 26 July 2024

  14. NVIDIA: NVIDIA OpenSHMEM Library (NVSHMEM) Documentation, Version 2.8.0 (2023). https://docs.nvidia.com/nvshmem/archives/nvshmem-280/api/index.html. Accessed 26 July 2024

  15. NVIDIA: CUDA Toolkit Documentation, Version 12.4. https://docs.nvidia.com/cuda/archive/12.4.0/. Accessed 26 July 2024

  16. OpenACC Organization Members: The OpenACC Application Programming Interface, Version 3.3 (2022). https://openacc.org/sites/default/files/inline-images/Specification/OpenACC-3.3-final.pdf. Accessed 26 July 2024

  17. OpenMP Architecture Review Board: OpenMP Application Programming Interface, Version 5.2 (2021). https://openmp.org/wp-content/uploads/OpenMP-API-Specification-5-2.pdf. Accessed 26 July 2024

  18. OpenSHMEM Team: OpenSHMEM Application Programming Interface Specification, Version 1.5 (2020). http://openshmem.org/site/sites/default/site_files/OpenSHMEM-1.5.pdf. Accessed 26 July 2024

  19. Saillard, E., Brunie, H., Carribault, P., Barthou, D.: PARCOACH extension for hybrid applications with interprocedural analysis. In: Knüpfer, A., Hilbrich, T., Niethammer, C., Gracia, J., Nagel, W.E., Resch, M.M. (eds.) Tools for High Performance Computing 2015, pp. 135–146. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-39589-0_11

    Chapter  Google Scholar 

  20. Saillard, E., Carribault, P., Barthou, D.: PARCOACH: combining static and dynamic validation of MPI collective communications. IJHPCA (2014)

    Google Scholar 

  21. Saillard, E., Sergent, M., Ait Kaci, C.T., Barthou, D.: Static local concurrency errors detection in MPI-RMA programs. In: Correctness 2022 (2022)

    Google Scholar 

  22. Schmitz, A., Burak, S., Miller, J., Müller, M.S.: Parallel pattern compiler for automatic global optimizations. Parallel Comput. (2024). https://doi.org/10.1016/j.parco.2024.103112

  23. Siegel, S.F., Zheng, M., Luo, Z., Zirkel, T.K., et al.: CIVL: the concurrency intermediate verification language. In: SC 2015 (2015)

    Google Scholar 

  24. Susungi, A., Tadonki, C.: Intermediate representations for explicitly parallel programs. ACM Comput. Surv. (2021)

    Google Scholar 

  25. Tiotto, E., Pérez, V., Tsang, W., Sommer, L., et al.: Experiences building an MLIR-based SYCL compiler. In: CGO 2024 (2024)

    Google Scholar 

  26. UPC Consortium: UPC Language Specifications, Version 1.3 (2013). https://upc.lbl.gov/publications/upc-spec-1.3.pdf. Accessed 26 July 2024

  27. UPC++ Specification Working Group: UPC++ Specification, Version 1.0 (2023). https://bitbucket.org/berkeleylab/upcxx/downloads/upcxx-spec-2023.9.0.pdf. Accessed 26 July 2024

  28. Wang, A., Yi, X., Yan, Y.: UPIR: toward the design of unified parallel intermediate representation for parallel programming models. In: PACT 2022 (2023)

    Google Scholar 

  29. Zhang, Y., Duesterwald, E.: Barrier matching for programs with textually unaligned barriers. In: PPoPP 2007 (2007)

    Google Scholar 

Download references

Acknowledgement

The authors gratefully acknowledge the German Federal Ministry of Education and Research (BMBF) and the state government of North Rhine-Westphalia for supporting this work as part of the NHR funding. This work was supported by JST SPRING, Grant Number JPMJSP2106, and the RIKEN Junior Research Associate Program.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Semih Burak .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2025 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Burak, S., Ivanov, I.R., Domke, J., Müller, M. (2025). SPMD IR: Unifying SPMD and Multi-value IR Showcased for Static Verification of Collectives. In: Blaas-Schenner, C., Niethammer, C., Haas, T. (eds) Recent Advances in the Message Passing Interface. EuroPVM/MPI 2024. Lecture Notes in Computer Science, vol 15267. Springer, Cham. https://doi.org/10.1007/978-3-031-73370-3_1

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-73370-3_1

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-73369-7

  • Online ISBN: 978-3-031-73370-3

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics