Skip to content

Commit b229234

Browse files
committed
explicit setting --with-ldms automaticall sets --enable-ldms-mod
1 parent 9d1801e commit b229234

File tree

3 files changed

+31
-17
lines changed

3 files changed

+31
-17
lines changed

darshan-runtime/configure.ac

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -603,13 +603,38 @@ if test "x$enable_darshan_runtime" = xyes ; then
603603
[], [AC_MSG_ERROR([mdhim requested but headers cannot be found])])
604604
fi
605605

606+
# inform about LDMS installs not found in default locations
607+
AC_ARG_WITH([ldms],
608+
[AS_HELP_STRING([--with-ldms@<:@=DIR@:>@],
609+
[Installation directory for LDMS.])]
610+
)
611+
606612
# LDMS support (disabled by default)
607613
AC_ARG_ENABLE([ldms-mod],
608614
[AS_HELP_STRING([--enable-ldms-mod],
609-
[Include LDMS for runtime I/O monitoring])],
610-
[], [enable_ldms_mod=no]
615+
[Include LDMS for runtime I/O monitoring])]
611616
)
617+
618+
# When --with-ldms is set, we automatically enable enable_ldms_mod
619+
if test "x$enable_ldms_mod" = x ; then
620+
if test "x$with_ldms" != x ; then
621+
enable_ldms_mod=yes
622+
else
623+
enable_ldms_mod=no
624+
fi
625+
fi
626+
612627
if test "x$enable_ldms_mod" = xyes ; then
628+
if test -d "$with_ldms"; then
629+
LDMS_HOME="$with_ldms"
630+
LDFLAGS="$LDFLAGS -L${LDMS_HOME}/lib -Wl,-rpath=${LDMS_HOME}/lib"
631+
CPPFLAGS="$CPPFLAGS -I${LDMS_HOME}/include"
632+
__DARSHAN_LDMS_LINK_FLAGS="-L${LDMS_HOME}/lib"
633+
__DARSHAN_LDMS_INCLUDE_FLAGS="-I${LDMS_HOME}/include"
634+
else
635+
AC_MSG_ERROR([LDMS installation path, $with_ldms, is not found])
636+
fi
637+
613638
CHECK_LDMS
614639
fi
615640

darshan-runtime/doc/darshan-runtime.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,10 @@ Compilation
209209
installation directory for LDMS
210210

211211
.. note::
212-
* Users must use the configuration flags ``--enable-ldms-mod`` and
213-
``--with-ldms=DIR`` to enable runtime data collection via LDMS.
212+
* When ``--with-ldms=DIR`` is set, building LDMS module is automatically
213+
enabled.
214+
* When ``--enable-ldms-mod`` is set but not ``--with-ldms=DIR``, Darshan
215+
will search for the LDMS installation location available on the system.
214216
* To collect runtime I/O information from Darshan, you will need to
215217
configure, initialize, and connect to an LDMS streams daemon. For
216218
detailed instructions please visit

maint/config/check_ldms.m4

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,5 @@
11
AC_DEFUN([CHECK_LDMS],
22
[
3-
AC_ARG_WITH([ldms],
4-
[ --with-ldms=DIR Root directory path of LDMS installation (defaults to
5-
to /usr/local or /usr if not found in /usr/local)],
6-
[if test -d "$withval"; then
7-
LDMS_HOME="$withval"
8-
LDFLAGS="$LDFLAGS -L${LDMS_HOME}/lib -Wl,-rpath=${LDMS_HOME}/lib"
9-
CPPFLAGS="$CPPFLAGS -I${LDMS_HOME}/include"
10-
__DARSHAN_LDMS_LINK_FLAGS="-L${LDMS_HOME}/lib"
11-
__DARSHAN_LDMS_INCLUDE_FLAGS="-I${LDMS_HOME}/include"
12-
else
13-
AC_MSG_ERROR([LDMS installation path is required])
14-
fi])
15-
163
AC_CHECK_HEADERS([ldms/ldms.h ldms/ldmsd_stream.h ovis_json/ovis_json.h ovis_util/util.h],
174
[ldms_found_stream_headers=yes],
185
[AC_MSG_ERROR([One or more LDMS headers not found. Please check installation path or LDMS version > 4.3.4])])

0 commit comments

Comments
 (0)