1
1

Add another name field to the job object

This commit was SVN r23299.
Этот коммит содержится в:
Ralph Castain 2010-06-24 01:57:27 +00:00
родитель 5cdd79ef13
Коммит e9f4c84d7e
3 изменённых файлов: 15 добавлений и 2 удалений

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

@ -216,8 +216,10 @@ 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\n%s\tNum apps: %ld\tControls: %0x\tStdin target: %s\tState: %s\tAbort: %s", pfx2,
ORTE_JOBID_PRINT(src->jobid), src->name, pfx2,
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,
ORTE_JOBID_PRINT(src->jobid),
(NULL != src->name) ? src->name : "NULL",
(NULL != src->instance) ? src->instance : "NULL", 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);

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

@ -618,6 +618,7 @@ OBJ_CLASS_INSTANCE(orte_app_context_t,
static void orte_job_construct(orte_job_t* job)
{
job->name = NULL;
job->instance = NULL;
job->jobid = ORTE_JOBID_INVALID;
job->apps = OBJ_NEW(opal_pointer_array_t);
opal_pointer_array_init(job->apps,
@ -682,6 +683,14 @@ static void orte_job_destruct(orte_job_t* job)
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), ORTE_JOBID_PRINT(job->jobid));
}
if (NULL != job->name) {
free(job->name);
}
if (NULL != job->instance) {
free(job->instance);
}
for (n=0; n < job->apps->size; n++) {
if (NULL == (app = (orte_app_context_t*)opal_pointer_array_get_item(job->apps, n))) {
continue;

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

@ -352,6 +352,8 @@ typedef struct {
opal_list_item_t super;
/* a name for this job */
char *name;
/* a name for this instance of the job */
char *instance;
/* jobid for this job */
orte_jobid_t jobid;
/* app_context array for this job */