Fix a double-free when tree-spawning
Fix the round-robin mapper so it doesn't move to the next node just because it completed mapping an app_context This commit was SVN r18344.
Этот коммит содержится в:
родитель
a1e5139b8f
Коммит
1766442591
@ -764,12 +764,11 @@ static int construct_daemonmap(opal_buffer_t *data)
|
||||
ORTE_ERROR_LOG(rc);
|
||||
return rc;
|
||||
}
|
||||
/* unpack the nodemap */
|
||||
/* unpack the nodemap - this will free the bytes in bo */
|
||||
if (ORTE_SUCCESS != (rc = orte_util_decode_nodemap(bo, &orte_daemonmap))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
return rc;
|
||||
}
|
||||
free(bo->bytes);
|
||||
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
@ -229,11 +229,15 @@ static int map_app_by_slot(
|
||||
/* Update the number of procs allocated */
|
||||
++num_alloc;
|
||||
|
||||
/** if all the procs have been mapped OR we have fully used up this node
|
||||
/** if all the procs have been mapped, we return */
|
||||
if (num_alloc == app->num_procs) {
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
||||
/* if we have fully used up this node
|
||||
* OR we are at our ppn and loadbalancing, then break from the loop
|
||||
*/
|
||||
if (num_alloc == app->num_procs ||
|
||||
ORTE_ERR_NODE_FULLY_USED == rc ||
|
||||
if (ORTE_ERR_NODE_FULLY_USED == rc ||
|
||||
(orte_rmaps_base.loadbalance && i == ppn)) {
|
||||
break;
|
||||
}
|
||||
@ -246,7 +250,7 @@ static int map_app_by_slot(
|
||||
*/
|
||||
if (i < (num_slots_to_take-1) &&
|
||||
ORTE_ERR_NODE_FULLY_USED != rc &&
|
||||
i != ppn) {
|
||||
(orte_rmaps_base.loadbalance && i != ppn)) {
|
||||
continue;
|
||||
}
|
||||
cur_node_item = next;
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user