11#! /bin/sh
2+ #
3+ # See COPYRIGHT notice in top-level directory.
4+ #
5+ # @configure_input@
6+
7+ version=" @PACKAGE_NAME@ @PACKAGE_VERSION@"
28
39prefix=" @prefix@"
410exec_prefix=" @exec_prefix@"
@@ -8,6 +14,117 @@ DARSHAN_LD_FLAGS="@LDFLAGS@"
814DARSHAN_LOG_PATH=" @__DARSHAN_LOG_PATH@"
915DARSHAN_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
43160 DARSHAN_LOG_ALL=$DARSHAN_LOG_PATH
44161fi
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
49229if 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
79297done
298+
299+ exit 0
0 commit comments