Skip to content

Commit ed967d8

Browse files
authored
Merge pull request #6073 from hoopoepg/topic/set-osc-ucx-level-200
OSC: set UCX module used by default
2 parents 3339e2a + e91f214 commit ed967d8

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

ompi/mca/osc/ucx/osc_ucx_component.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
#include "osc_ucx.h"
2121
#include "osc_ucx_request.h"
2222

23+
#define UCX_VERSION(_major, _minor, _build) (((_major) * 100) + (_minor))
24+
2325
#define memcpy_off(_dst, _src, _len, _off) \
2426
memcpy(((char*)(_dst)) + (_off), _src, _len); \
2527
(_off) += (_len);
@@ -105,8 +107,15 @@ static int component_open(void) {
105107
}
106108

107109
static int component_register(void) {
110+
unsigned major = 0;
111+
unsigned minor = 0;
112+
unsigned release_number = 0;
108113
char *description_str;
109-
mca_osc_ucx_component.priority = 0;
114+
115+
ucp_get_version(&major, &minor, &release_number);
116+
117+
mca_osc_ucx_component.priority = UCX_VERSION(major, minor, release_number) >= UCX_VERSION(1, 5, 0) ? 200 : 0;
118+
110119
opal_asprintf(&description_str, "Priority of the osc/ucx component (default: %d)",
111120
mca_osc_ucx_component.priority);
112121
(void) mca_base_component_var_register(&mca_osc_ucx_component.super.osc_version, "priority", description_str,

0 commit comments

Comments
 (0)