[Darshan-commits] [Git][darshan/darshan][master] 2 commits: explicitly link darshan when dynamically linking
Shane Snyder
xgitlab at cels.anl.gov
Fri Mar 27 10:04:31 CDT 2020
Shane Snyder pushed to branch master at darshan / darshan
Commits:
0750b747 by Philip Carns at 2020-03-27T10:04:24-05:00
explicitly link darshan when dynamically linking
- for some platforms (particularly the Cray Programming Environment)
this is sufficient to enable instrumentation on dynamically-linked
executables with the current version of Darshan
- - - - -
7715697e by Shane Snyder at 2020-03-27T10:04:24-05:00
Merge branch 'carns/dev-dyn-link-updates' into 'master'
revise dynamic linking strategy
See merge request darshan/darshan!41
- - - - -
28 changed files:
- darshan-runtime/Makefile.in
- darshan-runtime/configure
- darshan-runtime/configure.in
- darshan-runtime/darshan-config.in
- darshan-runtime/darshan-gen-cc.pl.in
- darshan-runtime/darshan-gen-cxx.pl.in
- darshan-runtime/darshan-gen-fortran.pl.in
- darshan-runtime/doc/darshan-runtime.txt
- darshan-runtime/lib/pkgconfig/darshan-runtime.pc.in
- − darshan-runtime/maint/generate-bg-compilers.sh
- − darshan-runtime/maint/generate-bgq-compilers.sh
- − darshan-runtime/maint/install-eureka.sh
- − darshan-runtime/maint/install-gadzooks.sh
- − darshan-runtime/maint/install-intrepid.sh
- − darshan-runtime/maint/install-surveyor.sh
- − darshan-runtime/maint/upgrade-eureka.sh
- − darshan-runtime/maint/upgrade-gadzooks.sh
- − darshan-runtime/maint/upgrade-intrepid.sh
- − darshan-runtime/maint/upgrade-surveyor.sh
- − darshan-runtime/share/mpi-profile/darshan-bg-cc.conf.in
- − darshan-runtime/share/mpi-profile/darshan-bg-cxx.conf.in
- − darshan-runtime/share/mpi-profile/darshan-bg-f.conf.in
- + darshan-runtime/share/mpi-profile/darshan-cc-static.conf.in
- darshan-runtime/share/mpi-profile/darshan-cc.conf.in
- + darshan-runtime/share/mpi-profile/darshan-cxx-static.conf.in
- darshan-runtime/share/mpi-profile/darshan-cxx.conf.in
- + darshan-runtime/share/mpi-profile/darshan-f-static.conf.in
- darshan-runtime/share/mpi-profile/darshan-f.conf.in
Changes:
=====================================
darshan-runtime/Makefile.in
=====================================
@@ -242,9 +242,9 @@ endif
install -m 755 share/mpi-profile/darshan-cc.conf $(DESTDIR)$(datarootdir)/mpi-profile/darshan-cc.conf
install -m 755 share/mpi-profile/darshan-cxx.conf $(DESTDIR)$(datarootdir)/mpi-profile/darshan-cxx.conf
install -m 755 share/mpi-profile/darshan-f.conf $(DESTDIR)$(datarootdir)/mpi-profile/darshan-f.conf
- install -m 755 share/mpi-profile/darshan-bg-cc.conf $(DESTDIR)$(datarootdir)/mpi-profile/darshan-bg-cc.conf
- install -m 755 share/mpi-profile/darshan-bg-cxx.conf $(DESTDIR)$(datarootdir)/mpi-profile/darshan-bg-cxx.conf
- install -m 755 share/mpi-profile/darshan-bg-f.conf $(DESTDIR)$(datarootdir)/mpi-profile/darshan-bg-f.conf
+ install -m 755 share/mpi-profile/darshan-cc-static.conf $(DESTDIR)$(datarootdir)/mpi-profile/darshan-cc-static.conf
+ install -m 755 share/mpi-profile/darshan-cxx-static.conf $(DESTDIR)$(datarootdir)/mpi-profile/darshan-cxx-static.conf
+ install -m 755 share/mpi-profile/darshan-f-static.conf $(DESTDIR)$(datarootdir)/mpi-profile/darshan-f-static.conf
install -d $(DESTDIR)$(datarootdir)/ld-opts
install -m 644 share/ld-opts/darshan-base-ld-opts $(DESTDIR)$(datarootdir)/ld-opts/darshan-base-ld-opts
ifdef BUILD_POSIX_MODULE
=====================================
darshan-runtime/configure
=====================================
@@ -679,6 +679,7 @@ infodir
docdir
oldincludedir
includedir
+runstatedir
localstatedir
sharedstatedir
sysconfdir
@@ -774,6 +775,7 @@ datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
+runstatedir='${localstatedir}/run'
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@@ -1026,6 +1028,15 @@ do
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
+ -runstatedir | --runstatedir | --runstatedi | --runstated \
+ | --runstate | --runstat | --runsta | --runst | --runs \
+ | --run | --ru | --r)
+ ac_prev=runstatedir ;;
+ -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
+ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
+ | --run=* | --ru=* | --r=*)
+ runstatedir=$ac_optarg ;;
+
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1163,7 +1174,7 @@ fi
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
datadir sysconfdir sharedstatedir localstatedir includedir \
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
- libdir localedir mandir
+ libdir localedir mandir runstatedir
do
eval ac_val=\$$ac_var
# Remove trailing slashes.
@@ -1316,6 +1327,7 @@ Fine tuning of the installation directories:
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
@@ -4878,7 +4890,7 @@ DARSHAN_VERSION="3.2.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 share/ld-opts/darshan-base-ld-opts"
+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-cc-static.conf share/mpi-profile/darshan-cxx-static.conf share/mpi-profile/darshan-f-static.conf share/ld-opts/darshan-base-ld-opts"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@@ -5585,9 +5597,9 @@ do
"share/mpi-profile/darshan-cc.conf") CONFIG_FILES="$CONFIG_FILES share/mpi-profile/darshan-cc.conf" ;;
"share/mpi-profile/darshan-cxx.conf") CONFIG_FILES="$CONFIG_FILES share/mpi-profile/darshan-cxx.conf" ;;
"share/mpi-profile/darshan-f.conf") CONFIG_FILES="$CONFIG_FILES share/mpi-profile/darshan-f.conf" ;;
- "share/mpi-profile/darshan-bg-cc.conf") CONFIG_FILES="$CONFIG_FILES share/mpi-profile/darshan-bg-cc.conf" ;;
- "share/mpi-profile/darshan-bg-cxx.conf") CONFIG_FILES="$CONFIG_FILES share/mpi-profile/darshan-bg-cxx.conf" ;;
- "share/mpi-profile/darshan-bg-f.conf") CONFIG_FILES="$CONFIG_FILES share/mpi-profile/darshan-bg-f.conf" ;;
+ "share/mpi-profile/darshan-cc-static.conf") CONFIG_FILES="$CONFIG_FILES share/mpi-profile/darshan-cc-static.conf" ;;
+ "share/mpi-profile/darshan-cxx-static.conf") CONFIG_FILES="$CONFIG_FILES share/mpi-profile/darshan-cxx-static.conf" ;;
+ "share/mpi-profile/darshan-f-static.conf") CONFIG_FILES="$CONFIG_FILES share/mpi-profile/darshan-f-static.conf" ;;
"share/ld-opts/darshan-base-ld-opts") CONFIG_FILES="$CONFIG_FILES share/ld-opts/darshan-base-ld-opts" ;;
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
=====================================
darshan-runtime/configure.in
=====================================
@@ -531,9 +531,9 @@ 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
+share/mpi-profile/darshan-cc-static.conf
+share/mpi-profile/darshan-cxx-static.conf
+share/mpi-profile/darshan-f-static.conf
share/ld-opts/darshan-base-ld-opts
)
=====================================
darshan-runtime/darshan-config.in
=====================================
@@ -5,17 +5,23 @@ DARSHAN_SHARE_PATH="@darshan_share_path@"
DARSHAN_LD_FLAGS="@LDFLAGS@"
# NOTE:
-# - we deliberately list libdarshan twice in the link command. The
-# first is necessary to correctly use the MPI profiling interface. The
-# final one is necessary to give the linker a change to resolve indirect
-# dependencies on PnetCDF and HDF5 symbols (if the app used a library which
-# in turn used one of those HLLs).
+# - we deliberately list libdarshan twice in the link command when
+# statically linking. The first sets symbol wrapping options early in the
+# link line. The final one is necessary to give the linker a change to
+# resolve indirect 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 -Wl,@$DARSHAN_SHARE_PATH/ld-opts/darshan-base-ld-opts"
POST_LD_FLAGS="-L$DARSHAN_LIB_PATH -Wl,--start-group -ldarshan -ldarshan-stubs -Wl,--end-group -lz -lrt -lpthread"
+# NOTE:
+# - when dynamic linking there is no need for wrapping options, we simply
+# need to get the darshan symbol definitions early enough in the link
+# order. We also set no-as-needed for linkers that may not identify
+DYN_LD_FLAGS="-L$DARSHAN_LIB_PATH $DARSHAN_LD_FLAGS -Wl,-rpath=$DARSHAN_LIB_PATH $DARSHAN_LD_FLAGS -Wl,-no-as-needed -ldarshan"
+
usage="\
-Usage: darshan-config [--pre-ld-flags] [--post-ld-flags]"
+Usage: darshan-config [--pre-ld-flags] [--post-ld-flags] [--dyn-ld-flags]"
if test $# -eq 0; then
echo "${usage}" 1>&2
@@ -35,6 +41,9 @@ while test $# -gt 0; do
--post-ld-flags)
echo $POST_LD_FLAGS
;;
+ --dyn-ld-flags)
+ echo $DYN_LD_FLAGS
+ ;;
*)
echo "${usage}" 1>&2
exit 1
=====================================
darshan-runtime/darshan-gen-cc.pl.in
=====================================
@@ -83,6 +83,7 @@ $CC_from_link=$1;
$link_cmd_prefix=$2;
$base_link_cmd_suffix="\"\$\{allargs\[\@\]\}\" $4";
$link_cmd_suffix="\"\$\{newallargs\[\@\]\}\" `$PREFIX/bin/darshan-config --pre-ld-flags` $4 `$PREFIX/bin/darshan-config --post-ld-flags`";
+$dyn_link_cmd_suffix="\"\$\{newallargs\[\@\]\}\" `$PREFIX/bin/darshan-config --dyn-ld-flags` $4";
# repeat the above step for the compilation command line
if(!($compile_cmd =~ /(\S+)(.+)(-c foo.c)\s+(.*)/))
@@ -198,13 +199,6 @@ if [ "$linking" = yes ] ; then
fi
EOF
print OUTPUT<<"EOF";
- # Trial run to generate a symbol listing. We only enable Darshan if:
- # a) MPI is used
- # b) PMPI is _not_ used
- #
- # We want Darshan to get out of the way if the user is doing a runtime
- # test in configure (in which case MPI objects break the executable) or
- # if the user is using another PMPI based tool
# if allargs includes any libraries, then we need to get
# -ldarshan in there first
@@ -243,6 +237,14 @@ print OUTPUT<<"EOF";
used_darshan=0
+ # Perform a test link before the real link. This allows us to check
+ # for two things:
+ # 1) Are MPI symbols present? Technically Darshan should not harm
+ # non-MPI programs, but it may bring in unwanted dependencies or
+ # interfere with autoconf checks.
+ # 2) Is this link command line going to produce a static or dynamic
+ # linked executable? We will adjust Darshan link strategy accordingly.
+
# create a temporary file
tmpfile=`mktemp`
binfile=`mktemp`
@@ -261,31 +263,23 @@ print OUTPUT<<"EOF";
# is MPI in there?
grep MPI \$tmpfile >& /dev/null
rc_mpi=\$?
- # is PMPI being used for PMPI_File_open?
- grep -E PMPI_File_open \$tmpfile | grep -v -E \\(mpich.*\\.a\\) |grep \\(PMPI >& /dev/null
- rc_pmpi=\$?
- rm \$tmpfile >& /dev/null
- # is MPI_Init a weak symbol?
- # disable darshan if it is not
- if [ -e \$binfile ];
- then
- nm \$binfile | grep -i "mpi_init" | grep -i "w" >& /dev/null
- rc_weak=\$?
- else
- rc_weak=1
- fi
+ # did the link options produce a dynamic executable?
+ ldd \$binfile >& /dev/null
+ rc_dyn=\$?
+
+ rm \$tmpfile >& /dev/null
rm \$binfile >& /dev/null
- # disable darshan if the executable is not an MPI program (this feature
- # mainly allows runtime configure tests to work
- if [ \$rc_mpi -eq 0 ] ; then
- # disable darshan if something else is already using PMPI; we don't
- # want to cause any symbol conflicts
- if [ \$rc_pmpi -ne 0 ] && [ \$compiler_check -eq 0 ] && [ \$rc_weak -eq 0 ]; then
+ # disable darshan if the executable is not an MPI program or we've
+ # detected an incompatible compiler
+ if [ \$rc_mpi -eq 0 ] && [ \$compiler_check -eq 0 ]; then
+ if [ \$rc_dyn -eq 0 ]; then
+ \$Show \$CC $link_cmd_prefix $dyn_link_cmd_suffix
+ else
\$Show \$CC $link_cmd_prefix $link_cmd_suffix
- used_darshan=1
fi
+ used_darshan=1
fi
# otherwise use the normal command line
=====================================
darshan-runtime/darshan-gen-cxx.pl.in
=====================================
@@ -83,6 +83,7 @@ $CXX_from_link=$1;
$link_cmd_prefix=$2;
$base_link_cmd_suffix="\"\$\{allargs\[\@\]\}\" $4";
$link_cmd_suffix="\"\$\{newallargs\[\@\]\}\" \$CXXMPICH `$PREFIX/bin/darshan-config --pre-ld-flags` $4 `$PREFIX/bin/darshan-config --post-ld-flags`";
+$dyn_link_cmd_suffix="\"\$\{newallargs\[\@\]\}\" \$CXXMPICH `$PREFIX/bin/darshan-config --dyn-ld-flags` $4";
# repeat the above step for the compilation command line
if(!($compile_cmd =~ /(\S+)(.+)(-c foo.c)\s+(.*)/))
@@ -198,15 +199,8 @@ if [ "$linking" = yes ] ; then
fi
EOF
print OUTPUT<<"EOF";
- # Trial run to generate a symbol listing. We only enable Darshan if:
- # a) MPI is used
- # b) PMPI is _not_ used
- #
- # We want Darshan to get out of the way if the user is doing a runtime
- # test in configure (in which case MPI objects break the executable) or
- # if the user is using another PMPI based tool
-
- # if allargs includes any libraries, then we need to get
+
+ # if allargs includes any libraries, then we need to get
# -ldarshan in there first
argno=0;
once=0;
@@ -244,6 +238,14 @@ print OUTPUT<<"EOF";
used_darshan=0
+ # Perform a test link before the real link. This allows us to check
+ # for two things:
+ # 1) Are MPI symbols present? Technically Darshan should not harm
+ # non-MPI programs, but it may bring in unwanted dependencies or
+ # interfere with autoconf checks.
+ # 2) Is this link command line going to produce a static or dynamic
+ # linked executable? We will adjust Darshan link strategy accordingly.
+
# create a temporary file
tmpfile=`mktemp`
binfile=`mktemp`
@@ -263,9 +265,9 @@ print OUTPUT<<"EOF";
grep MPI \$tmpfile >& /dev/null
rc_mpi=\$?
- # is PMPI being used for PMPI_File_open?
- grep -E PMPI_File_open \$tmpfile | grep -v -E \\(mpich.*\\.a\\) |grep \\(PMPI >& /dev/null
- rc_pmpi=\$?
+ # did the link options produce a dynamic executable?
+ ldd \$binfile >& /dev/null
+ rc_dyn=\$?
CXXMPICH=-lmpichcxx
@@ -288,27 +290,17 @@ print OUTPUT<<"EOF";
fi
rm \$tmpfile >& /dev/null
-
- # is MPI_Init a weak symbol?
- # disable darshan if it is not
- if [ -e \$binfile ];
- then
- nm \$binfile | grep -i "mpi_init" | grep -i "w" >& /dev/null
- rc_weak=\$?
- else
- rc_weak=1
- fi
rm \$binfile >& /dev/null
- # disable darshan if the executable is not an MPI program (this feature
- # mainly allows runtime configure tests to work
- if [ \$rc_mpi -eq 0 ] ; then
- # disable darshan if something else is already using PMPI; we don't
- # want to cause any symbol conflicts
- if [ \$rc_pmpi -ne 0 ] && [ \$compiler_check -eq 0 ] && [ \$rc_weak -eq 0 ]; then
+ # disable darshan if the executable is not an MPI program or we've
+ # detected an incompatible compiler
+ if [ \$rc_mpi -eq 0 ] && [ \$compiler_check -eq 0 ]; then
+ if [ \$rc_dyn -eq 0 ]; then
+ \$Show \$CXX $link_cmd_prefix $dyn_link_cmd_suffix
+ else
\$Show \$CXX $link_cmd_prefix $link_cmd_suffix
- used_darshan=1
fi
+ used_darshan=1
fi
# otherwise use the normal command line
=====================================
darshan-runtime/darshan-gen-fortran.pl.in
=====================================
@@ -83,6 +83,7 @@ $FC_from_link=$1;
$link_cmd_prefix=$2;
$base_link_cmd_suffix="\"\$\{allargs\[\@\]\}\" $4";
$link_cmd_suffix="\"\$\{newallargs\[\@\]\}\" \$FMPICH `$PREFIX/bin/darshan-config --pre-ld-flags` $4 `$PREFIX/bin/darshan-config --post-ld-flags`";
+$dyn_link_cmd_suffix="\"\$\{newallargs\[\@\]\}\" \$FMPICH `$PREFIX/bin/darshan-config --dyn-ld-flags` $4";
# repeat the above step for the compilation command line
if(!($compile_cmd =~ /(\S+)(.+)(-c foo.c)\s+(.*)/))
@@ -206,13 +207,6 @@ if [ "$linking" = yes ] ; then
fi
EOF
print OUTPUT<<"EOF";
- # Trial run to generate a symbol listing. We only enable Darshan if:
- # a) MPI is used
- # b) PMPI is _not_ used
- #
- # We want Darshan to get out of the way if the user is doing a runtime
- # test in configure (in which case MPI objects break the executable) or
- # if the user is using another PMPI based tool
# if allargs includes any libraries, then we need to get
# -ldarshan in there first
@@ -252,6 +246,14 @@ print OUTPUT<<"EOF";
used_darshan=0
+ # Perform a test link before the real link. This allows us to check
+ # for two things:
+ # 1) Are MPI symbols present? Technically Darshan should not harm
+ # non-MPI programs, but it may bring in unwanted dependencies or
+ # interfere with autoconf checks.
+ # 2) Is this link command line going to produce a static or dynamic
+ # linked executable? We will adjust Darshan link strategy accordingly.
+
# create a temporary file
tmpfile=`mktemp`
binfile=`mktemp`
@@ -271,10 +273,9 @@ print OUTPUT<<"EOF";
grep -i MPI \$tmpfile >& /dev/null
rc_mpi=\$?
- # is PMPI being used for PMPI_File_open?
- grep -E PMPI_File_open \$tmpfile | grep -v -E \\(mpich.*\\.a\\) |grep \\(PMPI >& /dev/null
- rc_pmpi=\$?
-
+ # did the link options produce a dynamic executable?
+ ldd \$binfile >& /dev/null
+ rc_dyn=\$?
# find appropriate fortran library name for profiling
grep -E libmpifort \$tmpfile >& /dev/null
@@ -298,27 +299,17 @@ print OUTPUT<<"EOF";
fi
rm \$tmpfile >& /dev/null
-
- # is MPI_Init a weak symbol?
- # disable darshan if it is not
- if [ -e \$binfile ];
- then
- nm \$binfile | grep -i "mpi_init" | grep -i "w" >& /dev/null
- rc_weak=\$?
- else
- rc_weak=1
- fi
rm \$binfile >& /dev/null
- # disable darshan if the executable is not an MPI program (this feature
- # mainly allows runtime configure tests to work
- if [ \$rc_mpi -eq 0 ] ; then
- # disable darshan if something else is already using PMPI; we don't
- # want to cause any symbol conflicts
- if [ \$rc_pmpi -ne 0 ] && [ \$compiler_check -eq 0 ] && [ \$rc_weak -eq 0 ]; then
+ # disable darshan if the executable is not an MPI program or we've
+ # detected an incompatible compiler
+ if [ \$rc_mpi -eq 0 ] && [ \$compiler_check -eq 0 ]; then
+ if [ \$rc_dyn -eq 0 ]; then
+ \$Show \$FC $link_cmd_prefix $dyn_link_cmd_suffix
+ else
\$Show \$FC $link_cmd_prefix $link_cmd_suffix
- used_darshan=1
fi
+ used_darshan=1
fi
# otherwise use the normal command line
=====================================
darshan-runtime/doc/darshan-runtime.txt
=====================================
@@ -7,18 +7,17 @@ This document describes darshan-runtime, which is the instrumentation
portion of the Darshan characterization tool. It should be installed on the
system where you intend to collect I/O characterization information.
-Darshan instruments applications via either compile time wrappers for static
-executables or dynamic library preloading for dynamic executables. An
-application that has been instrumented with Darshan will produce a single
-log file each time it is executed. This log summarizes the I/O access patterns
-used by the application.
+Darshan instruments applications via either compile time wrappers or
+dynamic library preloading. An application that has been instrumented
+with Darshan will produce a single log file each time it is executed.
+This log summarizes the I/O access patterns used by the application.
The darshan-runtime instrumentation has traditionally only supported MPI
applications (specifically, those that call `MPI_Init()` and `MPI_Finalize()`),
but, as of version 3.2.0, Darshan also supports instrumentation of non-MPI
applications. Regardless of whether MPI is used, Darshan provides detailed
statistics about POSIX level file accesses made by the application.
-In the case of MPI applications, Darshan additionally captures detals on MPI-IO
+In the case of MPI applications, Darshan additionally captures details on MPI-IO
level access, as well as limited information about HDF5 and PnetCDF access.
Note that instrumentation of non-MPI applications is currently only supported
in Darshan's shared library, which applications must `LD_PRELOAD`.
@@ -44,12 +43,12 @@ coarse-grained instrumentation methods.
This document provides generic installation instructions, but "recipes" for
several common HPC systems are provided at the end of the document as well.
-More information about Darshan can be found at the
+More information about Darshan can be found at the
http://www.mcs.anl.gov/darshan[Darshan web site].
== Requirements
-* C compiler (preferrably GCC-compatible)
+* C compiler (preferably GCC-compatible)
* zlib development headers and library
== Compilation
@@ -108,24 +107,11 @@ with support for HDF5 versions prior to 1.10
* `--enable-HDF5-post-1.10`: enables the Darshan HDF5 instrumentation module,
with support for HDF5 versions 1.10 or higher
-=== Cross compilation
-
-On some systems (notably the IBM Blue Gene series), the login nodes do not
-have the same architecture or runtime environment as the compute nodes. In
-this case, you must configure darshan-runtime to be built using a cross
-compiler. The following configure arguments show an example for the BG/P system:
-
-----
---host=powerpc-bgp-linux CC=/bgsys/drivers/ppcfloor/comm/default/bin/mpicc
-----
-
== Environment preparation
Once darshan-runtime has been installed, you must prepare a location
in which to store the Darshan log files and configure an instrumentation method.
-=== Log directory
-
This step can be safely skipped if you configured darshan-runtime using the
`--with-log-path-by-env` option. A more typical configuration uses a static
directory hierarchy for Darshan log
@@ -138,7 +124,7 @@ placed. The deepest subdirectories will have sticky permissions to enable
multiple users to write to the same directory. If the log directory is
shared system-wide across many users then the following script should be run
as root.
-
+
----
darshan-mk-log-dirs.pl
----
@@ -161,36 +147,75 @@ administrators group
* recursively set the setgid bit on the log directories
====
+== Instrumenting applications
+
+[NOTE]
+====
+More specific installation "recipes" are provided later in this document for
+some platforms. This section of the documentation covers general techniques.
+====
+
+Once Darshan has been installed and a log path has been prepared, the next
+step is to actually instrument applications. The preferred method is to
+instrument applications at compile time.
+
+=== Option 1: Instrumenting MPI applications at compile time
-=== Instrumentation method
+This method is applicable to C, Fortran, and C++ MPI applications
+(regardless of whether they are static or dynamicly linked) and is the most
+straightforward method to apply transparently system-wide. It works by
+injecting additional libraries and options into the linker command line to
+intercept relevant I/O calls.
-The instrumentation method to use depends on whether the executables
-produced by your compiler are statically or dynamically linked. If you
-are unsure, you can check by running `ldd <executable_name>` on an example
-executable. Dynamically-linked executables will produce a list of shared
-libraries when this command is executed.
+On Cray platforms you can enable the compile time instrumentation by simply
+loading the Darshan module. It can then be enabled for all users by placing
+that module in the default environment. As of Darshan 3.2.0 this will
+instrument both static and dynamic executables, while in previous versions
+of Darshan this was only sufficient for static executables. See the Cray
+installation recipe for more details.
-Some compilers allow you to toggle dynamic or static linking via options
-such as `-dynamic` or `-static`. Please check your compiler man page
-for details if you intend to force one mode or the other.
+For other general MPICH-based MPI implementations, you can generate
+Darshan-enabled variants of the standard mpicc/mpicxx/mpif90/mpif77
+wrappers using the following commands:
-== Instrumenting statically-linked MPI applications
+----
+darshan-gen-cc.pl `which mpicc` --output mpicc.darshan
+darshan-gen-cxx.pl `which mpicxx` --output mpicxx.darshan
+darshan-gen-fortran.pl `which mpif77` --output mpif77.darshan
+darshan-gen-fortran.pl `which mpif90` --output mpif90.darshan
+-----
-Statically linked executables must be instrumented at compile time.
-The simplest methods to do this are to either generate a customized
-MPI compiler script (e.g. `mpicc`) that includes the link options and
-libraries needed by Darshan, or to use existing profiling configuration
-hooks for MPI compiler scripts. Once this is done, Darshan
-instrumentation is transparent; you simply compile applications using
-the Darshan-enabled MPI compiler scripts.
+The resulting *.darshan wrappers will transparently inject Darshan
+instrumentation into the link step without any explicit user intervention.
+They can be renamed and placed in an appropriate
+PATH to enable automatic instrumentation. This method also works correctly
+for both static and dynamic executables as of Darshan 3.2.0.
-=== Using a profile configuration
+For other systems you can enable compile-time instrumentation by either
+manually adding the appropriate link options to your command line or
+modifying your default MPI compiler script. The `darshan-config` command
+line tool can be used to display the options that you should use:
+
+----
+# Linker options to use for dynamic linking (default on most platforms)
+# These arguments should go *before* the MPI libraries in the underlying
+# linker command line to ensure that Darshan can be activated. It should
+# also ideally go before other libraries that may issue I/O function calls.
+darshan-config --dyn-ld-flags
+
+# linker options to use for static linking
+# The first set of arguments should go early in the link command line
+# (before MPI, while the second set should go at the end of the link command
+# line
+darshan-config --pre-ld-flags
+darshan-config --post-ld-flags
+----
+
+==== Using a profile configuration
-[[static-prof]]
The MPICH MPI implementation supports the specification of a profiling library
configuration that can be used to insert Darshan instrumentation without
-modifying the existing MPI compiler script. Example profiling configuration
-files are installed with Darshan 2.3.1 and later. You can enable a profiling
+modifying the existing MPI compiler script. You can enable a profiling
configuration using environment variables or command line arguments to the
compiler scripts:
@@ -201,14 +226,6 @@ export MPICXX_PROFILE=$DARSHAN_PREFIX/share/mpi-profile/darshan-cxx
export MPIFORT_PROFILE=$DARSHAN_PREFIX/share/mpi-profile/darshan-f
----
-Example for MPICH 3.1 or earlier:
-----
-export MPICC_PROFILE=$DARSHAN_PREFIX/share/mpi-profile/darshan-cc
-export MPICXX_PROFILE=$DARSHAN_PREFIX/share/mpi-profile/darshan-cxx
-export MPIF77_PROFILE=$DARSHAN_PREFIX/share/mpi-profile/darshan-f
-export MPIF90_PROFILE=$DARSHAN_PREFIX/share/mpi-profile/darshan-f
-----
-
Examples for command line use:
----
mpicc -profile=$DARSHAN_PREFIX/share/mpi-profile/darshan-c <args>
@@ -217,36 +234,20 @@ mpif77 -profile=$DARSHAN_PREFIX/share/mpi-profile/darshan-f <args>
mpif90 -profile=$DARSHAN_PREFIX/share/mpi-profile/darshan-f <args>
----
-=== Using customized compiler wrapper scripts
-
-[[static-wrapper]]
-For MPICH-based MPI libraries, such as MPICH1, MPICH2, or MVAPICH,
-custom wrapper scripts can be generated to automatically include Darshan
-instrumentation. The following example illustrates how to produce
-wrappers for C, C++, and Fortran compilers:
-
-----
-darshan-gen-cc.pl `which mpicc` --output mpicc.darshan
-darshan-gen-cxx.pl `which mpicxx` --output mpicxx.darshan
-darshan-gen-fortran.pl `which mpif77` --output mpif77.darshan
-darshan-gen-fortran.pl `which mpif90` --output mpif90.darshan
------
-
-=== Other configurations
-
-Please see the Cray recipe in this document for instructions on
-instrumenting statically-linked applications on that platform.
+Note that unlike the previously described methods in this section, this
+method *will not* automatically adapt to static and dynamic linking options.
+The example profile configurations show above only support dynamic linking.
-For other MPI Libraries you must manually modify the MPI compiler scripts to
-add the necessary link options and libraries. Please see the
-`darshan-gen-*` scripts for examples or contact the Darshan users mailing
-list for help.
+Example profile configurations are also provided with a "-static" suffix if
+you need examples for static linking.
-== Instrumenting dynamically-linked MPI applications
+=== Option 2: Instrumenting MPI applications at run time
-For dynamically-linked executables, Darshan relies on the `LD_PRELOAD`
-environment variable to insert instrumentation at run time. The executables
-should be compiled using the normal, unmodified MPI compiler.
+This method is applicable to pre-compiled dynamically linked executables
+as well as interpreted languages such as Python. You do not need to
+change your compile options in any way. This method works by injecting
+instrumentation at run time. It will not work for statically linked
+executables.
To use this mechanism, set the `LD_PRELOAD` environment variable to the full
path to the Darshan shared library. The preferred method of inserting Darshan
@@ -285,28 +286,7 @@ For SGI systems running the MPT environment, it may be necessary to set the `MPI
environment variable equal to `true` to avoid deadlock when preloading the Darshan shared
library.
-=== Instrumenting dynamically-linked Fortran applications
-
-Please follow the general steps outlined in the previous section. For
-Fortran applications compiled with MPICH you may have to take the additional
-step of adding
-`libfmpich.so` to your `LD_PRELOAD` environment variable. For example:
-
-----
-export LD_PRELOAD=/path/to/mpi/used/by/executable/lib/libfmpich.so:/home/carns/darshan-install/lib/libdarshan.so
-----
-
-[NOTE]
-The full path to the libfmpich.so library can be omitted if the rpath
-variable points to the correct path. Be careful to check the rpath of the
-darshan library and the executable before using this configuration, however.
-They may provide conflicting paths. Ideally the rpath to the MPI library
-would *not* be set by the Darshan library, but would instead be specified
-exclusively by the executable itself. You can check the rpath of the
-darshan library by running `objdump -x
-/home/carns/darshan-install/lib/libdarshan.so |grep RPATH`.
-
-== Instrumenting dynamically-linked non-MPI applications
+=== Option 3: Instrumenting non-MPI applications at run time
Similar to the process described in the previous section, Darshan relies on the
`LD_PRELOAD` mechanism for instrumenting dynamically-linked non-MPI applications.
@@ -335,6 +315,17 @@ env LD_PRELOAD=/home/carns/darshan-install/lib/libdarshan.so io-test
Recall that Darshan instrumentation of non-MPI applications is only possible with
dynamically-linked applications.
+=== Using other profiling tools at the same time as Darshan
+
+As of Darshan version 3.2.0, Darshan does not necessarily interfere with
+other profiling tools (particularly those using the PMPI profiling
+interface). Darshan itself does not use the PMPI interface, and instead
+uses dynamic linker symbol interception or --wrap function interception for
+static executables.
+
+As a rule of thumb most profiling tools should appear in the linker command
+line *before* -ldarshan if possible.
+
== Using the Darshan eXtended Tracing (DXT) module
DXT support is disabled by default in Darshan, requiring the user to either explicitly
@@ -349,7 +340,7 @@ export DXT_ENABLE_IO_TRACE=1
----
To enable tracing for particular files, DXT additionally offers a trace
-triggering mechansim, with users specifying triggers used to decide whether or
+triggering mechanism, with users specifying triggers used to decide whether or
not to trace a particular file at runtime. Files that do not match any trace
trigger will not store trace data in the Darshan log. Currently, DXT supports
the following types of trace triggers:
@@ -360,7 +351,7 @@ the following types of trace triggers:
Users simply need to specify one or more of these triggers in a text file that is passed
to DXT at runtime -- when multiple triggers are specified, DXT will keep any file traces
-that match at least one trigger (i.e., the trace decision is a logical OR accross given triggers).
+that match at least one trigger (i.e., the trace decision is a logical OR across given triggers).
An example configuration file is given below, illustrating the syntax to use for currently
supported triggers:
@@ -391,76 +382,26 @@ The following recipes provide examples for prominent HPC systems.
These are intended to be used as a starting point. You will most likely have to adjust paths and options to
reflect the specifics of your system.
-=== IBM Blue Gene (BG/P or BG/Q)
-
-IBM Blue Gene systems produces static executables by default, uses a
-different architecture for login and compute nodes, and uses an MPI
-environment based on MPICH.
-
-The following example shows how to configure Darshan on a BG/P system:
-
-----
-./configure --with-mem-align=16 \
- --with-log-path=/home/carns/working/darshan/releases/logs \
- --prefix=/home/carns/working/darshan/install --with-jobid-env=COBALT_JOBID \
- --with-zlib=/soft/apps/zlib-1.2.3/ \
- --host=powerpc-bgp-linux CC=/bgsys/drivers/ppcfloor/comm/default/bin/mpicc
-----
-
-.Rationale
-[NOTE]
-====
-The memory alignment is set to 16 not because that is the proper alignment
-for the BG/P CPU architecture, but because that is the optimal alignment for
-the network transport used between compute nodes and I/O nodes in the
-system. The jobid environment variable is set to `COBALT_JOBID` in this
-case for use with the Cobalt scheduler, but other BG/P systems may use
-different schedulers. The `--with-zlib` argument is used to point to a
-version of zlib that has been compiled for use on the compute nodes rather
-than the login node. The `--host` argument is used to force cross-compilation
-of Darshan. The `CC` variable is set to point to a stock MPI compiler.
-====
-
-Once Darshan has been installed, you can use one of the static
-instrumentation methods described earlier in this document. If you
-use the profiling configuration file method, then please note that the
-Darshan installation includes profiling configuration files that have been
-adapted specifically for the Blue Gene environment. Set the following
-environment variables to enable them, and then use your normal compiler
-scripts. This method is compatible with both GNU and IBM compilers.
-
-Blue Gene profiling configuration example:
-----
-export MPICC_PROFILE=$DARSHAN_PREFIX/share/mpi-profile/darshan-bg-cc
-export MPICXX_PROFILE=$DARSHAN_PREFIX/share/mpi-profile/darshan-bg-cxx
-export MPIF77_PROFILE=$DARSHAN_PREFIX/share/mpi-profile/darshan-bg-f
-export MPIF90_PROFILE=$DARSHAN_PREFIX/share/mpi-profile/darshan-bg-f
-----
-
=== Cray platforms (XE, XC, or similar)
-The Cray programming environment produces static executables by default,
-which means that Darshan instrumentation must be inserted at compile
-time. This can be accomplished by loading a software module that sets
-appropriate environment variables to modify the Cray compiler script link
-behavior. This section describes how to compile and install Darshan,
+This section describes how to compile and install Darshan,
as well as how to use a software module to enable and disable Darshan
-instrumentation.
+instrumentation on Cray systems.
==== Building and installing Darshan
Please set your environment to use the GNU programming environment before
configuring or compiling Darshan. Although Darshan can be built with a
-variety of compilers, the GNU compilers are recommended because it will
+variety of compilers, the GNU compiler is recommended because it will
produce a Darshan library that is interoperable with the widest range
of compilers and linkers. On most Cray systems you can enable the GNU
-programming environment with a command similar to "module swap PrgEnv-pgi
+programming environment with a command similar to "module swap PrgEnv-intel
PrgEnv-gnu". Please see your site documentation for information about
how to switch programming environments.
The following example shows how to configure and build Darshan on a Cray
-system using the GNU programming environment. Adjust the
---with-log-path and --prefix arguments to point to the desired log file path
+system using the GNU programming environment. Adjust the
+--with-log-path and --prefix arguments to point to the desired log file path
and installation path, respectively.
----
@@ -488,8 +429,8 @@ Darshan will typically use the LOGNAME environment variable to determine a
userid.
====
-As in any Darshan installation, the darshan-mk-log-dirs.pl script can then be
-used to create the appropriate directory hierarchy for storing Darshan log
+As in any Darshan installation, the darshan-mk-log-dirs.pl script can then be
+used to create the appropriate directory hierarchy for storing Darshan log
files in the --with-log-path directory.
Note that Darshan is not currently capable of detecting the stripe size
@@ -497,7 +438,7 @@ Note that Darshan is not currently capable of detecting the stripe size
If a Lustre file system is detected, then Darshan assumes an optimal
file alignment of 1 MiB.
-==== Enabling Darshan instrumentation
+==== Enabling Darshan instrumentation
Darshan will automatically install example software module files in the
following locations (depending on how you specified the --prefix option in
@@ -531,10 +472,25 @@ command:
module use /soft/darshan-2.2.3/share/craype-<VERSION>/modulefiles
----
-From this point, Darshan instrumenation can be enabled for all future
+From this point, Darshan instrumentation can be enabled for all future
application compilations by running "module load darshan".
-=== Linux clusters using Intel MPI
+=== Linux clusters using MPICH
+
+Most MPICH installations produce dynamic executables by default. To
+configure Darshan in this environment you can use the following example. We
+recommend using mpicc with GNU compilers to compile Darshan.
+
+----
+./configure --with-log-path=/darshan-logs --with-jobid-env=PBS_JOBID CC=mpicc
+----
+
+The darshan-gen-* scripts described earlier in this document can be used
+to create variants of the standard mpicc/mpicxx/mpif77/mpif90 scipts
+that are Darshan enabled. These scripts will work correctly for both
+dynamic and statically linked executables.
+
+=== Linux clusters using Intel MPI
Most Intel MPI installations produce dynamic executables by default. To
configure Darshan in this environment you can use the following example:
@@ -551,29 +507,11 @@ the underlying GNU compilers rather than the Intel ICC compilers to compile
Darshan itself.
====
-You can use the `LD_PRELOAD` method described earlier in this document to
-instrument executables compiled with the Intel MPI compiler scripts. This
-method has been briefly tested using both GNU and Intel compilers.
-
-=== Linux clusters using MPICH
-
-Follow the generic instructions provided at the top of this document. For MPICH versions 3.1 and
-later, MPICH uses shared libraries by default, so you may need to consider the dynamic linking
-instrumentation approach.
+You can enable Darshan instrumentation at compile time by adding
+`darshan-config --dyn-ld-flags` options to your linker command line.
-The static linking method can be used if MPICH is configured to use static
-linking by default, or if you are using a version prior to 3.1.
-The only modification is to make sure that the `CC` used for compilation is
-based on a GNU compiler. Once Darshan has been installed, it should be
-capable of instrumenting executables built with GNU, Intel, and PGI
-compilers.
-
-[NOTE]
-MPICH versions 3.1, 3.1.1, 3.1.2, and 3.1.3 may produce link-time errors when building static
-executables (i.e. using the -static option) if MPICH is built with shared library support.
-Please see http://trac.mpich.org/projects/mpich/ticket/2190 for more details. The workaround if you
-wish to use static linking is to configure MPICH with `--enable-shared=no --enable-static=yes` to
-force it to use static MPI libraries with correct dependencies.
+Alternatively you can use `LD_PRELOAD` runtime instrumentation method to
+instrument executables that have already been compiled.
=== Linux clusters using Open MPI
@@ -581,13 +519,11 @@ Follow the generic instructions provided at the top of this document for
compilation, and make sure that the `CC` used for compilation is based on a
GNU compiler.
-Open MPI typically produces dynamically linked executables by default, which
-means that you should use the `LD_PRELOAD` method to instrument executables
-that have been built with Open MPI. Darshan is only compatible with Open
-MPI 1.6.4 and newer. For more details on why Darshan is not compatible with
-older versions of Open MPI, please refer to the following mailing list discussion:
+You can enable Darshan instrumentation at compile time by adding
+`darshan-config --dyn-ld-flags` options to your linker command line.
-http://www.open-mpi.org/community/lists/devel/2013/01/11907.php
+Alternatively you can use `LD_PRELOAD` runtime instrumentation method to
+instrument executables that have already been compiled.
== Upgrading to Darshan 3.x from 2.x
@@ -661,19 +597,21 @@ For statically linked executables:
00000000004070a0 T darshan_core_register_module
----
-* Make sure the application executable is statically linked:
- ** In general, we encourage the use of purely statically linked executables when using the static
-instrumentation method given in link:darshan-runtime.html#_instrumenting_statically_linked_applications[Section 5]
- ** If purely static executables are not an option, we encourage users to use the LD_PRELOAD method of
-instrumentation given in link:darshan-runtime.html#_instrumenting_dynamically_linked_applications[Section 6]
- ** Statically linked executables are the default on Cray platforms and the IBM BG platforms;
-statically linked executables can be explicitly requested using the `-static` compile option to most compilers
- ** You can verify that an executable is purely statically linked by using the `file` command:
+For dynamically linked executables:
+
+* Ensure that the Darshan library is present in the list of shared libraries
+ to be used by the application, and that it appears before the MPI library:
----
-> file mpi-io-test
-mpi-io-test: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked, for GNU/Linux 2.6.24, BuildID[sha1]=9893e599e7a560159ccf547b4c4ba5671f65ba32, not stripped
+> ldd mpi-io-test
+ linux-vdso.so.1 (0x00007ffd83925000)
+ libdarshan.so => /home/carns/working/install/lib/libdarshan.so (0x00007f0f4a7a6000)
+ libmpi.so.12 => /home/carns/working/src/spack/opt/spack/linux-ubuntu19.10-skylake/gcc-9.2.1/mpich-3.3.2-h3dybprufq7i5kt4hcyfoyihnrnbaogk/lib/libmpi.so.12 (0x00007f0f4a44f000)
+ libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f0f4a241000)
+ ...
----
+General:
+
* Ensure that the linker is correctly linking in Darshan's runtime libraries:
** A common mistake is to explicitly link in the underlying MPI libraries (e.g., `-lmpich` or `-lmpichf90`)
in the link command, which can interfere with Darshan's instrumentation
=====================================
darshan-runtime/lib/pkgconfig/darshan-runtime.pc.in
=====================================
@@ -15,5 +15,5 @@ darshan_libdir= -L${darshan_prefix}/lib
darshan_linkopts="-Wl,@${darshan_share}/ld-opts/darshan-base-ld-opts"
Cflags:
-Libs:
+Libs: -ldarshan
Libs.private: ${darshan_linkopts} ${darshan_libdir} -lfmpich -lmpichcxx -Wl,--start-group -ldarshan -ldarshan-stubs -Wl,--end-group
=====================================
darshan-runtime/maint/generate-bg-compilers.sh deleted
=====================================
@@ -1,35 +0,0 @@
-#!/bin/bash
-#
-# Generates compiler scripts for all BG compilers
-#
-
-PREFIX=/soft/apps/darshan-x.x.x
-BGPATH=/bgsys/drivers/ppcfloor/comm/xxx/bin
-
-for compiler_type in default fast xl;
-do
- compiler_path=${BGPATH/xxx/$compiler_type}
- compiler_opt=""
- for compiler in $(ls $compiler_path);
- do
- if [ $compiler != "mpich2version" -a \
- $compiler != "parkill" ]; then
- mkdir -p $PREFIX/bin/$compiler_type
- if [ $(expr match $compiler ".*xl.*") -gt 0 -o \
- $compiler_type = "fast" -o \
- $compiler_type = "xl" ]; then
- compiler_opt="--trim --xl";
- fi
- if [ $(expr match $compiler ".*cxx") -gt 0 ]; then
- $PREFIX/bin/darshan-gen-cxx.pl $compiler_opt --output=$PREFIX/bin/$compiler_type/$compiler $compiler_path/$compiler
- elif [ $(expr match $compiler ".*f77") -gt 0 -o \
- $(expr match $compiler ".*f90") -gt 0 -o \
- $(expr match $compiler ".*f95") -gt 0 -o \
- $(expr match $compiler ".*f2003") -gt 0 ]; then
- $PREFIX/bin/darshan-gen-fortran.pl $compiler_opt --output=$PREFIX/bin/$compiler_type/$compiler $compiler_path/$compiler
- else
- $PREFIX/bin/darshan-gen-cc.pl $compiler_opt --output=$PREFIX/bin/$compiler_type/$compiler $compiler_path/$compiler
- fi
- fi
- done
-done
=====================================
darshan-runtime/maint/generate-bgq-compilers.sh deleted
=====================================
@@ -1,36 +0,0 @@
-#!/bin/bash
-#
-# Generates compiler scripts for all BG compilers
-#
-
-PREFIX=/soft/perftools/darshan/darshan-x.y.z
-BGPATH=/bgsys/drivers/ppcfloor/comm/xxx/bin
-
-for compiler_type in xl xl.ndebug xl.legacy xl.legacy.ndebug gcc gcc.legacy;
-do
- compiler_path=${BGPATH/xxx/$compiler_type}
- compiler_opt="--trim"
- for compiler in $(ls $compiler_path);
- do
- if [ $compiler != "mpich2version" -a \
- $compiler != "parkill" ]; then
- mkdir -p $PREFIX/wrappers/$compiler_type
- if [ $compiler_type = "xl" -o \
- $compiler_type = "xl.ndebug" -o \
- $compiler_type = "xl.legacy" -o \
- $compiler_type = "xl.legacy.ndebug" ]; then
- compiler_opt="--trim --xl";
- fi
- if [ $(expr match $compiler ".*cxx") -gt 0 ]; then
- $PREFIX/bin/darshan-gen-cxx.pl $compiler_opt --output=$PREFIX/wrappers/$compiler_type/$compiler $compiler_path/$compiler
- elif [ $(expr match $compiler ".*f77") -gt 0 -o \
- $(expr match $compiler ".*f90") -gt 0 -o \
- $(expr match $compiler ".*f95") -gt 0 -o \
- $(expr match $compiler ".*f2003") -gt 0 ]; then
- $PREFIX/bin/darshan-gen-fortran.pl $compiler_opt --output=$PREFIX/wrappers/$compiler_type/$compiler $compiler_path/$compiler
- else
- $PREFIX/bin/darshan-gen-cc.pl $compiler_opt --output=$PREFIX/wrappers/$compiler_type/$compiler $compiler_path/$compiler
- fi
- fi
- done
-done
=====================================
darshan-runtime/maint/install-eureka.sh deleted
=====================================
@@ -1,9 +0,0 @@
-#!/bin/bash
-
-PREFIX=/soft/apps/darshan-x.y.z
-LOGDIR=/intrepid-fs0/logs/darshan-eureka
-
-# Configure, Make and Install Darshan suite
-cd ../
-./configure --with-mem-align=16 --with-log-path=$LOGDIR --prefix=$PREFIX --with-jobid-env=COBALT_JOBID CFLAGS="-O2" CC=/soft/apps/mpich2-1.3.1-gnu/bin/mpicc && make && make install
-
=====================================
darshan-runtime/maint/install-gadzooks.sh deleted
=====================================
@@ -1,8 +0,0 @@
-#!/bin/bash
-
-PREFIX=/soft/apps/darshan-x.y.z
-LOGDIR=/pvfs-surveyor/logs/darshan-gadzooks
-
-# Configure, Make and Install Darshan suite
-./configure --with-mem-align=16 --with-log-path=$LOGDIR --prefix=$PREFIX --with-jobid-env=COBALT_JOBID CFLAGS="-O2" CC=/soft/apps/mpich2-1.3.1-gnu/bin/mpicc && make && make install
-
=====================================
darshan-runtime/maint/install-intrepid.sh deleted
=====================================
@@ -1,11 +0,0 @@
-#!/bin/bash
-
-PREFIX=/soft/apps/darshan-x.y.z
-LOGDIR=/intrepid-fs0/logs/darshan/
-
-#darshan
-cd ../
-./configure --disable-ld-preload --with-mem-align=16 --with-log-path=$LOGDIR --prefix=$PREFIX --with-zlib=/soft/apps/zlib-1.2.3/ --with-jobid-env=COBALT_JOBID CFLAGS="-O2" CC=/bgsys/drivers/ppcfloor/comm/default/bin/mpicc && make && make install
-
-mkdir -p $LOGDIR
-$PREFIX/bin/darshan-mk-log-dirs.pl
=====================================
darshan-runtime/maint/install-surveyor.sh deleted
=====================================
@@ -1,11 +0,0 @@
-#!/bin/bash
-
-PREFIX=/soft/apps/darshan-x.y.z
-LOGDIR=/pvfs-surveyor/logs/darshan
-
-#darshan
-cd ../
-./configure --disable-ld-preload --with-mem-align=16 --with-log-path=$LOGDIR --prefix=$PREFIX --with-zlib=/soft/apps/zlib-1.2.3/ --with-jobid-env=COBALT_JOBID CFLAGS="-O2" CC=/bgsys/drivers/ppcfloor/comm/default/bin/mpicc && make && make install
-
-mkdir -p $LOGDIR
-$PREFIX/bin/darshan-mk-log-dirs.pl
=====================================
darshan-runtime/maint/upgrade-eureka.sh deleted
=====================================
@@ -1,8 +0,0 @@
-#!/bin/bash
-
-PREFIX=/soft/apps/darshan-x.y.z
-LOGDIR=/intrepid-fs0/logs/darshan-eureka
-
-# Configure, Make and Install Darshan suite
-cd ../
-./configure --with-mem-align=16 --with-log-path=$LOGDIR --prefix=$PREFIX --with-jobid-env=COBALT_JOBID CFLAGS="-O2" CC=/soft/apps/mpich2-1.3.1-gnu/bin/mpicc && make && make install
=====================================
darshan-runtime/maint/upgrade-gadzooks.sh deleted
=====================================
@@ -1,9 +0,0 @@
-#!/bin/bash
-
-PREFIX=/soft/apps/darshan-x.y.z
-LOGDIR=/pvfs-surveyor/logs/darshan-gadzooks
-
-# Configure, Make and Install Darshan suite
-cd ../
-./configure --with-mem-align=16 --with-log-path=$LOGDIR --prefix=$PREFIX --with-jobid-env=COBALT_JOBID CFLAGS="-O2" CC=/soft/apps/mpich2-1.3.1-gnu/bin/mpicc && make && make install
-
=====================================
darshan-runtime/maint/upgrade-intrepid.sh deleted
=====================================
@@ -1,9 +0,0 @@
-#!/bin/bash
-
-PREFIX=/soft/apps/darshan-x.y.z
-LOGDIR=/intrepid-fs0/logs/darshan/
-
-#darshan
-cd ../
-./configure --disable-ld-preload --with-mem-align=16 --with-log-path=$LOGDIR --prefix=$PREFIX --with-zlib=/soft/apps/zlib-1.2.3/ --with-jobid-env=COBALT_JOBID CFLAGS="-O2" CC=/bgsys/drivers/ppcfloor/comm/default/bin/mpicc && make && make install
-
=====================================
darshan-runtime/maint/upgrade-surveyor.sh deleted
=====================================
@@ -1,9 +0,0 @@
-#!/bin/bash
-
-PREFIX=/soft/apps/darshan-x.y.z
-LOGDIR=/pvfs-surveyor/logs/darshan
-
-#darshan
-cd ../
-./configure --disable-ld-preload --with-mem-align=16 --with-log-path=$LOGDIR --prefix=$PREFIX --with-zlib=/soft/apps/zlib-1.2.3/ --with-jobid-env=COBALT_JOBID CFLAGS="-O2" CC=/bgsys/drivers/ppcfloor/comm/default/bin/mpicc && make && make install
-
=====================================
darshan-runtime/share/mpi-profile/darshan-bg-cc.conf.in deleted
=====================================
@@ -1,29 +0,0 @@
-#!/bin/bash
-
-# Example Darshan profiling configuration file for MPICH.
-DARSHAN_PREFIX=@prefix@
-
-# Check to see if user explicitly specified dynamic linking options
-echo $CFLAGS |grep "\\-dynamic" >& /dev/null
-dyncheck1=$?
-echo $LDFLAGS |grep "\\-dynamic" >& /dev/null
-dyncheck2=$?
-echo "${allargs[@]}" | grep "\\-dynamic" >& /dev/null
-dyncheck3=$?
-
-# Skip profiling if we know that dynamic linking is in use. See LD_PRELOAD
-# method instead.
-if [ "$dyncheck1" -ne 0 -a "$dyncheck2" -ne 0 -a "$dyncheck3" -ne 0 ]; then
-
- # Libraries (and paths) to include before the MPI library
- export PROFILE_PRELIB=`$DARSHAN_PREFIX/bin/darshan-config --pre-ld-flags`
-
- # Libraries to include after the MPI library
- export PROFILE_POSTLIB=`$DARSHAN_PREFIX/bin/darshan-config --post-ld-flags`
-fi
-
-# C preprocessor arguments for any include files For example, to add
-# /usr/local/myprof/include to the include path and the library libmyprof.a in
-# /usr/local/myprof/lib to the link step, you could create the file myprof.conf with the
-# lines
-# PROFILE_INCPATHS
=====================================
darshan-runtime/share/mpi-profile/darshan-bg-cxx.conf.in deleted
=====================================
@@ -1,35 +0,0 @@
-#!/bin/bash
-
-# Example Darshan profiling configuration file for MPICH.
-
-
-DARSHAN_PREFIX=@prefix@
-
-# Check to see if user explicitly specified dynamic linking options
-echo $CFLAGS |grep "\\-dynamic" >& /dev/null
-dyncheck1=$?
-echo $LDFLAGS |grep "\\-dynamic" >& /dev/null
-dyncheck2=$?
-echo "${allargs[@]}" | grep "\\-dynamic" >& /dev/null
-dyncheck3=$?
-
-# Skip profiling if we know that dynamic linking is in use. See LD_PRELOAD
-# method instead.
-if [ "$dyncheck1" -ne 0 -a "$dyncheck2" -ne 0 -a "$dyncheck3" -ne 0 ]; then
-
- # NOTE: there is something fragile here. We are relying on the BG mpicxx script to set a
- # variable called $cxxlibs to the name of the libmpichcxx variant that we need in order
- # to intercept pmpi calls
-
- # Libraries (and paths) to include before the MPI library
- export PROFILE_PRELIB="$cxxlibs `$DARSHAN_PREFIX/bin/darshan-config --pre-ld-flags`"
-
- # Libraries to include after the MPI library
- export PROFILE_POSTLIB=`$DARSHAN_PREFIX/bin/darshan-config --post-ld-flags`
-fi
-
-# C preprocessor arguments for any include files For example, to add
-# /usr/local/myprof/include to the include path and the library libmyprof.a in
-# /usr/local/myprof/lib to the link step, you could create the file myprof.conf with the
-# lines
-# PROFILE_INCPATHS
=====================================
darshan-runtime/share/mpi-profile/darshan-bg-f.conf.in deleted
=====================================
@@ -1,35 +0,0 @@
-#!/bin/bash
-
-# Example Darshan profiling configuration file for MPICH.
-
-
-DARSHAN_PREFIX=@prefix@
-
-# Check to see if user explicitly specified dynamic linking options
-echo $CFLAGS |grep "\\-dynamic" >& /dev/null
-dyncheck1=$?
-echo $LDFLAGS |grep "\\-dynamic" >& /dev/null
-dyncheck2=$?
-echo "${allargs[@]}" | grep "\\-dynamic" >& /dev/null
-dyncheck3=$?
-
-# try to detect name of libmpichf77 or libmpichf90 library needed for pmpi
-# - these may be named with different suffixes to match the compiler version
-D_MPI_PRELIB=`echo $LIBS |grep "\-lmpichf\\S\+\-\\S\+" -o`
-
-# Skip profiling if we know that dynamic linking is in use. See LD_PRELOAD
-# method instead.
-if [ "$dyncheck1" -ne 0 -a "$dyncheck2" -ne 0 -a "$dyncheck3" -ne 0 ]; then
-
- # Libraries (and paths) to include before the MPI library
- export PROFILE_PRELIB="$D_MPI_PRELIB `$DARSHAN_PREFIX/bin/darshan-config --pre-ld-flags`"
-
- # Libraries to include after the MPI library
- export PROFILE_POSTLIB=`$DARSHAN_PREFIX/bin/darshan-config --post-ld-flags`
-fi
-
-# C preprocessor arguments for any include files For example, to add
-# /usr/local/myprof/include to the include path and the library libmyprof.a in
-# /usr/local/myprof/lib to the link step, you could create the file myprof.conf with the
-# lines
-# PROFILE_INCPATHS
=====================================
darshan-runtime/share/mpi-profile/darshan-cc-static.conf.in
=====================================
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+# Example Darshan profiling configuration file for MPICH when using static
+# linking.
+
+DARSHAN_PREFIX=@prefix@
+
+# Libraries (and paths) to include before the MPI library
+export PROFILE_PRELIB=`$DARSHAN_PREFIX/bin/darshan-config --pre-ld-flags`
+
+# Libraries to include after the MPI library
+export PROFILE_POSTLIB=`$DARSHAN_PREFIX/bin/darshan-config --post-ld-flags`
+
=====================================
darshan-runtime/share/mpi-profile/darshan-cc.conf.in
=====================================
@@ -3,27 +3,5 @@
# Example Darshan profiling configuration file for MPICH.
DARSHAN_PREFIX=@prefix@
-# Check to see if user explicitly specified dynamic linking options
-echo $CFLAGS |grep "\\-dynamic" >& /dev/null
-dyncheck1=$?
-echo $LDFLAGS |grep "\\-dynamic" >& /dev/null
-dyncheck2=$?
-echo "${allargs[@]}" | grep "\\-dynamic" >& /dev/null
-dyncheck3=$?
-
-# Skip profiling if we know that dynamic linking is in use. See LD_PRELOAD
-# method instead.
-if [ "$dyncheck1" -ne 0 -a "$dyncheck2" -ne 0 -a "$dyncheck3" -ne 0 ]; then
-
- # Libraries (and paths) to include before the MPI library
- export PROFILE_PRELIB=`$DARSHAN_PREFIX/bin/darshan-config --pre-ld-flags`
-
- # Libraries to include after the MPI library
- export PROFILE_POSTLIB=`$DARSHAN_PREFIX/bin/darshan-config --post-ld-flags`
-fi
-
-# C preprocessor arguments for any include files For example, to add
-# /usr/local/myprof/include to the include path and the library libmyprof.a in
-# /usr/local/myprof/lib to the link step, you could create the file myprof.conf with the
-# lines
-# PROFILE_INCPATHS
+# Libraries (and paths) to include before the MPI library
+export PROFILE_PRELIB=`$DARSHAN_PREFIX/bin/darshan-config --dyn-ld-flags`
=====================================
darshan-runtime/share/mpi-profile/darshan-cxx-static.conf.in
=====================================
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+# Example Darshan profiling configuration file for MPICH when statically
+# linking.
+
+DARSHAN_PREFIX=@prefix@
+MPICH_LIB_OLD=@MPICH_LIB_OLD@
+
+# Libraries (and paths) to include before the MPI library
+if [ $MPICH_LIB_OLD -eq 1 ]; then
+ export PROFILE_PRELIB="-lmpichcxx `$DARSHAN_PREFIX/bin/darshan-config --pre-ld-flags`"
+else
+ export PROFILE_PRELIB="-lmpicxx `$DARSHAN_PREFIX/bin/darshan-config --pre-ld-flags`"
+fi
+
+# Libraries to include after the MPI library
+export PROFILE_POSTLIB=`$DARSHAN_PREFIX/bin/darshan-config --post-ld-flags`
=====================================
darshan-runtime/share/mpi-profile/darshan-cxx.conf.in
=====================================
@@ -2,35 +2,8 @@
# Example Darshan profiling configuration file for MPICH.
-
DARSHAN_PREFIX=@prefix@
-MPICH_LIB_OLD=@MPICH_LIB_OLD@
-
-# Check to see if user explicitly specified dynamic linking options
-echo $CFLAGS |grep "\\-dynamic" >& /dev/null
-dyncheck1=$?
-echo $LDFLAGS |grep "\\-dynamic" >& /dev/null
-dyncheck2=$?
-echo "${allargs[@]}" | grep "\\-dynamic" >& /dev/null
-dyncheck3=$?
-
-# Skip profiling if we know that dynamic linking is in use. See LD_PRELOAD
-# method instead.
-if [ "$dyncheck1" -ne 0 -a "$dyncheck2" -ne 0 -a "$dyncheck3" -ne 0 ]; then
-
- # Libraries (and paths) to include before the MPI library
- if [ $MPICH_LIB_OLD -eq 1 ]; then
- export PROFILE_PRELIB="-lmpichcxx `$DARSHAN_PREFIX/bin/darshan-config --pre-ld-flags`"
- else
- export PROFILE_PRELIB="-lmpicxx `$DARSHAN_PREFIX/bin/darshan-config --pre-ld-flags`"
- fi
- # Libraries to include after the MPI library
- export PROFILE_POSTLIB=`$DARSHAN_PREFIX/bin/darshan-config --post-ld-flags`
-fi
+# Libraries (and paths) to include before the MPI library
+export PROFILE_PRELIB="`$DARSHAN_PREFIX/bin/darshan-config --dyn-ld-flags`"
-# C preprocessor arguments for any include files For example, to add
-# /usr/local/myprof/include to the include path and the library libmyprof.a in
-# /usr/local/myprof/lib to the link step, you could create the file myprof.conf with the
-# lines
-# PROFILE_INCPATHS
=====================================
darshan-runtime/share/mpi-profile/darshan-f-static.conf.in
=====================================
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+# Example Darshan profiling configuration file for MPICH.
+
+
+DARSHAN_PREFIX=@prefix@
+MPICH_LIB_OLD=@MPICH_LIB_OLD@
+
+# Libraries (and paths) to include before the MPI library
+if [ $MPICH_LIB_OLD -eq 1 ]; then
+ export PROFILE_PRELIB="-lfmpich `$DARSHAN_PREFIX/bin/darshan-config --pre-ld-flags`"
+else
+ export PROFILE_PRELIB="-lmpifort `$DARSHAN_PREFIX/bin/darshan-config --pre-ld-flags`"
+fi
+
+# Libraries to include after the MPI library
+export PROFILE_POSTLIB=`$DARSHAN_PREFIX/bin/darshan-config --post-ld-flags`
+
=====================================
darshan-runtime/share/mpi-profile/darshan-f.conf.in
=====================================
@@ -4,33 +4,5 @@
DARSHAN_PREFIX=@prefix@
-MPICH_LIB_OLD=@MPICH_LIB_OLD@
-# Check to see if user explicitly specified dynamic linking options
-echo $CFLAGS |grep "\\-dynamic" >& /dev/null
-dyncheck1=$?
-echo $LDFLAGS |grep "\\-dynamic" >& /dev/null
-dyncheck2=$?
-echo "${allargs[@]}" | grep "\\-dynamic" >& /dev/null
-dyncheck3=$?
-
-# Skip profiling if we know that dynamic linking is in use. See LD_PRELOAD
-# method instead.
-if [ "$dyncheck1" -ne 0 -a "$dyncheck2" -ne 0 -a "$dyncheck3" -ne 0 ]; then
-
- # Libraries (and paths) to include before the MPI library
- if [ $MPICH_LIB_OLD -eq 1 ]; then
- export PROFILE_PRELIB="-lfmpich `$DARSHAN_PREFIX/bin/darshan-config --pre-ld-flags`"
- else
- export PROFILE_PRELIB="-lmpifort `$DARSHAN_PREFIX/bin/darshan-config --pre-ld-flags`"
- fi
-
- # Libraries to include after the MPI library
- export PROFILE_POSTLIB=`$DARSHAN_PREFIX/bin/darshan-config --post-ld-flags`
-fi
-
-# C preprocessor arguments for any include files For example, to add
-# /usr/local/myprof/include to the include path and the library libmyprof.a in
-# /usr/local/myprof/lib to the link step, you could create the file myprof.conf with the
-# lines
-# PROFILE_INCPATHS
+export PROFILE_PRELIB="`$DARSHAN_PREFIX/bin/darshan-config --dyn-ld-flags`"
View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/compare/405131f9acd5e6448f573b203745b39fb8802ac9...7715697e435be5acdfdf0b4973bb4c62bcaa383c
--
View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/compare/405131f9acd5e6448f573b203745b39fb8802ac9...7715697e435be5acdfdf0b4973bb4c62bcaa383c
You're receiving this email because of your account on xgitlab.cels.anl.gov.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/darshan-commits/attachments/20200327/0d441f97/attachment-0001.html>
More information about the Darshan-commits
mailing list