Partially restore the iof changes - this repairs the initial observation of inconsistent and incomplete output
This commit was SVN r19999.
Этот коммит содержится в:
родитель
586334d1c8
Коммит
68423f7544
@ -271,8 +271,6 @@ static int hnp_close(const orte_process_name_t* peer,
|
||||
orte_iof_tag_t source_tag)
|
||||
{
|
||||
opal_list_item_t *item, *next_item;
|
||||
|
||||
if( ORTE_IOF_STDIN & source_tag ) {
|
||||
orte_iof_read_event_t* rev;
|
||||
int rev_fd;
|
||||
|
||||
@ -281,16 +279,16 @@ static int hnp_close(const orte_process_name_t* peer,
|
||||
item = next_item ) {
|
||||
rev = (orte_iof_read_event_t*)item;
|
||||
next_item = opal_list_get_next(item);
|
||||
if( (rev->name.jobid == peer->jobid) &&
|
||||
(rev->name.vpid == peer->vpid) ) {
|
||||
if ((rev->name.jobid == peer->jobid) &&
|
||||
(rev->name.vpid == peer->vpid) &&
|
||||
(source_tag & rev->tag) ) {
|
||||
|
||||
/* Dont close if it's the main stdin. This will get closed
|
||||
* in component close.
|
||||
*/
|
||||
if( mca_iof_hnp_component.stdinev == rev ) continue;
|
||||
|
||||
opal_list_remove_item(&mca_iof_hnp_component.read_events,
|
||||
item);
|
||||
opal_list_remove_item(&mca_iof_hnp_component.read_events, item);
|
||||
/* No need to delete the event, the destructor will automatically
|
||||
* do it for us.
|
||||
*/
|
||||
@ -299,7 +297,7 @@ static int hnp_close(const orte_process_name_t* peer,
|
||||
close(rev_fd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
||||
@ -370,6 +368,8 @@ static void stdin_write_handler(int fd, short event, void *cbdata)
|
||||
}
|
||||
OBJ_RELEASE(output);
|
||||
}
|
||||
goto CHECK;
|
||||
|
||||
ABORT:
|
||||
close(wev->fd);
|
||||
opal_event_del(&wev->ev);
|
||||
|
@ -160,26 +160,26 @@ static int orted_pull(const orte_process_name_t* dst_name,
|
||||
static int orted_close(const orte_process_name_t* peer,
|
||||
orte_iof_tag_t source_tag)
|
||||
{
|
||||
OPAL_THREAD_LOCK(&mca_iof_orted_component.lock);
|
||||
|
||||
/* The STDIN have a read event attached, while everything else
|
||||
* have a sink. We don't have to do anything special for sinks,
|
||||
* they will dissapear when the output queue is empty.
|
||||
*/
|
||||
if( ORTE_IOF_STDIN & source_tag ) {
|
||||
opal_list_item_t *item, *next_item;
|
||||
orte_iof_read_event_t* rev;
|
||||
int rev_fd;
|
||||
|
||||
OPAL_THREAD_LOCK(&mca_iof_orted_component.lock);
|
||||
|
||||
for( item = opal_list_get_first(&mca_iof_orted_component.read_events);
|
||||
item != opal_list_get_end(&mca_iof_orted_component.read_events);
|
||||
item = next_item ) {
|
||||
rev = (orte_iof_read_event_t*)item;
|
||||
next_item = opal_list_get_next(item);
|
||||
if( (rev->name.jobid == peer->jobid) &&
|
||||
(rev->name.vpid == peer->vpid) ) {
|
||||
opal_list_remove_item(&mca_iof_orted_component.read_events,
|
||||
item);
|
||||
if ((rev->name.jobid == peer->jobid) &&
|
||||
(rev->name.vpid == peer->vpid) &&
|
||||
(source_tag & rev->tag)) {
|
||||
|
||||
opal_list_remove_item(&mca_iof_orted_component.read_events, item);
|
||||
/* No need to delete the event, the destructor will automatically
|
||||
* do it for us.
|
||||
*/
|
||||
@ -188,7 +188,6 @@ static int orted_close(const orte_process_name_t* peer,
|
||||
close(rev_fd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
OPAL_THREAD_UNLOCK(&mca_iof_orted_component.lock);
|
||||
|
||||
|
@ -1859,8 +1859,7 @@ MOVEON:
|
||||
child->alive = false;
|
||||
|
||||
/* Release the IOF resources related to this child */
|
||||
orte_iof.close(child->name, (ORTE_IOF_STDIN | ORTE_IOF_STDOUT |
|
||||
ORTE_IOF_STDERR | ORTE_IOF_STDDIAG) );
|
||||
orte_iof.close(child->name, ORTE_IOF_STDIN);
|
||||
|
||||
/* Clean up the session directory as if we were the process
|
||||
* itself. This covers the case where the process died abnormally
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user