From 36934a8bb2484c3d27d14683d65012ff422334f4 Mon Sep 17 00:00:00 2001 From: Sergey Oblomov Date: Mon, 12 Nov 2018 15:08:22 +0200 Subject: [PATCH 1/2] OSC: set UCX module used by default - OSC/UCX module set priority to 200 to be used by default Signed-off-by: Sergey Oblomov --- 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 6fd3291bad..81428b5282 100644 --- a/ompi/mca/osc/ucx/osc_ucx_component.c +++ b/ompi/mca/osc/ucx/osc_ucx_component.c @@ -106,7 +106,7 @@ static int component_open(void) { static int component_register(void) { char *description_str; - mca_osc_ucx_component.priority = 0; + 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, From e91f214982391b8e1b26be39147c357d32b8380e Mon Sep 17 00:00:00 2001 From: Sergey Oblomov Date: Wed, 14 Nov 2018 10:03:13 +0200 Subject: [PATCH 2/2] OSC/UCX: added UCX version evaluation - added UCX version evaluation to set OSC UCX priority Signed-off-by: Sergey Oblomov --- ompi/mca/osc/ucx/osc_ucx_component.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ompi/mca/osc/ucx/osc_ucx_component.c b/ompi/mca/osc/ucx/osc_ucx_component.c index 81428b5282..54571542e3 100644 --- a/ompi/mca/osc/ucx/osc_ucx_component.c +++ b/ompi/mca/osc/ucx/osc_ucx_component.c @@ -20,6 +20,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); @@ -105,8 +107,15 @@ 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; + + 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; + 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,