[m-rev.] for review: Disable detection of libhwloc by default.
Peter Wang
novalazy at gmail.com
Thu May 17 13:25:10 AEST 2018
libhwloc is only used to support thread pinning in low-level C grades,
an experimental (and IMHO dubious) feature that needs to be manually
enabled via MERCURY_OPTIONS. On Linux, we also support thread pinning
without libhwloc. In fact, when I tested it, thread pinning ONLY works
without using libhwloc, so some code has probably bit-rotted.
configure.ac:
Disable detection of libhwloc by default so we don't try to use it
just because it happens to be installed.
---
configure.ac | 20 +++++++-------------
1 file changed, 7 insertions(+), 13 deletions(-)
diff --git a/configure.ac b/configure.ac
index f7f2eb77f..012033607 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5201,43 +5201,37 @@ AC_SUBST(USE_MSVCRT)
#
# Check for readline
#
MERCURY_CHECK_READLINE
#-----------------------------------------------------------------------------#
#
# Check for libhwloc, http://www.open-mpi.org/projects/hwloc/
#
+
PKG_PROG_PKG_CONFIG
AC_ARG_WITH([hwloc],
- [AS_HELP_STRING([--without-hwloc],
- [Do not use libhwloc to detect the processors available.])],
- [],
- [with_hwloc=check])
+ AS_HELP_STRING([--with-hwloc],
+ [Use libhwloc in support of thread pinning (developers only)]),
+ [with_hwloc="$withval"],
+ [with_hwloc="no"])
-if test "$with_hwloc" != "no"; then
+if test "$with_hwloc" = "yes"
+then
PKG_CHECK_MODULES(libhwloc, hwloc >= 1.1,
[
AC_DEFINE(MR_HAVE_HWLOC)
hwloc_static_libs="`pkg-config --libs --static hwloc`"
],
[
- case "$LIBGRADES" in
- $BEST_LLDS_BASE_GRADE.par.gc*)
- MERCURY_MSG(["Warning: libhwloc not found, thread pinning in"])
- MERCURY_MSG(["low-level C parallel grades may be less accurate."])
- ;;
- *)
- ;;
- esac
hwloc_static_libs=""
])
else
libhwloc_LIBS=""
libhwloc_CFLAGS=""
hwloc_static_libs=""
fi
HWLOC_LIBS="$libhwloc_LIBS"
HWLOC_CFLAGS="$libhwloc_CFLAGS"
--
2.17.0
More information about the reviews
mailing list