1
1

Send recovery defined flag in app_contexts, include recovery flags in debug prints

This commit was SVN r24619.
Этот коммит содержится в:
Ralph Castain 2011-04-18 14:46:42 +00:00
родитель 89501e6e24
Коммит 8014e7432c
3 изменённых файлов: 22 добавлений и 4 удалений

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

@ -749,6 +749,12 @@ int orte_dt_pack_app_context(opal_buffer_t *buffer, const void *src,
}
}
/* pack the recovery defined flag */
if (ORTE_SUCCESS != (rc = opal_dss_pack_buffer(buffer,
(void*)(&(app_context[i]->recovery_defined)), 1, OPAL_BOOL))) {
ORTE_ERROR_LOG(rc);
return rc;
}
/* pack the restart limit */
if (ORTE_SUCCESS != (rc = opal_dss_pack_buffer(buffer,
(void*)(&(app_context[i]->max_restarts)), 1, OPAL_INT32))) {

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

@ -218,10 +218,13 @@ int orte_dt_print_job(char **output, char *prefix, orte_job_t *src, opal_data_ty
asprintf(&pfx2, "%s", prefix);
}
asprintf(&tmp, "\n%sData for job: %s\tName: %s\tInstance: %s\n%s\tNum apps: %ld\tControls: %0x\tStdin target: %s\tState: %s\tAbort: %s", pfx2,
asprintf(&tmp, "\n%sData for job: %s\tName: %s\tInstance: %s\tRecovery: %s(%s)\n%s\tNum apps: %ld\tControls: %0x\tStdin target: %s\tState: %s\tAbort: %s", pfx2,
ORTE_JOBID_PRINT(src->jobid),
(NULL != src->name) ? src->name : "NULL",
(NULL != src->instance) ? src->instance : "NULL", pfx2,
(NULL != src->instance) ? src->instance : "NULL",
(src->enable_recovery) ? "ENABLED" : "DISABLED",
(src->recovery_defined) ? "DEFINED" : "DEFAULT",
pfx2,
(long)src->num_apps, src->controls, ORTE_VPID_PRINT(src->stdin_target),
orte_job_state_to_str(src->state), src->abort ? "True" : "False");
asprintf(&pfx, "%s\t", pfx2);
@ -529,11 +532,13 @@ int orte_dt_print_app_context(char **output, char *prefix, orte_app_context_t *s
asprintf(&pfx2, "%s", prefix);
}
asprintf(&tmp, "\n%sData for app_context: name: %s\t index %lu\tuid: %d\tgid: %d\tapp: %s\n%s\tNum procs: %lu\tMax Restarts: %d",
asprintf(&tmp, "\n%sData for app_context: name: %s\t index %lu\tuid: %d\tgid: %d\tapp: %s\n%s\tNum procs: %lu\tRecovery: %s\tMax Restarts: %d",
pfx2, (NULL == src->name) ? "NULL" : src->name,
(unsigned long)src->idx, src->uid, src->gid,
(NULL == src->app) ? "NULL" : src->app,
pfx2, (unsigned long)src->num_procs, src->max_restarts);
pfx2, (unsigned long)src->num_procs,
(src->recovery_defined) ? "DEFINED" : "DEFAULT",
src->max_restarts);
count = opal_argv_count(src->argv);
for (i=0; i < count; i++) {

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

@ -825,6 +825,13 @@ int orte_dt_unpack_app_context(opal_buffer_t *buffer, void *dest,
app_context[i]->preload_files_src_dir = NULL;
}
/* Unpack the recovery_defined flag */
max_n=1;
if (ORTE_SUCCESS != (rc = opal_dss_unpack_buffer(buffer, &(app_context[i]->recovery_defined),
&max_n, OPAL_BOOL))) {
ORTE_ERROR_LOG(rc);
return rc;
}
/* unpack the restart limit */
max_n=1;
if (ORTE_SUCCESS != (rc = opal_dss_unpack_buffer(buffer, &app_context[i]->max_restarts,