From 4e32a826389d719553ee34f42af0a2d6dbe23be2 Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Sun, 9 Feb 2014 16:14:38 +0000 Subject: [PATCH] If we are binding to hwthreads, then we need to treat hwthreads as cpus to get the mapping right cmr=v1.7.5:reviewer=jsquyres:subject=set hwthreads to cpus when binding to them This commit was SVN r30648. --- opal/mca/hwloc/base/hwloc_base_frame.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/opal/mca/hwloc/base/hwloc_base_frame.c b/opal/mca/hwloc/base/hwloc_base_frame.c index f4da49a981..f82c9dbfb8 100644 --- a/opal/mca/hwloc/base/hwloc_base_frame.c +++ b/opal/mca/hwloc/base/hwloc_base_frame.c @@ -1,6 +1,6 @@ /* * Copyright (c) 2011-2014 Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2013 Intel, Inc. All rights reserved. + * Copyright (c) 2013-2014 Intel, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -243,6 +243,11 @@ static int opal_hwloc_base_open(mca_base_open_flag_t flags) } } + /* if we are binding to hwthreads, then we must use hwthreads as cpus */ + if (OPAL_GET_BINDING_POLICY(opal_hwloc_binding_policy) == OPAL_BIND_TO_HWTHREAD) { + opal_hwloc_use_hwthreads_as_cpus = true; + } + /* to support tools such as ompi_info, add the components * to a list */