Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: Re: [OMPI users] mpicc link shouldn't add -ldl and -lhwloc
From: Orion Poplawski (orion_at_[hidden])
Date: 2012-05-21 18:06:39

On 05/15/2012 10:37 AM, Orion Poplawski wrote:
> See
> $ mpicc -showme:link
> -pthread -m64 -L/usr/lib64/openmpi/lib -lmpi -ldl -lhwloc
> -ldl and -lhwloc should not be listed. The user should only link against
> libraries that they are using directly, namely -lmpi, and they should
> explicitly add -ldl and -lhwloc if their code directly uses those libraries.
> There does not appear to be any references to libdl or libhwloc symbols in the
> openmpi headers which is the other place it could come in.
> configure appears to add them to opal_WRAPPER_EXTRA_LIBS which then makes its
> way into this list.
> This report is with openmpi-1.5.5. Haven't tested with 1.6, but configure
> looks to do the same in it.


Orion Poplawski
Technical Manager                     303-415-9701 x222
NWRA, Boulder Office                  FAX: 303-415-9702
3380 Mitchell Lane                       orion_at_[hidden]
Boulder, CO 80301