I'm afraid the various MPI implementations are not ABI compatible, so you have to compile against the one you intend to use
On Sep 11, 2014, at 11:28 AM, JR Cary <c...@txcorp.com> wrote: > > 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 > > > _______________________________________________ > users mailing list > us...@open-mpi.org > Subscription: http://www.open-mpi.org/mailman/listinfo.cgi/users > Link to this post: > http://www.open-mpi.org/community/lists/users/2014/09/25311.php