Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: Re: [OMPI users] Compiling for portability to non-mpi systems.
From: jody (jody.xha_at_[hidden])
Date: 2008-09-25 07:57:05


I don't think there is an Open-MPI based solution for this.

I would probably to the following:

- place all functions using MPI calls into a separate module and
create a shared-object dynamic library (so file).
- create another .so file which contains the non-MPI equivalents of
those functions

At runtime, determine whether MPI is present. If yes, dynamically load the
MPI-functions .so, and otherwise load the Non-MPI-functions .so

However beware that you will have problems if you will use this
application on a system
whose Open-MPI has a different version than the one you compiled your
application with.

Jody

On Thu, Sep 25, 2008 at 1:26 PM, Ali Copey <alicopey158_at_[hidden]> wrote:
> Hello,
>
> We have created a piece of software that is designed to work under a variety
> of conditions, one of which is using MPI.
>
> This application will preferably us a single executable and then load the
> mpi communications interface as a library at runtime, however adding this
> functionality by compiling using the mpi compile wrappers creates an
> executable that will not run on a system without mpi installed.
>
> Is it possible to have the main executable not dependent upon the presence
> of mpi but still able to load the mpi dependent library if mpi is required,
> and how would this be achieved?
>
> Thank you,
>
> Alex
>
>
>
> _______________________________________________
> users mailing list
> users_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/users
>