Skip to content

Commit 894f88f

Browse files
committed
darshan-config: add a complete list of options configured
1 parent b781182 commit 894f88f

File tree

2 files changed

+272
-16
lines changed

2 files changed

+272
-16
lines changed

darshan-runtime/configure.ac

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -651,6 +651,7 @@ if test "x$enable_darshan_runtime" = xyes ; then
651651
)
652652
])
653653

654+
rdtscp_num=
654655
AC_ARG_ENABLE(rdtscp,
655656
[ --enable-rdtscp=<num> Use RDTSCP intrinsic for timing, with specified base frequency],
656657
[
@@ -662,6 +663,8 @@ if test "x$enable_darshan_runtime" = xyes ; then
662663
fi
663664
if test x$HAVE_RDTSCP != x1; then
664665
AC_MSG_ERROR(attempted to enable rdtscp timer, but it is not supported on this platform)
666+
else
667+
rdtscp_num=${enableval}
665668
fi
666669
],
667670
[]
@@ -832,6 +835,39 @@ else
832835
with_jobid_env=
833836
fi
834837

838+
AC_SUBST(ENABLE_LD_PRELOAD, ["$enable_ld_preload"])
839+
AC_SUBST(ENABLE_CUSERID, ["$enable_cuserid"])
840+
AC_SUBST(ENABLE_GROUP_READABLE_LOGS, ["$enable_group_readable_logs"])
841+
AC_SUBST(ENABLE_MMAP_LOGS, ["$enable_mmap_logs"])
842+
AC_SUBST(ENABLE_NULL_MOD, ["$enable_null_mod"])
843+
AC_SUBST(ENABLE_POSIX_MOD, ["$enable_posix_mod"])
844+
AC_SUBST(ENABLE_STDIO_MOD, ["$enable_stdio_mod"])
845+
AC_SUBST(ENABLE_DXT_MOD, ["$enable_dxt_mod"])
846+
AC_SUBST(ENABLE_HEATMAP_MOD, ["$enable_heatmap_mod"])
847+
AC_SUBST(ENABLE_MPIIO_MOD, ["$enable_mpiio_mod"])
848+
AC_SUBST(ENABLE_APMPI_MOD, ["$enable_apmpi_mod"])
849+
AC_SUBST(ENABLE_APMPI_COLL_SYNC, ["$enable_apmpi_coll_sync"])
850+
AC_SUBST(ENABLE_APXC_MOD, ["$enable_apxc_mod"])
851+
AC_SUBST(ENABLE_HDF5_MOD, ["$enable_hdf5_mod"])
852+
AC_SUBST(ENABLE_PNETCDF_MOD, ["$enable_pnetcdf_mod"])
853+
AC_SUBST(ENABLE_DAOS_MOD, ["$enable_daos_mod"])
854+
AC_SUBST(ENABLE_BGQ_MOD, ["$enable_bgq_mod"])
855+
AC_SUBST(ENABLE_LUSTRE_MOD, ["$enable_lustre_mod"])
856+
AC_SUBST(ENABLE_MDHIM_MOD, ["$enable_mdhim_mod"])
857+
AC_SUBST(ENABLE_LDMS_MOD, ["$enable_ldms_mod"])
858+
AC_SUBST(ENABLE_RDTSCP_NUM, ["$rdtscp_num"])
859+
AC_SUBST(ENABLE_EXIT_WRAPPER, ["$enable_exit_wrapper"])
860+
AC_SUBST(ZLIB_HOME, ["$ZLIB_HOME"])
861+
AC_SUBST(MEM_ALIGN, ["$with_mem_align"])
862+
AC_SUBST(DARSHAN_LOG_HINTS, ["$__DARSHAN_LOG_HINTS"])
863+
AC_SUBST(JOBID_ENV, ["$with_jobid_env"])
864+
AC_SUBST(USERNAME_ENV, ["$with_username_env"])
865+
AC_SUBST(MOD_MEM, ["$with_mod_mem"])
866+
AC_SUBST(NAME_MEM, ["$with_name_mem"])
867+
AC_SUBST(HDF5_PATH, ["$with_hdf5"])
868+
AC_SUBST(PNETCDF_PATH, ["$with_pnetcdf"])
869+
AC_SUBST(DAOS_PATH, ["$with_daos"])
870+
AC_SUBST(LDMS_PATH, ["$LDMS_HOME"])
835871

836872
AM_CONDITIONAL(ENABLE_MMAP_LOGS, [test "x$enable_mmap_logs" = xyes])
837873
AM_CONDITIONAL(ENABLE_LDPRELOAD, [test "x$enable_ld_preload" = xyes])

darshan-runtime/darshan-config.in

Lines changed: 236 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
#!/bin/sh
2+
#
3+
# See COPYRIGHT notice in top-level directory.
4+
#
5+
# @configure_input@
6+
7+
version="@PACKAGE_NAME@ @PACKAGE_VERSION@"
28

39
prefix="@prefix@"
410
exec_prefix="@exec_prefix@"
@@ -8,6 +14,117 @@ DARSHAN_LD_FLAGS="@LDFLAGS@"
814
DARSHAN_LOG_PATH="@__DARSHAN_LOG_PATH@"
915
DARSHAN_LOG_ENV="@__DARSHAN_LOG_ENV@"
1016

17+
C_COMPILER="@CC@"
18+
C_COMPILER=`echo "$C_COMPILER" | sed -e 's/^[ \t]*//'`
19+
CPPFLAGS="@CPPFLAGS@"
20+
CPPFLAGS=`echo "$CPPFLAGS" | sed -e 's/^[ \t]*//'`
21+
CFLAGS="@CFLAGS@"
22+
CFLAGS=`echo "$CFLAGS" | sed -e 's/^[ \t]*//'`
23+
LIBS="@LIBS@"
24+
LIBS=`echo "$LIBS" | sed -e 's/^[ \t]*//'`
25+
26+
enable_ld_preload="@ENABLE_LD_PRELOAD@"
27+
enable_cuserid="@ENABLE_CUSERID@"
28+
enable_group_readable_logs="@ENABLE_GROUP_READABLE_LOGS@"
29+
enable_mmap_logs="@ENABLE_MMAP_LOGS@"
30+
enable_null_mod="@ENABLE_NULL_MOD@"
31+
enable_posix_mod="@ENABLE_POSIX_MOD@"
32+
enable_stdio_mod="@ENABLE_STDIO_MOD@"
33+
enable_dxt_mod="@ENABLE_DXT_MOD@"
34+
enable_heatmap_mod="@ENABLE_HEATMAP_MOD@"
35+
enable_mpiio_mod="@ENABLE_MPIIO_MOD@"
36+
enable_apmpi_mod="@ENABLE_APMPI_MOD@"
37+
enable_apmpi_coll_sync="@ENABLE_APMPI_COLL_SYNC@"
38+
enable_apxc_mod="@ENABLE_APXC_MOD@"
39+
enable_hdf5_mod="@ENABLE_HDF5_MOD@"
40+
enable_pnetcdf_mod="@ENABLE_PNETCDF_MOD@"
41+
enable_daos_mod="@ENABLE_DAOS_MOD@"
42+
enable_bgq_mod="@ENABLE_BGQ_MOD@"
43+
enable_lustre_mod="@ENABLE_LUSTRE_MOD@"
44+
enable_mdhim_mod="@ENABLE_MDHIM_MOD@"
45+
enable_ldms_mod="@ENABLE_LDMS_MOD@"
46+
enable_rdtscp_num="@ENABLE_RDTSCP_NUM@"
47+
enable_exit_wrapper="@ENABLE_EXIT_WRAPPER@"
48+
49+
zlib_home="@ZLIB_HOME@"
50+
mem_align="@MEM_ALIGN@"
51+
log_hints="@DARSHAN_LOG_HINTS@"
52+
jobid_env="@JOBID_ENV@"
53+
if test "x$jobid_env" = xNONE ; then username_env= ; fi
54+
username_env="@USERNAME_ENV@"
55+
if test "x$username_env" = xno ; then username_env= ; fi
56+
mod_mem="@MOD_MEM@"
57+
if test "x$mod_mem" = xno ; then mod_mem= ; fi
58+
name_mem="@NAME_MEM@"
59+
if test "x$name_mem" = xno ; then name_mem= ; fi
60+
hdf5_path="@HDF5_PATH@"
61+
if test "x$hdf5_path" = xno ; then hdf5_path= ; fi
62+
pnetcdf_path="@PNETCDF_PATH@"
63+
if test "x$pnetcdf_path" = xno ; then pnetcdf_path= ; fi
64+
daos_path="@DAOS_PATH@"
65+
if test "x$daos_path" = xno ; then daos_path= ; fi
66+
ldms_path="@LDMS_PATH@"
67+
if test "x$ldms_path" = xno ; then ldms_path= ; fi
68+
69+
all()
70+
{
71+
echo
72+
echo "This $version was built with the following features:"
73+
echo
74+
echo " --ld-preload -> $enable_ld_preload"
75+
echo " --cuserid -> $enable_cuserid"
76+
echo " --group-readable-logs -> $enable_group_readable_logs"
77+
echo " --mmap-logs -> $enable_mmap_logs"
78+
echo " --null-mod -> $enable_null_mod"
79+
echo " --posix-mod -> $enable_posix_mod"
80+
echo " --stdio-mod -> $enable_stdio_mod"
81+
echo " --dxt-mod -> $enable_dxt_mod"
82+
echo " --heatmap-mod -> $enable_heatmap_mod"
83+
echo " --mpiio-mod -> $enable_mpiio_mod"
84+
echo " --apmpi-mod -> $enable_apmpi_mod"
85+
echo " --apmpi-coll-sync -> $enable_apmpi_coll_sync"
86+
echo " --apxc-mod -> $enable_apxc_mod"
87+
echo " --hdf5-mod -> $enable_hdf5_mod"
88+
echo " --pnetcdf-mod -> $enable_pnetcdf_mod"
89+
echo " --daos-mod -> $enable_daos_mod"
90+
echo " --bgq-mod -> $enable_bgq_mod"
91+
echo " --lustre-mod -> $enable_lustre_mod"
92+
echo " --mdhim-mod -> $enable_mdhim_mod"
93+
echo " --ldms-mod -> $enable_ldms_mod"
94+
if test "x$enable_rdtscp_num" = x ; then
95+
echo " --rdtscp -> no"
96+
else
97+
echo " --rdtscp -> $enable_rdtscp_num"
98+
fi
99+
echo " --exit-wrapper -> $enable_exit_wrapper"
100+
101+
echo
102+
echo "This $version was built using the following compilers and flags:"
103+
echo
104+
echo " --cc -> $C_COMPILER"
105+
echo " --cppflags -> $CPPFLAGS"
106+
echo " --cflags -> $CFLAGS"
107+
echo " --ldflags -> $LDFLAGS"
108+
echo " --libs -> $LIBS"
109+
echo ""
110+
echo " --pre-ld-flags -> $PRE_LD_FLAGS"
111+
echo " --post-ld-flags -> $POST_LD_FLAGS"
112+
echo " --dyn-ld-flags -> $DYN_LD_FLAGS"
113+
echo " --log-path -> $DARSHAN_LOG_ALL"
114+
echo ""
115+
echo " --with-zlib-path -> $zlib_home"
116+
echo " --with-mem-align -> $mem_align"
117+
echo " --with-log-hints -> $log_hints"
118+
echo " --with-jobid-env -> $jobid_env"
119+
echo " --with-username-env -> $username_env"
120+
echo " --with-mod-mem -> $mod_mem"
121+
echo " --with-name-mem -> $name_mem"
122+
echo " --with-hdf5 -> $hdf5_path"
123+
echo " --with-pnetcdf -> $pnetcdf_path"
124+
echo " --with-daos -> $daos_path"
125+
echo " --with-ldms -> $ldms_path"
126+
}
127+
11128
# NOTE:
12129
# - we deliberately list libdarshan twice in the link command when
13130
# statically linking. The first sets symbol wrapping options early in the
@@ -43,8 +160,71 @@ else
43160
DARSHAN_LOG_ALL=$DARSHAN_LOG_PATH
44161
fi
45162

46-
usage="\
47-
Usage: darshan-config [--pre-ld-flags] [--post-ld-flags] [--dyn-ld-flags] [--log-path]"
163+
usage()
164+
{
165+
cat <<EOF
166+
darshan-config is a utility program to display the build and installation
167+
information of the Darshan runtime library.
168+
169+
Usage: darshan-config [OPTION]
170+
171+
Available values for OPTION include:
172+
173+
--help display this help message and exit
174+
--all display all options
175+
--cc C compiler used to build Darshan
176+
--cflags C compiler flags used to build Darshan
177+
--cppflags C pre-processor flags used to build Darshan
178+
--ldflags Linker flags used to build Darshan
179+
--libs Extra libraries used to build Darshan
180+
--pre-ld-flags Linker flags for setting env variable LD_PRELOAD
181+
--post-ld-flags Linker flags for statically linking
182+
--dyn-ld-flags Linker flags for dynamically linking
183+
--log-path Storage locations of Darshan log files
184+
185+
--ld-preload Whether LD_PRELOAD library is enabled
186+
--cuserid Whether cuserid() is used at run time
187+
--group-readable-logs Whether log files are group readable
188+
--mmap-logs Whether to use mmap I/O data to log file
189+
--null-mod Whether NULL module is enabled
190+
--posix-mod Whether POSIX module is enabled
191+
--stdio-mod Whether STDIO module is enabled
192+
--dxt-mod Whether DXT module is enabled
193+
--heatmap-mod Whether HEATMAP module is enabled
194+
--mpiio-mod Whether MPI-IO module is enabled
195+
--apmpi-mod Whether AUTOPERF MPI module is enabled
196+
--apmpi-coll-sync Whether sync for MPI collectives is enabled
197+
--apxc-mod Whether AUTOPERF XC module is enabled
198+
--hdf5-mod Whether HDF5 module is enabled
199+
--pnetcdf-mod Whether PnetCDF module is enabled
200+
--daos-mod Whether DAOS module is enabled
201+
--bgq-mod Whether BG/Q module is enabled
202+
--lustre-mod Whether Lustre module is enabled
203+
--mdhim-mod Whether mdhim module is enabled
204+
--ldms-mod Whether to include LDMS for runtime I/O monitoring
205+
--rdtscp Frequency of using RDTSCP intrinsic for timing
206+
--exit-wrapper Whether to wrap _exit() calls as last ditch shutdown
207+
hook for the Darshan library when used in non-MPI mode
208+
209+
--with-zlib Root directory path of zlib installation
210+
--with-mem-align Memory alignment in bytes
211+
--with-log-hints List of MPI-IO hints for log file write
212+
--with-log-path Location to store log files at run time
213+
--with-jobid-env Name of environment variable that stores the jobid
214+
--with-username-env Name of environment variable that stores the username
215+
--with-mod-mem Maximum runtime memory consumption per process (in
216+
MiB) across all instrumentation modules
217+
--with-name-mem Maximum runtime memory consumption per process (in
218+
MiB) for storing name records
219+
--with-hdf5 Installation directory for HDF5.
220+
--with-pnetcdf Installation directory for PnetCDF.
221+
--with-daos Installation directory for DAOS.
222+
--with-ldms Root directory path of LDMS installation
223+
224+
EOF
225+
exit $1
226+
}
227+
48228

49229
if test $# -eq 0; then
50230
echo "${usage}" 1>&2
@@ -58,22 +238,62 @@ while test $# -gt 0; do
58238
esac
59239

60240
case $1 in
61-
--pre-ld-flags)
62-
echo $PRE_LD_FLAGS
63-
;;
64-
--post-ld-flags)
65-
echo $POST_LD_FLAGS
66-
;;
67-
--dyn-ld-flags)
68-
echo $DYN_LD_FLAGS
69-
;;
70-
--log-path)
71-
echo $DARSHAN_LOG_ALL
72-
;;
241+
--help) usage 0 ;;
242+
--all) all ;;
243+
244+
--version) echo "$version" ;;
245+
--cc) echo "$C_COMPILER" ;;
246+
--cflags) echo "$CFLAGS" ;;
247+
--cppflags) echo "$CPPFLAGS" ;;
248+
--libdir) echo "$DARSHAN_LIB_PATH" ;;
249+
--ldflags) echo "$LDFLAGS" ;;
250+
--libs) echo "$LIBS" ;;
251+
252+
--ld-preload) echo "$enable_ld_preload" ;;
253+
--cuserid) echo "$enable_cuserid" ;;
254+
--group-readable-logs) echo "$enable_group_readable_logs" ;;
255+
--mmap-logs) echo "$enable_mmap_logs" ;;
256+
--null-mod) echo "$enable_null_mod" ;;
257+
--posix-mod) echo "$enable_posix_mod" ;;
258+
--stdio-mod) echo "$enable_stdio_mod" ;;
259+
--dxt-mod) echo "$enable_dxt_mod" ;;
260+
--heatmap-mod) echo "$enable_heatmap_mod" ;;
261+
--mpiio-mod) echo "$enable_mpiio_mod" ;;
262+
--apmpi-mod) echo "$enable_apmpi_mod" ;;
263+
--apmpi-coll-sync) echo "$enable_apmpi_coll_sync" ;;
264+
--apxc-mod) echo "$enable_apxc_mod" ;;
265+
--hdf5-mod) echo "$enable_hdf5_mod" ;;
266+
--pnetcdf-mod) echo "$enable_pnetcdf_mod" ;;
267+
--daos-mod) echo "$enable_daos_mod" ;;
268+
--bgq-mod) echo "$enable_bgq_mod" ;;
269+
--lustre-mod) echo "$enable_lustre_mod" ;;
270+
--mdhim-mod) echo "$enable_mdhim_mod" ;;
271+
--ldms-mod) echo "$enable_ldms_mod" ;;
272+
--rdtscp) echo "$enable_rdtscp_num" ;;
273+
--exit-wrapper) echo "$enable_exit_wrapper" ;;
274+
275+
--pre-ld-flags) echo "$PRE_LD_FLAGS" ;;
276+
--post-ld-flags) echo "$POST_LD_FLAGS" ;;
277+
--dyn-ld-flags) echo "$DYN_LD_FLAGS" ;;
278+
--log-path) echo "$DARSHAN_LOG_ALL" ;;
279+
--with-zlib-path) echo "$zlib_home" ;;
280+
--with-mem-align) echo "$mem_align" ;;
281+
--with-log-hints) echo "$log_hints" ;;
282+
--with-jobid-env) echo "$jobid_env" ;;
283+
--with-username-env) echo "$username_env" ;;
284+
--with-mod-mem) echo "$mod_mem" ;;
285+
--with-name-mem) echo "$name_mem" ;;
286+
--with-hdf5) echo "$hdf5_path" ;;
287+
--with-pnetcdf) echo "$pnetcdf_path" ;;
288+
--with-daos) echo "$daos_path" ;;
289+
--with-ldms) echo "$ldms_path" ;;
73290
*)
74-
echo "${usage}" 1>&2
75-
exit 1
291+
echo "unknown option: $1"
292+
echo ""
293+
usage 1
76294
;;
77295
esac
78296
shift
79297
done
298+
299+
exit 0

0 commit comments

Comments
 (0)