Hello. I'm wondering if anyone knows of a way to get OpenMPI to compile shared libraries without hard-coding the installation directory in them. After compiling and installing OpenMPI, the shared libraries have the installation libraries hard-coded in them. For instance:
$ ldd libmpi.soliborte.so.0 => /usr/local/fluent/develop/multiport4.4/packages/lnamd64/openmpi/openmpi-1.1.2/lib/liborte.so.0 (0x0000002a956ea000)
libnsl.so.1 => /lib64/libnsl.so.1 (0x0000002a95852000) libutil.so.1 => /lib64/libutil.so.1 (0x0000002a95968000) libm.so.6 => /lib64/tls/libm.so.6 (0x0000002a95a6c000) libpthread.so.0 => /lib64/tls/libpthread.so.0 (0x0000002a95bc4000) libc.so.6 => /lib64/tls/libc.so.6 (0x0000002a95cd8000)libopal.so.0 => /usr/local/fluent/develop/multiport4.4/packages/lnamd64/openmpi/openmpi-1.1.2/lib/libopal.so.0 (0x0000002a95f00000)
/lib64/ld-linux-x86-64.so.2 (0x000000552aaaa000) libdl.so.2 => /lib64/libdl.so.2 (0x0000002a9605a000)In the above, "/usr/local/fluent/develop/multiport4.4/packages/lnamd64/openmpi/openmpi-1.1.2/lib" is hardcoded into libmpi.so using --rpath when libmpi.so is compiled.
This is problematic because the installation cannot be moved after it is installed. It is often useful to compile/install libraries on one machine and then move the libraries to a different location on other machines (of course, LD_LIBRARY_PATH or some means then needs to be used to pick up libs are runtime). This relocation is also useful when redistributing the MPI installation with an application. The hard-coded paths prohibit this.
I've tried to modify the "--rpath" argument in libtool and opal/libltdl/libtool, but have not gotten this to work.
Has anyone else had experience with this? (I'm building OpenMPI 1.1.2 on linux x86_64.) Thanks in advance for any potential help.
Regards, -Patrick
<<attachment: pj.vcf>>