Skip to content

Commit 2998773

Browse files
committed
pml/base: Remove unnecessary lines of code
Rmoved the unused int num_pml and removed the multiple initialization of variables in mca_pml_base_select(). Signed-off-by: William Zhang <wilzhang@amazon.com>
1 parent a1ff19b commit 2998773

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

ompi/mca/pml/base/pml_base_select.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* reserved.
1515
* Copyright (c) 2013-2020 Intel, Inc. All rights reserved.
1616
* Copyright (c) 2015-2020 Cisco Systems, Inc. All rights reserved.
17-
* Copyright (c) 2020 Amazon.com, Inc. or its affiliates. All Rights
17+
* Copyright (c) 2020-2022 Amazon.com, Inc. or its affiliates. All Rights
1818
* Copyright (c) 2018-2020 Triad National Security, LLC. All rights
1919
* reserved.
2020
* $COPYRIGHT$
@@ -70,7 +70,7 @@ static int mca_pml_base_finalize (void) {
7070
int mca_pml_base_select(bool enable_progress_threads,
7171
bool enable_mpi_threads)
7272
{
73-
int i, priority = 0, best_priority = 0, num_pml = 0, ret = 0;
73+
int i, priority = 0, best_priority = -1, ret = 0;
7474
opal_list_item_t *item = NULL;
7575
mca_base_component_list_item_t *cli = NULL;
7676
mca_pml_base_component_t *component = NULL, *best_component = NULL;
@@ -82,9 +82,6 @@ int mca_pml_base_select(bool enable_progress_threads,
8282
/* Traverse the list of available components; call their init
8383
functions. */
8484

85-
best_priority = -1;
86-
best_component = NULL;
87-
module = NULL;
8885
OBJ_CONSTRUCT(&opened, opal_list_t);
8986
OPAL_LIST_FOREACH(cli, &ompi_pml_base_framework.framework_components, mca_base_component_list_item_t) {
9087
component = (mca_pml_base_component_t *) cli->cli_component;
@@ -121,9 +118,6 @@ int mca_pml_base_select(bool enable_progress_threads,
121118
continue;
122119
}
123120

124-
/* this is a pml that could be considered */
125-
num_pml++;
126-
127121
/* Init component to get its priority */
128122
opal_output_verbose( 10, ompi_pml_base_framework.framework_output,
129123
"select: initializing %s component %s",

0 commit comments

Comments
 (0)