Skip to content

Commit e1fec6d

Browse files
authored
Merge pull request #10889 from wckzhang/fixacceleratorselect
opal/accelerator: Fix base selection logic
2 parents 069a0fe + 0bbe734 commit e1fec6d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

opal/mca/accelerator/base/accelerator_base_select.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ static void multiple_accelerators_found_help_message(opal_list_t *components);
4747
int opal_accelerator_base_select(void)
4848
{
4949
mca_base_component_list_item_t *cli = NULL;
50+
mca_base_component_t *skip = NULL;
5051
opal_accelerator_base_component_t *component = NULL;
5152
opal_accelerator_base_module_t *module = NULL;
5253
accelerator_list_item_t *ali = NULL, *ali2 = NULL;
@@ -125,6 +126,7 @@ int opal_accelerator_base_select(void)
125126
} else if (2 >= initialized_list.opal_list_length) {
126127
ali = (accelerator_list_item_t *) opal_list_get_first(&initialized_list);
127128
accelerator_base_selected_component = *ali->accelerator_component;
129+
skip = (mca_base_component_t *) ali->accelerator_component;
128130
opal_accelerator = *ali->accelerator_module;
129131
} else {
130132
multiple_accelerators_found_help_message(&initialized_list);
@@ -137,9 +139,7 @@ int opal_accelerator_base_select(void)
137139

138140
/* This base function closes, unloads, and removes from the available list all
139141
* unselected components. The available list will contain only the selected component. */
140-
mca_base_components_close(opal_accelerator_base_framework.framework_output,
141-
&opal_accelerator_base_framework.framework_components,
142-
(mca_base_component_t *) &accelerator_base_selected_component);
142+
mca_base_framework_components_close(&opal_accelerator_base_framework, skip);
143143

144144
/* Cleanup Lists */
145145
for (item = opal_list_remove_first(&ordered_list); NULL != item; item = opal_list_remove_first(&ordered_list)) {

0 commit comments

Comments
 (0)