Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
intel-hpdd
darshan-dxlt
Commits
c3946b9d
Commit
c3946b9d
authored
Mar 12, 2015
by
Philip Carns
Browse files
detect dynamic linking in profile conf
parent
2eae92a3
Changes
3
Hide whitespace changes
Inline
Side-by-side
darshan-runtime/share/mpi-profile/darshan-cc.conf.in
View file @
c3946b9d
#!/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
...
...
darshan-runtime/share/mpi-profile/darshan-cxx.conf.in
View file @
c3946b9d
...
...
@@ -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
...
...
darshan-runtime/share/mpi-profile/darshan-f.conf.in
View file @
c3946b9d
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment