From 74385302c0bcd23c8a2181c5024194c514bcfeee Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Tue, 27 Jan 2015 06:58:33 -0600 Subject: [PATCH] Add the personality to the orte_job_t datatype support --- orte/runtime/data_type_support/orte_dt_packing_fns.c | 6 +++++- orte/runtime/data_type_support/orte_dt_print_fns.c | 4 ++-- orte/runtime/data_type_support/orte_dt_unpacking_fns.c | 7 ++++++- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/orte/runtime/data_type_support/orte_dt_packing_fns.c b/orte/runtime/data_type_support/orte_dt_packing_fns.c index 06bd6478ed..025b670d41 100644 --- a/orte/runtime/data_type_support/orte_dt_packing_fns.c +++ b/orte/runtime/data_type_support/orte_dt_packing_fns.c @@ -80,7 +80,11 @@ int orte_dt_pack_job(opal_buffer_t *buffer, const void *src, ORTE_ERROR_LOG(rc); return rc; } - + /* pack the personality */ + if (ORTE_SUCCESS != (rc = opal_dss_pack_buffer(buffer, &jobs[i]->personality, 1, OPAL_STRING))) { + ORTE_ERROR_LOG(rc); + return rc; + } /* pack the number of apps */ if (ORTE_SUCCESS != (rc = opal_dss_pack_buffer(buffer, (void*)(&(jobs[i]->num_apps)), 1, ORTE_APP_IDX))) { diff --git a/orte/runtime/data_type_support/orte_dt_print_fns.c b/orte/runtime/data_type_support/orte_dt_print_fns.c index 3fab61995b..118d488a6d 100644 --- a/orte/runtime/data_type_support/orte_dt_print_fns.c +++ b/orte/runtime/data_type_support/orte_dt_print_fns.c @@ -186,8 +186,8 @@ 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\tMPI allowed: %s\tStdin target: %s\tState: %s\tAbort: %s", pfx2, - ORTE_JOBID_PRINT(src->jobid), + asprintf(&tmp, "\n%sData for job: %s\tPersonality: %s\tRecovery: %s(%s)\n%s\tNum apps: %ld\tMPI allowed: %s\tStdin target: %s\tState: %s\tAbort: %s", pfx2, + ORTE_JOBID_PRINT(src->jobid), src->personality, (ORTE_FLAG_TEST(src, ORTE_JOB_FLAG_RECOVERABLE)) ? "ENABLED" : "DISABLED", (orte_get_attribute(&src->attributes, ORTE_JOB_RECOVER_DEFINED, NULL, OPAL_BOOL)) ? "DEFINED" : "DEFAULT", pfx2, diff --git a/orte/runtime/data_type_support/orte_dt_unpacking_fns.c b/orte/runtime/data_type_support/orte_dt_unpacking_fns.c index 096e49a703..f0c54fe444 100644 --- a/orte/runtime/data_type_support/orte_dt_unpacking_fns.c +++ b/orte/runtime/data_type_support/orte_dt_unpacking_fns.c @@ -83,7 +83,12 @@ int orte_dt_unpack_job(opal_buffer_t *buffer, void *dest, ORTE_ERROR_LOG(rc); return rc; } - + /* unpack the personality */ + n=1; + if (ORTE_SUCCESS != (rc = opal_dss_unpack_buffer(buffer, &jobs[i]->personality, &n, OPAL_STRING))) { + ORTE_ERROR_LOG(rc); + return rc; + } /* unpack the num apps */ n = 1; if (ORTE_SUCCESS != (rc = opal_dss_unpack_buffer(buffer,