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 <valgrind/valgrind.h>, but also supplements CPPFLAGS (to find Valgrind's header files) before doing that check. Signed-off-by: Jeff Squyres <jsquyres@cisco.com> 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 <Brice.Goglin@inria.fr> Fixes open-mpi/ompi#1732 (cherry picked from commit open-mpi/hwloc@8b44fb1c81)
Этот коммит содержится в:
родитель
57978a75d0
Коммит
3867bd3640
@ -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 <valgrind/valgrind.h>]])
|
||||
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 <valgrind/valgrind.h>]])
|
||||
])
|
||||
|
||||
AC_CHECK_HEADERS([pthread_np.h])
|
||||
AC_CHECK_DECLS([pthread_setaffinity_np],,[:],[[
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user