From ee952fcccdd876138eda3c83a185386047a6140d Mon Sep 17 00:00:00 2001 From: Xin Zhao Date: Sat, 25 Mar 2017 01:59:01 +0300 Subject: [PATCH] Passing estimated_num_procs to UCX init in PML and SPML. Signed-off-by: Xin Zhao --- ompi/mca/pml/ucx/pml_ucx.c | 5 +++-- oshmem/mca/spml/ucx/spml_ucx_component.c | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ompi/mca/pml/ucx/pml_ucx.c b/ompi/mca/pml/ucx/pml_ucx.c index c0b6593868..9b38008dac 100644 --- a/ompi/mca/pml/ucx/pml_ucx.c +++ b/ompi/mca/pml/ucx/pml_ucx.c @@ -136,7 +136,8 @@ int mca_pml_ucx_open(void) UCP_PARAM_FIELD_REQUEST_INIT | UCP_PARAM_FIELD_REQUEST_CLEANUP | UCP_PARAM_FIELD_TAG_SENDER_MASK | - UCP_PARAM_FIELD_MT_WORKERS_SHARED; + UCP_PARAM_FIELD_MT_WORKERS_SHARED | + UCP_PARAM_FIELD_ESTIMATED_NUM_EPS; params.features = UCP_FEATURE_TAG; params.request_size = sizeof(ompi_request_t); params.request_init = mca_pml_ucx_request_init; @@ -144,7 +145,7 @@ int mca_pml_ucx_open(void) params.tag_sender_mask = PML_UCX_SPECIFIC_SOURCE_MASK; params.mt_workers_shared = 0; /* we do not need mt support for context since it will be protected by worker */ - + params.estimated_num_eps = ompi_proc_world_size(); status = ucp_init(¶ms, config, &ompi_pml_ucx.ucp_context); ucp_config_release(config); diff --git a/oshmem/mca/spml/ucx/spml_ucx_component.c b/oshmem/mca/spml/ucx/spml_ucx_component.c index 42567c3add..58ee395147 100644 --- a/oshmem/mca/spml/ucx/spml_ucx_component.c +++ b/oshmem/mca/spml/ucx/spml_ucx_component.c @@ -126,8 +126,9 @@ static int mca_spml_ucx_component_open(void) } memset(¶ms, 0, sizeof(params)); - params.field_mask = UCP_PARAM_FIELD_FEATURES; + params.field_mask = UCP_PARAM_FIELD_FEATURES|UCP_PARAM_FIELD_ESTIMATED_NUM_EPS; params.features = UCP_FEATURE_RMA|UCP_FEATURE_AMO32|UCP_FEATURE_AMO64; + params.estimated_num_eps = oshmem_num_procs(); err = ucp_init(¶ms, ucp_config, &mca_spml_ucx.ucp_context); ucp_config_release(ucp_config);