File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -616,7 +616,7 @@ static int component_available(void)
616616/* Start all modules */
617617static int component_startup (void )
618618{
619- int rc ;
619+ int rc = ORTE_SUCCESS ;
620620
621621 opal_output_verbose (2 , orte_oob_base_framework .framework_output ,
622622 "%s TCP STARTUP" ,
@@ -627,10 +627,19 @@ static int component_startup(void)
627627 mca_oob_tcp_module .api .init ();
628628 }
629629
630- /* start the listening thread/event */
631- if (ORTE_SUCCESS != (rc = orte_oob_tcp_start_listening ())) {
632- ORTE_ERROR_LOG (rc );
630+ /* if we are a daemon/HNP, or we are a standalone app,
631+ * then it is possible that someone else may initiate a
632+ * connection to us. In these cases, we need to start the
633+ * listening thread/event. Otherwise, we will be the one
634+ * initiating communication, and there is no need for
635+ * a listener */
636+ if (ORTE_PROC_IS_HNP || ORTE_PROC_IS_DAEMON ||
637+ orte_standalone_operation ) {
638+ if (ORTE_SUCCESS != (rc = orte_oob_tcp_start_listening ())) {
639+ ORTE_ERROR_LOG (rc );
640+ }
633641 }
642+
634643 return rc ;
635644}
636645
You can’t perform that action at this time.
0 commit comments