Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |  

This web mail archive is frozen.

This page is part of a frozen web archive of this mailing list.

You can still navigate around this archive, but know that no new mails have been added to it since July of 2016.

Click here to be taken to the new web archives of this list; it includes all the mails that are in this frozen archive plus all new mails that have been sent to the list since it was migrated to the new archives.

Subject: [OMPI users] mpicc link shouldn't add -ldl and -lhwloc
From: Orion Poplawski (orion_at_[hidden])
Date: 2012-05-15 12:37:16


$ 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

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