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
darshan
darshan
Commits
4a3f37d9
Commit
4a3f37d9
authored
Apr 26, 2020
by
Philip Carns
Committed by
Shane Snyder
Apr 26, 2020
Browse files
add darshan-config --log-path option
closes
#244
parent
c54a8a42
Changes
5
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
4a3f37d9
...
...
@@ -5,6 +5,8 @@ Darshan Release Change Log
Darshan-3.2.0-pre2
=============
* silence stdout from darshan-job-summary.pl and remove --summary option
* added `darshan-config --log-path` command option to display the log path(s)
configured for use with Darshan
Darshan-3.2.0-pre1
=============
...
...
darshan-runtime/configure
View file @
4a3f37d9
...
...
@@ -643,6 +643,7 @@ DARSHAN_VERSION
ENABLE_MMAP_LOGS
DISABLE_LDPRELOAD
DISABLE_STATIC_LIB
__DARSHAN_LOG_ENV
__DARSHAN_LOG_PATH
darshan_share_path
darshan_lib_path
...
...
@@ -4892,6 +4893,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-cc-static.conf share/mpi-profile/darshan-cxx-static.conf share/mpi-profile/darshan-f-static.conf share/ld-opts/darshan-base-ld-opts share/ld-opts/darshan-stdio-ld-opts"
...
...
darshan-runtime/configure.in
View file @
4a3f37d9
...
...
@@ -500,6 +500,7 @@ AC_SUBST(darshan_lib_path)
AC_SUBST(darshan_share_path)
AC_SUBST(LDFLAGS)
AC_SUBST(__DARSHAN_LOG_PATH)
AC_SUBST(__DARSHAN_LOG_ENV)
AC_SUBST(DISABLE_STATIC_LIB)
AC_SUBST(DISABLE_LDPRELOAD)
AC_SUBST(ENABLE_MMAP_LOGS)
...
...
darshan-runtime/darshan-config.in
View file @
4a3f37d9
...
...
@@ -3,6 +3,8 @@
DARSHAN_LIB_PATH
=
"@darshan_lib_path@"
DARSHAN_SHARE_PATH
=
"@darshan_share_path@"
DARSHAN_LD_FLAGS
=
"@LDFLAGS@"
DARSHAN_LOG_PATH
=
"@__DARSHAN_LOG_PATH@"
DARSHAN_LOG_ENV
=
"@__DARSHAN_LOG_ENV@"
# NOTE:
# - we deliberately list libdarshan twice in the link command when
...
...
@@ -20,8 +22,27 @@ POST_LD_FLAGS="-L$DARSHAN_LIB_PATH -ldarshan -lz -lrt -lpthread"
# 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
-Wl,-no-as-needed -ldarshan"
# NOTE:
# - construct complete list of log path options, separated by commas.
# LOG_ENV takes precedent over LOG_PATH, but both could be specified. The
# LOG_ENV may already be a comma saparated list, but we insert '$'
# characters to denote that these are environment variables.
if
[
"
$DARSHAN_LOG_ENV
"
]
;
then
DARSHAN_LOG_ENV
=
`
echo
$DARSHAN_LOG_ENV
|
sed
-e
's/^/\$/g'
`
DARSHAN_LOG_ENV
=
`
echo
$DARSHAN_LOG_ENV
|
sed
-e
's/,/,\$/g'
`
fi
# figure out if we need a comma separator to construct env and path list
if
[
"
$DARSHAN_LOG_ENV
"
-a
"
$DARSHAN_LOG_PATH
"
]
;
then
DARSHAN_LOG_ALL
=
"
$DARSHAN_LOG_ENV
,
$DARSHAN_LOG_PATH
"
elif
[
"
$DARSHAN_LOG_ENV
"
]
;
then
DARSHAN_LOG_ALL
=
$DARSHAN_LOG_ENV
else
DARSHAN_LOG_ALL
=
$DARSHAN_LOG_PATH
fi
usage
=
"
\
Usage: darshan-config [--pre-ld-flags] [--post-ld-flags] [--dyn-ld-flags]"
Usage: darshan-config [--pre-ld-flags] [--post-ld-flags] [--dyn-ld-flags]
[--log-path]
"
if
test
$#
-eq
0
;
then
echo
"
${
usage
}
"
1>&2
...
...
@@ -44,6 +65,9 @@ while test $# -gt 0; do
--dyn-ld-flags
)
echo
$DYN_LD_FLAGS
;;
--log-path
)
echo
$DARSHAN_LOG_ALL
;;
*
)
echo
"
${
usage
}
"
1>&2
exit
1
...
...
darshan-runtime/doc/darshan-runtime.txt
View file @
4a3f37d9
...
...
@@ -84,6 +84,7 @@ specified environment variable is not set.
* `--with-log-path=` (this, or `--with-log-path-by-env`, is mandatory): This
specifies the parent directory for the directory tree where Darshan logs
will be placed.
** NOTE: after installation, any user can display the configured path with the `darshan-config --log-path` command
* `--with-log-path-by-env=`: specifies an environment variable to use to
determine the log path at run time.
* `--with-log-hints=`: specifies hints to use when writing the Darshan log
...
...
@@ -129,6 +130,15 @@ as root.
darshan-mk-log-dirs.pl
----
.A note about finding log paths after installation
[NOTE]
====
Regardless of whether a Darshan installation is using the --with-log-path or
--with-log-path-by-env option, end users can display the path (and/or
environment variables) at any time by running `darshan-config --log-path`
on the command line.
====
.A note about log directory permissions
[NOTE]
====
...
...
@@ -583,6 +593,9 @@ behavior at runtime:
In cases where Darshan is not generating a log file for an application, some common things to check are:
* Make sure you are looking in the correct place for logs. Confirm the
location with the `darshan-config --log-path` command.
* Check stderr to ensure Darshan isn't indicating any internal errors (e.g., invalid log file path)
For statically linked executables:
...
...
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