The ordering of the appfile matters. The ranks must be in increasing rank
order, so that they get assigned the same ORTE name on restart. cmr:v1.4.2 cmr:v1.5 This commit was SVN r22586.
Этот коммит содержится в:
родитель
b26cd93511
Коммит
4513440df9
@ -78,6 +78,8 @@ static int check_file(orte_snapc_base_global_snapshot_t *snapshot);
|
||||
static int create_appfile(orte_snapc_base_global_snapshot_t *snapshot);
|
||||
static int spawn_children(orte_snapc_base_global_snapshot_t *snapshot, pid_t *child_pid);
|
||||
static int snapshot_info(orte_snapc_base_global_snapshot_t *snapshot);
|
||||
static int snapshot_sort_compare_fn(opal_list_item_t **a,
|
||||
opal_list_item_t **b);
|
||||
|
||||
/*****************************************
|
||||
* Global Vars for Command line Arguments
|
||||
@ -495,6 +497,14 @@ static int create_appfile(orte_snapc_base_global_snapshot_t *snapshot)
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
/*
|
||||
* Sort the snapshots so that they are in order
|
||||
*/
|
||||
opal_list_sort(&snapshot->local_snapshots, snapshot_sort_compare_fn);
|
||||
|
||||
/*
|
||||
* Construct the appfile
|
||||
*/
|
||||
for(item = opal_list_get_first(&snapshot->local_snapshots);
|
||||
item != opal_list_get_end(&snapshot->local_snapshots);
|
||||
item = opal_list_get_next(item) ) {
|
||||
@ -732,3 +742,22 @@ int snapshot_info(orte_snapc_base_global_snapshot_t *snapshot)
|
||||
cleanup:
|
||||
return exit_status;
|
||||
}
|
||||
|
||||
static int snapshot_sort_compare_fn(opal_list_item_t **a,
|
||||
opal_list_item_t **b)
|
||||
{
|
||||
orte_snapc_base_local_snapshot_t *snap_a, *snap_b;
|
||||
|
||||
snap_a = (orte_snapc_base_local_snapshot_t*)(*a);
|
||||
snap_b = (orte_snapc_base_local_snapshot_t*)(*b);
|
||||
|
||||
if( snap_a->process_name.vpid > snap_b->process_name.vpid ) {
|
||||
return 1;
|
||||
}
|
||||
else if( snap_a->process_name.vpid == snap_b->process_name.vpid ) {
|
||||
return 0;
|
||||
}
|
||||
else {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user