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)
245245 return OMPI_SUCCESS ;
246246}
247247
248- int mca_pml_ucx_init (void )
248+ int mca_pml_ucx_init (int enable_mpi_threads )
249249{
250250 ucp_worker_params_t params ;
251251 ucp_worker_attr_t attr ;
@@ -256,8 +256,7 @@ int mca_pml_ucx_init(void)
256256
257257 /* TODO check MPI thread mode */
258258 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 ) {
261260 params .thread_mode = UCS_THREAD_MODE_MULTI ;
262261 } else {
263262 params .thread_mode = UCS_THREAD_MODE_SINGLE ;
@@ -279,10 +278,11 @@ int mca_pml_ucx_init(void)
279278 goto err_destroy_worker ;
280279 }
281280
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 )) {
283282 /* UCX does not support multithreading, disqualify current PML for now */
284283 /* 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" );
286286 rc = OMPI_ERR_NOT_SUPPORTED ;
287287 goto err_destroy_worker ;
288288 }
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ extern mca_pml_ucx_module_t ompi_pml_ucx;
6464
6565int mca_pml_ucx_open (void );
6666int mca_pml_ucx_close (void );
67- int mca_pml_ucx_init (void );
67+ int mca_pml_ucx_init (int enable_mpi_threads );
6868int mca_pml_ucx_cleanup (void );
6969
7070int 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)
9090
9191static mca_pml_base_module_t *
9292mca_pml_ucx_component_init (int * priority , bool enable_progress_threads ,
93- bool enable_mpi_threads )
93+ bool enable_mpi_threads )
9494{
9595 int ret ;
9696
97- if ( (ret = mca_pml_ucx_init ()) != 0 ) {
97+ if ( (ret = mca_pml_ucx_init (enable_mpi_threads )) != 0 ) {
9898 return NULL ;
9999 }
100100
You can’t perform that action at this time.
0 commit comments