Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
M

mpl

> 数据库
Open source

A C++17 message passing library based on MPI

186 stars0 likes0 views
WebsiteGitHub

About

A C++17 message passing library based on MPI

MPL - A message passing library

MPL is a message passing library written in C++17 based on the Message Passing Interface (MPI) standard. Since the C++ API has been dropped from the MPI standard in version 3.1, it is the aim of MPL to provide a modern C++ message passing library for high performance computing.

MPL will neither bring all functions of the C language MPI-API to C++ nor provide a direct mapping of the C API to some C++ functions and classes. The library's focus lies on the MPI core message passing functions, ease of use, type safety, and elegance. The aim of MPL is to provide an idiomatic C++ message passing library without introducing a significant overhead compared to utilizing MPI via its plain C-API. This library is most useful for developers who have at least some basic knowledge of the Message Passing Interface standard and would like to utilize it via a more user-friendly interface in modern C++. Unlike Boost.MPI, MPL does not rely on an external serialization library and has a negligible run-time overhead.

Supported features

MPL assumes that the underlying MPI implementation supports the version 3.1 of the Message Passing Interface standard. Future versions of MPL may also employ features of the new version 4.0 or later MPI versions.

MPL gives currently access via a convenient C++ interface to the following features of the Message Passing Interface standard:

  • environmental management (implicit initialization and finalization, timers, but no error handling).
  • point-to-point communication (blocking and non-blocking),
  • collective communication (blocking and non-blocking),
  • derived data types (happens automatically for many custom data types or via the base_struct_builder helper class and the layout classes of MPL),
  • communicator- and group-management,
  • process topologies (cartesian and graph topologies),
  • inter-communicators,
  • dynamic process creation and
  • file i/o.

Currently, the following MPI features are not yet supported by MPL:

  • error handling and
  • one-sided communication.

Although MPL covers a subset of the MPI functionality only, it has probably the largest MPI-feature coverage among all alternative C++ interfaces to MPI.

Hello parallel world

MPL is built on top of the Message Passing Interface (MPI) standard. Therefore, MPL shares many concepts known from the MPI standard, e.g., the concept of a communicator. Communicators manage the message exchange between different processes, i.e., messages are sent and received with the help of a communicator.

The MPL environment provides a global default communicator comm_world, which will be used in the following Hello-World program. The program prints out some information about each process:

  • its rank,
  • the total number of processes and
  • the computer's name the process is running on.

If there are two or more processes, a message is sent from process 0 to process 1, which is also printed.

…

Documentation

For further documentation see the documentation, the blog posts

  • MPL – A message passing library,
  • MPL – Collective communication,
  • MPL – Data types,

the presentation

  • Message Passing mit modernem C++ (German only),

the book

  • Parallel Programming for Science and Engineering by Victor Eijkhout, or

the workshop material

  • SMU O'Donnell Data Science and Research Computing Institute Parallel C++ Workshop

and the files in the examples directory of the source package.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

C++c-plus-plusc-plus-plus-17cluster-computingheader-only

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category数据库
PricingOpen source

> Related tools

P
PostgreSQL
功能强大的开源关系型数据库
R
Redis
内存数据结构存储,常用作缓存与队列
M
MySQL
广泛使用的开源关系型数据库