Skip to content

Commit ee952fc

Browse files
committed
Passing estimated_num_procs to UCX init in PML and SPML.
Signed-off-by: Xin Zhao <[email protected]>
1 parent d782542 commit ee952fc

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

ompi/mca/pml/ucx/pml_ucx.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,15 +136,16 @@ int mca_pml_ucx_open(void)
136136
UCP_PARAM_FIELD_REQUEST_INIT |
137137
UCP_PARAM_FIELD_REQUEST_CLEANUP |
138138
UCP_PARAM_FIELD_TAG_SENDER_MASK |
139-
UCP_PARAM_FIELD_MT_WORKERS_SHARED;
139+
UCP_PARAM_FIELD_MT_WORKERS_SHARED |
140+
UCP_PARAM_FIELD_ESTIMATED_NUM_EPS;
140141
params.features = UCP_FEATURE_TAG;
141142
params.request_size = sizeof(ompi_request_t);
142143
params.request_init = mca_pml_ucx_request_init;
143144
params.request_cleanup = mca_pml_ucx_request_cleanup;
144145
params.tag_sender_mask = PML_UCX_SPECIFIC_SOURCE_MASK;
145146
params.mt_workers_shared = 0; /* we do not need mt support for context
146147
since it will be protected by worker */
147-
148+
params.estimated_num_eps = ompi_proc_world_size();
148149

149150
status = ucp_init(&params, config, &ompi_pml_ucx.ucp_context);
150151
ucp_config_release(config);

oshmem/mca/spml/ucx/spml_ucx_component.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,9 @@ static int mca_spml_ucx_component_open(void)
126126
}
127127

128128
memset(&params, 0, sizeof(params));
129-
params.field_mask = UCP_PARAM_FIELD_FEATURES;
129+
params.field_mask = UCP_PARAM_FIELD_FEATURES|UCP_PARAM_FIELD_ESTIMATED_NUM_EPS;
130130
params.features = UCP_FEATURE_RMA|UCP_FEATURE_AMO32|UCP_FEATURE_AMO64;
131+
params.estimated_num_eps = oshmem_num_procs();
131132

132133
err = ucp_init(&params, ucp_config, &mca_spml_ucx.ucp_context);
133134
ucp_config_release(ucp_config);

0 commit comments

Comments
 (0)