From fcec24b2a42d255f7fecba55494abd8c31f52b9e Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Tue, 27 Jan 2015 07:14:36 -0600 Subject: [PATCH] Minor cleanups to handle comm_spawn and singletons --- ompi/mca/dpm/orte/dpm_orte.c | 11 +++++++++++ orte/orted/orted_main.c | 2 ++ 2 files changed, 13 insertions(+) diff --git a/ompi/mca/dpm/orte/dpm_orte.c b/ompi/mca/dpm/orte/dpm_orte.c index 69bd6f3d4f..9151104579 100644 --- a/ompi/mca/dpm/orte/dpm_orte.c +++ b/ompi/mca/dpm/orte/dpm_orte.c @@ -868,6 +868,12 @@ static int spawn(int count, const char *array_of_commands[], have_wdir = 0; if ( array_of_info != NULL && array_of_info[i] != MPI_INFO_NULL ) { + /* check for personality */ + ompi_info_get (array_of_info[i], "personality", sizeof(host) - 1, host, &flag); + if ( flag ) { + jdata->personality = strdup(host); + } + /* check for 'host' */ ompi_info_get (array_of_info[i], "host", sizeof(host) - 1, host, &flag); if ( flag ) { @@ -1119,6 +1125,11 @@ static int spawn(int count, const char *array_of_commands[], */ } /* for (i = 0 ; i < count ; ++i) */ + /* default the personality */ + if (NULL == jdata->personality) { + jdata->personality = strdup("ompi"); + } + /* spawn procs */ rc = orte_plm.spawn(jdata); OBJ_RELEASE(jdata); diff --git a/orte/orted/orted_main.c b/orte/orted/orted_main.c index ac7576af48..d2c646e04d 100644 --- a/orte/orted/orted_main.c +++ b/orte/orted/orted_main.c @@ -538,6 +538,8 @@ int orte_daemon(int argc, char *argv[]) /* setup the singleton's job */ jdata = OBJ_NEW(orte_job_t); + /* default to ompi for now */ + jdata->personality = strdup("ompi"); orte_plm_base_create_jobid(jdata); ljob = ORTE_LOCAL_JOBID(jdata->jobid); opal_pointer_array_set_item(orte_job_data, ljob, jdata);