Skip to content

Commit 2631789

Browse files
authored
Merge pull request #4934 from bgoglin/3.1.x-error-hwloc2
hwloc: bring back the configure error when external hwloc is >= 2.0
2 parents a066522 + 9eb37be commit 2631789

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)