diff --git a/orte/mca/ras/base/ras_base_node.c b/orte/mca/ras/base/ras_base_node.c index df95b3650c..78f35fc144 100644 --- a/orte/mca/ras/base/ras_base_node.c +++ b/orte/mca/ras/base/ras_base_node.c @@ -9,7 +9,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2011 Los Alamos National Security, LLC. All rights + * Copyright (c) 2011-2012 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ * @@ -91,7 +91,7 @@ int orte_ras_base_node_insert(opal_list_t* nodes, orte_job_t *jdata) /* get the hnp node's info */ hnp_node = (orte_node_t*)opal_pointer_array_get_item(orte_node_pool, 0); - + /* cycle through the list */ while (NULL != (item = opal_list_remove_first(nodes))) { node = (orte_node_t*)item; @@ -109,20 +109,15 @@ int orte_ras_base_node_insert(opal_list_t* nodes, orte_job_t *jdata) ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), node->name, (long)node->slots)); - + /* flag that hnp has been allocated */ orte_hnp_is_allocated = true; - /* adjust the total slots in the job - note - * that the HNP ess module will not have entered - * a value for its slots, so that will be zero. - * Thus, this only has impact if we re-allocate - */ - orte_ras_base.total_slots_alloc -= hnp_node->slots; + /* update the total slots in the job */ + orte_ras_base.total_slots_alloc += node->slots; /* copy the allocation data to that node's info */ - hnp_node->slots = node->slots; + hnp_node->slots += node->slots; hnp_node->slots_max = node->slots_max; hnp_node->launch_id = node->launch_id; - hnp_node->slots = node->slots; if (orte_managed_allocation) { /* the slots are always treated as sacred * in managed allocations @@ -152,8 +147,6 @@ int orte_ras_base_node_insert(opal_list_t* nodes, orte_job_t *jdata) } } } - /* update the total slots in the job */ - orte_ras_base.total_slots_alloc += hnp_node->slots; /* don't keep duplicate copy */ OBJ_RELEASE(node); } else {