>In short, "mpicc -Wl,-rpath=/my/lib/path helloworld.c -o hello", will >compile a dynamic binary "hello" with built in search path >to "/my/lib/path".
Excuse me... Is that a path or file? I get this: mpif90 -g -pthread -Wl,rpath=/share/apps/computer/OpenBLAS-0.2.18 -o iotk_print_kinds.x iotk_print_kinds.o libiotk.a /usr/bin/ld: rpath=/share/apps/computer/OpenBLAS-0.2.18: No such file: No such file or directory collect2: ld returned 1 exit status However, the lib files are there. [root@cluster source]# ls -l /share/apps/computer/OpenBLAS-0.2.18/libopenblas* lrwxrwxrwx 1 nfsnobody nfsnobody 32 Sep 8 14:40 /share/apps/computer/OpenBLAS-0.2.18/libopenblas.a -> libopenblas_bulldozerp-r0.2.18.a -rw-r--r-- 1 nfsnobody nfsnobody 28075178 Sep 8 14:41 /share/apps/computer/OpenBLAS-0.2.18/libopenblas_bulldozerp-r0.2.18.a -rwxr-xr-x 1 nfsnobody nfsnobody 14906048 Sep 8 14:41 /share/apps/computer/OpenBLAS-0.2.18/libopenblas_bulldozerp-r0.2.18.so lrwxrwxrwx 1 nfsnobody nfsnobody 33 Sep 8 14:41 /share/apps/computer/OpenBLAS-0.2.18/libopenblas.so -> libopenblas_bulldozerp-r0.2.18.so lrwxrwxrwx 1 nfsnobody nfsnobody 33 Sep 8 14:41 /share/apps/computer/OpenBLAS-0.2.18/libopenblas.so.0 -> libopenblas_bulldozerp-r0.2.18.so Please note that, I added that option to the linker section of make.inc from ESPRESSO # compiler flags: C, F90, F77 # C flags must include DFLAGS and IFLAGS # F90 flags must include MODFLAGS, IFLAGS, and FDFLAGS with appropriate syntax CFLAGS = -O3 $(DFLAGS) $(IFLAGS) F90FLAGS = $(FFLAGS) -x f95-cpp-input $(FDFLAGS) $(IFLAGS) $(MODFLAGS) FFLAGS = -O3 -g # Linker, linker-specific flags (if any) # Typically LD coincides with F90 or MPIF90, LD_LIBS is empty LD = mpif90 LDFLAGS = -g -pthread -Wl,rpath=/share/apps/computer/OpenBLAS-0.2.18 LD_LIBS = Regards, Mahmood
_______________________________________________ users mailing list users@lists.open-mpi.org https://lists.open-mpi.org/mailman/listinfo/users