diff --git a/ompi/mca/mtl/base/mtl_base_frame.c b/ompi/mca/mtl/base/mtl_base_frame.c index 55260d19c9..ea5784304a 100644 --- a/ompi/mca/mtl/base/mtl_base_frame.c +++ b/ompi/mca/mtl/base/mtl_base_frame.c @@ -49,8 +49,9 @@ mca_mtl_base_module_t *ompi_mtl = NULL; * need to reexamine this at a later time. */ int -ompi_mtl_base_select(bool enable_progress_threads, - bool enable_mpi_threads) +ompi_mtl_base_select (bool enable_progress_threads, + bool enable_mpi_threads, + int *priority) { int ret = OMPI_ERR_NOT_FOUND; mca_mtl_base_component_t *best_component = NULL; @@ -84,6 +85,7 @@ ompi_mtl_base_select(bool enable_progress_threads, "select: init returned success"); ompi_mtl_base_selected_component = best_component; ompi_mtl = best_module; + *priority = best_priority; ret = OMPI_SUCCESS; } diff --git a/ompi/mca/mtl/mxm/mtl_mxm_component.c b/ompi/mca/mtl/mxm/mtl_mxm_component.c index 6afa47f096..28c04a3efa 100644 --- a/ompi/mca/mtl/mxm/mtl_mxm_component.c +++ b/ompi/mca/mtl/mxm/mtl_mxm_component.c @@ -131,7 +131,8 @@ static int ompi_mtl_mxm_component_register(void) free(runtime_version); #endif - param_priority = 100; + /* set high enought to defeat ob1's default */ + param_priority = 30; (void) mca_base_component_var_register (c, "priority", "Priority of the MXM MTL component", MCA_BASE_VAR_TYPE_INT, NULL, 0, 0, diff --git a/ompi/mca/mtl/ofi/mtl_ofi_component.c b/ompi/mca/mtl/ofi/mtl_ofi_component.c index 35fb4e67ff..4c9d444a61 100644 --- a/ompi/mca/mtl/ofi/mtl_ofi_component.c +++ b/ompi/mca/mtl/ofi/mtl_ofi_component.c @@ -56,7 +56,7 @@ mca_mtl_ofi_component_t mca_mtl_ofi_component = { static int ompi_mtl_ofi_component_register(void) { - param_priority = 10; /* for now give a lower priority than the psm mtl */ + param_priority = 10; /* for now give a lower priority than the psm mtl and ob1 */ mca_base_component_var_register(&mca_mtl_ofi_component.super.mtl_version, "priority", "Priority of the OFI MTL component", MCA_BASE_VAR_TYPE_INT, NULL, 0, 0, diff --git a/ompi/mca/mtl/psm/mtl_psm_component.c b/ompi/mca/mtl/psm/mtl_psm_component.c index b018d7f587..b4b71b2f99 100644 --- a/ompi/mca/mtl/psm/mtl_psm_component.c +++ b/ompi/mca/mtl/psm/mtl_psm_component.c @@ -90,7 +90,8 @@ ompi_mtl_psm_component_register(void) #endif - param_priority = 100; + /* set priority high enough to beat ob1's default */ + param_priority = 30; (void) mca_base_component_var_register (&mca_mtl_psm_component.super.mtl_version, "priority", "Priority of the PSM MTL component", MCA_BASE_VAR_TYPE_INT, NULL, 0, 0, diff --git a/ompi/mca/mtl/psm2/mtl_psm2_component.c b/ompi/mca/mtl/psm2/mtl_psm2_component.c index 5a43f77a6a..28174728a9 100644 --- a/ompi/mca/mtl/psm2/mtl_psm2_component.c +++ b/ompi/mca/mtl/psm2/mtl_psm2_component.c @@ -1,3 +1,4 @@ +/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ /* * Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana * University Research and Technology @@ -10,7 +11,7 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2006-2010 QLogic Corporation. All rights reserved. - * Copyright (c) 2012-2013 Los Alamos National Security, LLC. + * Copyright (c) 2012-2015 Los Alamos National Security, LLC. * All rights reserved. * Copyright (c) 2013-2015 Intel, Inc. All rights reserved * $COPYRIGHT$ @@ -85,7 +86,8 @@ ompi_mtl_psm2_component_register(void) MCA_BASE_VAR_SCOPE_READONLY, &ompi_mtl_psm2.connect_timeout); - param_priority = 120; + /* set priority high enough to beat ob1's default (also set higher than psm) */ + param_priority = 40; (void) mca_base_component_var_register (&mca_mtl_psm2_component.super.mtl_version, "priority", "Priority of the PSM2 MTL component", MCA_BASE_VAR_TYPE_INT, NULL, 0, 0, diff --git a/ompi/mca/pml/cm/pml_cm.h b/ompi/mca/pml/cm/pml_cm.h index 471b4f6056..2c697910d9 100644 --- a/ompi/mca/pml/cm/pml_cm.h +++ b/ompi/mca/pml/cm/pml_cm.h @@ -50,7 +50,6 @@ struct ompi_pml_cm_t { int free_list_num; int free_list_max; int free_list_inc; - int default_priority; }; typedef struct ompi_pml_cm_t ompi_pml_cm_t; extern ompi_pml_cm_t ompi_pml_cm; diff --git a/ompi/mca/pml/cm/pml_cm_component.c b/ompi/mca/pml/cm/pml_cm_component.c index 94e12d9c9c..72f79312cf 100644 --- a/ompi/mca/pml/cm/pml_cm_component.c +++ b/ompi/mca/pml/cm/pml_cm_component.c @@ -101,14 +101,6 @@ mca_pml_cm_component_register(void) MCA_BASE_VAR_SCOPE_READONLY, &ompi_pml_cm.free_list_inc); - ompi_pml_cm.default_priority = 10; - (void) mca_base_component_var_register(&mca_pml_cm_component.pmlm_version, "priority", - "CM PML selection priority", - MCA_BASE_VAR_TYPE_INT, NULL, 0, 0, - OPAL_INFO_LVL_9, - MCA_BASE_VAR_SCOPE_READONLY, - &ompi_pml_cm.default_priority); - return OPAL_SUCCESS; } @@ -143,26 +135,14 @@ mca_pml_cm_component_init(int* priority, { int ret; + *priority = -1; + opal_output_verbose( 10, 0, "in cm pml priority is %d\n", *priority); /* find a useable MTL */ - ret = ompi_mtl_base_select(enable_progress_threads, enable_mpi_threads); + ret = ompi_mtl_base_select(enable_progress_threads, enable_mpi_threads, priority); if (OMPI_SUCCESS != ret) { - *priority = -1; return NULL; - } else if((strcmp(ompi_mtl_base_selected_component->mtl_version.mca_component_name, "psm") == 0) || - (strcmp(ompi_mtl_base_selected_component->mtl_version.mca_component_name, "psm2") == 0) || - (strcmp(ompi_mtl_base_selected_component->mtl_version.mca_component_name, "mxm") == 0) || - (strcmp(ompi_mtl_base_selected_component->mtl_version.mca_component_name, "ofi") == 0) || - (strcmp(ompi_mtl_base_selected_component->mtl_version.mca_component_name, "portals4") == 0)) { - /* - * If MTL is MXM or PSM then up our priority - * For every other communication layer having MTLs and BTLs, the user/admin - * may still select PML/ob1 (BTLs) or PML/cm (MTLs) if preferable for the app/site. - */ - *priority = 30; - } else { - *priority = ompi_pml_cm.default_priority; } if (ompi_mtl->mtl_flags & MCA_MTL_BASE_FLAG_REQUIRE_WORLD) {