Skip to content

Commit d68ca89

Browse files
committed
cm: fix selection priority
This patch removes a priority check that disables cm if the previous pml had higher priority. The check was incorrect as coded and is unnecessary as we finalize all but one pml anyway. Fixes open-mpi#1035 (cherry picked from open-mpi/ompi@2fd176a) Signed-off-by: Nathan Hjelm <[email protected]>
1 parent e1ab66c commit d68ca89

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

ompi/mca/pml/cm/pml_cm_component.c

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
12
/*
23
* Copyright (c) 2006-2007 The Trustees of Indiana University and Indiana
34
* University Research and Technology
@@ -9,6 +10,8 @@
910
* All rights reserved.
1011
* Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved.
1112
* Copyright (c) 2013 Sandia National Laboratories. All rights reserved.
13+
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
14+
* reserved.
1215
* $COPYRIGHT$
1316
*
1417
* Additional copyrights may follow
@@ -143,27 +146,26 @@ mca_pml_cm_component_init(int* priority,
143146
{
144147
int ret;
145148

146-
if((*priority) > ompi_pml_cm.default_priority) {
147-
*priority = ompi_pml_cm.default_priority;
148-
return NULL;
149-
}
150-
*priority = ompi_pml_cm.default_priority;
151-
opal_output_verbose( 10, 0,
149+
opal_output_verbose( 10, 0,
152150
"in cm pml priority is %d\n", *priority);
153151
/* find a useable MTL */
154152
ret = ompi_mtl_base_select(enable_progress_threads, enable_mpi_threads);
155-
if (OMPI_SUCCESS != ret) {
153+
if (OMPI_SUCCESS != ret) {
156154
*priority = -1;
157155
return NULL;
158156
} else if((strcmp(ompi_mtl_base_selected_component->mtl_version.mca_component_name, "psm") == 0) ||
159157
(strcmp(ompi_mtl_base_selected_component->mtl_version.mca_component_name, "psm2") == 0) ||
160-
(strcmp(ompi_mtl_base_selected_component->mtl_version.mca_component_name, "mxm") == 0)) {
158+
(strcmp(ompi_mtl_base_selected_component->mtl_version.mca_component_name, "mxm") == 0) ||
159+
(strcmp(ompi_mtl_base_selected_component->mtl_version.mca_component_name, "ofi") == 0) ||
160+
(strcmp(ompi_mtl_base_selected_component->mtl_version.mca_component_name, "portals4") == 0)) {
161161
/*
162162
* If MTL is MXM or PSM then up our priority
163163
* For every other communication layer having MTLs and BTLs, the user/admin
164164
* may still select PML/ob1 (BTLs) or PML/cm (MTLs) if preferable for the app/site.
165165
*/
166166
*priority = 30;
167+
} else {
168+
*priority = ompi_pml_cm.default_priority;
167169
}
168170

169171

0 commit comments

Comments
 (0)