darshan-cc.conf.in 1.03 KB
Newer Older
1 2 3
#!/bin/bash

# Example Darshan profiling configuration file for MPICH.
4
DARSHAN_PREFIX=@prefix@
5

6 7 8 9 10 11 12
# 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=$?
13

14 15 16
# 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
17

18 19
	# Libraries (and paths) to include before the MPI library 
	export PROFILE_PRELIB=`$DARSHAN_PREFIX/bin/darshan-config --pre-ld-flags`
20

21 22 23
	# Libraries to include after the MPI library 
	export PROFILE_POSTLIB=`$DARSHAN_PREFIX/bin/darshan-config --post-ld-flags`
fi
24 25 26 27 28 29

# 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