What is MorphMPI

MorphMPI is a library that simulates an ABI for MPI. MorphMPI therefore makes it possible to run an MPI application on any switch, using the native and optimised MPI-implementation that comes with the switch, without recompiling.

To port an existing application to another MPI-implementation/switch, it suffices to compile the MorphMPI library for the targeted MPI-implemenation and just relink the application with the MorphMPI library. The application is thus not as dependent anymore on a specific MPI-implementation. The dependencies between the application and a specific MPI-implementation , when using MorphMPI or not, are shown in the diagram below.
MPI-dependencies MorphMPI-dependencies
Dependencies between the application and the MPI-implementation without using MorphMPI Dependencies between the application and the MPI-implementation when using MorphMPI

Some background

The MPI standard only specifies an API. Thus for instance, the layout of the MPI_Comm objects in memory or the exact value of MPI_ERR_COMM are not defined in the MPI standard. The API specification therefore leaves plenty of flexibility to MPI implementors. The drawback though is that applications compiled with one implementation can generally not be linked to any other implementation on an otherwise compatible platform. But why should an application link with different MPI implementations on one and the same platform you ask? Many switches come with a tuned MPI implementation and thus to support multiple switches for one and the same platform, different executables are needed.

For any application, executables are only available on a limited number of platforms. A platform is generally defined by a combination of operating system and processor specifications. Executables of parallel applications that rely on MPI, additionally depend on a specific MPI implementation. This means that these parallel applications need to be started with the tools that come with the MPI implementation they are created/linked with and need to be run on hardware that is supported by this particular MPI implementation. Thus the platform specication for MPI applications also need to take the MPI implementation into account.

MorphMPI enables an MPI application to be compiled and later be relinked to any MPI implementation. MorphMPI therefore provides an MPI-standard compatible headerfile mpi.h. And instead of handling the MPI calls on the network, MorphMPI comes with a library that translates and routes all MPI-calls to any other MPI library.

Using MorphMPI

To use MorphMPI in your application:

Building MorphMPI

MorphMPI consists of

To create the MorphMPI library


MorphMPI is licensed under the LGPL v2.1


MorphMPI can be downloaded from


The MorphMPI library is a result from discussions on the beowulf and Open-MPI mailing-list. You can find discussions on this subject at following links:


Thanks to Mathieu Gontier and Free Field Technologies S.A.