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
jsquy...@cisco.com
For corporate legal information go to: 
http://www.cisco.com/web/about/doing_business/legal/cri/


Reply via email to