1
1

* Clean up some of the debugging output so that it is a bit more obvious who

is calling what.  Hopefully will make some of the startup issues a bit more
  obvious to debug

This commit was SVN r2246.
Этот коммит содержится в:
Brian Barrett 2004-08-20 01:12:50 +00:00
родитель 242f062386
Коммит 0e6e74115e
10 изменённых файлов: 93 добавлений и 55 удалений

Просмотреть файл

@ -36,13 +36,15 @@ int mca_base_components_close(int output_id,
if (NULL != component->mca_close_component) { if (NULL != component->mca_close_component) {
component->mca_close_component(); component->mca_close_component();
ompi_output_verbose(10, output_id, "close: component %s closed", ompi_output_verbose(10, output_id,
"mca: base: close: component %s closed",
component->mca_component_name); component->mca_component_name);
} }
/* Unload */ /* Unload */
ompi_output_verbose(10, output_id, "close: unloading component %s", ompi_output_verbose(10, output_id,
"mca: base: close: unloading component %s",
component->mca_component_name); component->mca_component_name);
mca_base_component_repository_release((mca_base_component_t *) component); mca_base_component_repository_release((mca_base_component_t *) component);
} }

Просмотреть файл

@ -63,7 +63,7 @@ int mca_base_components_open(const char *type_name, int output_id,
if (output_id != 0) { if (output_id != 0) {
ompi_output_set_verbosity(output_id, verbose_level); ompi_output_set_verbosity(output_id, verbose_level);
} }
ompi_output_verbose(10, output_id, "open: Looking for components"); ompi_output_verbose(10, output_id, "mca: base: open: Looking for components");
/* Find and load all available components */ /* Find and load all available components */
@ -163,13 +163,14 @@ static int open_components(const char *type_name, int output_id,
if (NULL == requested_component_names) { if (NULL == requested_component_names) {
ompi_output_verbose(10, output_id, ompi_output_verbose(10, output_id,
"open: looking for any %s components", type_name); "mca: base: open: "
"looking for any %s components", type_name);
} else { } else {
ompi_output_verbose(10, output_id, ompi_output_verbose(10, output_id,
"open: looking for specific %s components:", "mca: base: open: looking for specific %s components:",
type_name); type_name);
for (i = 0; NULL != requested_component_names[i]; ++i) { for (i = 0; NULL != requested_component_names[i]; ++i) {
ompi_output_verbose(10, output_id, "open: %s", ompi_output_verbose(10, output_id, "mca: base: open: %s",
requested_component_names[i]); requested_component_names[i]);
} }
} }
@ -202,24 +203,28 @@ static int open_components(const char *type_name, int output_id,
if (acceptable) { if (acceptable) {
opened = called_open = false; opened = called_open = false;
ompi_output_verbose(10, output_id, "open: found loaded component %s", ompi_output_verbose(10, output_id,
"mca: base: open: found loaded component %s",
component->mca_component_name); component->mca_component_name);
if (NULL == component->mca_open_component) { if (NULL == component->mca_open_component) {
opened = true; opened = true;
ompi_output_verbose(10, output_id, ompi_output_verbose(10, output_id,
"open: component %s has no open function", "mca: base: open: "
"component %s has no open function",
component->mca_component_name); component->mca_component_name);
} else { } else {
called_open = true; called_open = true;
if (MCA_SUCCESS == component->mca_open_component()) { if (MCA_SUCCESS == component->mca_open_component()) {
opened = true; opened = true;
ompi_output_verbose(10, output_id, ompi_output_verbose(10, output_id,
"open: component %s open function successful", "mca: base: open: "
"component %s open function successful",
component->mca_component_name); component->mca_component_name);
} else { } else {
ompi_output_verbose(10, output_id, ompi_output_verbose(10, output_id,
"open: component %s open function failed", "mca: base: open: "
"component %s open function failed",
component->mca_component_name); component->mca_component_name);
} }
} }
@ -232,13 +237,13 @@ static int open_components(const char *type_name, int output_id,
component->mca_close_component(); component->mca_close_component();
} }
ompi_output_verbose(10, output_id, ompi_output_verbose(10, output_id,
"open: component %s closed", "mca: base: open: component %s closed",
component->mca_component_name); component->mca_component_name);
called_open = false; called_open = false;
} }
mca_base_component_repository_release(component); mca_base_component_repository_release(component);
ompi_output_verbose(10, output_id, ompi_output_verbose(10, output_id,
"open: component %s unloaded", "mca: base: open: component %s unloaded",
component->mca_component_name); component->mca_component_name);
} }

Просмотреть файл

@ -59,7 +59,7 @@ int mca_base_open(void)
set_defaults(&lds); set_defaults(&lds);
} }
ompi_output_reopen(0, &lds); ompi_output_reopen(0, &lds);
ompi_output_verbose(5, 0, " Opening"); ompi_output_verbose(5, 0, "mca: base: opening components");
/* Open up the component repository */ /* Open up the component repository */

Просмотреть файл

@ -22,7 +22,7 @@
/* /*
* Global variables * Global variables
*/ */
int mca_llm_base_output = -1; int mca_llm_base_output = 0;
ompi_list_t mca_llm_base_components_available; ompi_list_t mca_llm_base_components_available;
mca_llm_base_component_t mca_llm_base_selected_component; mca_llm_base_component_t mca_llm_base_selected_component;

Просмотреть файл

@ -52,6 +52,9 @@ mca_llm_base_select(const char *active_pcm,
ompi_list_t opened; ompi_list_t opened;
opened_component_t *oc; opened_component_t *oc;
ompi_output_verbose(10, mca_llm_base_output,
"llm: base: select: started selection code");
/* Traverse the list of available components; call their init /* Traverse the list of available components; call their init
functions. */ functions. */
@ -65,21 +68,23 @@ mca_llm_base_select(const char *active_pcm,
component = (mca_llm_base_component_t *) cli->cli_component; component = (mca_llm_base_component_t *) cli->cli_component;
ompi_output_verbose(10, mca_llm_base_output, ompi_output_verbose(10, mca_llm_base_output,
"select: initializing %s component %s", "llm: base: select: initializing %s component %s",
component->llm_version.mca_type_name, component->llm_version.mca_type_name,
component->llm_version.mca_component_name); component->llm_version.mca_component_name);
if (NULL == component->llm_init) { if (NULL == component->llm_init) {
ompi_output_verbose(10, mca_llm_base_output, ompi_output_verbose(10, mca_llm_base_output,
"select: no init function; ignoring component"); "llm: base: select: "
"no init function; ignoring component");
} else { } else {
module = component->llm_init(active_pcm, &priority, &user_threads, module = component->llm_init(active_pcm, &priority, &user_threads,
&hidden_threads); &hidden_threads);
if (NULL == module) { if (NULL == module) {
ompi_output_verbose(10, mca_llm_base_output, ompi_output_verbose(10, mca_llm_base_output,
"select: init returned failure"); "llm: base: select: init returned failure");
} else { } else {
ompi_output_verbose(10, mca_llm_base_output, ompi_output_verbose(10, mca_llm_base_output,
"select: init returned priority %d", priority); "llm: base: select: init returned priority %d",
priority);
if (priority > best_priority) { if (priority > best_priority) {
best_priority = priority; best_priority = priority;
best_user_threads = user_threads; best_user_threads = user_threads;
@ -124,7 +129,8 @@ mca_llm_base_select(const char *active_pcm,
oc->oc_component->llm_finalize(); oc->oc_component->llm_finalize();
ompi_output_verbose(10, mca_llm_base_output, ompi_output_verbose(10, mca_llm_base_output,
"select: component %s not selected / finalized", "llm: base: select: "
"component %s not selected / finalized",
component->llm_version.mca_component_name); component->llm_version.mca_component_name);
} }
} }
@ -145,12 +151,15 @@ mca_llm_base_select(const char *active_pcm,
*selected = *best_module; *selected = *best_module;
*allow_multi_user_threads = best_user_threads; *allow_multi_user_threads = best_user_threads;
*have_hidden_threads = best_hidden_threads; *have_hidden_threads = best_hidden_threads;
ompi_output_verbose(10, mca_llm_base_output, ompi_output_verbose(5, mca_llm_base_output,
"select: component %s selected", "llm: base: select: component %s selected",
component->llm_version.mca_component_name); component->llm_version.mca_component_name);
OBJ_DESTRUCT(&opened); OBJ_DESTRUCT(&opened);
ompi_output_verbose(10, mca_llm_base_output,
"llm: base: select: completed");
/* All done */ /* All done */
return OMPI_SUCCESS; return OMPI_SUCCESS;

Просмотреть файл

@ -8,6 +8,7 @@
#include "mca/base/base.h" #include "mca/base/base.h"
#include "mca/pcm/pcm.h" #include "mca/pcm/pcm.h"
#include "mca/pcm/base/base.h" #include "mca/pcm/base/base.h"
#include "util/output.h"
/* /*
* The following file was created by configure. It contains extern * The following file was created by configure. It contains extern
@ -38,6 +39,8 @@ int mca_pcm_base_open(void)
if (OMPI_SUCCESS != if (OMPI_SUCCESS !=
mca_base_components_open("pcm", 0, mca_pcm_base_static_components, mca_base_components_open("pcm", 0, mca_pcm_base_static_components,
&mca_pcm_base_components_available)) { &mca_pcm_base_components_available)) {
ompi_output_verbose(5, mca_pcm_base_output,
"pcm: error opening components");
return OMPI_ERROR; return OMPI_ERROR;
} }

Просмотреть файл

@ -33,8 +33,8 @@ int mca_pcm_base_select(bool *allow_multi_user_threads,
mca_pcm_base_module_t *module, *best_module; mca_pcm_base_module_t *module, *best_module;
extern ompi_list_t mca_pcm_base_components_available; extern ompi_list_t mca_pcm_base_components_available;
ompi_output_verbose(100, mca_pcm_base_output, ompi_output_verbose(10, mca_pcm_base_output,
"mca_pcm_base_select started"); "pcm: base: select: starting selection code");
/* Traverse the list of available components; call their init /* Traverse the list of available components; call their init
functions. */ functions. */
@ -48,20 +48,22 @@ int mca_pcm_base_select(bool *allow_multi_user_threads,
component = (mca_pcm_base_component_t *) cli->cli_component; component = (mca_pcm_base_component_t *) cli->cli_component;
ompi_output_verbose(10, mca_pcm_base_output, ompi_output_verbose(10, mca_pcm_base_output,
"select: initializing %s component %s", "pcm: base: select: initializing %s component %s",
component->pcm_version.mca_type_name, component->pcm_version.mca_type_name,
component->pcm_version.mca_component_name); component->pcm_version.mca_component_name);
if (NULL == component->pcm_init) { if (NULL == component->pcm_init) {
ompi_output_verbose(10, mca_pcm_base_output, ompi_output_verbose(10, mca_pcm_base_output,
"select: no init function; ignoring component"); "pcm: base: select: "
"no init function; ignoring component");
} else { } else {
module = component->pcm_init(&priority, &user_threads, &hidden_threads); module = component->pcm_init(&priority, &user_threads, &hidden_threads);
if (NULL == module) { if (NULL == module) {
ompi_output_verbose(10, mca_pcm_base_output, ompi_output_verbose(10, mca_pcm_base_output,
"select: init returned failure"); "pcm: base: select: init returned failure");
} else { } else {
ompi_output_verbose(10, mca_pcm_base_output, ompi_output_verbose(10, mca_pcm_base_output,
"select: init returned priority %d", priority); "pcm: base: select: init returned priority %d",
priority);
if (priority > best_priority) { if (priority > best_priority) {
best_priority = priority; best_priority = priority;
best_user_threads = user_threads; best_user_threads = user_threads;
@ -100,7 +102,7 @@ int mca_pcm_base_select(bool *allow_multi_user_threads,
component->pcm_finalize(); component->pcm_finalize();
ompi_output_verbose(10, mca_pcm_base_output, ompi_output_verbose(10, mca_pcm_base_output,
"select: component %s finalized", "pcm: base: select: component %s finalized",
component->pcm_version.mca_component_name); component->pcm_version.mca_component_name);
} }
} }
@ -110,7 +112,8 @@ int mca_pcm_base_select(bool *allow_multi_user_threads,
available list all unselected components. The available list will available list all unselected components. The available list will
contain only the selected component. */ contain only the selected component. */
mca_base_components_close(mca_pcm_base_output, &mca_pcm_base_components_available, mca_base_components_close(mca_pcm_base_output,
&mca_pcm_base_components_available,
(mca_base_component_t *) best_component); (mca_base_component_t *) best_component);
/* Save the winner */ /* Save the winner */
@ -119,10 +122,12 @@ int mca_pcm_base_select(bool *allow_multi_user_threads,
mca_pcm = *best_module; mca_pcm = *best_module;
*allow_multi_user_threads = best_user_threads; *allow_multi_user_threads = best_user_threads;
*have_hidden_threads = best_hidden_threads; *have_hidden_threads = best_hidden_threads;
ompi_output_verbose(10, mca_pcm_base_output, ompi_output_verbose(5, mca_pcm_base_output,
"select: component %s initialized", "pcm: base: select: component %s selected and initialized",
best_component->pcm_version.mca_component_name); best_component->pcm_version.mca_component_name);
ompi_output_verbose(10, mca_pcm_base_output,
"pcm: base: select: completed");
/* All done */ /* All done */
return OMPI_SUCCESS; return OMPI_SUCCESS;

Просмотреть файл

@ -96,35 +96,45 @@ mca_pcm_cofs_init(int *priority, bool *allow_multi_user_threads,
/* lookup parameters for local name */ /* lookup parameters for local name */
mca_base_param_lookup_int(mca_pcm_cofs_num_procs_param, &value); mca_base_param_lookup_int(mca_pcm_cofs_num_procs_param, &value);
if(value <= 0) { if(value <= 0) {
ompi_output(0, "mca_pcm_cofs_init: missing/invalid value for OMPI_MCA_pcm_cofs_num_procs\n"); ompi_output_verbose(1001, 0,
"pcm: cofs: init: missing/invalid "
"value for OMPI_MCA_pcm_cofs_num_procs");
return NULL; return NULL;
} }
mca_pcm_cofs_num_procs = value; mca_pcm_cofs_num_procs = value;
mca_base_param_lookup_int(mca_pcm_cofs_cellid_param, &value); mca_base_param_lookup_int(mca_pcm_cofs_cellid_param, &value);
if(value < 0) { if(value < 0) {
ompi_output(0, "mca_pcm_cofs_init: missing/invalid value for OMPI_MCA_pcm_cofs_cellid\n"); ompi_output_verbose(1001, 0,
"pcm: cofs: init: missing/invalid "
"value for OMPI_MCA_pcm_cofs_cellid");
return NULL; return NULL;
} }
cellid = value; cellid = value;
mca_base_param_lookup_int(mca_pcm_cofs_jobid_param, &value); mca_base_param_lookup_int(mca_pcm_cofs_jobid_param, &value);
if(value < 0) { if(value < 0) {
ompi_output(0, "mca_pcm_cofs_init: missing/invalid value for OMPI_MCA_pcm_cofs_jobid\n"); ompi_output_verbose(1001, 0,
"pcm: cofs: init: missing/invalid "
"value for OMPI_MCA_pcm_cofs_jobid");
return NULL; return NULL;
} }
jobid = value; jobid = value;
mca_base_param_lookup_int(mca_pcm_cofs_procid_param, &value); mca_base_param_lookup_int(mca_pcm_cofs_procid_param, &value);
if(value < 0) { if(value < 0) {
ompi_output(0, "mca_pcm_cofs_init: missing value for OMPI_MCA_pcm_cofs_procid\n"); ompi_output_verbose(1001, 0,
"pcm: cofs: init: "
"missing value for OMPI_MCA_pcm_cofs_procid");
return NULL; return NULL;
} }
mca_pcm_cofs_procid = value; mca_pcm_cofs_procid = value;
mca_pcm_cofs_procs = (ompi_process_name_t*)malloc(sizeof(ompi_process_name_t) * mca_pcm_cofs_num_procs); mca_pcm_cofs_procs = (ompi_process_name_t*)malloc(sizeof(ompi_process_name_t) * mca_pcm_cofs_num_procs);
if(NULL == mca_pcm_cofs_procs) { if(NULL == mca_pcm_cofs_procs) {
ompi_output(0, "mca_pcm_cofs_init: missing value for OMPI_MCA_pcm_cofs_num_procs\n"); ompi_output_verbose(1001, 0,
"pcm: cofs: init: "
"missing value for OMPI_MCA_pcm_cofs_num_procs");
return NULL; return NULL;
} }

Просмотреть файл

@ -64,7 +64,7 @@ ompi_output_stream_t mca_pcm_rsh_output_stream = {
false, /* lds_want_syslog */ false, /* lds_want_syslog */
0, /* lds_syslog_priority */ 0, /* lds_syslog_priority */
NULL, /* lds_syslog_ident */ NULL, /* lds_syslog_ident */
"pcm_rsh: ", /* lds_prefix */ "pcm: rsh: ", /* lds_prefix */
true, /* lds_want_stdout */ true, /* lds_want_stdout */
false, /* lds_want_stderr */ false, /* lds_want_stderr */
true, /* lds_want_file */ true, /* lds_want_file */
@ -157,12 +157,12 @@ mca_pcm_rsh_init(int *priority,
*allow_multi_user_threads = true; *allow_multi_user_threads = true;
*have_hidden_threads = false; *have_hidden_threads = false;
ompi_output_verbose(10, mca_pcm_rsh_output, "start llm selection");
ret = mca_llm_base_select("pcm", &mca_pcm_rsh_llm, ret = mca_llm_base_select("pcm", &mca_pcm_rsh_llm,
allow_multi_user_threads, allow_multi_user_threads,
have_hidden_threads); have_hidden_threads);
if (OMPI_SUCCESS != ret) { if (OMPI_SUCCESS != ret) {
/* well, that can't be good. guess we can't run */ /* well, that can't be good. guess we can't run */
ompi_output_verbose(5, mca_pcm_rsh_output, "select: no llm found");
return NULL; return NULL;
} }
@ -172,8 +172,6 @@ mca_pcm_rsh_init(int *priority,
mca_pcm_rsh_1_0_0.pcm_deallocate_resources = mca_pcm_rsh_1_0_0.pcm_deallocate_resources =
mca_pcm_rsh_llm.llm_deallocate_resources; mca_pcm_rsh_llm.llm_deallocate_resources;
ompi_output_verbose(10, mca_pcm_rsh_output, "stop llm selection");
/* DO SOME PARAM "FIXING" */ /* DO SOME PARAM "FIXING" */
/* BWB - remove param fixing before 1.0 */ /* BWB - remove param fixing before 1.0 */
if (0 == mca_pcm_rsh_no_profile) { if (0 == mca_pcm_rsh_no_profile) {

Просмотреть файл

@ -33,8 +33,8 @@ int mca_pcmclient_base_select(bool *allow_multi_user_threads,
mca_pcmclient_base_module_t *module, *best_module; mca_pcmclient_base_module_t *module, *best_module;
extern ompi_list_t mca_pcmclient_base_components_available; extern ompi_list_t mca_pcmclient_base_components_available;
ompi_output_verbose(100, mca_pcmclient_base_output, ompi_output_verbose(10, mca_pcmclient_base_output,
"mca_pcmclient_base_select started"); "pcmclient: base: select: started selection code");
/* Traverse the list of available components; call their init /* Traverse the list of available components; call their init
functions. */ functions. */
@ -48,20 +48,22 @@ int mca_pcmclient_base_select(bool *allow_multi_user_threads,
component = (mca_pcmclient_base_component_t *) cli->cli_component; component = (mca_pcmclient_base_component_t *) cli->cli_component;
ompi_output_verbose(10, mca_pcmclient_base_output, ompi_output_verbose(10, mca_pcmclient_base_output,
"select: initializing %s component %s", "pcmclient: base: select: initializing %s component %s",
component->pcmclient_version.mca_type_name, component->pcmclient_version.mca_type_name,
component->pcmclient_version.mca_component_name); component->pcmclient_version.mca_component_name);
if (NULL == component->pcmclient_init) { if (NULL == component->pcmclient_init) {
ompi_output_verbose(10, mca_pcmclient_base_output, ompi_output_verbose(10, mca_pcmclient_base_output,
"select: no init function; ignoring component"); "pcmclient: base: select: no init function; "
"ignoring component");
} else { } else {
module = component->pcmclient_init(&priority, &user_threads, &hidden_threads); module = component->pcmclient_init(&priority, &user_threads, &hidden_threads);
if (NULL == module) { if (NULL == module) {
ompi_output_verbose(10, mca_pcmclient_base_output, ompi_output_verbose(10, mca_pcmclient_base_output,
"select: init returned failure"); "pcmclient: base: select: init returned failure");
} else { } else {
ompi_output_verbose(10, mca_pcmclient_base_output, ompi_output_verbose(10, mca_pcmclient_base_output,
"select: init returned priority %d", priority); "pcmclient: base: select: init returned priority %d",
priority);
if (priority > best_priority) { if (priority > best_priority) {
best_priority = priority; best_priority = priority;
best_user_threads = user_threads; best_user_threads = user_threads;
@ -77,7 +79,7 @@ int mca_pcmclient_base_select(bool *allow_multi_user_threads,
if (NULL == best_component) { if (NULL == best_component) {
/* JMS Replace with show_help */ /* JMS Replace with show_help */
ompi_abort(1, "No PCMCLIENT component available. This shouldn't happen."); ompi_abort(1, "No pcmclient component available. This shouldn't happen.");
} }
/* Finalize all non-selected components */ /* Finalize all non-selected components */
@ -100,7 +102,7 @@ int mca_pcmclient_base_select(bool *allow_multi_user_threads,
component->pcmclient_finalize(); component->pcmclient_finalize();
ompi_output_verbose(10, mca_pcmclient_base_output, ompi_output_verbose(10, mca_pcmclient_base_output,
"select: component %s finalized", "pcmclient: base: select: component %s finalized",
component->pcmclient_version.mca_component_name); component->pcmclient_version.mca_component_name);
} }
} }
@ -110,7 +112,8 @@ int mca_pcmclient_base_select(bool *allow_multi_user_threads,
available list all unselected components. The available list will available list all unselected components. The available list will
contain only the selected component. */ contain only the selected component. */
mca_base_components_close(mca_pcmclient_base_output, &mca_pcmclient_base_components_available, mca_base_components_close(mca_pcmclient_base_output,
&mca_pcmclient_base_components_available,
(mca_base_component_t *) best_component); (mca_base_component_t *) best_component);
/* Save the winner */ /* Save the winner */
@ -119,10 +122,13 @@ int mca_pcmclient_base_select(bool *allow_multi_user_threads,
mca_pcmclient = *best_module; mca_pcmclient = *best_module;
*allow_multi_user_threads = best_user_threads; *allow_multi_user_threads = best_user_threads;
*have_hidden_threads = best_hidden_threads; *have_hidden_threads = best_hidden_threads;
ompi_output_verbose(10, mca_pcmclient_base_output, ompi_output_verbose(5, mca_pcmclient_base_output,
"select: component %s initialized", "pcmclient: base: select: component %s initialized",
mca_pcmclient_base_selected_component.pcmclient_version.mca_component_name); mca_pcmclient_base_selected_component.pcmclient_version.mca_component_name);
ompi_output_verbose(10, mca_pcmclient_base_output,
"pcmclient: base: select: completed");
/* All done */ /* All done */
return OMPI_SUCCESS; return OMPI_SUCCESS;