Skip to content

Commit b20a219

Browse files
committed
hwloc/external: abort if hwloc v2 is detected since it is not yet supported
1 parent 0ca1ee5 commit b20a219

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

opal/mca/hwloc/external/configure.m4

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,21 @@ AC_DEFUN([MCA_opal_hwloc_external_CONFIG],[
181181
[AC_MSG_RESULT([yes])],
182182
[AC_MSG_RESULT([no])
183183
AC_MSG_ERROR([Cannot continue])])
184+
AC_MSG_CHECKING([if external hwloc version is lower than 2.0])
185+
AS_IF([test "$opal_hwloc_dir" != ""],
186+
[opal_hwloc_external_CFLAGS_save=$CFLAGS
187+
CFLAGS="-I$opal_hwloc_dir/include $opal_hwloc_external_CFLAGS_save"])
188+
AC_COMPILE_IFELSE(
189+
[AC_LANG_PROGRAM([[#include <hwloc.h>]],
190+
[[
191+
#if HWLOC_API_VERSION >= 0x00020000
192+
#error "hwloc API version is greater or equal than 0x00020000"
193+
#endif
194+
]])],
195+
[AC_MSG_RESULT([yes])],
196+
[AC_MSG_RESULT([no])
197+
AC_MSG_ERROR([OMPI does not currently support hwloc v2 API
198+
Cannot continue])])
184199
AS_IF([test "$opal_hwloc_dir" != ""],
185200
[CFLAGS=$opal_hwloc_external_CFLAGS_save])
186201
$1],

0 commit comments

Comments
 (0)