mca/base: use standard verbosity levels
Signed-off-by: Nathan Hjelm <hjelmn@lanl.gov>
Этот коммит содержится в:
родитель
2f447b2c4c
Коммит
0a968de53f
@ -14,6 +14,8 @@
|
||||
* Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved.
|
||||
* Copyright (c) 2015 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* Copyright (c) 2014-2015 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -133,7 +135,7 @@ int mca_base_component_find (const char *directory, mca_base_framework_t *framew
|
||||
find_dyn_components(directory, framework, (const char**)requested_component_names,
|
||||
include_mode);
|
||||
} else {
|
||||
opal_output_verbose(40, 0,
|
||||
opal_output_verbose (MCA_BASE_VERBOSE_INFO, 0,
|
||||
"mca: base: component_find: dso loading for %s MCA components disabled",
|
||||
framework->framework_name);
|
||||
}
|
||||
@ -193,11 +195,11 @@ int mca_base_components_filter (mca_base_framework_t *framework, uint32_t filter
|
||||
if (!can_use || (filter_flags & dummy->data.param_field) != filter_flags) {
|
||||
if (can_use && (filter_flags & MCA_BASE_METADATA_PARAM_CHECKPOINT) &&
|
||||
!(MCA_BASE_METADATA_PARAM_CHECKPOINT & dummy->data.param_field)) {
|
||||
opal_output_verbose(10, output_id,
|
||||
"mca: base: components_filter: "
|
||||
"(%s) Component %s is *NOT* Checkpointable - Disabled",
|
||||
component->reserved,
|
||||
component->mca_component_name);
|
||||
opal_output_verbose (MCA_BASE_VERBOSE_COMPONENT, output_id,
|
||||
"mca: base: components_filter: "
|
||||
"(%s) Component %s is *NOT* Checkpointable - Disabled",
|
||||
component->reserved,
|
||||
component->mca_component_name);
|
||||
}
|
||||
|
||||
opal_list_remove_item (components, &cli->super);
|
||||
@ -206,11 +208,11 @@ int mca_base_components_filter (mca_base_framework_t *framework, uint32_t filter
|
||||
|
||||
OBJ_RELEASE(cli);
|
||||
} else if (filter_flags & MCA_BASE_METADATA_PARAM_CHECKPOINT) {
|
||||
opal_output_verbose(10, output_id,
|
||||
"mca: base: components_filter: "
|
||||
"(%s) Component %s is Checkpointable",
|
||||
component->reserved,
|
||||
component->mca_component_name);
|
||||
opal_output_verbose (MCA_BASE_VERBOSE_COMPONENT, output_id,
|
||||
"mca: base: components_filter: "
|
||||
"(%s) Component %s is Checkpointable",
|
||||
component->reserved,
|
||||
component->mca_component_name);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -314,10 +314,10 @@ int mca_base_component_repository_open (mca_base_framework_t *framework,
|
||||
char *struct_name = NULL;
|
||||
int vl, ret;
|
||||
|
||||
opal_output_verbose(40, 0, "mca_base_component_repository_open: examining dynamic %s MCA component \"%s\" at path %s",
|
||||
ri->ri_type, ri->ri_name, ri->ri_path);
|
||||
opal_output_verbose(MCA_BASE_VERBOSE_INFO, 0, "mca_base_component_repository_open: examining dynamic "
|
||||
"%s MCA component \"%s\" at path %s", ri->ri_type, ri->ri_name, ri->ri_path);
|
||||
|
||||
vl = mca_base_component_show_load_errors ? 0 : 40;
|
||||
vl = mca_base_component_show_load_errors ? MCA_BASE_VERBOSE_ERROR : MCA_BASE_VERBOSE_INFO;
|
||||
|
||||
/* Ensure that this component is not already loaded (should only happen
|
||||
if it was statically loaded). It's an error if it's already
|
||||
@ -327,7 +327,7 @@ int mca_base_component_repository_open (mca_base_framework_t *framework,
|
||||
|
||||
OPAL_LIST_FOREACH(mitem, &framework->framework_components, mca_base_component_list_item_t) {
|
||||
if (0 == strcmp(mitem->cli_component->mca_component_name, ri->ri_name)) {
|
||||
opal_output_verbose(40, 0, "mca_base_component_repository_open: already loaded (ignored)");
|
||||
opal_output_verbose (MCA_BASE_VERBOSE_INFO, 0, "mca_base_component_repository_open: already loaded (ignored)");
|
||||
return OPAL_ERR_BAD_PARAM;
|
||||
}
|
||||
}
|
||||
@ -336,7 +336,7 @@ int mca_base_component_repository_open (mca_base_framework_t *framework,
|
||||
mitem = NULL;
|
||||
|
||||
if (NULL != ri->ri_dlhandle) {
|
||||
opal_output_verbose(40, 0, "mca_base_component_repository_open: already loaded. returning cached component");
|
||||
opal_output_verbose (MCA_BASE_VERBOSE_INFO, 0, "mca_base_component_repository_open: already loaded. returning cached component");
|
||||
mitem = OBJ_NEW(mca_base_component_list_item_t);
|
||||
if (NULL == mitem) {
|
||||
return OPAL_ERR_OUT_OF_RESOURCE;
|
||||
@ -445,8 +445,8 @@ int mca_base_component_repository_open (mca_base_framework_t *framework,
|
||||
ri->ri_component_struct = mitem->cli_component = component_struct;
|
||||
opal_list_append(&framework->framework_components, &mitem->super);
|
||||
|
||||
opal_output_verbose(40, 0, "mca_base_component_repository_open: opened dynamic %s MCA component \"%s\"",
|
||||
ri->ri_type, ri->ri_name);
|
||||
opal_output_verbose (MCA_BASE_VERBOSE_INFO, 0, "mca_base_component_repository_open: opened dynamic %s MCA "
|
||||
"component \"%s\"", ri->ri_type, ri->ri_name);
|
||||
|
||||
return OPAL_SUCCESS;
|
||||
} while (0);
|
||||
|
@ -10,7 +10,7 @@
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2006 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2013 Los Alamos National Security, LLC. All rights
|
||||
* Copyright (c) 2013-2015 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
@ -33,9 +33,9 @@ void mca_base_component_unload (const mca_base_component_t *component, int outpu
|
||||
int ret;
|
||||
|
||||
/* Unload */
|
||||
opal_output_verbose(10, output_id,
|
||||
"mca: base: close: unloading component %s",
|
||||
component->mca_component_name);
|
||||
opal_output_verbose (MCA_BASE_VERBOSE_COMPONENT, output_id,
|
||||
"mca: base: close: unloading component %s",
|
||||
component->mca_component_name);
|
||||
|
||||
ret = mca_base_var_group_find (component->mca_project_name, component->mca_type_name,
|
||||
component->mca_component_name);
|
||||
@ -51,9 +51,9 @@ void mca_base_component_close (const mca_base_component_t *component, int output
|
||||
/* Close */
|
||||
if (NULL != component->mca_close_component) {
|
||||
component->mca_close_component();
|
||||
opal_output_verbose(10, output_id,
|
||||
"mca: base: close: component %s closed",
|
||||
component->mca_component_name);
|
||||
opal_output_verbose (MCA_BASE_VERBOSE_COMPONENT, output_id,
|
||||
"mca: base: close: component %s closed",
|
||||
component->mca_component_name);
|
||||
}
|
||||
|
||||
mca_base_component_unload (component, output_id);
|
||||
|
@ -109,26 +109,26 @@ static int open_components(mca_base_framework_t *framework)
|
||||
}
|
||||
|
||||
/* Announce */
|
||||
opal_output_verbose(10, output_id, "mca: base: components_open: opening %s components",
|
||||
framework->framework_name);
|
||||
opal_output_verbose (MCA_BASE_VERBOSE_COMPONENT, output_id, "mca: base: components_open: opening %s components",
|
||||
framework->framework_name);
|
||||
|
||||
/* Traverse the list of components */
|
||||
OPAL_LIST_FOREACH_SAFE(cli, next, components, mca_base_component_list_item_t) {
|
||||
const mca_base_component_t *component = cli->cli_component;
|
||||
|
||||
opal_output_verbose(10, output_id,
|
||||
"mca: base: components_open: found loaded component %s",
|
||||
component->mca_component_name);
|
||||
opal_output_verbose (MCA_BASE_VERBOSE_COMPONENT, output_id,
|
||||
"mca: base: components_open: found loaded component %s",
|
||||
component->mca_component_name);
|
||||
|
||||
if (NULL != component->mca_open_component) {
|
||||
/* Call open if register didn't call it already */
|
||||
ret = component->mca_open_component();
|
||||
|
||||
if (OPAL_SUCCESS == ret) {
|
||||
opal_output_verbose(10, output_id,
|
||||
"mca: base: components_open: "
|
||||
"component %s open function successful",
|
||||
component->mca_component_name);
|
||||
opal_output_verbose (MCA_BASE_VERBOSE_COMPONENT, output_id,
|
||||
"mca: base: components_open: "
|
||||
"component %s open function successful",
|
||||
component->mca_component_name);
|
||||
} else {
|
||||
if (OPAL_ERR_NOT_AVAILABLE != ret) {
|
||||
/* If the component returns OPAL_ERR_NOT_AVAILABLE,
|
||||
@ -143,15 +143,16 @@ static int open_components(mca_base_framework_t *framework)
|
||||
expected. */
|
||||
|
||||
if (mca_base_component_show_load_errors) {
|
||||
opal_output(0, "mca: base: components_open: "
|
||||
"component %s / %s open function failed",
|
||||
component->mca_type_name,
|
||||
component->mca_component_name);
|
||||
opal_output_verbose (MCA_BASE_VERBOSE_ERROR, output_id,
|
||||
"mca: base: components_open: component %s "
|
||||
"/ %s open function failed",
|
||||
component->mca_type_name,
|
||||
component->mca_component_name);
|
||||
}
|
||||
opal_output_verbose(10, output_id,
|
||||
"mca: base: components_open: "
|
||||
"component %s open function failed",
|
||||
component->mca_component_name);
|
||||
opal_output_verbose (MCA_BASE_VERBOSE_COMPONENT, output_id,
|
||||
"mca: base: components_open: "
|
||||
"component %s open function failed",
|
||||
component->mca_component_name);
|
||||
}
|
||||
|
||||
mca_base_component_close (component, output_id);
|
||||
|
@ -76,25 +76,25 @@ static int register_components(mca_base_framework_t *framework)
|
||||
int output_id = framework->framework_output;
|
||||
|
||||
/* Announce */
|
||||
opal_output_verbose(10, output_id,
|
||||
"mca: base: components_register: registering framework %s components",
|
||||
framework->framework_name);
|
||||
opal_output_verbose (MCA_BASE_VERBOSE_COMPONENT, output_id,
|
||||
"mca: base: components_register: registering framework %s components",
|
||||
framework->framework_name);
|
||||
|
||||
/* Traverse the list of found components */
|
||||
|
||||
OPAL_LIST_FOREACH_SAFE(cli, next, &framework->framework_components, mca_base_component_list_item_t) {
|
||||
component = (mca_base_component_t *)cli->cli_component;
|
||||
|
||||
opal_output_verbose(10, output_id,
|
||||
opal_output_verbose(MCA_BASE_VERBOSE_COMPONENT, output_id,
|
||||
"mca: base: components_register: found loaded component %s",
|
||||
component->mca_component_name);
|
||||
|
||||
/* Call the component's MCA parameter registration function (or open if register doesn't exist) */
|
||||
if (NULL == component->mca_register_component_params) {
|
||||
opal_output_verbose(10, output_id,
|
||||
"mca: base: components_register: "
|
||||
"component %s has no register or open function",
|
||||
component->mca_component_name);
|
||||
opal_output_verbose (MCA_BASE_VERBOSE_COMPONENT, output_id,
|
||||
"mca: base: components_register: "
|
||||
"component %s has no register or open function",
|
||||
component->mca_component_name);
|
||||
ret = OPAL_SUCCESS;
|
||||
} else {
|
||||
ret = component->mca_register_component_params();
|
||||
@ -114,16 +114,17 @@ static int register_components(mca_base_framework_t *framework)
|
||||
expected. */
|
||||
|
||||
if (mca_base_component_show_load_errors) {
|
||||
opal_output(0, "mca: base: components_register: "
|
||||
"component %s / %s register function failed",
|
||||
component->mca_type_name,
|
||||
component->mca_component_name);
|
||||
opal_output_verbose (MCA_BASE_VERBOSE_ERROR, output_id,
|
||||
"mca: base: components_register: component %s "
|
||||
"/ %s register function failed",
|
||||
component->mca_type_name,
|
||||
component->mca_component_name);
|
||||
}
|
||||
|
||||
opal_output_verbose(10, output_id,
|
||||
"mca: base: components_register: "
|
||||
"component %s register function failed",
|
||||
component->mca_component_name);
|
||||
opal_output_verbose (MCA_BASE_VERBOSE_COMPONENT, output_id,
|
||||
"mca: base: components_register: "
|
||||
"component %s register function failed",
|
||||
component->mca_component_name);
|
||||
}
|
||||
|
||||
opal_list_remove_item (&framework->framework_components, &cli->super);
|
||||
@ -134,7 +135,7 @@ static int register_components(mca_base_framework_t *framework)
|
||||
}
|
||||
|
||||
if (NULL != component->mca_register_component_params) {
|
||||
opal_output_verbose (10, output_id, "mca: base: components_register: "
|
||||
opal_output_verbose (MCA_BASE_VERBOSE_COMPONENT, output_id, "mca: base: components_register: "
|
||||
"component %s register function successful",
|
||||
component->mca_component_name);
|
||||
}
|
||||
|
@ -2,6 +2,8 @@
|
||||
* Copyright (c) 2004-2008 The Trustees of Indiana University and Indiana
|
||||
* University Research and Technology
|
||||
* Corporation. All rights reserved.
|
||||
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -40,9 +42,9 @@ int mca_base_select(const char *type_name, int output_id,
|
||||
*best_module = NULL;
|
||||
*best_component = NULL;
|
||||
|
||||
opal_output_verbose(10, output_id,
|
||||
"mca:base:select: Auto-selecting %s components",
|
||||
type_name);
|
||||
opal_output_verbose (MCA_BASE_VERBOSE_COMPONENT, output_id,
|
||||
"mca:base:select: Auto-selecting %s components",
|
||||
type_name);
|
||||
|
||||
/*
|
||||
* Traverse the list of available components.
|
||||
@ -55,18 +57,18 @@ int mca_base_select(const char *type_name, int output_id,
|
||||
* If there is a query function then use it.
|
||||
*/
|
||||
if (NULL == component->mca_query_component) {
|
||||
opal_output_verbose(5, output_id,
|
||||
"mca:base:select:(%5s) Skipping component [%s]. It does not implement a query function",
|
||||
type_name, component->mca_component_name );
|
||||
opal_output_verbose (MCA_BASE_VERBOSE_COMPONENT, output_id,
|
||||
"mca:base:select:(%5s) Skipping component [%s]. It does not implement a query function",
|
||||
type_name, component->mca_component_name );
|
||||
continue;
|
||||
}
|
||||
|
||||
/*
|
||||
* Query this component for the module and priority
|
||||
*/
|
||||
opal_output_verbose(5, output_id,
|
||||
"mca:base:select:(%5s) Querying component [%s]",
|
||||
type_name, component->mca_component_name);
|
||||
opal_output_verbose (MCA_BASE_VERBOSE_COMPONENT, output_id,
|
||||
"mca:base:select:(%5s) Querying component [%s]",
|
||||
type_name, component->mca_component_name);
|
||||
|
||||
component->mca_query_component(&module, &priority);
|
||||
|
||||
@ -74,18 +76,18 @@ int mca_base_select(const char *type_name, int output_id,
|
||||
* If no module was returned, then skip component
|
||||
*/
|
||||
if (NULL == module) {
|
||||
opal_output_verbose(5, output_id,
|
||||
"mca:base:select:(%5s) Skipping component [%s]. Query failed to return a module",
|
||||
type_name, component->mca_component_name );
|
||||
opal_output_verbose (MCA_BASE_VERBOSE_COMPONENT, output_id,
|
||||
"mca:base:select:(%5s) Skipping component [%s]. Query failed to return a module",
|
||||
type_name, component->mca_component_name );
|
||||
continue;
|
||||
}
|
||||
|
||||
/*
|
||||
* Determine if this is the best module we have seen by looking the priority
|
||||
*/
|
||||
opal_output_verbose(5, output_id,
|
||||
"mca:base:select:(%5s) Query of component [%s] set priority to %d",
|
||||
type_name, component->mca_component_name, priority);
|
||||
opal_output_verbose (MCA_BASE_VERBOSE_COMPONENT, output_id,
|
||||
"mca:base:select:(%5s) Query of component [%s] set priority to %d",
|
||||
type_name, component->mca_component_name, priority);
|
||||
if (priority > best_priority) {
|
||||
best_priority = priority;
|
||||
*best_component = component;
|
||||
@ -99,7 +101,7 @@ int mca_base_select(const char *type_name, int output_id,
|
||||
* Make sure we found something in the process.
|
||||
*/
|
||||
if (NULL == *best_component) {
|
||||
opal_output_verbose(5, output_id,
|
||||
opal_output_verbose (MCA_BASE_VERBOSE_COMPONENT, output_id,
|
||||
"mca:base:select:(%5s) No component selected!",
|
||||
type_name);
|
||||
/*
|
||||
@ -111,9 +113,9 @@ int mca_base_select(const char *type_name, int output_id,
|
||||
return OPAL_ERR_NOT_FOUND;
|
||||
}
|
||||
|
||||
opal_output_verbose(5, output_id,
|
||||
"mca:base:select:(%5s) Selected component [%s]",
|
||||
type_name, (*best_component)->mca_component_name);
|
||||
opal_output_verbose (MCA_BASE_VERBOSE_COMPONENT, output_id,
|
||||
"mca:base:select:(%5s) Selected component [%s]",
|
||||
type_name, (*best_component)->mca_component_name);
|
||||
|
||||
/*
|
||||
* Close the non-selected components
|
||||
|
@ -140,7 +140,7 @@ int mca_base_open(void)
|
||||
gethostname(hostname, 64);
|
||||
asprintf(&lds.lds_prefix, "[%s:%05d] ", hostname, getpid());
|
||||
opal_output_reopen(0, &lds);
|
||||
opal_output_verbose(5, 0, "mca: base: opening components");
|
||||
opal_output_verbose (MCA_BASE_VERBOSE_COMPONENT, 0, "mca: base: opening components");
|
||||
free(lds.lds_prefix);
|
||||
|
||||
/* Open up the component repository */
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user