From 165f4b01c69296c4d49a110f6a8f537917911e6c Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Fri, 28 Jan 2022 12:19:25 -0800 Subject: [PATCH] Protect against HWLOC issues Blacklist all HWLOC releases 2.5.0 and above Signed-off-by: Ralph Castain --- config/prte_setup_hwloc.m4 | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/config/prte_setup_hwloc.m4 b/config/prte_setup_hwloc.m4 index 1f462ce93f..1c2bb27f96 100644 --- a/config/prte_setup_hwloc.m4 +++ b/config/prte_setup_hwloc.m4 @@ -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$ @@ -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 ]], + [[ + #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 ]],