From 58a9aeff5ac845f84f6a25a6e681e0ba5e7d9b9e Mon Sep 17 00:00:00 2001 From: Brad Benton Date: Fri, 2 Apr 2010 18:24:12 +0000 Subject: [PATCH] ================================================================================ modify the OPAL_PAFFINITY_PROCESS_IS_BOUND macro to search the cpuset for the maximum possible number of cpus rather than just the number of cpus currently online. This corrects a problem where mpi_paffinity_alone was not working properly on systems in which there can be cpu namespaces with holes, such as on ppc64 with smt off (as discussed in #2365). This commit was SVN r22927. --- opal/mca/paffinity/paffinity.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/opal/mca/paffinity/paffinity.h b/opal/mca/paffinity/paffinity.h index 87205e9f98..00f86a07a1 100644 --- a/opal/mca/paffinity/paffinity.h +++ b/opal/mca/paffinity/paffinity.h @@ -11,6 +11,7 @@ * All rights reserved. * Copyright (c) 2007 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved. + * Copyright (c) 2010 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -206,7 +207,7 @@ typedef struct opal_paffinity_base_cpu_set_t { if (OPAL_SUCCESS == \ opal_paffinity_base_get_processor_info(&num_processors)) {\ num_bound = 0; \ - for (i = 0; i < num_processors; i++) { \ + for (i = 0; i < OPAL_PAFFINITY_BITMASK_CPU_MAX; i++) { \ if (OPAL_PAFFINITY_CPU_ISSET(i, (cpuset))) { \ num_bound++; \ } \