English

Concepts for designing modern C++ interfaces for MPI

Distributed, Parallel, and Cluster Computing 2025-10-17 v2

Abstract

Since the C++ bindings were deleted in 2008, the Message Passing Interface (MPI) community has revived efforts in building high-level modern C++ interfaces. Such interfaces are either built to serve specific scientific application needs (with limited coverage to the underlying MPI functionalities), or as an exercise in general-purpose programming model building, with the hope that bespoke interfaces can be broadly adopted to construct a variety of distributed-memory scientific applications. However, with the advent of modern C++-based heterogeneous programming models, GPUs and widespread Machine Learning (ML) usage in contemporary scientific computing, the role of prospective community-standardized high-level C++ interfaces to MPI is evolving. The success of such an interface clearly will depend on providing robust abstractions and features adhering to the generic programming principles that underpin the C++ programming language, without compromising on either performance and portability, the core principles upon which MPI was founded. However, there is a tension between idiomatic C++ handling of types and lifetimes and MPI's loose interpretation of object lifetimes/ownership and insistence on maintaining global states. Instead of proposing "yet another" high-level C++ interface to MPI, overlooking or providing partial solutions to work around the key issues concerning the dissonance between MPI semantics and idiomatic C++, this paper focuses on the three fundamental aspects of a high-level interface: type system, object lifetimes and communication buffers, also identifying inconsistencies in the MPI specification. Presumptive solutions can be unrefined, and we hope the broader MPI and C++ communities will engage with us in productive exchange of ideas and concerns.

Cite

@article{arxiv.2506.14610,
  title  = {Concepts for designing modern C++ interfaces for MPI},
  author = {C. Nicole Avans and Alfredo A. Correa and Sayan Ghosh and Matthias Schimek and Joseph Schuchart and Anthony Skjellum and Evan D. Suggs and Tim Niklas Uhl},
  journal= {arXiv preprint arXiv:2506.14610},
  year   = {2025}
}

Comments

This version of the contribution has been accepted for publication after peer review, but is not the Version of Record and does not reflect post-acceptance improvements, or any corrections. The Version of Record appeared in Recent Advances in the Message Passing Interface. EuroMPI 2025. Lecture Notes in Computer Science, vol 15977. Springer, Cham

R2 v1 2026-07-01T03:22:03.257Z