Skip to content

Commit cc2f5ef

Browse files
committed
osc/rdma: Simplify priority selection
With the removal of the pt2pt component, there's really not an advantage to having 2 levels of priority (depending on whether we have a true rdma btl or emulated), so go with a single priority. Signed-off-by: Brian Barrett <bbarrett@amazon.com>
1 parent 9c74047 commit cc2f5ef

File tree

2 files changed

+4
-13
lines changed

2 files changed

+4
-13
lines changed

ompi/mca/osc/rdma/osc_rdma.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
* Copyright (c) 2019 Triad National Security, LLC. All rights
1717
* reserved.
1818
* Copyright (c) 2020-2021 Google, LLC. All rights reserved.
19+
* Copyright (c) 2022 Amazon.com, Inc. or its affiliates.
20+
* All Rights reserved.
1921
* $COPYRIGHT$
2022
*
2123
* Additional copyrights may follow
@@ -108,9 +110,6 @@ struct ompi_osc_rdma_component_t {
108110
/** Priority of the osc/rdma component */
109111
unsigned int priority;
110112

111-
/** Priority of the osc/rdma component when using non-RDMA BTLs */
112-
unsigned int alternate_priority;
113-
114113
/** directory where to place backing files */
115114
char *backing_directory;
116115

ompi/mca/osc/rdma/osc_rdma_component.c

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -238,14 +238,6 @@ static int ompi_osc_rdma_component_register (void)
238238
MCA_BASE_VAR_SCOPE_GROUP, &mca_osc_rdma_component.priority);
239239
free(description_str);
240240

241-
mca_osc_rdma_component.alternate_priority = 37;
242-
opal_asprintf(&description_str, "Priority of the osc/rdma component when using non-RDMA btls (default: %d)",
243-
mca_osc_rdma_component.alternate_priority);
244-
(void) mca_base_component_var_register (&mca_osc_rdma_component.super.osc_version, "alternate_priority", description_str,
245-
MCA_BASE_VAR_TYPE_UNSIGNED_INT, NULL, 0, 0, OPAL_INFO_LVL_3,
246-
MCA_BASE_VAR_SCOPE_GROUP, &mca_osc_rdma_component.alternate_priority);
247-
free(description_str);
248-
249241
(void) mca_base_var_enum_create ("osc_rdma_locking_mode", ompi_osc_rdma_locking_modes, &new_enum);
250242

251243
mca_osc_rdma_component.locking_mode = OMPI_OSC_RDMA_LOCKING_TWO_LEVEL;
@@ -408,10 +400,10 @@ static int ompi_osc_rdma_component_query (struct ompi_win_t *win, void **base, s
408400
}
409401

410402
if (OMPI_SUCCESS == ompi_osc_rdma_query_alternate_btls (comm, NULL)) {
411-
return mca_osc_rdma_component.alternate_priority;
403+
return mca_osc_rdma_component.priority;
412404
}
413405

414-
return mca_osc_rdma_component.priority;
406+
return OMPI_ERROR;
415407
}
416408

417409
static int ompi_osc_rdma_initialize_region (ompi_osc_rdma_module_t *module, void **base, size_t size) {

0 commit comments

Comments
 (0)