Ensure we don't get trapped in an infinite loop when ranking bynode if something isn't right
This commit was SVN r26948.
Этот коммит содержится в:
родитель
0d878937fe
Коммит
96f6f94c24
@ -408,14 +408,16 @@ int orte_rmaps_base_compute_vpids(orte_job_t *jdata,
|
|||||||
orte_proc_t *proc;
|
orte_proc_t *proc;
|
||||||
int rc;
|
int rc;
|
||||||
opal_list_item_t *item;
|
opal_list_item_t *item;
|
||||||
|
bool one_found;
|
||||||
|
|
||||||
map = jdata->map;
|
map = jdata->map;
|
||||||
|
|
||||||
if (ORTE_RANK_BY_NODE == ORTE_GET_RANKING_POLICY(map->ranking) ||
|
if (ORTE_RANK_BY_NODE == ORTE_GET_RANKING_POLICY(map->ranking) ||
|
||||||
ORTE_RANK_BY_BOARD == ORTE_GET_RANKING_POLICY(map->ranking)) {
|
ORTE_RANK_BY_BOARD == ORTE_GET_RANKING_POLICY(map->ranking)) {
|
||||||
opal_output_verbose(5, orte_rmaps_base.rmaps_output,
|
opal_output_verbose(5, orte_rmaps_base.rmaps_output,
|
||||||
"mca:rmaps:base: computing vpids by node for job %s",
|
"mca:rmaps:base: computing vpids by node for job %s app %d on %d nodes",
|
||||||
ORTE_JOBID_PRINT(jdata->jobid));
|
ORTE_JOBID_PRINT(jdata->jobid), (int)app->idx,
|
||||||
|
(int)opal_list_get_size(nodes));
|
||||||
/* bozo check */
|
/* bozo check */
|
||||||
if (0 == opal_list_get_size(nodes)) {
|
if (0 == opal_list_get_size(nodes)) {
|
||||||
ORTE_ERROR_LOG(ORTE_ERR_BAD_PARAM);
|
ORTE_ERROR_LOG(ORTE_ERR_BAD_PARAM);
|
||||||
@ -426,7 +428,9 @@ int orte_rmaps_base_compute_vpids(orte_job_t *jdata,
|
|||||||
*/
|
*/
|
||||||
cnt=0;
|
cnt=0;
|
||||||
vpid=jdata->num_procs;
|
vpid=jdata->num_procs;
|
||||||
while (cnt < app->num_procs) {
|
one_found = true;
|
||||||
|
while (cnt < app->num_procs && one_found) {
|
||||||
|
one_found = false;
|
||||||
for (item = opal_list_get_first(nodes);
|
for (item = opal_list_get_first(nodes);
|
||||||
item != opal_list_get_end(nodes);
|
item != opal_list_get_end(nodes);
|
||||||
item = opal_list_get_next(item)) {
|
item = opal_list_get_next(item)) {
|
||||||
@ -456,6 +460,7 @@ int orte_rmaps_base_compute_vpids(orte_job_t *jdata,
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
cnt++;
|
cnt++;
|
||||||
|
one_found = true;
|
||||||
/* track where the highest vpid landed - this is our
|
/* track where the highest vpid landed - this is our
|
||||||
* new bookmark
|
* new bookmark
|
||||||
*/
|
*/
|
||||||
@ -464,6 +469,9 @@ int orte_rmaps_base_compute_vpids(orte_job_t *jdata,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (cnt < app->num_procs) {
|
||||||
|
return ORTE_ERR_FATAL;
|
||||||
|
}
|
||||||
return ORTE_SUCCESS;
|
return ORTE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user