@@ -246,8 +246,10 @@ static int ucp_context_init(bool enable_mt, int proc_world_size) {
246246}
247247
248248static int component_init (bool enable_progress_threads , bool enable_mpi_threads ) {
249- opal_common_ucx_support_level_t support_level ;
250- int ret = OMPI_SUCCESS ;
249+ opal_common_ucx_support_level_t support_level = OPAL_COMMON_UCX_SUPPORT_NONE ;
250+ mca_base_var_source_t param_source = MCA_BASE_VAR_SOURCE_DEFAULT ;
251+ int ret = OMPI_SUCCESS ,
252+ param = -1 ;
251253
252254 mca_osc_ucx_component .enable_mpi_threads = enable_mpi_threads ;
253255 mca_osc_ucx_component .wpool = opal_common_ucx_wpool_allocate ();
@@ -265,13 +267,21 @@ static int component_init(bool enable_progress_threads, bool enable_mpi_threads)
265267 return OMPI_ERR_NOT_AVAILABLE ;
266268 }
267269
270+ param = mca_base_var_find ("ompi" ,"osc" ,"ucx" ,"priority" );
271+ if (0 <= param ) {
272+ (void ) mca_base_var_get_value (param , NULL , & param_source , NULL );
273+ }
274+
268275 /*
269276 * Retain priority if we have supported devices and transports.
270277 * Lower priority if we have supported transports, but not supported devices.
271278 */
272- mca_osc_ucx_component .priority = (support_level == OPAL_COMMON_UCX_SUPPORT_DEVICE ) ?
273- mca_osc_ucx_component .priority : 19 ;
279+ if (MCA_BASE_VAR_SOURCE_DEFAULT == param_source ) {
280+ mca_osc_ucx_component .priority = (support_level == OPAL_COMMON_UCX_SUPPORT_DEVICE ) ?
281+ mca_osc_ucx_component .priority : 9 ;
282+ }
274283 OSC_UCX_VERBOSE (2 , "returning priority %d" , mca_osc_ucx_component .priority );
284+
275285 return OMPI_SUCCESS ;
276286}
277287
0 commit comments