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: Jeff Squyres (jsquyres_at_[hidden])
Date: 2012-05-21 20:15:22

On May 15, 2012, at 10:37 AM, Orion Poplawski wrote:

> $ 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.

I just read this a few times, and I admit that I'm a little confused.

libmpi does use symbols from libdl; we use it to load OMPI's plugins. So I'm not sure why you're saying we shouldn't -ldl in the wrapper compiler...?

libhwloc might be a little questionable here -- I'll have to check to see whether 1.6 uses hwloc only in a plugin or whether it's used in the base library (I don't remember offhand).

Jeff Squyres
For corporate legal information go to: