From 012e27af77bdf384226916e3eafa66fe424e5cb7 Mon Sep 17 00:00:00 2001 From: Sergey Oblomov Date: Mon, 12 Nov 2018 15:08:22 +0200 Subject: [PATCH 1/3] OSC: set UCX module used by default - OSC/UCX module set priority to 200 to be used by default Signed-off-by: Sergey Oblomov (cherry picked from commit 36934a8bb2484c3d27d14683d65012ff422334f4) --- ompi/mca/osc/ucx/osc_ucx_component.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ompi/mca/osc/ucx/osc_ucx_component.c b/ompi/mca/osc/ucx/osc_ucx_component.c index c983ea7670..2bb9e7badb 100644 --- a/ompi/mca/osc/ucx/osc_ucx_component.c +++ b/ompi/mca/osc/ucx/osc_ucx_component.c @@ -103,9 +103,9 @@ static int component_open(void) { static int component_register(void) { char *description_str; - mca_osc_ucx_component.priority = 0; - asprintf(&description_str, "Priority of the osc/ucx component (default: %d)", - mca_osc_ucx_component.priority); + mca_osc_ucx_component.priority = 200; + opal_asprintf(&description_str, "Priority of the osc/ucx component (default: %d)", + mca_osc_ucx_component.priority); (void) mca_base_component_var_register(&mca_osc_ucx_component.super.osc_version, "priority", description_str, MCA_BASE_VAR_TYPE_UNSIGNED_INT, NULL, 0, 0, OPAL_INFO_LVL_3, MCA_BASE_VAR_SCOPE_GROUP, &mca_osc_ucx_component.priority); From 38a4953707a97d83e80e595e42851fe871e76c4e Mon Sep 17 00:00:00 2001 From: Sergey Oblomov Date: Wed, 14 Nov 2018 10:03:13 +0200 Subject: [PATCH 2/3] OSC/UCX: added UCX version evaluation - added UCX version evaluation to set OSC UCX priority Signed-off-by: Sergey Oblomov (cherry picked from commit e91f214982391b8e1b26be39147c357d32b8380e) --- ompi/mca/osc/ucx/osc_ucx_component.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/ompi/mca/osc/ucx/osc_ucx_component.c b/ompi/mca/osc/ucx/osc_ucx_component.c index 2bb9e7badb..1326e7be1b 100644 --- a/ompi/mca/osc/ucx/osc_ucx_component.c +++ b/ompi/mca/osc/ucx/osc_ucx_component.c @@ -17,6 +17,8 @@ #include "osc_ucx.h" #include "osc_ucx_request.h" +#define UCX_VERSION(_major, _minor, _build) (((_major) * 100) + (_minor)) + #define memcpy_off(_dst, _src, _len, _off) \ memcpy(((char*)(_dst)) + (_off), _src, _len); \ (_off) += (_len); @@ -102,10 +104,17 @@ static int component_open(void) { } static int component_register(void) { + unsigned major = 0; + unsigned minor = 0; + unsigned release_number = 0; char *description_str; - mca_osc_ucx_component.priority = 200; - opal_asprintf(&description_str, "Priority of the osc/ucx component (default: %d)", - mca_osc_ucx_component.priority); + + ucp_get_version(&major, &minor, &release_number); + + mca_osc_ucx_component.priority = UCX_VERSION(major, minor, release_number) >= UCX_VERSION(1, 5, 0) ? 200 : 0; + + asprintf(&description_str, "Priority of the osc/ucx component (default: %d)", + mca_osc_ucx_component.priority); (void) mca_base_component_var_register(&mca_osc_ucx_component.super.osc_version, "priority", description_str, MCA_BASE_VAR_TYPE_UNSIGNED_INT, NULL, 0, 0, OPAL_INFO_LVL_3, MCA_BASE_VAR_SCOPE_GROUP, &mca_osc_ucx_component.priority); From 6651672711ebbfe7aad122c02ce68f332de09aff Mon Sep 17 00:00:00 2001 From: Sergey Oblomov Date: Tue, 27 Nov 2018 14:20:28 +0200 Subject: [PATCH 3/3] OSC/UCX: set max level value to 60 Signed-off-by: Sergey Oblomov (cherry picked from commit 2d230b3aacce0185f0d46e69f608071b670eeb3c) --- ompi/mca/osc/ucx/osc_ucx_component.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ompi/mca/osc/ucx/osc_ucx_component.c b/ompi/mca/osc/ucx/osc_ucx_component.c index 1326e7be1b..8014ac6f23 100644 --- a/ompi/mca/osc/ucx/osc_ucx_component.c +++ b/ompi/mca/osc/ucx/osc_ucx_component.c @@ -111,7 +111,7 @@ static int component_register(void) { ucp_get_version(&major, &minor, &release_number); - mca_osc_ucx_component.priority = UCX_VERSION(major, minor, release_number) >= UCX_VERSION(1, 5, 0) ? 200 : 0; + mca_osc_ucx_component.priority = UCX_VERSION(major, minor, release_number) >= UCX_VERSION(1, 5, 0) ? 60 : 0; asprintf(&description_str, "Priority of the osc/ucx component (default: %d)", mca_osc_ucx_component.priority);