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.
Dependencies between the application and the MPI-implementation without using MorphMPI | Dependencies between the application and the MPI-implementation when using MorphMPI |
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.
To use MorphMPI in your application:
MPI_Send
becomes
MorphMPI_Send
. This can easily be done by executing
the morph.sh
script on every header and source
file.morphmpi.h
header in the include-path.MorphMPI consists of
morphmpi.h
header-file that replaces the
standard mpi.h
To create the MorphMPI library
Makefile.config
in the root directory. In
this Makefile.config
you need to tell MorphMPI where
it can find the MPI implementation that you wish MorphMPI routes
all MPI calls to.make
in the
src
directory.