Track the app_context rank - will equal overall rank for single app_context jobs
This commit was SVN r24778.
Этот коммит содержится в:
родитель
4fec0c198d
Коммит
7f2d2e3de7
@ -614,7 +614,8 @@ int orte_rmaps_base_compute_local_ranks(orte_job_t *jdata)
|
|||||||
orte_vpid_t minv, minv2;
|
orte_vpid_t minv, minv2;
|
||||||
orte_local_rank_t local_rank;
|
orte_local_rank_t local_rank;
|
||||||
orte_job_map_t *map;
|
orte_job_map_t *map;
|
||||||
|
orte_app_context_t *app;
|
||||||
|
|
||||||
OPAL_OUTPUT_VERBOSE((5, orte_rmaps_base.rmaps_output,
|
OPAL_OUTPUT_VERBOSE((5, orte_rmaps_base.rmaps_output,
|
||||||
"%s rmaps:base:compute_usage",
|
"%s rmaps:base:compute_usage",
|
||||||
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME)));
|
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME)));
|
||||||
@ -684,6 +685,24 @@ int orte_rmaps_base_compute_local_ranks(orte_job_t *jdata)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* compute app_rank */
|
||||||
|
for (i=0; i < jdata->apps->size; i++) {
|
||||||
|
if (NULL == (app = (orte_app_context_t*)opal_pointer_array_get_item(jdata->apps, i))) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
k=0;
|
||||||
|
/* loop thru all procs in job to find those from this app_context */
|
||||||
|
for (j=0; j < jdata->procs->size; j++) {
|
||||||
|
if (NULL == (proc = (orte_proc_t*)opal_pointer_array_get_item(jdata->procs, j))) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (proc->app_idx != app->idx) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
proc->app_rank = k++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return ORTE_SUCCESS;
|
return ORTE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -497,8 +497,8 @@ int orte_dt_print_proc(char **output, char *prefix, orte_proc_t *src, opal_data_
|
|||||||
|
|
||||||
asprintf(&tmp, "\n%sData for proc: %s", pfx2, ORTE_NAME_PRINT(&src->name));
|
asprintf(&tmp, "\n%sData for proc: %s", pfx2, ORTE_NAME_PRINT(&src->name));
|
||||||
|
|
||||||
asprintf(&tmp2, "%s\n%s\tPid: %ld\tLocal rank: %lu\tNode rank: %lu", tmp, pfx2,
|
asprintf(&tmp2, "%s\n%s\tPid: %ld\tLocal rank: %lu\tNode rank: %lu\tApp rank: %d", tmp, pfx2,
|
||||||
(long)src->pid, (unsigned long)src->local_rank, (unsigned long)src->node_rank);
|
(long)src->pid, (unsigned long)src->local_rank, (unsigned long)src->node_rank, src->app_rank);
|
||||||
free(tmp);
|
free(tmp);
|
||||||
tmp = tmp2;
|
tmp = tmp2;
|
||||||
|
|
||||||
|
@ -887,6 +887,7 @@ static void orte_proc_construct(orte_proc_t* proc)
|
|||||||
proc->pid = 0;
|
proc->pid = 0;
|
||||||
proc->local_rank = ORTE_LOCAL_RANK_INVALID;
|
proc->local_rank = ORTE_LOCAL_RANK_INVALID;
|
||||||
proc->node_rank = ORTE_NODE_RANK_INVALID;
|
proc->node_rank = ORTE_NODE_RANK_INVALID;
|
||||||
|
proc->app_rank = -1;
|
||||||
proc->last_errmgr_state = ORTE_PROC_STATE_UNDEF;
|
proc->last_errmgr_state = ORTE_PROC_STATE_UNDEF;
|
||||||
proc->state = ORTE_PROC_STATE_UNDEF;
|
proc->state = ORTE_PROC_STATE_UNDEF;
|
||||||
proc->app_idx = 0;
|
proc->app_idx = 0;
|
||||||
|
@ -460,6 +460,11 @@ struct orte_proc_t {
|
|||||||
* know which static IP port to use
|
* know which static IP port to use
|
||||||
*/
|
*/
|
||||||
orte_node_rank_t node_rank;
|
orte_node_rank_t node_rank;
|
||||||
|
/* rank of this proc within its app context - this
|
||||||
|
* will just equal its vpid for single app_context
|
||||||
|
* applications
|
||||||
|
*/
|
||||||
|
int32_t app_rank;
|
||||||
/* Last state used to trigger the errmgr for this proc */
|
/* Last state used to trigger the errmgr for this proc */
|
||||||
orte_proc_state_t last_errmgr_state;
|
orte_proc_state_t last_errmgr_state;
|
||||||
/* process state */
|
/* process state */
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user