diff --git a/compilers/fast/mpicc-trace-bgp-V1R4.in b/compilers/fast/mpicc-trace-bgp-V1R4.in index e867209f641a89446bf66710d39e8573b2e225b8..b7098b7ebb26b741a0399d444983a465e8d8e607 100755 --- a/compilers/fast/mpicc-trace-bgp-V1R4.in +++ b/compilers/fast/mpicc-trace-bgp-V1R4.in @@ -261,7 +261,10 @@ if [ "$linking" = yes ] ; then stock_link_cmd="$CC ${allargs[@]} -I$includedir $CFLAGS $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS" - darshan_link_cmd="$CC ${allargs[@]} -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -ldarshan-mpi-io -lz -I$includedir $CFLAGS ${CP_WRAPPERS} $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix" + # if allargs includes any libraries, then we need to get + # -ldarshan-mpi-io in there first + newallargs=`echo ${allargs[@]} | sed 's/ -l/ -ldarshan-mpi-io -l/'` + darshan_link_cmd="$CC $newallargs -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -ldarshan-mpi-io -lz -I$includedir $CFLAGS ${CP_WRAPPERS} $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix" used_darshan=0 diff --git a/compilers/fast/mpicxx-trace-bgp-V1R4.in b/compilers/fast/mpicxx-trace-bgp-V1R4.in index 3cd80f9e5f3b6f69ec1955783ebe58507a4a4688..9c21a70208fc095fe3e6d1676c5a88c2efafd81c 100755 --- a/compilers/fast/mpicxx-trace-bgp-V1R4.in +++ b/compilers/fast/mpicxx-trace-bgp-V1R4.in @@ -261,7 +261,10 @@ if [ "$linking" = yes ] ; then stock_link_cmd="$CXX ${allargs[@]} -I$includedir $CXXFLAGS $LDFLAGS -L$libdir -L$opalibdir $shllibpath $cxxlibs $mpilibs $MPI_OTHERLIBS" - darshan_link_cmd="$CXX ${allargs[@]} -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -lcxxmpich.cnk -ldarshan-mpi-io -lz -I$includedir $CXXFLAGS ${CP_WRAPPERS} $LDFLAGS -L$libdir -L$opalibdir $shllibpath $cxxlibs $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix" + # if allargs includes any libraries, then we need to get + # -ldarshan-mpi-io in there first + newallargs=`echo ${allargs[@]} | sed 's/ -l/ -ldarshan-mpi-io -l/'` + darshan_link_cmd="$CXX $newallargs -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -lcxxmpich.cnk -ldarshan-mpi-io -lz -I$includedir $CXXFLAGS ${CP_WRAPPERS} $LDFLAGS -L$libdir -L$opalibdir $shllibpath $cxxlibs $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix" used_darshan=0 diff --git a/compilers/fast/mpif77-trace-bgp-V1R4.in b/compilers/fast/mpif77-trace-bgp-V1R4.in index 97e2e47b76555ffcc99d0855c106571395307a81..80c4d8ce774f600b4a731196bc8172c3570b9ced 100755 --- a/compilers/fast/mpif77-trace-bgp-V1R4.in +++ b/compilers/fast/mpif77-trace-bgp-V1R4.in @@ -309,7 +309,10 @@ if [ "$linking" = yes ] ; then stock_link_cmd="$FC ${allargs[@]} -I$includedir $FFLAGS $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS" - darshan_link_cmd="$FC ${CP_WRAPPERS} ${allargs[@]} -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -lfmpich.cnk -ldarshan-posix -ldarshan-mpi-io -I$includedir $FFLAGS $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix -ldarshan-mpi-io -lz" + # if allargs includes any libraries, then we need to get + # -ldarshan-mpi-io in there first + newallargs=`echo ${allargs[@]} | sed 's/ -l/ -ldarshan-mpi-io -l/'` + darshan_link_cmd="$FC ${CP_WRAPPERS} $newallargs -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -lfmpich.cnk -ldarshan-posix -ldarshan-mpi-io -I$includedir $FFLAGS $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix -ldarshan-mpi-io -lz" used_darshan=0 diff --git a/compilers/fast/mpif90-trace-bgp-V1R4.in b/compilers/fast/mpif90-trace-bgp-V1R4.in index 951577a538075c4b578ff27ebb895afd9bcef721..a91b121cfb93141825911787d4f03eb0d1e8df98 100755 --- a/compilers/fast/mpif90-trace-bgp-V1R4.in +++ b/compilers/fast/mpif90-trace-bgp-V1R4.in @@ -356,7 +356,10 @@ if [ "$linking" = yes ] ; then stock_link_cmd="$F90 ${allargs[@]} $F90INCDIRS $F90MODDIRS $F90FLAGS $LDFLAGS -L$libdir -L$opalibdir $F90MODLIBS $mpilibs $MPI_OTHERLIBS" - darshan_link_cmd="$F90 ${CP_WRAPPERS} ${allargs[@]} -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -lfmpich.cnk -ldarshan-posix -ldarshan-mpi-io $F90INCDIRS $F90MODDIRS $F90FLAGS $LDFLAGS -L$libdir -L$opalibdir $F90MODLIBS $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix -ldarshan-mpi-io -lz" + # if allargs includes any libraries, then we need to get + # -ldarshan-mpi-io in there first + newallargs=`echo ${allargs[@]} | sed 's/ -l/ -ldarshan-mpi-io -l/'` + darshan_link_cmd="$F90 ${CP_WRAPPERS} $newallargs -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -lfmpich.cnk -ldarshan-posix -ldarshan-mpi-io $F90INCDIRS $F90MODDIRS $F90FLAGS $LDFLAGS -L$libdir -L$opalibdir $F90MODLIBS $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix -ldarshan-mpi-io -lz" used_darshan=0 diff --git a/compilers/fast/mpixlc-trace-bgp-V1R4.in b/compilers/fast/mpixlc-trace-bgp-V1R4.in index 40dc6897912ad85ca8754647fe44bdeb01f18736..da5a6c2cb0a1d9cfccdd705a704dfb5f7a4b4d2b 100755 --- a/compilers/fast/mpixlc-trace-bgp-V1R4.in +++ b/compilers/fast/mpixlc-trace-bgp-V1R4.in @@ -261,7 +261,10 @@ if [ "$linking" = yes ] ; then stock_link_cmd="$CC ${allargs[@]} -I$includedir $CFLAGS $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS" - darshan_link_cmd="$CC ${allargs[@]} -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -ldarshan-mpi-io -lz -I$includedir $CFLAGS ${CP_WRAPPERS} $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix" + # if allargs includes any libraries, then we need to get + # -ldarshan-mpi-io in there first + newallargs=`echo ${allargs[@]} | sed 's/ -l/ -ldarshan-mpi-io -l/'` + darshan_link_cmd="$CC $newallargs -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -ldarshan-mpi-io -lz -I$includedir $CFLAGS ${CP_WRAPPERS} $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix" used_darshan=0 diff --git a/compilers/fast/mpixlc_r-trace-bgp-V1R4.in b/compilers/fast/mpixlc_r-trace-bgp-V1R4.in index e867209f641a89446bf66710d39e8573b2e225b8..b7098b7ebb26b741a0399d444983a465e8d8e607 100755 --- a/compilers/fast/mpixlc_r-trace-bgp-V1R4.in +++ b/compilers/fast/mpixlc_r-trace-bgp-V1R4.in @@ -261,7 +261,10 @@ if [ "$linking" = yes ] ; then stock_link_cmd="$CC ${allargs[@]} -I$includedir $CFLAGS $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS" - darshan_link_cmd="$CC ${allargs[@]} -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -ldarshan-mpi-io -lz -I$includedir $CFLAGS ${CP_WRAPPERS} $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix" + # if allargs includes any libraries, then we need to get + # -ldarshan-mpi-io in there first + newallargs=`echo ${allargs[@]} | sed 's/ -l/ -ldarshan-mpi-io -l/'` + darshan_link_cmd="$CC $newallargs -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -ldarshan-mpi-io -lz -I$includedir $CFLAGS ${CP_WRAPPERS} $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix" used_darshan=0 diff --git a/compilers/fast/mpixlcxx-trace-bgp-V1R4.in b/compilers/fast/mpixlcxx-trace-bgp-V1R4.in index 3b717002e670ac55a85737ad87b1607739b1a7b8..b142808d7cbea38ad29e70adda8f3578cc1a0241 100755 --- a/compilers/fast/mpixlcxx-trace-bgp-V1R4.in +++ b/compilers/fast/mpixlcxx-trace-bgp-V1R4.in @@ -261,7 +261,10 @@ if [ "$linking" = yes ] ; then stock_link_cmd="$CXX ${allargs[@]} -I$includedir $CXXFLAGS $LDFLAGS -L$libdir -L$opalibdir $shllibpath $cxxlibs $mpilibs $MPI_OTHERLIBS" - darshan_link_cmd="$CXX ${allargs[@]} -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -lcxxmpich.cnk -ldarshan-mpi-io -lz -I$includedir $CXXFLAGS ${CP_WRAPPERS} $LDFLAGS -L$libdir -L$opalibdir $shllibpath $cxxlibs $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix" + # if allargs includes any libraries, then we need to get + # -ldarshan-mpi-io in there first + newallargs=`echo ${allargs[@]} | sed 's/ -l/ -ldarshan-mpi-io -l/'` + darshan_link_cmd="$CXX $newallargs -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -lcxxmpich.cnk -ldarshan-mpi-io -lz -I$includedir $CXXFLAGS ${CP_WRAPPERS} $LDFLAGS -L$libdir -L$opalibdir $shllibpath $cxxlibs $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix" used_darshan=0 diff --git a/compilers/fast/mpixlcxx_r-trace-bgp-V1R4.in b/compilers/fast/mpixlcxx_r-trace-bgp-V1R4.in index 3cd80f9e5f3b6f69ec1955783ebe58507a4a4688..9c21a70208fc095fe3e6d1676c5a88c2efafd81c 100755 --- a/compilers/fast/mpixlcxx_r-trace-bgp-V1R4.in +++ b/compilers/fast/mpixlcxx_r-trace-bgp-V1R4.in @@ -261,7 +261,10 @@ if [ "$linking" = yes ] ; then stock_link_cmd="$CXX ${allargs[@]} -I$includedir $CXXFLAGS $LDFLAGS -L$libdir -L$opalibdir $shllibpath $cxxlibs $mpilibs $MPI_OTHERLIBS" - darshan_link_cmd="$CXX ${allargs[@]} -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -lcxxmpich.cnk -ldarshan-mpi-io -lz -I$includedir $CXXFLAGS ${CP_WRAPPERS} $LDFLAGS -L$libdir -L$opalibdir $shllibpath $cxxlibs $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix" + # if allargs includes any libraries, then we need to get + # -ldarshan-mpi-io in there first + newallargs=`echo ${allargs[@]} | sed 's/ -l/ -ldarshan-mpi-io -l/'` + darshan_link_cmd="$CXX $newallargs -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -lcxxmpich.cnk -ldarshan-mpi-io -lz -I$includedir $CXXFLAGS ${CP_WRAPPERS} $LDFLAGS -L$libdir -L$opalibdir $shllibpath $cxxlibs $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix" used_darshan=0 diff --git a/compilers/fast/mpixlf2003-trace-bgp-V1R4.in b/compilers/fast/mpixlf2003-trace-bgp-V1R4.in index a5374e12392432a5fca441d5763aace1626ddfdb..cd9769b54b1f99a73de9b3a7882d640c7d8ddf72 100755 --- a/compilers/fast/mpixlf2003-trace-bgp-V1R4.in +++ b/compilers/fast/mpixlf2003-trace-bgp-V1R4.in @@ -309,7 +309,10 @@ if [ "$linking" = yes ] ; then stock_link_cmd="$FC ${allargs[@]} -I$includedir $FFLAGS $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS" - darshan_link_cmd="$FC ${CP_WRAPPERS} ${allargs[@]} -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -lfmpich.cnk -ldarshan-posix -ldarshan-mpi-io -I$includedir $FFLAGS $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix -ldarshan-mpi-io -lz" + # if allargs includes any libraries, then we need to get + # -ldarshan-mpi-io in there first + newallargs=`echo ${allargs[@]} | sed 's/ -l/ -ldarshan-mpi-io -l/'` + darshan_link_cmd="$FC ${CP_WRAPPERS} $newallargs -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -lfmpich.cnk -ldarshan-posix -ldarshan-mpi-io -I$includedir $FFLAGS $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix -ldarshan-mpi-io -lz" used_darshan=0 diff --git a/compilers/fast/mpixlf2003_r-trace-bgp-V1R4.in b/compilers/fast/mpixlf2003_r-trace-bgp-V1R4.in index a3987e102afb19f8320fc6a151778477c2747e54..982fc5e40496891a1dd396ec51eba65a301e7827 100755 --- a/compilers/fast/mpixlf2003_r-trace-bgp-V1R4.in +++ b/compilers/fast/mpixlf2003_r-trace-bgp-V1R4.in @@ -309,7 +309,10 @@ if [ "$linking" = yes ] ; then stock_link_cmd="$FC ${allargs[@]} -I$includedir $FFLAGS $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS" - darshan_link_cmd="$FC ${CP_WRAPPERS} ${allargs[@]} -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -lfmpich.cnk -ldarshan-posix -ldarshan-mpi-io -I$includedir $FFLAGS $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix -ldarshan-mpi-io -lz" + # if allargs includes any libraries, then we need to get + # -ldarshan-mpi-io in there first + newallargs=`echo ${allargs[@]} | sed 's/ -l/ -ldarshan-mpi-io -l/'` + darshan_link_cmd="$FC ${CP_WRAPPERS} $newallargs -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -lfmpich.cnk -ldarshan-posix -ldarshan-mpi-io -I$includedir $FFLAGS $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix -ldarshan-mpi-io -lz" used_darshan=0 diff --git a/compilers/fast/mpixlf77-trace-bgp-V1R4.in b/compilers/fast/mpixlf77-trace-bgp-V1R4.in index b80dd44e9abd8ad3ea8f4e0f900144752ba8f9bc..4d9896e41e0b9b28019e1a69c374765d5cc68950 100755 --- a/compilers/fast/mpixlf77-trace-bgp-V1R4.in +++ b/compilers/fast/mpixlf77-trace-bgp-V1R4.in @@ -309,7 +309,10 @@ if [ "$linking" = yes ] ; then stock_link_cmd="$FC ${allargs[@]} -I$includedir $FFLAGS $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS" - darshan_link_cmd="$FC ${CP_WRAPPERS} ${allargs[@]} -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -lfmpich.cnk -ldarshan-posix -ldarshan-mpi-io -I$includedir $FFLAGS $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix -ldarshan-mpi-io -lz" + # if allargs includes any libraries, then we need to get + # -ldarshan-mpi-io in there first + newallargs=`echo ${allargs[@]} | sed 's/ -l/ -ldarshan-mpi-io -l/'` + darshan_link_cmd="$FC ${CP_WRAPPERS} $newallargs -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -lfmpich.cnk -ldarshan-posix -ldarshan-mpi-io -I$includedir $FFLAGS $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix -ldarshan-mpi-io -lz" used_darshan=0 diff --git a/compilers/fast/mpixlf77_r-trace-bgp-V1R4.in b/compilers/fast/mpixlf77_r-trace-bgp-V1R4.in index 97e2e47b76555ffcc99d0855c106571395307a81..80c4d8ce774f600b4a731196bc8172c3570b9ced 100755 --- a/compilers/fast/mpixlf77_r-trace-bgp-V1R4.in +++ b/compilers/fast/mpixlf77_r-trace-bgp-V1R4.in @@ -309,7 +309,10 @@ if [ "$linking" = yes ] ; then stock_link_cmd="$FC ${allargs[@]} -I$includedir $FFLAGS $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS" - darshan_link_cmd="$FC ${CP_WRAPPERS} ${allargs[@]} -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -lfmpich.cnk -ldarshan-posix -ldarshan-mpi-io -I$includedir $FFLAGS $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix -ldarshan-mpi-io -lz" + # if allargs includes any libraries, then we need to get + # -ldarshan-mpi-io in there first + newallargs=`echo ${allargs[@]} | sed 's/ -l/ -ldarshan-mpi-io -l/'` + darshan_link_cmd="$FC ${CP_WRAPPERS} $newallargs -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -lfmpich.cnk -ldarshan-posix -ldarshan-mpi-io -I$includedir $FFLAGS $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix -ldarshan-mpi-io -lz" used_darshan=0 diff --git a/compilers/fast/mpixlf90-trace-bgp-V1R4.in b/compilers/fast/mpixlf90-trace-bgp-V1R4.in index fdc4ab7fcef6973726799e66feecaa36d7ab8c87..8144076a2d0f7b4c62627350d69ac2035cac5a6c 100755 --- a/compilers/fast/mpixlf90-trace-bgp-V1R4.in +++ b/compilers/fast/mpixlf90-trace-bgp-V1R4.in @@ -309,7 +309,10 @@ if [ "$linking" = yes ] ; then stock_link_cmd="$FC ${allargs[@]} -I$includedir $FFLAGS $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS" - darshan_link_cmd="$FC ${CP_WRAPPERS} ${allargs[@]} -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -lfmpich.cnk -ldarshan-posix -ldarshan-mpi-io -I$includedir $FFLAGS $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix -ldarshan-mpi-io -lz" + # if allargs includes any libraries, then we need to get + # -ldarshan-mpi-io in there first + newallargs=`echo ${allargs[@]} | sed 's/ -l/ -ldarshan-mpi-io -l/'` + darshan_link_cmd="$FC ${CP_WRAPPERS} $newallargs -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -lfmpich.cnk -ldarshan-posix -ldarshan-mpi-io -I$includedir $FFLAGS $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix -ldarshan-mpi-io -lz" used_darshan=0 diff --git a/compilers/fast/mpixlf90_r-trace-bgp-V1R4.in b/compilers/fast/mpixlf90_r-trace-bgp-V1R4.in index bb0bdb969c57fe57120a9e943950287b37db7cf7..92b7917b52b8725ea98ae649682f2fa6f8afb37e 100755 --- a/compilers/fast/mpixlf90_r-trace-bgp-V1R4.in +++ b/compilers/fast/mpixlf90_r-trace-bgp-V1R4.in @@ -309,7 +309,10 @@ if [ "$linking" = yes ] ; then stock_link_cmd="$FC ${allargs[@]} -I$includedir $FFLAGS $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS" - darshan_link_cmd="$FC ${CP_WRAPPERS} ${allargs[@]} -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -lfmpich.cnk -ldarshan-posix -ldarshan-mpi-io -I$includedir $FFLAGS $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix -ldarshan-mpi-io -lz" + # if allargs includes any libraries, then we need to get + # -ldarshan-mpi-io in there first + newallargs=`echo ${allargs[@]} | sed 's/ -l/ -ldarshan-mpi-io -l/'` + darshan_link_cmd="$FC ${CP_WRAPPERS} $newallargs -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -lfmpich.cnk -ldarshan-posix -ldarshan-mpi-io -I$includedir $FFLAGS $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix -ldarshan-mpi-io -lz" used_darshan=0 diff --git a/compilers/fast/mpixlf95-trace-bgp-V1R4.in b/compilers/fast/mpixlf95-trace-bgp-V1R4.in index fe02d324303bc2891d8708fe940f0d5429709bfb..c5467c0cdabd6b1f2ddedb79768e55a76e45208d 100755 --- a/compilers/fast/mpixlf95-trace-bgp-V1R4.in +++ b/compilers/fast/mpixlf95-trace-bgp-V1R4.in @@ -309,7 +309,10 @@ if [ "$linking" = yes ] ; then stock_link_cmd="$FC ${allargs[@]} -I$includedir $FFLAGS $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS" - darshan_link_cmd="$FC ${CP_WRAPPERS} ${allargs[@]} -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -lfmpich.cnk -ldarshan-posix -ldarshan-mpi-io -I$includedir $FFLAGS $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix -ldarshan-mpi-io -lz" + # if allargs includes any libraries, then we need to get + # -ldarshan-mpi-io in there first + newallargs=`echo ${allargs[@]} | sed 's/ -l/ -ldarshan-mpi-io -l/'` + darshan_link_cmd="$FC ${CP_WRAPPERS} $newallargs -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -lfmpich.cnk -ldarshan-posix -ldarshan-mpi-io -I$includedir $FFLAGS $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix -ldarshan-mpi-io -lz" used_darshan=0 diff --git a/compilers/fast/mpixlf95_r-trace-bgp-V1R4.in b/compilers/fast/mpixlf95_r-trace-bgp-V1R4.in index b3dee0bf233cb8896a19fb467ca0f984e8b876d9..68d411b81175140c1c843ee61ce99b532557a7b8 100755 --- a/compilers/fast/mpixlf95_r-trace-bgp-V1R4.in +++ b/compilers/fast/mpixlf95_r-trace-bgp-V1R4.in @@ -309,7 +309,10 @@ if [ "$linking" = yes ] ; then stock_link_cmd="$FC ${allargs[@]} -I$includedir $FFLAGS $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS" - darshan_link_cmd="$FC ${CP_WRAPPERS} ${allargs[@]} -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -lfmpich.cnk -ldarshan-posix -ldarshan-mpi-io -I$includedir $FFLAGS $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix -ldarshan-mpi-io -lz" + # if allargs includes any libraries, then we need to get + # -ldarshan-mpi-io in there first + newallargs=`echo ${allargs[@]} | sed 's/ -l/ -ldarshan-mpi-io -l/'` + darshan_link_cmd="$FC ${CP_WRAPPERS} $newallargs -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -lfmpich.cnk -ldarshan-posix -ldarshan-mpi-io -I$includedir $FFLAGS $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix -ldarshan-mpi-io -lz" used_darshan=0 diff --git a/compilers/mpicc-trace-bgp-V1R4.in b/compilers/mpicc-trace-bgp-V1R4.in index 68cdcdb9735d2712a78ff456ed31693843796677..55be16bd44f9e22a03bdf5a073372f4100f95659 100755 --- a/compilers/mpicc-trace-bgp-V1R4.in +++ b/compilers/mpicc-trace-bgp-V1R4.in @@ -261,7 +261,10 @@ if [ "$linking" = yes ] ; then stock_link_cmd="$CC ${allargs[@]} -I$includedir $CFLAGS $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS" - darshan_link_cmd="$CC ${allargs[@]} -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -ldarshan-mpi-io -lz -I$includedir $CFLAGS ${CP_WRAPPERS} $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix" + # if allargs includes any libraries, then we need to get + # -ldarshan-mpi-io in there first + newallargs=`echo ${allargs[@]} | sed 's/ -l/ -ldarshan-mpi-io -l/'` + darshan_link_cmd="$CC $newallargs -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -ldarshan-mpi-io -lz -I$includedir $CFLAGS ${CP_WRAPPERS} $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix" used_darshan=0 diff --git a/compilers/mpicc-trace-pcarns.in b/compilers/mpicc-trace-pcarns.in index 0fd719f86b7801ccc0f3d441a71e3809cf0dd3c4..b9c9082ceca107eb111167f3f84799063a620177 100755 --- a/compilers/mpicc-trace-pcarns.in +++ b/compilers/mpicc-trace-pcarns.in @@ -244,7 +244,10 @@ if [ "$linking" = yes ] ; then stock_link_cmd="$CC ${allargs[@]} -I$includedir $CFLAGS $LDFLAGS -L$libdir $mpilibs $MPI_OTHERLIBS" - darshan_link_cmd="$CC ${allargs[@]} -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -ldarshan-mpi-io -lz -I$includedir $CFLAGS ${CP_WRAPPERS} $LDFLAGS -L$libdir $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix" + # if allargs includes any libraries, then we need to get + # -ldarshan-mpi-io in there first + newallargs=`echo ${allargs[@]} | sed 's/ -l/ -ldarshan-mpi-io -l/'` + darshan_link_cmd="$CC $newallargs -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -ldarshan-mpi-io -lz -I$includedir $CFLAGS ${CP_WRAPPERS} $LDFLAGS -L$libdir $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix" used_darshan=0 diff --git a/compilers/mpicxx-trace-bgp-V1R4.in b/compilers/mpicxx-trace-bgp-V1R4.in index 5e8641d07a33bf011ef6811eeeaf96dc576a513f..5c7208ef89d9ff587613ee028e606f817a0080e4 100755 --- a/compilers/mpicxx-trace-bgp-V1R4.in +++ b/compilers/mpicxx-trace-bgp-V1R4.in @@ -261,7 +261,10 @@ if [ "$linking" = yes ] ; then stock_link_cmd="$CXX ${allargs[@]} -I$includedir $CXXFLAGS $LDFLAGS -L$libdir -L$opalibdir $shllibpath $cxxlibs $mpilibs $MPI_OTHERLIBS" - darshan_link_cmd="$CXX ${allargs[@]} -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -lcxxmpich.cnk -ldarshan-mpi-io -lz -I$includedir $CXXFLAGS ${CP_WRAPPERS} $LDFLAGS -L$libdir -L$opalibdir $shllibpath $cxxlibs $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix" + # if allargs includes any libraries, then we need to get + # -ldarshan-mpi-io in there first + newallargs=`echo ${allargs[@]} | sed 's/ -l/ -ldarshan-mpi-io -l/'` + darshan_link_cmd="$CXX $newallargs -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -lcxxmpich.cnk -ldarshan-mpi-io -lz -I$includedir $CXXFLAGS ${CP_WRAPPERS} $LDFLAGS -L$libdir -L$opalibdir $shllibpath $cxxlibs $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix" used_darshan=0 diff --git a/compilers/mpicxx-trace-pcarns.in b/compilers/mpicxx-trace-pcarns.in index 952d2a3dac8f9fe1c14d164bf055945736f8eec6..bc6616086721b43de64b340ccc2f228d485a0afd 100755 --- a/compilers/mpicxx-trace-pcarns.in +++ b/compilers/mpicxx-trace-pcarns.in @@ -244,7 +244,10 @@ if [ "$linking" = yes ] ; then stock_link_cmd="$CXX ${allargs[@]} -I$includedir $CXXFLAGS $LDFLAGS -L$libdir $shllibpath $cxxlibs $mpilibs $MPI_OTHERLIBS" - darshan_link_cmd="$CXX ${allargs[@]} -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -lmpichcxx -ldarshan-mpi-io -lz -I$includedir $CXXFLAGS ${CP_WRAPPERS} $LDFLAGS -L$libdir $shllibpath $cxxlibs $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix" + # if allargs includes any libraries, then we need to get + # -ldarshan-mpi-io in there first + newallargs=`echo ${allargs[@]} | sed 's/ -l/ -ldarshan-mpi-io -l/'` + darshan_link_cmd="$CXX $newallargs -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -lmpichcxx -ldarshan-mpi-io -lz -I$includedir $CXXFLAGS ${CP_WRAPPERS} $LDFLAGS -L$libdir $shllibpath $cxxlibs $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix" used_darshan=0 diff --git a/compilers/mpif77-trace-bgp-V1R4.in b/compilers/mpif77-trace-bgp-V1R4.in index e152257433ad7f583f0f06b9a54b148b8d782c00..3a599c45a1ab976835b7ca8fba61b0a531ab09aa 100755 --- a/compilers/mpif77-trace-bgp-V1R4.in +++ b/compilers/mpif77-trace-bgp-V1R4.in @@ -309,7 +309,10 @@ if [ "$linking" = yes ] ; then stock_link_cmd="$FC ${allargs[@]} -I$includedir $FFLAGS $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS" - darshan_link_cmd="$FC ${CP_WRAPPERS} ${allargs[@]} -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -lfmpich.cnk -ldarshan-posix -ldarshan-mpi-io -I$includedir $FFLAGS $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix -ldarshan-mpi-io -lz" + # if allargs includes any libraries, then we need to get + # -ldarshan-mpi-io in there first + newallargs=`echo ${allargs[@]} | sed 's/ -l/ -ldarshan-mpi-io -l/'` + darshan_link_cmd="$FC ${CP_WRAPPERS} $newallargs -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -lfmpich.cnk -ldarshan-posix -ldarshan-mpi-io -I$includedir $FFLAGS $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix -ldarshan-mpi-io -lz" used_darshan=0 diff --git a/compilers/mpif77-trace-pcarns.in b/compilers/mpif77-trace-pcarns.in index 12ff83cd78dcf8059ac82891393ef39bbe7155a1..6a5c39624a5c764435cf2b0ca9169c57ad342f7c 100755 --- a/compilers/mpif77-trace-pcarns.in +++ b/compilers/mpif77-trace-pcarns.in @@ -290,7 +290,10 @@ if [ "$linking" = yes ] ; then stock_link_cmd="$FC ${allargs[@]} -I$includedir $FFLAGS $LDFLAGS -L$libdir $mpilibs $MPI_OTHERLIBS" - darshan_link_cmd="$FC ${CP_WRAPPERS} ${allargs[@]} -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -lfmpich -ldarshan-posix -ldarshan-mpi-io -I$includedir $FFLAGS $LDFLAGS -L$libdir $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix -ldarshan-mpi-io -lz" + # if allargs includes any libraries, then we need to get + # -ldarshan-mpi-io in there first + newallargs=`echo ${allargs[@]} | sed 's/ -l/ -ldarshan-mpi-io -l/'` + darshan_link_cmd="$FC ${CP_WRAPPERS} $newallargs -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -lfmpich -ldarshan-posix -ldarshan-mpi-io -I$includedir $FFLAGS $LDFLAGS -L$libdir $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix -ldarshan-mpi-io -lz" used_darshan=0 diff --git a/compilers/mpif90-trace-bgp-V1R4.in b/compilers/mpif90-trace-bgp-V1R4.in index 429c38cb2649f9170f4122b7e67df2c737d2d38b..8317ce74a4875c559225bf720ac1494e2d636924 100755 --- a/compilers/mpif90-trace-bgp-V1R4.in +++ b/compilers/mpif90-trace-bgp-V1R4.in @@ -356,7 +356,10 @@ if [ "$linking" = yes ] ; then stock_link_cmd="$F90 ${allargs[@]} $F90INCDIRS $F90MODDIRS $F90FLAGS $LDFLAGS -L$libdir -L$opalibdir $F90MODLIBS $mpilibs $MPI_OTHERLIBS" - darshan_link_cmd="$F90 ${CP_WRAPPERS} ${allargs[@]} -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -lfmpich.cnk -ldarshan-posix -ldarshan-mpi-io $F90INCDIRS $F90MODDIRS $F90FLAGS $LDFLAGS -L$libdir -L$opalibdir $F90MODLIBS $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix -ldarshan-mpi-io -lz" + # if allargs includes any libraries, then we need to get + # -ldarshan-mpi-io in there first + newallargs=`echo ${allargs[@]} | sed 's/ -l/ -ldarshan-mpi-io -l/'` + darshan_link_cmd="$F90 ${CP_WRAPPERS} $newallargs -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -lfmpich.cnk -ldarshan-posix -ldarshan-mpi-io $F90INCDIRS $F90MODDIRS $F90FLAGS $LDFLAGS -L$libdir -L$opalibdir $F90MODLIBS $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix -ldarshan-mpi-io -lz" used_darshan=0 diff --git a/compilers/mpixlc-trace-bgp-V1R4.in b/compilers/mpixlc-trace-bgp-V1R4.in index 7adaf478b51e008d34235a85a0b9258299b3151e..907196e063785273881f0cdba0ca296407c47088 100755 --- a/compilers/mpixlc-trace-bgp-V1R4.in +++ b/compilers/mpixlc-trace-bgp-V1R4.in @@ -261,7 +261,10 @@ if [ "$linking" = yes ] ; then stock_link_cmd="$CC ${allargs[@]} -I$includedir $CFLAGS $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS" - darshan_link_cmd="$CC ${allargs[@]} -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -ldarshan-mpi-io -lz -I$includedir $CFLAGS ${CP_WRAPPERS} $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix" + # if allargs includes any libraries, then we need to get + # -ldarshan-mpi-io in there first + newallargs=`echo ${allargs[@]} | sed 's/ -l/ -ldarshan-mpi-io -l/'` + darshan_link_cmd="$CC $newallargs -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -ldarshan-mpi-io -lz -I$includedir $CFLAGS ${CP_WRAPPERS} $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix" used_darshan=0 diff --git a/compilers/mpixlc_r-trace-bgp-V1R4.in b/compilers/mpixlc_r-trace-bgp-V1R4.in index 31f7ed4e45413968c450a02c597b7a01ba43500a..42c251cdd57837b927858346bfd50dc98c7c6f15 100755 --- a/compilers/mpixlc_r-trace-bgp-V1R4.in +++ b/compilers/mpixlc_r-trace-bgp-V1R4.in @@ -261,7 +261,10 @@ if [ "$linking" = yes ] ; then stock_link_cmd="$CC ${allargs[@]} -I$includedir $CFLAGS $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS" - darshan_link_cmd="$CC ${allargs[@]} -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -ldarshan-mpi-io -lz -I$includedir $CFLAGS ${CP_WRAPPERS} $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix" + # if allargs includes any libraries, then we need to get + # -ldarshan-mpi-io in there first + newallargs=`echo ${allargs[@]} | sed 's/ -l/ -ldarshan-mpi-io -l/'` + darshan_link_cmd="$CC $newallargs -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -ldarshan-mpi-io -lz -I$includedir $CFLAGS ${CP_WRAPPERS} $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix" used_darshan=0 diff --git a/compilers/mpixlcxx-trace-bgp-V1R4.in b/compilers/mpixlcxx-trace-bgp-V1R4.in index 87970e5fb44deeedc9c46dcd9391887ab0fc4260..5cf707d5683ed155296bfc3202b0dca467626cf7 100755 --- a/compilers/mpixlcxx-trace-bgp-V1R4.in +++ b/compilers/mpixlcxx-trace-bgp-V1R4.in @@ -261,7 +261,10 @@ if [ "$linking" = yes ] ; then stock_link_cmd="$CXX ${allargs[@]} -I$includedir $CXXFLAGS $LDFLAGS -L$libdir -L$opalibdir $shllibpath $cxxlibs $mpilibs $MPI_OTHERLIBS" - darshan_link_cmd="$CXX ${allargs[@]} -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -lcxxmpich.cnk -ldarshan-mpi-io -lz -I$includedir $CXXFLAGS ${CP_WRAPPERS} $LDFLAGS -L$libdir -L$opalibdir $shllibpath $cxxlibs $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix" + # if allargs includes any libraries, then we need to get + # -ldarshan-mpi-io in there first + newallargs=`echo ${allargs[@]} | sed 's/ -l/ -ldarshan-mpi-io -l/'` + darshan_link_cmd="$CXX $newallargs -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -lcxxmpich.cnk -ldarshan-mpi-io -lz -I$includedir $CXXFLAGS ${CP_WRAPPERS} $LDFLAGS -L$libdir -L$opalibdir $shllibpath $cxxlibs $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix" used_darshan=0 diff --git a/compilers/mpixlcxx_r-trace-bgp-V1R4.in b/compilers/mpixlcxx_r-trace-bgp-V1R4.in index 829bf6510e5e2b5ec2bb742c542b90082ce01179..f0832444aa4fa5d2e12e89eaba78ffceaa494d45 100755 --- a/compilers/mpixlcxx_r-trace-bgp-V1R4.in +++ b/compilers/mpixlcxx_r-trace-bgp-V1R4.in @@ -261,7 +261,10 @@ if [ "$linking" = yes ] ; then stock_link_cmd="$CXX ${allargs[@]} -I$includedir $CXXFLAGS $LDFLAGS -L$libdir -L$opalibdir $shllibpath $cxxlibs $mpilibs $MPI_OTHERLIBS" - darshan_link_cmd="$CXX ${allargs[@]} -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -lcxxmpich.cnk -ldarshan-mpi-io -lz -I$includedir $CXXFLAGS ${CP_WRAPPERS} $LDFLAGS -L$libdir -L$opalibdir $shllibpath $cxxlibs $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix" + # if allargs includes any libraries, then we need to get + # -ldarshan-mpi-io in there first + newallargs=`echo ${allargs[@]} | sed 's/ -l/ -ldarshan-mpi-io -l/'` + darshan_link_cmd="$CXX $newallargs -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -lcxxmpich.cnk -ldarshan-mpi-io -lz -I$includedir $CXXFLAGS ${CP_WRAPPERS} $LDFLAGS -L$libdir -L$opalibdir $shllibpath $cxxlibs $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix" used_darshan=0 diff --git a/compilers/mpixlf2003-trace-bgp-V1R4.in b/compilers/mpixlf2003-trace-bgp-V1R4.in index dfb6b352fbaf0154cfff16a719fb5814577edd29..a2e61abe744a9776b045e7c46dc7b583eb15156f 100755 --- a/compilers/mpixlf2003-trace-bgp-V1R4.in +++ b/compilers/mpixlf2003-trace-bgp-V1R4.in @@ -309,7 +309,10 @@ if [ "$linking" = yes ] ; then stock_link_cmd="$FC ${allargs[@]} -I$includedir $FFLAGS $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS" - darshan_link_cmd="$FC ${CP_WRAPPERS} ${allargs[@]} -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -lfmpich.cnk -ldarshan-posix -ldarshan-mpi-io -I$includedir $FFLAGS $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix -ldarshan-mpi-io -lz" + # if allargs includes any libraries, then we need to get + # -ldarshan-mpi-io in there first + newallargs=`echo ${allargs[@]} | sed 's/ -l/ -ldarshan-mpi-io -l/'` + darshan_link_cmd="$FC ${CP_WRAPPERS} $newallargs -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -lfmpich.cnk -ldarshan-posix -ldarshan-mpi-io -I$includedir $FFLAGS $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix -ldarshan-mpi-io -lz" used_darshan=0 diff --git a/compilers/mpixlf2003_r-trace-bgp-V1R4.in b/compilers/mpixlf2003_r-trace-bgp-V1R4.in index fc9f527f8d3a934ffe1bce79add5491d579102bf..63e7313b62c20392d1d714480063d96e14b319d6 100755 --- a/compilers/mpixlf2003_r-trace-bgp-V1R4.in +++ b/compilers/mpixlf2003_r-trace-bgp-V1R4.in @@ -309,7 +309,10 @@ if [ "$linking" = yes ] ; then stock_link_cmd="$FC ${allargs[@]} -I$includedir $FFLAGS $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS" - darshan_link_cmd="$FC ${CP_WRAPPERS} ${allargs[@]} -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -lfmpich.cnk -ldarshan-posix -ldarshan-mpi-io -I$includedir $FFLAGS $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix -ldarshan-mpi-io -lz" + # if allargs includes any libraries, then we need to get + # -ldarshan-mpi-io in there first + newallargs=`echo ${allargs[@]} | sed 's/ -l/ -ldarshan-mpi-io -l/'` + darshan_link_cmd="$FC ${CP_WRAPPERS} $newallargs -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -lfmpich.cnk -ldarshan-posix -ldarshan-mpi-io -I$includedir $FFLAGS $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix -ldarshan-mpi-io -lz" used_darshan=0 diff --git a/compilers/mpixlf77-trace-bgp-V1R4.in b/compilers/mpixlf77-trace-bgp-V1R4.in index 8d1078c860be75c58a5ce03c2a78c441438f3a1e..9b63bdc5735ba0a42e40b27f9ff0c469bfa6bdf8 100755 --- a/compilers/mpixlf77-trace-bgp-V1R4.in +++ b/compilers/mpixlf77-trace-bgp-V1R4.in @@ -309,7 +309,10 @@ if [ "$linking" = yes ] ; then stock_link_cmd="$FC ${allargs[@]} -I$includedir $FFLAGS $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS" - darshan_link_cmd="$FC ${CP_WRAPPERS} ${allargs[@]} -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -lfmpich.cnk -ldarshan-posix -ldarshan-mpi-io -I$includedir $FFLAGS $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix -ldarshan-mpi-io -lz" + # if allargs includes any libraries, then we need to get + # -ldarshan-mpi-io in there first + newallargs=`echo ${allargs[@]} | sed 's/ -l/ -ldarshan-mpi-io -l/'` + darshan_link_cmd="$FC ${CP_WRAPPERS} $newallargs -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -lfmpich.cnk -ldarshan-posix -ldarshan-mpi-io -I$includedir $FFLAGS $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix -ldarshan-mpi-io -lz" used_darshan=0 diff --git a/compilers/mpixlf77_r-trace-bgp-V1R4.in b/compilers/mpixlf77_r-trace-bgp-V1R4.in index 55de885d9f89ee313f50bb7f13cf1eea40eb3732..2a405abb8ab6dc7f8dc2eefd3da4562b41ad3384 100755 --- a/compilers/mpixlf77_r-trace-bgp-V1R4.in +++ b/compilers/mpixlf77_r-trace-bgp-V1R4.in @@ -309,7 +309,10 @@ if [ "$linking" = yes ] ; then stock_link_cmd="$FC ${allargs[@]} -I$includedir $FFLAGS $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS" - darshan_link_cmd="$FC ${CP_WRAPPERS} ${allargs[@]} -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -lfmpich.cnk -ldarshan-posix -ldarshan-mpi-io -I$includedir $FFLAGS $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix -ldarshan-mpi-io -lz" + # if allargs includes any libraries, then we need to get + # -ldarshan-mpi-io in there first + newallargs=`echo ${allargs[@]} | sed 's/ -l/ -ldarshan-mpi-io -l/'` + darshan_link_cmd="$FC ${CP_WRAPPERS} $newallargs -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -lfmpich.cnk -ldarshan-posix -ldarshan-mpi-io -I$includedir $FFLAGS $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix -ldarshan-mpi-io -lz" used_darshan=0 diff --git a/compilers/mpixlf90-trace-bgp-V1R4.in b/compilers/mpixlf90-trace-bgp-V1R4.in index dfa11543b9cfc9c7f753fb09f23c31d4e5c538d3..aca36a0547b99de8c90844ffb7e9c7c03e550035 100755 --- a/compilers/mpixlf90-trace-bgp-V1R4.in +++ b/compilers/mpixlf90-trace-bgp-V1R4.in @@ -309,7 +309,10 @@ if [ "$linking" = yes ] ; then stock_link_cmd="$FC ${allargs[@]} -I$includedir $FFLAGS $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS" - darshan_link_cmd="$FC ${CP_WRAPPERS} ${allargs[@]} -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -lfmpich.cnk -ldarshan-posix -ldarshan-mpi-io -I$includedir $FFLAGS $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix -ldarshan-mpi-io -lz" + # if allargs includes any libraries, then we need to get + # -ldarshan-mpi-io in there first + newallargs=`echo ${allargs[@]} | sed 's/ -l/ -ldarshan-mpi-io -l/'` + darshan_link_cmd="$FC ${CP_WRAPPERS} $newallargs -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -lfmpich.cnk -ldarshan-posix -ldarshan-mpi-io -I$includedir $FFLAGS $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix -ldarshan-mpi-io -lz" used_darshan=0 diff --git a/compilers/mpixlf90_r-trace-bgp-V1R4.in b/compilers/mpixlf90_r-trace-bgp-V1R4.in index b6e0103528fc593fe96f16d757503324b5d95e36..ad679116eb3a1dab63e321bbef57e3c759ff0e4b 100755 --- a/compilers/mpixlf90_r-trace-bgp-V1R4.in +++ b/compilers/mpixlf90_r-trace-bgp-V1R4.in @@ -309,7 +309,10 @@ if [ "$linking" = yes ] ; then stock_link_cmd="$FC ${allargs[@]} -I$includedir $FFLAGS $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS" - darshan_link_cmd="$FC ${CP_WRAPPERS} ${allargs[@]} -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -lfmpich.cnk -ldarshan-posix -ldarshan-mpi-io -I$includedir $FFLAGS $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix -ldarshan-mpi-io -lz" + # if allargs includes any libraries, then we need to get + # -ldarshan-mpi-io in there first + newallargs=`echo ${allargs[@]} | sed 's/ -l/ -ldarshan-mpi-io -l/'` + darshan_link_cmd="$FC ${CP_WRAPPERS} $newallargs -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -lfmpich.cnk -ldarshan-posix -ldarshan-mpi-io -I$includedir $FFLAGS $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix -ldarshan-mpi-io -lz" used_darshan=0 diff --git a/compilers/mpixlf95-trace-bgp-V1R4.in b/compilers/mpixlf95-trace-bgp-V1R4.in index ab673bce0fb4739ce916991995b9663ca49196fc..159e095c2e9d472e20e45827f895b18751cd5d3c 100755 --- a/compilers/mpixlf95-trace-bgp-V1R4.in +++ b/compilers/mpixlf95-trace-bgp-V1R4.in @@ -309,7 +309,10 @@ if [ "$linking" = yes ] ; then stock_link_cmd="$FC ${allargs[@]} -I$includedir $FFLAGS $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS" - darshan_link_cmd="$FC ${CP_WRAPPERS} ${allargs[@]} -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -lfmpich.cnk -ldarshan-posix -ldarshan-mpi-io -I$includedir $FFLAGS $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix -ldarshan-mpi-io -lz" + # if allargs includes any libraries, then we need to get + # -ldarshan-mpi-io in there first + newallargs=`echo ${allargs[@]} | sed 's/ -l/ -ldarshan-mpi-io -l/'` + darshan_link_cmd="$FC ${CP_WRAPPERS} $newallargs -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -lfmpich.cnk -ldarshan-posix -ldarshan-mpi-io -I$includedir $FFLAGS $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix -ldarshan-mpi-io -lz" used_darshan=0 diff --git a/compilers/mpixlf95_r-trace-bgp-V1R4.in b/compilers/mpixlf95_r-trace-bgp-V1R4.in index 6e3c465885ff6b3dcab78797487c9d91684bab94..61538a2cf952d29eb3d3d3b89a4e644695b4d628 100755 --- a/compilers/mpixlf95_r-trace-bgp-V1R4.in +++ b/compilers/mpixlf95_r-trace-bgp-V1R4.in @@ -309,7 +309,10 @@ if [ "$linking" = yes ] ; then stock_link_cmd="$FC ${allargs[@]} -I$includedir $FFLAGS $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS" - darshan_link_cmd="$FC ${CP_WRAPPERS} ${allargs[@]} -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -lfmpich.cnk -ldarshan-posix -ldarshan-mpi-io -I$includedir $FFLAGS $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix -ldarshan-mpi-io -lz" + # if allargs includes any libraries, then we need to get + # -ldarshan-mpi-io in there first + newallargs=`echo ${allargs[@]} | sed 's/ -l/ -ldarshan-mpi-io -l/'` + darshan_link_cmd="$FC ${CP_WRAPPERS} $newallargs -L${DARSHAN_LIB_PATH} ${CP_ZLIB_LINK_FLAGS} -lfmpich.cnk -ldarshan-posix -ldarshan-mpi-io -I$includedir $FFLAGS $LDFLAGS -L$libdir -L$opalibdir $mpilibs $MPI_OTHERLIBS -L${DARSHAN_LIB_PATH} -ldarshan-posix -ldarshan-mpi-io -lz" used_darshan=0 diff --git a/darshan-gen-cc.pl.in b/darshan-gen-cc.pl.in index 441866fa4c5090490739d603c11668202fdd29c9..6d8da1fcea6678f87b183b0c79de886cf2d62c58 100644 --- a/darshan-gen-cc.pl.in +++ b/darshan-gen-cc.pl.in @@ -49,7 +49,7 @@ open (OUTPUT, ">$output_file") || die("Error opening output file: $!"); # substitute arguments and darshan options into commands $base_link_cmd = $link_cmd; $base_link_cmd =~ s/foo.o -o foo/"\$\{allargs\[\@\]\}"/g; -$link_cmd =~ s/foo.o -o foo/"\$\{allargs\[\@\]\}" -L$DARSHAN_LIB_PATH $CP_ZLIB_LINK_FLAGS -ldarshan-mpi-io -lz $CP_WRAPPERS/g; +$link_cmd =~ s/foo.o -o foo/"\$\{newallargs\}" -L$DARSHAN_LIB_PATH $CP_ZLIB_LINK_FLAGS -ldarshan-mpi-io -lz $CP_WRAPPERS/g; $link_cmd =~ s/$/ -L$DARSHAN_LIB_PATH -ldarshan-posix/g; $compile_cmd =~ s/-c foo.c/"\$\{allargs\[\@\]\}"/g; @@ -103,6 +103,10 @@ print OUTPUT <$output_file") || die("Error opening output file: $!"); # substitute arguments and darshan options into commands $base_link_cmd = $link_cmd; $base_link_cmd =~ s/foo.o -o foo/"\$\{allargs\[\@\]\}"/g; -$link_cmd =~ s/foo.o -o foo/"\$\{allargs\[\@\]\}" -L$DARSHAN_LIB_PATH $CP_ZLIB_LINK_FLAGS -lmpichcxx -ldarshan-mpi-io -lz $CP_WRAPPERS/g; +$link_cmd =~ s/foo.o -o foo/"\$\{newallargs\}" -L$DARSHAN_LIB_PATH $CP_ZLIB_LINK_FLAGS -lmpichcxx -ldarshan-mpi-io -lz $CP_WRAPPERS/g; $link_cmd =~ s/$/ -L$DARSHAN_LIB_PATH -ldarshan-posix/g; $compile_cmd =~ s/-c foo.c/"\$\{allargs\[\@\]\}"/g; @@ -103,6 +103,10 @@ print OUTPUT <