Skip to content

Commit 6753f8d

Browse files
committed
UCX: Propagate MPI serialized for all worker creations
Move MPI to UCX thread mode function to common source. Also use serialized mode for all oshmem initializations. Signed-off-by: Thomas Vegas <[email protected]> (cherry picked from commit 44cc663)
1 parent f13f291 commit 6753f8d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

ompi/mca/osc/ucx/osc_ucx_component.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -415,8 +415,12 @@ static int component_select(struct ompi_win_t *win, void **base, size_t size, in
415415
assert(mca_osc_ucx_component.ucp_worker == NULL);
416416
memset(&worker_params, 0, sizeof(worker_params));
417417
worker_params.field_mask = UCP_WORKER_PARAM_FIELD_THREAD_MODE;
418-
worker_params.thread_mode = (mca_osc_ucx_component.enable_mpi_threads == true)
419-
? UCS_THREAD_MODE_MULTI : UCS_THREAD_MODE_SINGLE;
418+
if (mca_osc_ucx_component.enable_mpi_threads == true) {
419+
worker_params.thread_mode = UCS_THREAD_MODE_MULTI;
420+
} else {
421+
worker_params.thread_mode =
422+
opal_common_ucx_thread_mode(ompi_mpi_thread_provided);
423+
}
420424
status = ucp_worker_create(mca_osc_ucx_component.ucp_context, &worker_params,
421425
&(mca_osc_ucx_component.ucp_worker));
422426
if (UCS_OK != status) {

0 commit comments

Comments
 (0)