Skip to content

Commit

Permalink
Merge pull request #1185 from rhc54/topic/hwl
Browse files Browse the repository at this point in the history
Protect against HWLOC issues
  • Loading branch information
rhc54 authored Jan 28, 2022
2 parents 900b67a + 165f4b0 commit e041940
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion config/prte_setup_hwloc.m4
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Copyright (c) 2009-2020 Cisco Systems, Inc. All rights reserved
# Copyright (c) 2013 Los Alamos National Security, LLC. All rights reserved.
# Copyright (c) 2013-2020 Intel, Inc. All rights reserved.
# Copyright (c) 2021 Nanook Consulting. All rights reserved.
# Copyright (c) 2021-2022 Nanook Consulting. All rights reserved.
# Copyright (c) 2021 Amazon.com, Inc. or its affiliates.
# All Rights reserved.
# $COPYRIGHT$
Expand Down Expand Up @@ -94,6 +94,26 @@ AC_DEFUN([PRTE_SETUP_HWLOC],[
PRTE_FLAGS_PREPEND_UNIQ([LDFLAGS], [$prte_hwloc_LDFLAGS])
PRTE_FLAGS_PREPEND_UNIQ([LIBS], [$prte_hwloc_LIBS])

AC_MSG_CHECKING([if hwloc version is 2.5 or greater])
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([[#include <hwloc.h>]],
[[
#if HWLOC_API_VERSION < 0x00020500
#error "hwloc API version is less than 0x00020500"
#endif
]])],
[AC_MSG_RESULT([yes])
AC_MSG_WARN([***********************************************************])
AC_MSG_WARN([PRRTE is not compatible with HWLOC versions 2.5.0 or greater])
AC_MSG_WARN([due to a bug in HWLOC's setting of environmental variables])
AC_MSG_WARN([and due to introduction of dependency on third-party libraries.])
AC_MSG_WARN([It is unclear when these issues will be resolved in new HWLOC.])
AC_MSG_WARN([Support for future releases will resume once that has occurred.])
AC_MSG_WARN([For now, please downgrade the HWLOC installation to v2.4.x or])
AC_MSG_WARN([earlier.])
AC_MSG_WARN([***********************************************************])
AC_MSG_ERROR([Cannot continue])])
AC_MSG_CHECKING([if hwloc version is 1.5 or greater])
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([[#include <hwloc.h>]],
Expand Down

0 comments on commit e041940

Please sign in to comment.