Skip to content

Commit 7088f15

Browse files
committed
OMPI/OSC/UCX: set priority to 0.
Signed-off-by: Xin Zhao <[email protected]>
1 parent 5544367 commit 7088f15

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
@@ -29,6 +29,7 @@ typedef struct ompi_osc_ucx_component {
2929
bool enable_mpi_threads;
3030
opal_free_list_t requests; /* request free list for the r* communication variants */
3131
int num_incomplete_req_ops;
32+
unsigned int priority;
3233
} ompi_osc_ucx_component_t;
3334

3435
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)