[Darshan-commits] [Darshan] branch, master, updated. darshan-2.3.1-pre2-3-gc3946b9

Service Account git at mcs.anl.gov
Thu Mar 12 14:23:45 CDT 2015


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "".

The branch, master has been updated
       via  c3946b9d21522c7c86a467a06024c801dd9fec74 (commit)
      from  2eae92a35b1bd8e43aad1ba14ea522e18e3c114f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit c3946b9d21522c7c86a467a06024c801dd9fec74
Author: Phil Carns <carns at mcs.anl.gov>
Date:   Thu Mar 12 19:23:33 2015 +0000

    detect dynamic linking in profile conf

-----------------------------------------------------------------------

Summary of changes:
 .../share/mpi-profile/darshan-cc.conf.in           |   21 +++++++++++---
 .../share/mpi-profile/darshan-cxx.conf.in          |   29 ++++++++++++++-----
 .../share/mpi-profile/darshan-f.conf.in            |   29 ++++++++++++++-----
 3 files changed, 58 insertions(+), 21 deletions(-)


Diff of changes:
diff --git a/darshan-runtime/share/mpi-profile/darshan-cc.conf.in b/darshan-runtime/share/mpi-profile/darshan-cc.conf.in
index 70fe29a..d0d09a7 100644
--- a/darshan-runtime/share/mpi-profile/darshan-cc.conf.in
+++ b/darshan-runtime/share/mpi-profile/darshan-cc.conf.in
@@ -1,15 +1,26 @@
 #!/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=$?
 
-DARSHAN_PREFIX=@prefix@
+# 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 (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`
+	# 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
diff --git a/darshan-runtime/share/mpi-profile/darshan-cxx.conf.in b/darshan-runtime/share/mpi-profile/darshan-cxx.conf.in
index 9499a76..f11ec9b 100644
--- a/darshan-runtime/share/mpi-profile/darshan-cxx.conf.in
+++ b/darshan-runtime/share/mpi-profile/darshan-cxx.conf.in
@@ -6,15 +6,28 @@
 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
+# 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 to include after the MPI library 
-export PROFILE_POSTLIB=`$DARSHAN_PREFIX/bin/darshan-config --post-ld-flags`
+	# 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
 
 # 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
diff --git a/darshan-runtime/share/mpi-profile/darshan-f.conf.in b/darshan-runtime/share/mpi-profile/darshan-f.conf.in
index 176ca88..7c8f5da 100644
--- a/darshan-runtime/share/mpi-profile/darshan-f.conf.in
+++ b/darshan-runtime/share/mpi-profile/darshan-f.conf.in
@@ -6,15 +6,28 @@
 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
+# 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 to include after the MPI library 
-export PROFILE_POSTLIB=`$DARSHAN_PREFIX/bin/darshan-config --post-ld-flags`
+	# 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


hooks/post-receive
--



More information about the Darshan-commits mailing list