Skip to content

Commit 14de6b7

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 14de6b7

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

orte/orted/pmix/pmix_server_dyn.c

Lines changed: 14 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,7 @@ 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;
162164
int rc;
163165
char cwd[OPAL_PATH_MAX];
164166

@@ -313,6 +315,18 @@ int pmix_server_spawn_fn(opal_process_name_t *requestor,
313315
orte_set_attribute(&jdata->attributes, ORTE_JOB_LAUNCH_PROXY, ORTE_ATTR_GLOBAL,
314316
requestor, OPAL_NAME);
315317

318+
/* get the parent jdata */
319+
if (NULL == (parent = orte_get_job_data_object(requestor->jobid))) {
320+
OBJ_RELEASE(jdata);
321+
return ORTE_ERR_NOT_FOUND;
322+
}
323+
/* this will also record the transport key attribute in the job object, and
324+
* adds the key envar to each app */
325+
if (ORTE_SUCCESS != (rc = orte_pre_condition_transports(parent))) {
326+
OBJ_RELEASE(jdata);
327+
return rc;
328+
}
329+
316330
/* setup a spawn tracker so we know who to call back when this is done
317331
* and thread-shift the entire thing so it can be safely added to
318332
* our tracking list */

0 commit comments

Comments
 (0)