From 37064ad23236f88b31d5398837ca17a4c8e9909c Mon Sep 17 00:00:00 2001 From: Gilles Gouaillardet Date: Tue, 26 Jan 2016 18:09:00 +0900 Subject: [PATCH] hwloc: have opal_hwloc_base_get_pu search for HWLOC_OBJ_PU when mpirun is invoked with --use-hwthread-cpus Fixes open-mpi/ompi#1247 (cherry picked from commit open-mpi/ompi@6d149554a7cc4259fd6a4e885f4206f967a0ad4f) --- opal/mca/hwloc/base/hwloc_base_util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opal/mca/hwloc/base/hwloc_base_util.c b/opal/mca/hwloc/base/hwloc_base_util.c index cd429eeb00..a86b276672 100644 --- a/opal/mca/hwloc/base/hwloc_base_util.c +++ b/opal/mca/hwloc/base/hwloc_base_util.c @@ -14,7 +14,7 @@ * Copyright (c) 2012-2015 Los Alamos National Security, LLC. * All rights reserved. * Copyright (c) 2013-2014 Intel, Inc. All rights reserved. - * Copyright (c) 2015 Research Organization for Information Science + * Copyright (c) 2015-2016 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * @@ -71,7 +71,7 @@ hwloc_obj_t opal_hwloc_base_get_pu(hwloc_topology_t topo, So first we have to see if we can find *any* cores by looking for the 0th core. If we find it, then try to find the Nth core. Otherwise, try to find the Nth PU. */ - if (NULL == hwloc_get_obj_by_type(topo, HWLOC_OBJ_CORE, 0)) { + if (opal_hwloc_use_hwthreads_as_cpus || (NULL == hwloc_get_obj_by_type(topo, HWLOC_OBJ_CORE, 0))) { obj_type = HWLOC_OBJ_PU; }