Skip to content

Commit d8c1a3d

Browse files
authored
Merge pull request #2589 from xinzhao3/topic/ucx-mt-support
PML/SPML/UCX: add UCX MT support to PML and SPML.
2 parents 00b87ea + 0ecf3c9 commit d8c1a3d

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

ompi/mca/pml/ucx/pml_ucx.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,12 +134,14 @@ int mca_pml_ucx_open(void)
134134
UCP_PARAM_FIELD_REQUEST_SIZE |
135135
UCP_PARAM_FIELD_REQUEST_INIT |
136136
UCP_PARAM_FIELD_REQUEST_CLEANUP |
137-
UCP_PARAM_FIELD_TAG_SENDER_MASK;
137+
UCP_PARAM_FIELD_TAG_SENDER_MASK |
138+
UCP_PARAM_FIELD_MT_WORKERS_SHARED;
138139
params.features = UCP_FEATURE_TAG;
139140
params.request_size = sizeof(ompi_request_t);
140141
params.request_init = mca_pml_ucx_request_init;
141142
params.request_cleanup = mca_pml_ucx_request_cleanup;
142143
params.tag_sender_mask = PML_UCX_SPECIFIC_SOURCE_MASK;
144+
params.mt_workers_shared = 0;
143145

144146
status = ucp_init(&params, config, &ompi_pml_ucx.ucp_context);
145147
ucp_config_release(config);
@@ -183,7 +185,7 @@ int mca_pml_ucx_init(void)
183185

184186
/* TODO check MPI thread mode */
185187
params.field_mask = UCP_WORKER_PARAM_FIELD_THREAD_MODE;
186-
params.thread_mode = UCS_THREAD_MODE_SINGLE;
188+
params.thread_mode = UCS_THREAD_MODE_MULTI;
187189

188190
status = ucp_worker_create(ompi_pml_ucx.ucp_context, &params,
189191
&ompi_pml_ucx.ucp_worker);

oshmem/mca/spml/ucx/spml_ucx_component.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,8 @@ static int mca_spml_ucx_component_open(void)
127127

128128
memset(&params, 0, sizeof(params));
129129
params.field_mask = UCP_PARAM_FIELD_FEATURES;
130-
params.features = UCP_FEATURE_RMA|UCP_FEATURE_AMO32|UCP_FEATURE_AMO64;
130+
params.features = UCP_FEATURE_RMA|UCP_FEATURE_AMO32|UCP_FEATURE_AMO64|UCP_PARAM_FIELD_MT_WORKERS_SHARED;
131+
params.mt_workers_shared = 0;
131132

132133
err = ucp_init(&params, ucp_config, &mca_spml_ucx.ucp_context);
133134
ucp_config_release(ucp_config);
@@ -153,7 +154,7 @@ static int spml_ucx_init(void)
153154
ucs_status_t err;
154155

155156
params.field_mask = UCP_WORKER_PARAM_FIELD_THREAD_MODE;
156-
params.thread_mode = UCS_THREAD_MODE_SINGLE;
157+
params.thread_mode = UCS_THREAD_MODE_MULTI;
157158

158159
err = ucp_worker_create(mca_spml_ucx.ucp_context, &params,
159160
&mca_spml_ucx.ucp_worker);

0 commit comments

Comments
 (0)