Skip to content

Commit 400f0df

Browse files
committed
orted/pmix: fix spawn in singleton mode
invoke orte_pre_condition_transports() in order to set the ORTE_JOB_TRANSPORT_KEY attribute.
1 parent 11ebf3a commit 400f0df

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

orte/orted/pmix/pmix_server_dyn.c

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
#include "orte/mca/rmaps/base/base.h"
4545
#include "orte/util/name_fns.h"
4646
#include "orte/util/show_help.h"
47+
#include "orte/util/pre_condition_transports.h"
4748
#include "orte/runtime/orte_globals.h"
4849
#include "orte/mca/rml/rml.h"
4950

@@ -159,6 +160,8 @@ int pmix_server_spawn_fn(opal_process_name_t *requestor,
159160
orte_app_context_t *app;
160161
opal_pmix_app_t *papp;
161162
opal_value_t *info;
163+
orte_job_t *parent;
164+
char *key;
162165
int rc;
163166
char cwd[OPAL_PATH_MAX];
164167

@@ -313,6 +316,22 @@ int pmix_server_spawn_fn(opal_process_name_t *requestor,
313316
orte_set_attribute(&jdata->attributes, ORTE_JOB_LAUNCH_PROXY, ORTE_ATTR_GLOBAL,
314317
requestor, OPAL_NAME);
315318

319+
/* get the parent jdata */
320+
if (NULL == (parent = orte_get_job_data_object(requestor->jobid))) {
321+
OBJ_RELEASE(jdata);
322+
return ORTE_ERR_NOT_FOUND;
323+
}
324+
key = NULL;
325+
if (!orte_get_attribute(&parent->attributes, ORTE_JOB_TRANSPORT_KEY, (void**)&key, OPAL_STRING) ||
326+
NULL == key) {
327+
/* record the transport key attribute in the job object if that
328+
* has not been done already */
329+
if (ORTE_SUCCESS != (rc = orte_pre_condition_transports(parent))) {
330+
OBJ_RELEASE(jdata);
331+
return rc;
332+
}
333+
}
334+
316335
/* setup a spawn tracker so we know who to call back when this is done
317336
* and thread-shift the entire thing so it can be safely added to
318337
* our tracking list */

0 commit comments

Comments
 (0)