Fix a reported bug whereby keyboard entry to a remote proc was being lost after the first iteration. In other words, if an application has a proc reading stdin from the keyboard, and that proc is not co-located with mpirun, then the system would hang.
The problem was eventually traced to two bugs in the code: 1. the orted wasn't resetting the write event flag, thus preventing itself from turning it on again. 2. the HNP needed to check if the stdin was attached to tty or not before adding the delay for fairness. If it is attached to a tty, there is no need for the delay. This prevents some strangely slow typing response. This patch needs to move to 1.3 This commit was SVN r20246.
Этот коммит содержится в:
родитель
1420c32a5d
Коммит
694008e9bb
@ -47,6 +47,7 @@
|
||||
static void restart_stdin(int fd, short event, void *cbdata)
|
||||
{
|
||||
if (NULL != mca_iof_hnp_component.stdinev) {
|
||||
mca_iof_hnp_component.stdinev->active = true;
|
||||
opal_event_add(&(mca_iof_hnp_component.stdinev->ev), 0);
|
||||
}
|
||||
}
|
||||
@ -179,7 +180,15 @@ void orte_iof_hnp_read_local_handler(int fd, short event, void *cbdata)
|
||||
/* this will also close our stdin file descriptor */
|
||||
OBJ_RELEASE(mca_iof_hnp_component.stdinev);
|
||||
} else {
|
||||
ORTE_TIMER_EVENT(0, 10000, restart_stdin);
|
||||
/* if we are looking at a tty, then we just go ahead and restart the
|
||||
* read event assuming we are not backgrounded
|
||||
*/
|
||||
if (orte_iof_hnp_stdin_check(fd)) {
|
||||
restart_stdin(fd, 0, NULL);
|
||||
} else {
|
||||
/* delay for awhile and then restart */
|
||||
ORTE_TIMER_EVENT(0, 10000, restart_stdin);
|
||||
}
|
||||
}
|
||||
/* nothing more to do */
|
||||
OPAL_THREAD_UNLOCK(&mca_iof_hnp_component.lock);
|
||||
|
@ -249,6 +249,7 @@ static void stdin_write_handler(int fd, short event, void *cbdata)
|
||||
|
||||
/* lock us up to protect global operations */
|
||||
OPAL_THREAD_LOCK(&mca_iof_orted_component.lock);
|
||||
wev->pending = false;
|
||||
|
||||
while (NULL != (item = opal_list_remove_first(&wev->outputs))) {
|
||||
output = (orte_iof_write_output_t*)item;
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user