Skip to content

Commit 638c949

Browse files
authored
Merge pull request #5135 from xinzhao3/topic/osc-priori-3.1.x
OMPI/OSC/UCX: set priority to 0. (v3.1.x)
2 parents 739f1cc + 7088f15 commit 638c949

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

ompi/mca/osc/ucx/osc_ucx.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ typedef struct ompi_osc_ucx_component {
3232
bool enable_mpi_threads;
3333
opal_free_list_t requests; /* request free list for the r* communication variants */
3434
int num_incomplete_req_ops;
35+
unsigned int priority;
3536
} ompi_osc_ucx_component_t;
3637

3738
OMPI_DECLSPEC extern ompi_osc_ucx_component_t mca_osc_ucx_component;

ompi/mca/osc/ucx/osc_ucx_component.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,15 @@ static int component_open(void) {
9191
}
9292

9393
static int component_register(void) {
94+
char *description_str;
95+
mca_osc_ucx_component.priority = 0;
96+
asprintf(&description_str, "Priority of the osc/ucx component (default: %d)",
97+
mca_osc_ucx_component.priority);
98+
(void) mca_base_component_var_register(&mca_osc_ucx_component.super.osc_version, "priority", description_str,
99+
MCA_BASE_VAR_TYPE_UNSIGNED_INT, NULL, 0, 0, OPAL_INFO_LVL_3,
100+
MCA_BASE_VAR_SCOPE_GROUP, &mca_osc_ucx_component.priority);
101+
free(description_str);
102+
94103
return OMPI_SUCCESS;
95104
}
96105

@@ -201,7 +210,7 @@ static int component_finalize(void) {
201210
static int component_query(struct ompi_win_t *win, void **base, size_t size, int disp_unit,
202211
struct ompi_communicator_t *comm, struct opal_info_t *info, int flavor) {
203212
if (MPI_WIN_FLAVOR_SHARED == flavor) return -1;
204-
return 100;
213+
return mca_osc_ucx_component.priority;
205214
}
206215

207216
static inline int allgather_len_and_info(void *my_info, int my_info_len, char **recv_info,

0 commit comments

Comments
 (0)