File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -245,7 +245,7 @@ int mca_pml_ucx_close(void)
245
245
return OMPI_SUCCESS ;
246
246
}
247
247
248
- int mca_pml_ucx_init (void )
248
+ int mca_pml_ucx_init (int enable_mpi_threads )
249
249
{
250
250
ucp_worker_params_t params ;
251
251
ucp_worker_attr_t attr ;
@@ -256,8 +256,7 @@ int mca_pml_ucx_init(void)
256
256
257
257
/* TODO check MPI thread mode */
258
258
params .field_mask = UCP_WORKER_PARAM_FIELD_THREAD_MODE ;
259
- params .thread_mode = UCS_THREAD_MODE_SINGLE ;
260
- if (ompi_mpi_thread_multiple ) {
259
+ if (enable_mpi_threads ) {
261
260
params .thread_mode = UCS_THREAD_MODE_MULTI ;
262
261
} else {
263
262
params .thread_mode = UCS_THREAD_MODE_SINGLE ;
@@ -279,10 +278,11 @@ int mca_pml_ucx_init(void)
279
278
goto err_destroy_worker ;
280
279
}
281
280
282
- if (ompi_mpi_thread_multiple && (attr .thread_mode != UCS_THREAD_MODE_MULTI )) {
281
+ if (enable_mpi_threads && (attr .thread_mode != UCS_THREAD_MODE_MULTI )) {
283
282
/* UCX does not support multithreading, disqualify current PML for now */
284
283
/* TODO: we should let OMPI to fallback to THREAD_SINGLE mode */
285
- PML_UCX_ERROR ("UCP worker does not support MPI_THREAD_MULTIPLE" );
284
+ PML_UCX_VERBOSE (1 , "UCP worker does not support MPI_THREAD_MULTIPLE. "
285
+ "PML UCX could not be selected" );
286
286
rc = OMPI_ERR_NOT_SUPPORTED ;
287
287
goto err_destroy_worker ;
288
288
}
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ extern mca_pml_ucx_module_t ompi_pml_ucx;
64
64
65
65
int mca_pml_ucx_open (void );
66
66
int mca_pml_ucx_close (void );
67
- int mca_pml_ucx_init (void );
67
+ int mca_pml_ucx_init (int enable_mpi_threads );
68
68
int mca_pml_ucx_cleanup (void );
69
69
70
70
int mca_pml_ucx_add_procs (struct ompi_proc_t * * procs , size_t nprocs );
Original file line number Diff line number Diff line change @@ -90,11 +90,11 @@ static int mca_pml_ucx_component_close(void)
90
90
91
91
static mca_pml_base_module_t *
92
92
mca_pml_ucx_component_init (int * priority , bool enable_progress_threads ,
93
- bool enable_mpi_threads )
93
+ bool enable_mpi_threads )
94
94
{
95
95
int ret ;
96
96
97
- if ( (ret = mca_pml_ucx_init ()) != 0 ) {
97
+ if ( (ret = mca_pml_ucx_init (enable_mpi_threads )) != 0 ) {
98
98
return NULL ;
99
99
}
100
100
You can’t perform that action at this time.
0 commit comments