diff --git a/darshan-runtime/Makefile.in b/darshan-runtime/Makefile.in index ee650f0dec0642d1008851670e120272880a706e..bd004407f8c41f9234db07c7f8083f9c8389504a 100644 --- a/darshan-runtime/Makefile.in +++ b/darshan-runtime/Makefile.in @@ -101,6 +101,8 @@ endif install -m 755 share/mpi-profile/darshan-bg-cc.conf $(datarootdir)/mpi-profile/darshan-bg-cc.conf install -m 755 share/mpi-profile/darshan-bg-cxx.conf $(datarootdir)/mpi-profile/darshan-bg-cxx.conf install -m 755 share/mpi-profile/darshan-bg-f.conf $(datarootdir)/mpi-profile/darshan-bg-f.conf + install -m 644 darshan-base-ld-opts $(datarootdir)/darshan-base-ld-opts + install -m 644 darshan-posix-ld-opts $(datarootdir)/darshan-posix-ld-opts install -d $(libdir)/pkgconfig install -m 644 lib/pkgconfig/darshan-runtime.pc $(libdir)/pkgconfig/darshan-runtime.pc @@ -108,5 +110,5 @@ clean:: rm -f *.o *.a lib/*.o lib/*.po lib/*.a lib/*.so distclean:: clean - rm -f darshan-runtime-config.h darshan-gen-cxx.pl darshan-gen-fortran.pl darshan-gen-cc.pl darshan-mk-log-dirs.pl aclocal.m4 autom4te.cache/* config.status config.log Makefile + rm -f darshan-runtime-config.h darshan-gen-cxx.pl darshan-gen-fortran.pl darshan-gen-cc.pl darshan-mk-log-dirs.pl darshan-config darshan-base-ld-opts aclocal.m4 autom4te.cache/* config.status config.log Makefile rm -rf autom4te.cache diff --git a/darshan-runtime/configure b/darshan-runtime/configure index 1b62d500d935b3355225a263e667ba92cdc9cbd5..ce590899f2402bc7471a5f466f978e0108d0307d 100755 --- a/darshan-runtime/configure +++ b/darshan-runtime/configure @@ -624,9 +624,8 @@ LIBOBJS MPICH_LIB_OLD DARSHAN_VERSION DISABLE_LDPRELOAD -CP_WRAPPERS __CP_LOG_PATH -darshan_bin_path +darshan_share_path darshan_lib_path PRI_MACROS_BROKEN EGREP @@ -4081,9 +4080,6 @@ done #CP_WRAPPERS="-Wl,-u,MPI_Init,-u,MPI_Wtime,-wrap,write,-wrap,open,-wrap,creat,-wrap,creat64,-wrap,open64,-wrap,close,-wrap,read,-wrap,lseek,-wrap,lseek64,-wrap,pread,-wrap,pwrite,-wrap,readv,-wrap,writev,-wrap,__xstat,-wrap,__lxstat,-wrap,__fxstat,-wrap,__xstat64,-wrap,__lxstat64,-wrap,__fxstat64,-wrap,mmap,-wrap,mmap64,-wrap,fopen,-wrap,fclose,-wrap,fread,-wrap,fwrite,-wrap,fseek,-wrap,fopen64,-wrap,pread64,-wrap,pwrite64,-wrap,fsync,-wrap,fdatasync,-wrap,ncmpi_create,-wrap,ncmpi_open,-wrap,ncmpi_close,-wrap,H5Fcreate,-wrap,H5Fopen,-wrap,H5Fclose,-wrap,aio_write,-wrap,aio_write64,-wrap,aio_read,-wrap,aio_read64,-wrap,lio_listio,-wrap,lio_listio64,-wrap,aio_return,-wrap,aio_return64,-wrap,mkstemp,-wrap,mkostemp,-wrap,mkstemps,-wrap,mkostemps" -# libc functions wrapped by darshan -CP_WRAPPERS="-Wl,-u,MPI_Init,-u,MPI_Wtime,-wrap,open,-wrap,open64,-wrap,creat,-wrap,creat64,-wrap,read,-wrap,write,-wrap,pread,-wrap,pwrite,-wrap,pread64,-wrap,pwrite64,-wrap,readv,-wrap,writev,-wrap,close" - # We need to know the value of the $libdir and $bindir variables so that # we can reference the correct path in the darshan compiler wrappers. # Unfortunately, those two variables are not normally evaluated by autoconf. @@ -4099,7 +4095,7 @@ saveExecprefix=$exec_prefix test "x$prefix" = xNONE && prefix=$ac_default_prefix test "x$exec_prefix" = xNONE && exec_prefix=$prefix eval darshan_lib_path=$libdir -eval darshan_bin_path=$bindir +eval darshan_share_path=$datarootdir prefix=$savePrefix exec_prefix=$saveExecprefix @@ -4273,8 +4269,7 @@ DARSHAN_VERSION="3.0.0-pre1" - -ac_config_files="$ac_config_files Makefile darshan-mk-log-dirs.pl darshan-gen-cc.pl darshan-gen-cxx.pl darshan-gen-fortran.pl darshan-config share/craype-1.x/darshan-module share/craype-2.x/darshan-module lib/pkgconfig/darshan-runtime.pc share/mpi-profile/darshan-cc.conf share/mpi-profile/darshan-cxx.conf share/mpi-profile/darshan-f.conf share/mpi-profile/darshan-bg-cc.conf share/mpi-profile/darshan-bg-cxx.conf share/mpi-profile/darshan-bg-f.conf" +ac_config_files="$ac_config_files Makefile darshan-mk-log-dirs.pl darshan-gen-cc.pl darshan-gen-cxx.pl darshan-gen-fortran.pl darshan-base-ld-opts darshan-config share/craype-1.x/darshan-module share/craype-2.x/darshan-module lib/pkgconfig/darshan-runtime.pc share/mpi-profile/darshan-cc.conf share/mpi-profile/darshan-cxx.conf share/mpi-profile/darshan-f.conf share/mpi-profile/darshan-bg-cc.conf share/mpi-profile/darshan-bg-cxx.conf share/mpi-profile/darshan-bg-f.conf" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -4973,6 +4968,7 @@ do "darshan-gen-cc.pl") CONFIG_FILES="$CONFIG_FILES darshan-gen-cc.pl" ;; "darshan-gen-cxx.pl") CONFIG_FILES="$CONFIG_FILES darshan-gen-cxx.pl" ;; "darshan-gen-fortran.pl") CONFIG_FILES="$CONFIG_FILES darshan-gen-fortran.pl" ;; + "darshan-base-ld-opts") CONFIG_FILES="$CONFIG_FILES darshan-base-ld-opts" ;; "darshan-config") CONFIG_FILES="$CONFIG_FILES darshan-config" ;; "share/craype-1.x/darshan-module") CONFIG_FILES="$CONFIG_FILES share/craype-1.x/darshan-module" ;; "share/craype-2.x/darshan-module") CONFIG_FILES="$CONFIG_FILES share/craype-2.x/darshan-module" ;; diff --git a/darshan-runtime/configure.in b/darshan-runtime/configure.in index c218a4b9a3dbe95a6441e2dff2cc20d409de5b3f..74b4dbd820991d66d3b2ffecc72d9b9dc3bcdd7b 100644 --- a/darshan-runtime/configure.in +++ b/darshan-runtime/configure.in @@ -189,9 +189,6 @@ AC_CHECK_HEADERS(mntent.h sys/mount.h) #CP_WRAPPERS="-Wl,-u,MPI_Init,-u,MPI_Wtime,-wrap,write,-wrap,open,-wrap,creat,-wrap,creat64,-wrap,open64,-wrap,close,-wrap,read,-wrap,lseek,-wrap,lseek64,-wrap,pread,-wrap,pwrite,-wrap,readv,-wrap,writev,-wrap,__xstat,-wrap,__lxstat,-wrap,__fxstat,-wrap,__xstat64,-wrap,__lxstat64,-wrap,__fxstat64,-wrap,mmap,-wrap,mmap64,-wrap,fopen,-wrap,fclose,-wrap,fread,-wrap,fwrite,-wrap,fseek,-wrap,fopen64,-wrap,pread64,-wrap,pwrite64,-wrap,fsync,-wrap,fdatasync,-wrap,ncmpi_create,-wrap,ncmpi_open,-wrap,ncmpi_close,-wrap,H5Fcreate,-wrap,H5Fopen,-wrap,H5Fclose,-wrap,aio_write,-wrap,aio_write64,-wrap,aio_read,-wrap,aio_read64,-wrap,lio_listio,-wrap,lio_listio64,-wrap,aio_return,-wrap,aio_return64,-wrap,mkstemp,-wrap,mkostemp,-wrap,mkstemps,-wrap,mkostemps" -# libc functions wrapped by darshan -CP_WRAPPERS="-Wl,-u,MPI_Init,-u,MPI_Wtime,-wrap,open,-wrap,open64,-wrap,creat,-wrap,creat64,-wrap,read,-wrap,write,-wrap,pread,-wrap,pwrite,-wrap,pread64,-wrap,pwrite64,-wrap,readv,-wrap,writev,-wrap,close" - # We need to know the value of the $libdir and $bindir variables so that # we can reference the correct path in the darshan compiler wrappers. # Unfortunately, those two variables are not normally evaluated by autoconf. @@ -207,7 +204,7 @@ saveExecprefix=$exec_prefix test "x$prefix" = xNONE && prefix=$ac_default_prefix test "x$exec_prefix" = xNONE && exec_prefix=$prefix eval darshan_lib_path=$libdir -eval darshan_bin_path=$bindir +eval darshan_share_path=$datarootdir prefix=$savePrefix exec_prefix=$saveExecprefix @@ -298,10 +295,9 @@ AS_IF([$CC -show foo.c -o foo |grep lmpich >& /dev/null], DARSHAN_VERSION="AC_PACKAGE_VERSION" AC_SUBST(darshan_lib_path) -AC_SUBST(darshan_bin_path) +AC_SUBST(darshan_share_path) AC_SUBST(LDFLAGS) AC_SUBST(__CP_LOG_PATH) -AC_SUBST(CP_WRAPPERS) AC_SUBST(DISABLE_LDPRELOAD) AC_SUBST(DARSHAN_VERSION) AC_SUBST(MPICH_LIB_OLD) @@ -310,6 +306,7 @@ darshan-mk-log-dirs.pl darshan-gen-cc.pl darshan-gen-cxx.pl darshan-gen-fortran.pl +darshan-base-ld-opts darshan-config share/craype-1.x/darshan-module share/craype-2.x/darshan-module diff --git a/darshan-runtime/darshan-base-ld-opts.in b/darshan-runtime/darshan-base-ld-opts.in new file mode 100644 index 0000000000000000000000000000000000000000..4f7fa6a52613e5c876d43cda45ab676037acb436 --- /dev/null +++ b/darshan-runtime/darshan-base-ld-opts.in @@ -0,0 +1 @@ +@@darshan_share_path@/darshan-posix-ld-opts diff --git a/darshan-runtime/darshan-config.in b/darshan-runtime/darshan-config.in index bfeffdd1d294d321727e57c123d2fdf774c6aaa7..6ed5c7cae5758ad06ec06e4a9cca9b6542020115 100755 --- a/darshan-runtime/darshan-config.in +++ b/darshan-runtime/darshan-config.in @@ -1,7 +1,7 @@ #!/bin/sh -CP_WRAPPERS="@CP_WRAPPERS@" DARSHAN_LIB_PATH="@darshan_lib_path@" +DARSHAN_SHARE_PATH="@darshan_share_path@" DARSHAN_LD_FLAGS="@LDFLAGS@" # NOTE: @@ -11,7 +11,7 @@ DARSHAN_LD_FLAGS="@LDFLAGS@" # dependencies on PnetCDF and HDF5 symbols (if the app used a library which # in turn used one of those HLLs). -PRE_LD_FLAGS="-L$DARSHAN_LIB_PATH $DARSHAN_LD_FLAGS -ldarshan -lz $CP_WRAPPERS" +PRE_LD_FLAGS="-L$DARSHAN_LIB_PATH $DARSHAN_LD_FLAGS -ldarshan -lz -Wl,@$DARSHAN_SHARE_PATH/darshan-base-ld-opts" POST_LD_FLAGS="-L$DARSHAN_LIB_PATH -ldarshan -lz -lrt -lpthread" usage="\ diff --git a/darshan-runtime/darshan-posix-ld-opts b/darshan-runtime/darshan-posix-ld-opts new file mode 100644 index 0000000000000000000000000000000000000000..be3b1df8ab4d67551e9a37de75457bf858ef56d1 --- /dev/null +++ b/darshan-runtime/darshan-posix-ld-opts @@ -0,0 +1,13 @@ +--wrap=open +--wrap=open64 +--wrap=creat +--wrap=creat64 +--wrap=read +--wrap=write +--wrap=pread +--wrap=pwrite +--wrap=pread64 +--wrap=pwrite64 +--wrap=readv +--wrap=writev +--wrap=close