Hi,

using Open MPI 4.1.4

$ mpicc --show …

tells me, that the command line contains "… -Wl,--enable-new-dtags …" so that 
even older linkers will include RUNPATH instead of RPATH in the created dynamic 
binary. On the other hand, Open MPI itself doesn't use this option for its own 
libraries:

./liboshmem.so.40.30.2
./libmpi_mpifh.so.40.30.0
./libmpi.so.40.30.4
./libmpi_usempi_ignore_tkr.so.40.30.0
./libopen-rte.so.40.30.2

Is this intended?

Setting LD_LIBRARY_PATH will instruct the created binary to look for libraries 
first in that location and resolve it, but the loaded library in turn will then 
use RPATH inside itself first to load additional libraries.

(I compile Open MPI in my home directory and move it then to the final 
destination for the group; setting OPAL_PREFIX of course. I see a mix of 
library locations when I run the created binary on my own with `ldd`.)

Looks like I can get the intended behavior while configuring Open MPI on this 
(older) system:

$ ./configure …  LDFLAGS=-Wl,--enable-new-dtags

-- Reuti

Reply via email to