1
1

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.
Этот коммит содержится в:
Ralph Castain 2008-05-01 14:49:56 +00:00
родитель a1e5139b8f
Коммит 1766442591
2 изменённых файлов: 9 добавлений и 6 удалений

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

@ -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;