From 9e7f621a98e78b9c0edef5574fa08595dccbe7be Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Sun, 7 Mar 2010 18:44:22 +0000 Subject: [PATCH] Port Brad's paffinity change to the 1.4 branch over to the trunk so we don't lose it going forward. This commit was SVN r22794. --- orte/mca/odls/default/odls_default_module.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/orte/mca/odls/default/odls_default_module.c b/orte/mca/odls/default/odls_default_module.c index 6b3d1ae648..f395d349a4 100644 --- a/orte/mca/odls/default/odls_default_module.c +++ b/orte/mca/odls/default/odls_default_module.c @@ -12,6 +12,7 @@ * Copyright (c) 2007-2009 Sun Microsystems, Inc. All rights reserved. * Copyright (c) 2007 Evergrid, Inc. All rights reserved. * Copyright (c) 2008-2010 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2010 IBM Corporation. All rights reserved. * * $COPYRIGHT$ * @@ -510,14 +511,14 @@ static int odls_default_fork_local_proc(orte_app_context_t* context, * against our available cores */ ncpu = 0; - for (i=0; i < orte_odls_globals.num_processors && ncpu <= logical_cpu; i++) { + for (i=0; i < OPAL_PAFFINITY_BITMASK_CPU_MAX && ncpu <= logical_cpu; i++) { if (OPAL_PAFFINITY_CPU_ISSET(i, orte_odls_globals.my_cores)) { ncpu++; phys_cpu = i; } } /* if we don't have enough processors, that is an error */ - if (ncpu < logical_cpu) { + if (ncpu <= logical_cpu) { ORTE_ODLS_IF_BIND_NOT_REQD("bind-to-core"); orte_show_help("help-odls-default.txt", "odls-default:not-enough-resources", true,