Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: Re: [OMPI users] Problem with linking on OS X
From: Jody Klymak (jklymak_at_[hidden])
Date: 2009-08-19 15:04:31


Hi Tomek,

I'm using 10.5.7, and just went through a painful process that we
thought was library related (but it wasn't), so I'll give my less-than-
learned response, and if you sill have difficulties hopefully others
will chime in:

What is the result of "which mpicc" (or whatever you are using for
your compiling/linking? I'm pretty sure that's where the library
paths get set, and if you are calling /usr/bin/mpicc you will get the
wrong library paths in the executable.

On Aug 19, 2009, at 10:57 AM, tomek wrote:

> 1. Using DYLD_LIBRARY_PATH
> 2. passing some ./configure --with-wrapper-ldflags="-L/opt/openmpi/
> lib"
> 3. passing some ./configure --with-wrapper-ldflags="-rpath /opt/
> openmpi/lib"
> 4. hand compilation with cc -L/opt/openmpi/lib -lmpi
>
> 2 and 3 did not work (ld error=22)
>
> With 1 and 2 my code still gets linked with /usr/lib/libmpi...
>
> Note, that the /opt/openmpi/bin path is properly set and ompi_info
> does outputs the right info.

You do not need to set DYLD_LIBRARY_PATH. I don't have it set and my
mpi applications run fine.

Did 4 work?

Cheers, Jody

--
Jody Klymak
http://web.uvic.ca/~jklymak/