1
1

Update some basic functions, mostly with diagnostics.

This commit was SVN r2620.
Этот коммит содержится в:
Ralph Castain 2004-09-13 01:25:25 +00:00
родитель 7127f7f5c3
Коммит 55a2576f01
3 изменённых файлов: 33 добавлений и 2 удалений

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

@ -88,6 +88,10 @@ int ompi_rte_universe_exists()
return OMPI_ERR_NOT_IMPLEMENTED; return OMPI_ERR_NOT_IMPLEMENTED;
} }
if (ompi_rte_debug_flag) {
ompi_output(0, "looking for session directory");
}
/* check to see if local universe already exists */ /* check to see if local universe already exists */
if (OMPI_SUCCESS == ompi_session_dir(false, if (OMPI_SUCCESS == ompi_session_dir(false,
ompi_process_info.tmpdir_base, ompi_process_info.tmpdir_base,
@ -98,6 +102,10 @@ int ompi_rte_universe_exists()
NULL, NULL,
NULL)) { /* found */ NULL)) { /* found */
if (ompi_rte_debug_flag) {
ompi_output(0, "check for contact info file");
}
/* check for "contact-info" file. if present, read it in. */ /* check for "contact-info" file. if present, read it in. */
contact_file = ompi_os_path(false, ompi_process_info.universe_session_dir, contact_file = ompi_os_path(false, ompi_process_info.universe_session_dir,
"universe-setup.txt", NULL); "universe-setup.txt", NULL);
@ -109,6 +117,10 @@ int ompi_rte_universe_exists()
return ret; return ret;
} }
if (ompi_rte_debug_flag) {
ompi_output(0, "contact info read");
}
if (!ompi_universe_info.persistence || /* not persistent... */ if (!ompi_universe_info.persistence || /* not persistent... */
(0 == strncmp(ompi_universe_info.scope, "exclusive", strlen("exclusive")))) { /* ...or no connection allowed */ (0 == strncmp(ompi_universe_info.scope, "exclusive", strlen("exclusive")))) { /* ...or no connection allowed */
/* also need to check "local" and that we did not specify the exact /* also need to check "local" and that we did not specify the exact
@ -120,6 +132,11 @@ int ompi_rte_universe_exists()
return OMPI_ERR_NO_CONNECTION_ALLOWED; return OMPI_ERR_NO_CONNECTION_ALLOWED;
} }
if (ompi_rte_debug_flag) {
ompi_output(0, "contact info to set: %s", ompi_universe_info.seed_contact_info);
}
/* if persistent, set contact info... */ /* if persistent, set contact info... */
if (OMPI_SUCCESS != mca_oob_set_contact_info(ompi_universe_info.seed_contact_info)) { /* set contact info */ if (OMPI_SUCCESS != mca_oob_set_contact_info(ompi_universe_info.seed_contact_info)) { /* set contact info */
if (ompi_rte_debug_flag) { if (ompi_rte_debug_flag) {
@ -129,6 +146,13 @@ int ompi_rte_universe_exists()
} }
mca_oob_parse_contact_info(ompi_universe_info.seed_contact_info, &proc, NULL); mca_oob_parse_contact_info(ompi_universe_info.seed_contact_info, &proc, NULL);
if (ompi_rte_debug_flag) {
ompi_output(0, "contact info set: %s", ompi_universe_info.seed_contact_info);
ompi_output(0, "issuing ping: %d %d %d", proc.cellid, proc.jobid, proc.vpid);
}
/* ...and ping to verify it's alive */ /* ...and ping to verify it's alive */
if (OMPI_SUCCESS != mca_oob_ping(&proc, &ompi_rte_ping_wait)) { if (OMPI_SUCCESS != mca_oob_ping(&proc, &ompi_rte_ping_wait)) {
if (ompi_rte_debug_flag) { if (ompi_rte_debug_flag) {

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

@ -170,6 +170,7 @@ int main(int argc, char *argv[])
return ret; return ret;
} }
fprintf (stderr, "issuing exit cmd\n");
ompi_buffer_init(&cmd, 0); ompi_buffer_init(&cmd, 0);
command = OMPI_DAEMON_EXIT_CMD; command = OMPI_DAEMON_EXIT_CMD;
recv_tag = MCA_OOB_TAG_DAEMON; recv_tag = MCA_OOB_TAG_DAEMON;

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

@ -78,7 +78,7 @@ int main(int argc, char *argv[])
} }
/* daemonize myself */ /* daemonize myself */
/* ompi_daemon_init(NULL); */ ompi_daemon_init(NULL);
/* setup the thread lock and condition variable */ /* setup the thread lock and condition variable */
OBJ_CONSTRUCT(&ompi_daemon_mutex, ompi_mutex_t); OBJ_CONSTRUCT(&ompi_daemon_mutex, ompi_mutex_t);
@ -297,7 +297,13 @@ int main(int argc, char *argv[])
ompi_rte_finalize(); ompi_rte_finalize();
mca_base_close(); mca_base_close();
ompi_finalize(); ompi_finalize();
return 0;
if (ompi_daemon_debug) {
ompi_output(0, "[%d,%d,%d] ompid: done - exiting", ompi_process_info.name->cellid,
ompi_process_info.name->jobid, ompi_process_info.name->vpid);
}
exit(0);
} }
static void ompi_daemon_recv(int status, ompi_process_name_t* sender, static void ompi_daemon_recv(int status, ompi_process_name_t* sender,