1
1

Arggg...revert r24645. I knew those fields were there for a reason...sigh.

This commit was SVN r24647.

The following SVN revision numbers were found above:
  r24645 --> open-mpi/ompi@e4732110da
Этот коммит содержится в:
Ralph Castain 2011-04-28 15:07:00 +00:00
родитель 859aaab93d
Коммит b586f2952e
6 изменённых файлов: 55 добавлений и 3 удалений

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

@ -1443,11 +1443,17 @@ static void check_job_complete(orte_job_t *jdata)
ORTE_UPDATE_EXIT_STATUS(0);
/* provide a notifier message if that framework is active - ignored otherwise */
if (NULL != (job = (orte_job_t*)opal_pointer_array_get_item(orte_job_data, 1))) {
if (NULL == job->name) {
job->name = strdup(orte_process_info.nodename);
}
if (NULL == job->instance) {
asprintf(&job->instance, "%d", orte_process_info.pid);
}
if (0 == orte_exit_status) {
asprintf(&msg, "Job %s complete", ORTE_JOBID_PRINT(job->jobid));
asprintf(&msg, "Job %s:%s complete", job->name, job->instance);
orte_notifier.log(ORTE_NOTIFIER_INFO, 0, msg);
} else {
asprintf(&msg, "Job %s terminated abnormally", ORTE_JOBID_PRINT(job->jobid));
asprintf(&msg, "Job %s:%s terminated abnormally", job->name, job->instance);
orte_notifier.log(ORTE_NOTIFIER_ALERT, orte_exit_status, msg);
}
free(msg);

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

@ -156,6 +156,20 @@ int orte_dt_pack_job(opal_buffer_t *buffer, const void *src,
jobs = (orte_job_t**) src;
for (i=0; i < num_vals; i++) {
/* pack the name of this job - may be null */
if (ORTE_SUCCESS != (rc = opal_dss_pack_buffer(buffer,
(void*)(&(jobs[i]->name)), 1, OPAL_STRING))) {
ORTE_ERROR_LOG(rc);
return rc;
}
/* pack the name of the instance of the job - may be null */
if (ORTE_SUCCESS != (rc = opal_dss_pack_buffer(buffer,
(void*)(&(jobs[i]->instance)), 1, OPAL_STRING))) {
ORTE_ERROR_LOG(rc);
return rc;
}
/* pack the jobid */
if (ORTE_SUCCESS != (rc = opal_dss_pack_buffer(buffer,
(void*)(&(jobs[i]->jobid)), 1, ORTE_JOBID))) {

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

@ -218,8 +218,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\tRecovery: %s(%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",
(src->enable_recovery) ? "ENABLED" : "DISABLED",
(src->recovery_defined) ? "DEFINED" : "DEFAULT",
pfx2,

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

@ -166,6 +166,22 @@ int orte_dt_unpack_job(opal_buffer_t *buffer, void *dest,
return ORTE_ERR_OUT_OF_RESOURCE;
}
/* unpack the name of this job - may be null */
n = 1;
if (ORTE_SUCCESS != (rc = opal_dss_unpack_buffer(buffer,
&(jobs[i]->name), &n, OPAL_STRING))) {
ORTE_ERROR_LOG(rc);
return rc;
}
/* unpack the instance name of this job - may be null */
n = 1;
if (ORTE_SUCCESS != (rc = opal_dss_unpack_buffer(buffer,
&(jobs[i]->instance), &n, OPAL_STRING))) {
ORTE_ERROR_LOG(rc);
return rc;
}
/* unpack the jobid */
n = 1;
if (ORTE_SUCCESS != (rc = opal_dss_unpack_buffer(buffer,

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

@ -652,6 +652,8 @@ 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,
@ -717,6 +719,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;

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

@ -364,6 +364,10 @@ typedef uint16_t orte_job_controls_t;
typedef struct {
/** Base object so this can be put on a list */
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 */