LAM/MPI logo

LAM/MPI General User's Mailing List Archives

  |   Home   |   Download   |   Documentation   |   FAQ   |   all just in this list

From: Brian Barrett (brbarret_at_[hidden])
Date: 2008-03-28 20:38:34


On Mar 28, 2008, at 12:08 PM, Jeff Squyres wrote:
> FWIW, I have found that the -lmpi used by LAM's wrapper compilers may
> actually find /usr/lib/libmpi rather than your LAM libmpi. I'm not
> enough of an OS X expert to chase this further.
>
> If I manually compiled an MPI app with the result of "mpicc --
> showme" (using the full pathname to LAM's libmpi instead of -lmpi),
> then LAM 7.1.4 worked fine for me on my Leopard MBP.

By default, OS X's linker will look through the entire library search
path for a dynamic library, then look through the entire search path
again for a matching static library. Since LAM/MPI builds static
libraries by default (libmpi.a) and Open MPI shipped with OS X builds
with dynamic libraries (libmpi.dylib), Open MPI's libmpi.dylib will
always be preferred to LAM/MPI's.

There's an option to OS X's linker, -search_paths_first, that restores
the more common search a directory for both dynamic and shared
libraries then move on to the next directory search order. Due to the
confusion being caused on Leopard, I'm going to have the wrapper
compilers automatically add this option on OS X 10.5 and above.

More information coming on the problem that started this thread, but
need to do some more checking before I can definitely say it's solved.

Brian

-- 
   Brian Barrett
   LAM/MPI Developer
   Make today a LAM/MPI day!