1
1

A couple verbose additions. Poll the event engine while waiting for the

named pipe.

This commit was SVN r17787.
Этот коммит содержится в:
Josh Hursey 2008-03-07 21:10:14 +00:00
родитель 9131461511
Коммит aaff245271
3 изменённых файлов: 24 добавлений и 6 удалений

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

@ -330,6 +330,9 @@ int opal_cr_init(void )
#if OPAL_ENABLE_FT_THREAD == 1
if( !opal_cr_is_tool && opal_cr_thread_use_if_avail) {
opal_output_verbose(10, opal_cr_output,
"opal_cr: init: starting the thread\n");
opal_set_using_threads(true);
/*
* Start the thread
@ -347,6 +350,10 @@ int opal_cr_init(void )
opal_thread_start(&opal_cr_thread);
} /* End opal_cr_is_tool = true */
else {
opal_output_verbose(10, opal_cr_output,
"opal_cr: init: *Not* Using C/R thread\n");
}
#endif /* OPAL_ENABLE_FT_THREAD == 1 */
cleanup:

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

@ -94,19 +94,22 @@ int app_coord_init() {
asprintf(&app_comm_pipe_r, "%s/%s.%s", opal_cr_pipe_dir, OPAL_CR_NAMED_PROG_R, tmp_pid);
asprintf(&app_comm_pipe_w, "%s/%s.%s", opal_cr_pipe_dir, OPAL_CR_NAMED_PROG_W, tmp_pid);
OPAL_OUTPUT_VERBOSE((15, mca_snapc_full_component.super.output_handle,
"app) Named Pipes (%s) (%s)",
app_comm_pipe_r, app_comm_pipe_w));
/*
* Setup a signal handler to catch and start the proper thread
* to handle the checkpoint
*/
if( SIG_ERR == signal(opal_cr_entry_point_signal, snapc_full_app_signal_handler) ) {
opal_output(mca_snapc_full_component.super.output_handle,
"App) init: Error: Failed to register signal %d\n",
opal_cr_entry_point_signal);
exit_status = OPAL_ERROR;
goto cleanup;
}
OPAL_OUTPUT_VERBOSE((15, mca_snapc_full_component.super.output_handle,
"app) Named Pipes (%s) (%s), Signal (%d)",
app_comm_pipe_r, app_comm_pipe_w, opal_cr_entry_point_signal));
cleanup:
if( NULL != tmp_pid) {
free(tmp_pid);

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

@ -1124,13 +1124,19 @@ static int snapc_full_local_start_checkpoint_all(size_t ckpt_state)
}
OPAL_OUTPUT_VERBOSE((20, mca_snapc_full_component.super.output_handle,
"Local) Signal process (%d)\n",
(int) vpid_snapshot->super.process_pid));
"Local) Signal process (%d) with signal %d\n",
(int) vpid_snapshot->super.process_pid,
opal_cr_entry_point_signal));
/*
* Signal the application
*/
if( 0 != (ret = kill(vpid_snapshot->super.process_pid, opal_cr_entry_point_signal) ) ) {
opal_output(mca_snapc_full_component.super.output_handle,
"local) Error: Failed to signal process %d with signal %d. %d\n",
(int) vpid_snapshot->super.process_pid,
opal_cr_entry_point_signal,
ret);
exit_status = ret;
goto cleanup;
}
@ -1239,6 +1245,7 @@ static int snapc_full_local_start_ckpt_open_comm(orte_snapc_full_local_snapshot_
vpid_snapshot->comm_pipe_r, ret, s_time, max_wait_time));
}
usleep(usleep_time);
opal_event_loop(OPAL_EVLOOP_NONBLOCK);
continue;
}
else if( 0 > (ret = access(vpid_snapshot->comm_pipe_w, F_OK) )) {
@ -1249,6 +1256,7 @@ static int snapc_full_local_start_ckpt_open_comm(orte_snapc_full_local_snapshot_
vpid_snapshot->comm_pipe_w, ret, s_time, max_wait_time));
}
usleep(usleep_time);
opal_event_loop(OPAL_EVLOOP_NONBLOCK);
continue;
}
else {