Skip to content

Commit 9eb37be

Browse files
committed
hwloc: bring back the configure error when external hwloc is >= 2.0
We'll remove this when/if hwloc 2.0 support ever comes back to this branch. Right now we have 1.11.7 internal (since bd9a568) and the OMPI side of the code only supports a non-final version of hwloc 2.0 API. This is partial revert of 60aa9cf (only the configure part of it) which added support for that non-final version of the hwloc 2.0 API. Signed-off-by: Brice Goglin <[email protected]>
1 parent 7848d55 commit 9eb37be

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

opal/mca/hwloc/external/configure.m4

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,21 @@ AC_DEFUN([MCA_opal_hwloc_external_CONFIG],[
184184
[AC_MSG_RESULT([yes])],
185185
[AC_MSG_RESULT([no])
186186
AC_MSG_ERROR([Cannot continue])])
187-
187+
AC_MSG_CHECKING([if external hwloc version is lower than 2.0])
188+
AS_IF([test "$opal_hwloc_dir" != ""],
189+
[opal_hwloc_external_CFLAGS_save=$CFLAGS
190+
CFLAGS="-I$opal_hwloc_dir/include $opal_hwloc_external_CFLAGS_save"])
191+
AC_COMPILE_IFELSE(
192+
[AC_LANG_PROGRAM([[#include <hwloc.h>]],
193+
[[
194+
#if HWLOC_API_VERSION >= 0x00020000
195+
#error "hwloc API version is greater or equal than 0x00020000"
196+
#endif
197+
]])],
198+
[AC_MSG_RESULT([yes])],
199+
[AC_MSG_RESULT([no])
200+
AC_MSG_ERROR([OMPI does not currently support hwloc v2 API
201+
Cannot continue])])
188202
AS_IF([test "$opal_hwloc_dir" != ""],
189203
[CFLAGS=$opal_hwloc_external_CFLAGS_save])
190204

0 commit comments

Comments
 (0)