@@ -246,8 +246,10 @@ static int ucp_context_init(bool enable_mt, int proc_world_size) {
246
246
}
247
247
248
248
static 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 ;
251
253
252
254
mca_osc_ucx_component .enable_mpi_threads = enable_mpi_threads ;
253
255
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)
265
267
return OMPI_ERR_NOT_AVAILABLE ;
266
268
}
267
269
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
+
268
275
/*
269
276
* Retain priority if we have supported devices and transports.
270
277
* Lower priority if we have supported transports, but not supported devices.
271
278
*/
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
+ }
274
283
OSC_UCX_VERBOSE (2 , "returning priority %d" , mca_osc_ucx_component .priority );
284
+
275
285
return OMPI_SUCCESS ;
276
286
}
277
287
0 commit comments