Update some basic functions, mostly with diagnostics.
This commit was SVN r2620.
Этот коммит содержится в:
родитель
7127f7f5c3
Коммит
55a2576f01
@ -88,6 +88,10 @@ int ompi_rte_universe_exists()
|
||||
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 */
|
||||
if (OMPI_SUCCESS == ompi_session_dir(false,
|
||||
ompi_process_info.tmpdir_base,
|
||||
@ -98,6 +102,10 @@ int ompi_rte_universe_exists()
|
||||
NULL,
|
||||
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. */
|
||||
contact_file = ompi_os_path(false, ompi_process_info.universe_session_dir,
|
||||
"universe-setup.txt", NULL);
|
||||
@ -109,6 +117,10 @@ int ompi_rte_universe_exists()
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (ompi_rte_debug_flag) {
|
||||
ompi_output(0, "contact info read");
|
||||
}
|
||||
|
||||
if (!ompi_universe_info.persistence || /* not persistent... */
|
||||
(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
|
||||
@ -120,6 +132,11 @@ int ompi_rte_universe_exists()
|
||||
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 (OMPI_SUCCESS != mca_oob_set_contact_info(ompi_universe_info.seed_contact_info)) { /* set contact info */
|
||||
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);
|
||||
|
||||
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 */
|
||||
if (OMPI_SUCCESS != mca_oob_ping(&proc, &ompi_rte_ping_wait)) {
|
||||
if (ompi_rte_debug_flag) {
|
||||
|
@ -170,6 +170,7 @@ int main(int argc, char *argv[])
|
||||
return ret;
|
||||
}
|
||||
|
||||
fprintf (stderr, "issuing exit cmd\n");
|
||||
ompi_buffer_init(&cmd, 0);
|
||||
command = OMPI_DAEMON_EXIT_CMD;
|
||||
recv_tag = MCA_OOB_TAG_DAEMON;
|
||||
|
@ -78,7 +78,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
/* daemonize myself */
|
||||
/* ompi_daemon_init(NULL); */
|
||||
ompi_daemon_init(NULL);
|
||||
|
||||
/* setup the thread lock and condition variable */
|
||||
OBJ_CONSTRUCT(&ompi_daemon_mutex, ompi_mutex_t);
|
||||
@ -297,7 +297,13 @@ int main(int argc, char *argv[])
|
||||
ompi_rte_finalize();
|
||||
mca_base_close();
|
||||
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,
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user