2929
3030#include "opal/class/opal_bitmap.h"
3131#include "orte/mca/mca.h"
32+ #include "opal/runtime/opal_progress_threads.h"
3233#include "opal/util/output.h"
3334#include "opal/mca/base/base.h"
3435
5354orte_oob_base_t orte_oob_base = {0 };
5455OPAL_TIMING_DECLARE (tm_oob )
5556
57+
5658static int orte_oob_base_register (mca_base_register_flag_t flags )
5759{
5860 if (ORTE_PROC_IS_APP || ORTE_PROC_IS_TOOL ) {
59- orte_oob_base .use_module_threads = false ;
61+ orte_oob_base .num_threads = 0 ;
6062 } else {
61- orte_oob_base .use_module_threads = true ;
63+ orte_oob_base .num_threads = 8 ;
6264 }
63- (void )mca_base_var_register ("orte" , "oob" , "base" , "enable_module_progress_threads " ,
64- "Whether to independently progress OOB messages for each interface" ,
65+ (void )mca_base_var_register ("orte" , "oob" , "base" , "num_progress_threads " ,
66+ "Number of independent progress OOB messages for each interface" ,
6567 MCA_BASE_VAR_TYPE_BOOL , NULL , 0 , 0 ,
6668 OPAL_INFO_LVL_9 ,
6769 MCA_BASE_VAR_SCOPE_READONLY ,
68- & orte_oob_base .use_module_threads );
70+ & orte_oob_base .num_threads );
6971
7072#if OPAL_ENABLE_TIMING
7173 /* Detailed timing setup */
@@ -107,6 +109,11 @@ static int orte_oob_base_close(void)
107109
108110 OBJ_DESTRUCT (& orte_oob_base .peers );
109111
112+ if (ORTE_PROC_IS_APP || ORTE_PROC_IS_TOOL ) {
113+ opal_progress_thread_finalize (NULL );
114+ } else {
115+ opal_progress_thread_finalize ("OOB-BASE" );
116+ }
110117
111118 OPAL_TIMING_EVENT ((& tm_oob , "Finish" ));
112119 OPAL_TIMING_REPORT (orte_oob_base .timing , & tm_oob );
@@ -126,6 +133,13 @@ static int orte_oob_base_open(mca_base_open_flag_t flags)
126133 opal_hash_table_init (& orte_oob_base .peers , 128 );
127134 OBJ_CONSTRUCT (& orte_oob_base .actives , opal_list_t );
128135
136+ if (ORTE_PROC_IS_APP || ORTE_PROC_IS_TOOL ) {
137+ orte_oob_base .ev_base = opal_progress_thread_init (NULL );
138+ } else {
139+ orte_oob_base .ev_base = opal_progress_thread_init ("OOB-BASE" );
140+ }
141+
142+
129143#if OPAL_ENABLE_FT_CR == 1
130144 /* register the FT events callback */
131145 orte_state .add_job_state (ORTE_JOB_STATE_FT_CHECKPOINT , orte_oob_base_ft_event , ORTE_ERROR_PRI );
0 commit comments