17
17
* et Automatique. All rights reserved.
18
18
* Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved.
19
19
* Copyright (c) 2013-2016 Intel, Inc. All rights reserved.
20
- * Copyright (c) 2015 Research Organization for Information Science
20
+ * Copyright (c) 2015-2016 Research Organization for Information Science
21
21
* and Technology (RIST). All rights reserved.
22
22
* $COPYRIGHT$
23
23
*
74
74
#include "orte/util/nidmap.h"
75
75
#include "orte/util/parse_options.h"
76
76
#include "orte/mca/rml/base/rml_contact.h"
77
+ #include "orte/util/pre_condition_transports.h"
77
78
78
79
#include "orte/mca/errmgr/errmgr.h"
79
80
#include "orte/mca/ess/ess.h"
@@ -526,7 +527,7 @@ int orte_daemon(int argc, char *argv[])
526
527
orte_node_t * node ;
527
528
orte_app_context_t * app ;
528
529
char * tmp , * nptr , * sysinfo ;
529
- char * * singenv = NULL ;
530
+ char * * singenv = NULL , * string_key , * env_str ;
530
531
531
532
/* setup the singleton's job */
532
533
jdata = OBJ_NEW (orte_job_t );
@@ -587,6 +588,9 @@ int orte_daemon(int argc, char *argv[])
587
588
proc -> app_idx = 0 ;
588
589
ORTE_FLAG_SET (proc , ORTE_PROC_FLAG_LOCAL );
589
590
591
+ /* set the ORTE_JOB_TRANSPORT_KEY from the environment */
592
+ orte_pre_condition_transports (jdata );
593
+
590
594
/* register the singleton's nspace with our PMIx server */
591
595
if (ORTE_SUCCESS != (ret = orte_pmix_server_register_nspace (jdata ))) {
592
596
ORTE_ERROR_LOG (ret );
@@ -597,6 +601,16 @@ int orte_daemon(int argc, char *argv[])
597
601
ORTE_ERROR_LOG (ret );
598
602
goto DONE ;
599
603
}
604
+
605
+ /* append the transport key to the envars needed by the singleton */
606
+ if (!orte_get_attribute (& jdata -> attributes , ORTE_JOB_TRANSPORT_KEY , (void * * )& string_key , OPAL_STRING ) || NULL == string_key ) {
607
+ ORTE_ERROR_LOG (ORTE_ERR_NOT_FOUND );
608
+ goto DONE ;
609
+ }
610
+ asprintf (& env_str , OPAL_MCA_PREFIX "orte_precondition_transports=%s" , string_key );
611
+ opal_argv_append_nosize (& singenv , env_str );
612
+ free (env_str );
613
+
600
614
nptr = opal_argv_join (singenv , ',' );
601
615
opal_argv_free (singenv );
602
616
/* create a string that contains our uri + sysinfo + PMIx server URI envars */
0 commit comments