From 8d7541f766dfa00768a8bf797437fd37fdde9262 Mon Sep 17 00:00:00 2001 From: Gilles Gouaillardet Date: Wed, 5 Apr 2017 11:07:07 +0900 Subject: [PATCH 1/2] hwloc: disable nvml is CUDA support is not built in Open MPI Signed-off-by: Gilles Gouaillardet --- opal/mca/hwloc/hwloc1116/configure.m4 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/opal/mca/hwloc/hwloc1116/configure.m4 b/opal/mca/hwloc/hwloc1116/configure.m4 index bea6327d89..33d62774e0 100644 --- a/opal/mca/hwloc/hwloc1116/configure.m4 +++ b/opal/mca/hwloc/hwloc1116/configure.m4 @@ -111,6 +111,10 @@ AC_DEFUN([MCA_opal_hwloc_hwloc1116_CONFIG],[ enable_libxml2=no enable_xml=yes + # Disable NVML support if CUDA support is not built + AS_IF([test "$opal_check_cuda_happy" != "yes"], + [enable_nvml=no]) + # hwloc checks for compiler visibility, and its needs to do # this without "picky" flags. opal_hwloc_hwloc1116_save_cflags=$CFLAGS From 10ea991d0a35f8315efbd32bcf639f762a98944f Mon Sep 17 00:00:00 2001 From: Gilles Gouaillardet Date: Wed, 5 Apr 2017 11:46:22 +0900 Subject: [PATCH 2/2] hwloc: add CUDA include dir to CPPFLAGS so hwloc configury can find nvml.h when CUDA support is built Signed-off-by: Gilles Gouaillardet --- opal/mca/hwloc/hwloc1116/configure.m4 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/opal/mca/hwloc/hwloc1116/configure.m4 b/opal/mca/hwloc/hwloc1116/configure.m4 index 33d62774e0..de1ff24ac3 100644 --- a/opal/mca/hwloc/hwloc1116/configure.m4 +++ b/opal/mca/hwloc/hwloc1116/configure.m4 @@ -119,6 +119,9 @@ AC_DEFUN([MCA_opal_hwloc_hwloc1116_CONFIG],[ # this without "picky" flags. opal_hwloc_hwloc1116_save_cflags=$CFLAGS CFLAGS=$OPAL_CFLAGS_BEFORE_PICKY + AS_IF([test -n "$opal_datatype_cuda_CPPFLAGS"], + [CPPFLAGS="$CPPFLAGS $opal_datatype_cuda_CPPFLAGS"]) + HWLOC_SETUP_CORE([opal/mca/hwloc/hwloc1116/hwloc], [AC_MSG_CHECKING([whether hwloc configure succeeded]) AC_MSG_RESULT([yes])