Modernizing the C++ Interface to MPI
The Message Passing Interface (MPI) is the de facto standard for writing message passing applications. Much of MPI’s power stems from its ability to provide a high-performance, consistent interface across C, Fortran, and C++. Unfortunately, with cross-language consistency at the forefront, MPI tends to support only the lowest common denominator of the three languages, providing a level of abstraction far lower than typical C++ libraries. For instance, MPI does not inherently support standard C++ constructs such as containers and iterators, nor does it provide seamless support for user-defined classes. To map these common C++ constructs into MPI, programmers must often write non-trivial boiler-plate code and weaken the type-safety guarantees provided by C++. This paper describes several ideas for modernizing the C++ interface to MPI, providing a more natural syntax along with seamless support for user-defined types and C++ Standard Library constructs. We also sketch the C++ techniques required to implement this interface and provide a preliminary performance evaluation illustrating that our modern interface does not imply unnecessary overhead.
KeywordsCollective Operation Lower Common Denominator Standard Template Library Trait Class Primitive Data Type
Unable to display preview. Download preview PDF.
- 1.MPI-1.1 Specification, http://www.mpi-forum.org/docs/docs.html
- 2.Squyres, J.M., McCandless, B.C., Lumsdaine, A.: Object Oriented MPI (OOMPI): a class library for the Message Passing Interface. In: Second MPI Developer’s Conference, Notre Dame, IN, USA. IEEE, Los Alamitos (1996)Google Scholar
- 3.Lee, L.-Q.: Generic Programming for High-Performance Scientific Computing. PhD thesis, University of Notre Dame (2002)Google Scholar
- 4.Ramsey, R.: Boost Serialization Library (2003), http://www.mpi-forum.org/docs/docs.html
- 5.Skjellum, A., Lu, Z., Bangalore, P.V., Doss, N.E.: Explicit parallel programming in C++ based on the message-passing interface (MPI). In: Wilson, G.V. (ed.) Parallel Programming Using C++. MIT Press, Cambridge (1996)Google Scholar
- 7.Squyres, J.M., Saphir, B., Lumsdaine, A.: The Design and Evolution of the MPI-2 C++ Interface. In: Proceedings, 1997 International Conference on Scientific Computing in Object-Oriented Parallel Computing. LNCS, Springer, Heidelberg (1997)Google Scholar