From 3867bd3640a785d2f427e16bcbbc5c73e00fd4cf Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Wed, 1 Jun 2016 06:57:14 -0700 Subject: [PATCH 1/2] hwloc.m4: only check for valgrind in non-embedded mode This fixes https://github.com/open-mpi/ompi/issues/1732: i.e., the case where the outer project has its own check for , but also supplements CPPFLAGS (to find Valgrind's header files) before doing that check. Signed-off-by: Jeff Squyres Ideally, we would tell OMPI to disable autoconf's caching of our valgrind check result so that its check gets the right result after adding CPPFLAGS. Not sure if we can do that. For now, just disable our Valgrind code in embedded mode. This will keep the x86 backend enabled under Valgrind but it will auto-disable itself when finding identical APIC ids anyway (because CPUID returns same outputs for all PUs). Signed-off-by: Brice Goglin Fixes open-mpi/ompi#1732 (cherry picked from commit open-mpi/hwloc@8b44fb1c812d01582887548c2fc28ee78255619d) --- opal/mca/hwloc/hwloc1113/hwloc/config/hwloc.m4 | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/opal/mca/hwloc/hwloc1113/hwloc/config/hwloc.m4 b/opal/mca/hwloc/hwloc1113/hwloc/config/hwloc.m4 index 13eb7dd1cc..b6970f6c2e 100644 --- a/opal/mca/hwloc/hwloc1113/hwloc/config/hwloc.m4 +++ b/opal/mca/hwloc/hwloc1113/hwloc/config/hwloc.m4 @@ -9,7 +9,7 @@ dnl Copyright © 2004-2012 The Regents of the University of California. dnl All rights reserved. dnl Copyright © 2004-2008 High Performance Computing Center Stuttgart, dnl University of Stuttgart. All rights reserved. -dnl Copyright © 2006-2015 Cisco Systems, Inc. All rights reserved. +dnl Copyright © 2006-2016 Cisco Systems, Inc. All rights reserved. dnl Copyright © 2012 Blue Brain Project, BBP/EPFL. All rights reserved. dnl Copyright © 2012 Oracle and/or its affiliates. All rights reserved. dnl See COPYING in top-level directory. @@ -671,8 +671,17 @@ EOF]) AC_CHECK_HEADERS([sys/utsname.h]) AC_CHECK_FUNCS([uname]) - AC_CHECK_HEADERS([valgrind/valgrind.h]) - AC_CHECK_DECLS([RUNNING_ON_VALGRIND],,[:],[[#include ]]) + dnl Don't check for valgrind in embedded mode because this may conflict + dnl with the embedder projects also checking for it. + dnl We only use Valgrind to nicely disable the x86 backend with a warning, + dnl but we can live without it in embedded mode (it auto-disables itself + dnl because of invalid CPUID outputs). + dnl Non-embedded checks usually go to hwloc_internal.m4 but this one is + dnl is really for the core library. + AS_IF([test "$hwloc_mode" != "embedded"], + [AC_CHECK_HEADERS([valgrind/valgrind.h]) + AC_CHECK_DECLS([RUNNING_ON_VALGRIND],,[:],[[#include ]]) + ]) AC_CHECK_HEADERS([pthread_np.h]) AC_CHECK_DECLS([pthread_setaffinity_np],,[:],[[ From d175fd692dd0752bbd126711217e46f071cbb453 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Wed, 1 Jun 2016 06:58:13 -0700 Subject: [PATCH 2/2] README.ompi: track patches added to hwloc Track post-v1.11.3-release patches applied to the hwloc copy embedded in Open MPI. Signed-off-by: Jeff Squyres --- opal/mca/hwloc/hwloc1113/README-ompi.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/opal/mca/hwloc/hwloc1113/README-ompi.txt b/opal/mca/hwloc/hwloc1113/README-ompi.txt index 1de58d8983..6aea451342 100644 --- a/opal/mca/hwloc/hwloc1113/README-ompi.txt +++ b/opal/mca/hwloc/hwloc1113/README-ompi.txt @@ -2,3 +2,4 @@ Cherry-picked commits after 1.11.3: open-mpi/hwloc@9549fd59af04dca2e2340e17f0e685f8c552d818 open-mpi/hwloc@0ab7af5e90fc2b58be30b2126cc2a73f9f7ecfe9 +open-mpi/hwloc@8b44fb1c812d01582887548c2fc28ee78255619