Provide a more robust way of checking for proct completion
Signed-off-by: Ralph Castain <rhc@open-mpi.org>
Этот коммит содержится в:
родитель
a25a7bcba7
Коммит
1de0421e48
@ -389,7 +389,6 @@ static int hnp_close(const orte_process_name_t* peer,
|
||||
{
|
||||
orte_iof_proc_t* proct;
|
||||
orte_ns_cmp_bitmask_t mask = ORTE_NS_CMP_ALL;
|
||||
int cnt;
|
||||
|
||||
OPAL_LIST_FOREACH(proct, &mca_iof_hnp_component.procs, orte_iof_proc_t) {
|
||||
if (OPAL_EQUAL == orte_util_compare_name_fields(mask, &proct->name, peer)) {
|
||||
@ -397,7 +396,7 @@ static int hnp_close(const orte_process_name_t* peer,
|
||||
if (NULL != proct->stdinev) {
|
||||
OBJ_RELEASE(proct->stdinev);
|
||||
}
|
||||
++cnt;
|
||||
proct->stdinev = NULL;
|
||||
}
|
||||
if ((ORTE_IOF_STDOUT & source_tag) ||
|
||||
(ORTE_IOF_STDMERGE & source_tag)) {
|
||||
@ -405,14 +404,14 @@ static int hnp_close(const orte_process_name_t* peer,
|
||||
orte_iof_base_static_dump_output(proct->revstdout);
|
||||
OBJ_RELEASE(proct->revstdout);
|
||||
}
|
||||
++cnt;
|
||||
proct->revstdout = NULL;
|
||||
}
|
||||
if (ORTE_IOF_STDERR & source_tag) {
|
||||
if (NULL != proct->revstderr) {
|
||||
orte_iof_base_static_dump_output(proct->revstderr);
|
||||
OBJ_RELEASE(proct->revstderr);
|
||||
}
|
||||
++cnt;
|
||||
proct->revstderr = NULL;
|
||||
}
|
||||
#if OPAL_PMIX_V1
|
||||
if (ORTE_IOF_STDDIAG & source_tag) {
|
||||
@ -420,13 +419,16 @@ static int hnp_close(const orte_process_name_t* peer,
|
||||
orte_iof_base_static_dump_output(proct->revstddiag);
|
||||
OBJ_RELEASE(proct->revstddiag);
|
||||
}
|
||||
++cnt;
|
||||
proct->revstddiag = NULL;
|
||||
}
|
||||
#else
|
||||
++cnt;
|
||||
#endif
|
||||
/* if we closed them all, then remove this proc */
|
||||
if (4 == cnt) {
|
||||
if (NULL == proct->stdinev &&
|
||||
NULL == proct->revstdout &&
|
||||
#if OPAL_PMIX_V1
|
||||
NULL == proct->revstddiag &&
|
||||
#endif
|
||||
NULL == proct->revstderr) {
|
||||
opal_list_remove_item(&mca_iof_hnp_component.procs, &proct->super);
|
||||
OBJ_RELEASE(proct);
|
||||
}
|
||||
|
@ -282,7 +282,6 @@ static int orted_close(const orte_process_name_t* peer,
|
||||
{
|
||||
orte_iof_proc_t* proct;
|
||||
orte_ns_cmp_bitmask_t mask = ORTE_NS_CMP_ALL;
|
||||
int cnt = 0;
|
||||
|
||||
OPAL_LIST_FOREACH(proct, &mca_iof_orted_component.procs, orte_iof_proc_t) {
|
||||
if (OPAL_EQUAL == orte_util_compare_name_fields(mask, &proct->name, peer)) {
|
||||
@ -290,7 +289,7 @@ static int orted_close(const orte_process_name_t* peer,
|
||||
if (NULL != proct->stdinev) {
|
||||
OBJ_RELEASE(proct->stdinev);
|
||||
}
|
||||
++cnt;
|
||||
proct->stdinev = NULL;
|
||||
}
|
||||
if ((ORTE_IOF_STDOUT & source_tag) ||
|
||||
(ORTE_IOF_STDMERGE & source_tag)) {
|
||||
@ -298,14 +297,14 @@ static int orted_close(const orte_process_name_t* peer,
|
||||
orte_iof_base_static_dump_output(proct->revstdout);
|
||||
OBJ_RELEASE(proct->revstdout);
|
||||
}
|
||||
++cnt;
|
||||
proct->revstdout = NULL;
|
||||
}
|
||||
if (ORTE_IOF_STDERR & source_tag) {
|
||||
if (NULL != proct->revstderr) {
|
||||
orte_iof_base_static_dump_output(proct->revstderr);
|
||||
OBJ_RELEASE(proct->revstderr);
|
||||
}
|
||||
++cnt;
|
||||
proct->revstderr = NULL;
|
||||
}
|
||||
#if OPAL_PMIX_V1
|
||||
if (ORTE_IOF_STDDIAG & source_tag) {
|
||||
@ -313,13 +312,16 @@ static int orted_close(const orte_process_name_t* peer,
|
||||
orte_iof_base_static_dump_output(proct->revstddiag);
|
||||
OBJ_RELEASE(proct->revstddiag);
|
||||
}
|
||||
++cnt;
|
||||
proct->revstddiag = NULL;
|
||||
}
|
||||
#else
|
||||
++cnt;
|
||||
#endif
|
||||
/* if we closed them all, then remove this proc */
|
||||
if (4 == cnt) {
|
||||
if (NULL == proct->stdinev &&
|
||||
NULL == proct->revstdout &&
|
||||
#if OPAL_PMIX_V1
|
||||
NULL == proct->revstddiag &&
|
||||
#endif
|
||||
NULL == proct->revstderr) {
|
||||
opal_list_remove_item(&mca_iof_orted_component.procs, &proct->super);
|
||||
OBJ_RELEASE(proct);
|
||||
}
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user