1
1
Fix bug reported by FreyGuy19713: in cases where HNP node has multiple entries in a hostfile or other allocation, we need to track the total slots allocated to that node.

This commit was SVN r27673.

The following Trac tickets were found above:
  Ticket 3429 --> https://svn.open-mpi.org/trac/ompi/ticket/3429
Этот коммит содержится в:
Ralph Castain 2012-12-14 17:00:44 +00:00
родитель c5b0bcd9f7
Коммит 2fdd367aa9

Просмотреть файл

@ -9,7 +9,7 @@
* University of Stuttgart. All rights reserved. * University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California. * Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved. * 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. * reserved.
* $COPYRIGHT$ * $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 */ /* get the hnp node's info */
hnp_node = (orte_node_t*)opal_pointer_array_get_item(orte_node_pool, 0); hnp_node = (orte_node_t*)opal_pointer_array_get_item(orte_node_pool, 0);
/* cycle through the list */ /* cycle through the list */
while (NULL != (item = opal_list_remove_first(nodes))) { while (NULL != (item = opal_list_remove_first(nodes))) {
node = (orte_node_t*)item; 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), ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
node->name, node->name,
(long)node->slots)); (long)node->slots));
/* flag that hnp has been allocated */ /* flag that hnp has been allocated */
orte_hnp_is_allocated = true; orte_hnp_is_allocated = true;
/* adjust the total slots in the job - note /* update the total slots in the job */
* that the HNP ess module will not have entered orte_ras_base.total_slots_alloc += node->slots;
* 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;
/* copy the allocation data to that node's info */ /* 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->slots_max = node->slots_max;
hnp_node->launch_id = node->launch_id; hnp_node->launch_id = node->launch_id;
hnp_node->slots = node->slots;
if (orte_managed_allocation) { if (orte_managed_allocation) {
/* the slots are always treated as sacred /* the slots are always treated as sacred
* in managed allocations * 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 */ /* don't keep duplicate copy */
OBJ_RELEASE(node); OBJ_RELEASE(node);
} else { } else {