There were long, religious debates about exactly this issue in the OMPI developer group. The end result is pretty much a generalization of what Michael said: our wrappers should do the absolute minimum to compile and link MPI executables. That is, we provide the -I's, - L's, and -l's necessary to find all the relevant OMPI headers/ libraries, and sometimes a few additional flags required for a consistent executable (e.g., -pthread, if OMPI was compiled with - pthread -- i.e., flags that if OMPI was compiled with them, then MPI apps need to be compiled with them). But nothing else.

If we start including arbitrary features such as -rpath/etc., then although we make some users happy, we will undoubtedly break assumptions of other users.

That being said, OMPI does offer two ways for you to control what the wrapper compilers do:

1. Use the --with-wrapper-*-flags options to OMPI's configure to directly add flags to the wrapper compilers.

2. Edit $prefix/share/openmpi/*-wrapper-data.txt. These text files contain the flags that the wrappers will add (the wrapper compiler program is actually quite dumb; it reads these text files and directly adds those flags to the command line).

So if you want to add -rpath/etc. to the wrappers, we provide you with the facilities to do so, but do not do so by default.

Hope that helps!



On Oct 12, 2006, at 7:27 AM, Michael Kluskens wrote:


On Oct 11, 2006, at 10:38 AM, Lisandro Dalcin wrote:

On 10/11/06, Jeff Squyres <jsquy...@cisco.com> wrote:
Open MPI v1.1.1 requires that you set your LD_LIBRARY_PATH to
include the
directory where its libraries were installed (typically, $prefix/
lib).  Or,
you can use mpirun's --prefix functionality to avoid this

BTW, Why mpicc/mpicxx does not symply pass a -rpath/-R flag to the
linker? Do you want to select libraries at runtime? There are
portability problem in some target plataform? This behavior can be
really useful to experienced unix users/developers but I am not sure
if this holds true for all users.

It appears that you want to hardcode the path to libraries in the
executable?

That is a very bad thing to do.

Example: you compile your code on your system and run the code on
someone else's system.

Not everyone distributes source code and not everyone wants to
compile source code.

Michael

_______________________________________________
users mailing list
us...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/users


--
Jeff Squyres
Server Virtualization Business Unit
Cisco Systems

Reply via email to