We need to build an application on our machine with one mpi (e.g. openmpi),
but for performance reasons, upon installation, we would like to runtime
link to a different, specialized mpi, such as an SGI implementation provided
for their systems.

Can one expect this to work?

I tried this with openmpi and mpich, building the code against shared openmpi
and then changing the LD_LIBRARY_PATH to point to the shared mpich.  This
failed due to the sonames being different.

$ ldd foo  | grep mpi
    libmpi_usempi.so.1 => not found
    libmpi_mpifh.so.2 => not found
    libmpi.so.1 => not found
    libmpi_cxx.so.1 => not found

but in the mpich distribution one has different sonames

libmpi.so.12

so the runtime loader will not load the mpich libraries instead.

and the fortran libraries (which may not matter to us) have different
names,

$ \ls /contrib/mpich-shared/lib/*.so.12
/contrib/mpich-shared/lib/libmpicxx.so.12
/contrib/mpich-shared/lib/libmpifort.so.12
/contrib/mpich-shared/lib/libmpi.so.12

Is there a general approach to this?

Or in practice, must one build on a machine to use that machine's MPI?

Thx.....John Cary


Reply via email to