Open MPI logo

Network Locality Devel Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Network Locality Devel mailing list

Subject: [netloc-devel] PATCH: check for minimum hwloc version
From: Jeff Squyres (jsquyres) (jsquyres_at_[hidden])
Date: 2013-12-06 07:49:18

What do you guys think of this? It just checks for a minimum version number for hwloc (the display of the patch got cutoff in the AC_MSG_WARN... the rest of the message is actually there in the real code):

diff --git a/ b/
index 898f682..8ba08b3 100644
--- a/
+++ b/
@@ -220,6 +220,22 @@ AS_IF([test "$hwloc_happy" = "0"],
        AC_MSG_ERROR([Cannot continue])])
+AC_MSG_CHECKING([for hwloc version >= 1.4.2])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <hwloc.h>]],
+ [[
+#if HWLOC_API_VERSION <= 0x00010400
+#error "HWLOC_API_VERSION is less than 0x00010400"
+ ]])],
+ [hwloc_happy=1
+ AC_MSG_RESULT([yes])],
+ [AC_MSG_RESULT([no])])
+AS_IF([test $hwloc_happy -eq 0],
+ [AC_MSG_WARN([Your version of hwloc is too old])
+ AC_MSG_WARN([Please upgrade, and/or point to a newer version via --with-h
+ AC_MSG_ERROR([Cannot continue])])
 AC_CHECK_LIB([hwloc], [hwloc_topology_init], [hwloc_happy=1])
 AS_IF([test "$hwloc_happy" = "0"],
       [AC_MSG_WARN([Cannot find libhwloc])

Jeff Squyres
For corporate legal information go to: