pml/cm: use the priority of the mtl component
This commit changes the priority of mtl components to be relative to pml/ob1 and updates the mtl interface to expose this priority. cm now sets its own priority based on the priority of the selected mtl component. Signed-off-by: Nathan Hjelm <hjelmn@lanl.gov>
Этот коммит содержится в:
родитель
8b5810f7f7
Коммит
53f6b57c0a
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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;
|
||||
|
@ -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) {
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user