Commit 0750b747 authored by Philip Carns's avatar Philip Carns Committed by Shane Snyder

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
parent 405131f9
......@@ -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
......
......@@ -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;;
......
......@@ -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
)
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
This diff is collapsed.
......@@ -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
#!/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
#!/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
#!/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
#!/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
#!/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
#!/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
#!/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
#!/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
#!/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
#!/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
#!/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
#!/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
#!/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
#!/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`
......@@ -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`
#!/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`