Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: Re: [OMPI users] MPI flavor-agnostic libraries
From: Mattijs Janssens (m.janssens_at_[hidden])
Date: 2009-01-14 10:00:54

We did something similar in OpenFOAM by encapsulating our communications
routines into a separate shared library which gets loaded through

The api of this library does not expose any mpi specifics so for a new MPI
version we only have to recompile our small communications library against
the new MPI and the rest of the code works as normal.

Then we can just use LD_LIBRARY_PATH to pick which communications library to
load and hence which mpi to use.

On Wednesday 14 January 2009 14:49, Gregory D Abram wrote:
> I'd like to release binary libraries that use MPI but are agnostic as to
> which flavor or MPI (eg. OpenMPI, MVAPICH, LAM...) that is used by the
> application linking the libraries. I've seen that there are some
> significant differences that stand in the way, for example that MPI_Comm is
> a pointer on OpenMPI and an integer on MVAPICH. I can see some ways that
> might work, but they are pretty complex - for example, I could create an
> intercept library that loads a real MPI library explicitly and do whatever
> needs be done (for example, translating MPI_Comm parameters). Does anyone
> know of anything that might help?

Mattijs Janssens
OpenCFD Ltd.
9 Albert Road,
Reading RG4 7AN.
Tel: +44 (0)118 9471030
Email: M.Janssens_at_[hidden]