darshan-bg-cxx.conf.in 1.27 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/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

20
21
22
23
	# 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

24
	# Libraries (and paths) to include before the MPI library 
25
	export PROFILE_PRELIB="$cxxlibs `$DARSHAN_PREFIX/bin/darshan-config --pre-ld-flags`"
26
27
28
29
30
31
32
33
34
35

	# 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