1
1

* remove the pcm component-specific debugging handle - make all components

share the same handle

This commit was SVN r3208.
Этот коммит содержится в:
Brian Barrett 2004-10-19 16:56:27 +00:00
родитель eec0a0c9c4
Коммит a5623776d1
3 изменённых файлов: 13 добавлений и 60 удалений

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

@ -69,10 +69,4 @@ extern "C" {
}
#endif
/*
* component variables
*/
/* debugging output stream */
extern int mca_pcm_rsh_output;
#endif /* MCA_PCM_RSH_H_ */

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

@ -45,23 +45,6 @@ mca_pcm_base_component_1_0_0_t mca_pcm_rsh_component = {
NULL /* unique name */
};
/* need to create output stream to dump in file */
ompi_output_stream_t mca_pcm_rsh_output_stream = {
false, /* lds_is_debugging BWB - change me for release */
0, /* lds_verbose_level */
false, /* lds_want_syslog */
0, /* lds_syslog_priority */
NULL, /* lds_syslog_ident */
"pcm: rsh: ", /* lds_prefix */
true, /* lds_want_stdout */
false, /* lds_want_stderr */
true, /* lds_want_file */
true, /* lds_want_file_append */
"pcm_rsh" /* lds_file_suffix */
};
/*
* component variables handles
*/
@ -70,21 +53,11 @@ static int mca_pcm_rsh_param_fast;
static int mca_pcm_rsh_param_ignore_stderr;
static int mca_pcm_rsh_param_priority;
static int mca_pcm_rsh_param_agent;
static int mca_pcm_rsh_param_debug;
/*
* component variables
*/
/* debugging output stream */
int mca_pcm_rsh_output = -1;
int
mca_pcm_rsh_component_open(void)
{
mca_pcm_rsh_param_debug =
mca_base_param_register_int("pcm", "rsh", "debug", NULL, 100);
mca_pcm_rsh_param_agent =
mca_base_param_register_string("pcm", "rsh", "agent", NULL,
"ssh");
@ -99,8 +72,6 @@ mca_pcm_rsh_component_open(void)
mca_pcm_rsh_param_priority =
mca_base_param_register_int("pcm", "rsh", "priority", NULL, 1);
mca_pcm_rsh_output = ompi_output_open(&mca_pcm_rsh_output_stream);
return OMPI_SUCCESS;
}
@ -108,10 +79,6 @@ mca_pcm_rsh_component_open(void)
int
mca_pcm_rsh_component_close(void)
{
if (mca_pcm_rsh_output > 0) {
ompi_output_close(mca_pcm_rsh_output);
}
return OMPI_SUCCESS;
}
@ -121,18 +88,13 @@ mca_pcm_rsh_init(int *priority,
bool have_threads,
int constraints)
{
int debug;
int ret;
mca_pcm_rsh_module_t *me;
/* do debugging gorp */
mca_base_param_lookup_int(mca_pcm_rsh_param_debug, &debug);
ompi_output_set_verbosity(mca_pcm_rsh_output, debug);
/* get our priority */
mca_base_param_lookup_int(mca_pcm_rsh_param_priority, priority);
me = malloc(sizeof(mca_pcm_rsh_module_t));
me = (mca_pcm_rsh_module_t*) malloc(sizeof(mca_pcm_rsh_module_t));
if (NULL == me) return NULL;
/* fill in params */
@ -149,7 +111,8 @@ mca_pcm_rsh_init(int *priority,
if (OMPI_SUCCESS != ret) {
/* well, that can't be good. guess we can't run */
ompi_output_verbose(5, mca_pcm_rsh_output, "init: no llm found");
ompi_output_verbose(5, mca_pcm_base_output, "init: no llm found");
free(me);
return NULL;
}
@ -172,17 +135,13 @@ mca_pcm_rsh_init(int *priority,
int
mca_pcm_rsh_finalize(struct mca_pcm_base_module_1_0_0_t* me_super)
{
mca_pcm_rsh_module_t *me;
mca_pcm_rsh_module_t *me = (mca_pcm_rsh_module_t*) me_super;
if (me_super == NULL) return OMPI_ERR_BAD_PARAM;
if (NULL == me) return OMPI_ERR_BAD_PARAM;
me = (mca_pcm_rsh_module_t*) me_super;
if (me != NULL) {
me->llm->llm_finalize(me->llm);
if (NULL != me->rsh_agent) free(me->rsh_agent);
free(me);
}
me->llm->llm_finalize(me->llm);
if (NULL != me->rsh_agent) free(me->rsh_agent);
free(me);
return OMPI_SUCCESS;
}

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

@ -209,10 +209,10 @@ internal_need_profile(mca_pcm_rsh_module_t *me,
p = getpwuid(getuid());
if (NULL == p) return OMPI_ERROR;
ompi_output_verbose(5, mca_pcm_rsh_output,
ompi_output_verbose(5, mca_pcm_base_output,
"fast boot mode - "
"assuming same shell on remote nodes");
ompi_output_verbose(5, mca_pcm_rsh_output,
ompi_output_verbose(5, mca_pcm_base_output,
"getpwuid: got local shell %s", p->pw_shell);
strncpy(shellpath, p->pw_shell, PRS_BUFSIZE - 1);
shellpath[PRS_BUFSIZE - 1] = '\0';
@ -231,7 +231,7 @@ internal_need_profile(mca_pcm_rsh_module_t *me,
ompi_argv_append(&cmdc, &cmdv, "echo $SHELL");
printable = ompi_argv_join(cmdv, ' ');
ompi_output_verbose(5, mca_pcm_rsh_output,
ompi_output_verbose(5, mca_pcm_base_output,
"attempting to execute: %s", printable);
cmd0 = strdup(cmdv[0]);
@ -257,7 +257,7 @@ internal_need_profile(mca_pcm_rsh_module_t *me,
if ('\n' == shellpath[strlen(shellpath) - 1]) {
shellpath[strlen(shellpath) - 1] = '\0';
}
ompi_output_verbose(5, mca_pcm_rsh_output,
ompi_output_verbose(5, mca_pcm_base_output,
"remote shell %s", shellpath);
if (NULL == strstr(p->pw_shell, "csh") &&
@ -475,7 +475,7 @@ internal_wait_cb(pid_t pid, int status, void *data)
int ret;
char *proc_name;
ompi_output_verbose(10, mca_pcm_rsh_output,
ompi_output_verbose(10, mca_pcm_base_output,
"process %d exited with status %d", pid, status);
ret = mca_pcm_base_get_job_info(pid, &jobid, &lower, &upper);