Fix uninitialized variable. Set exit codes for failed launch so we get pretty error messages
Signed-off-by: Ralph Castain <rhc@open-mpi.org>
Этот коммит содержится в:
родитель
9c1df3f7f0
Коммит
9d6b929894
@ -121,6 +121,7 @@ static void lookup_cbfunc(int status, opal_list_t *data, void *cbdata)
|
||||
static void opcbfunc(int status, void *cbdata)
|
||||
{
|
||||
struct lookup_caddy_t *cd = (struct lookup_caddy_t*)cbdata;
|
||||
cd->status = status;
|
||||
cd->active = false;
|
||||
}
|
||||
|
||||
@ -155,27 +156,29 @@ int opal_pmix_base_exchange(opal_value_t *indat,
|
||||
return rc;
|
||||
}
|
||||
} else {
|
||||
caddy.active = true;
|
||||
rc = opal_pmix.publish_nb(&ilist, opcbfunc, &caddy);
|
||||
if (OPAL_SUCCESS != rc) {
|
||||
OPAL_ERROR_LOG(rc);
|
||||
OPAL_LIST_DESTRUCT(&ilist);
|
||||
return rc;
|
||||
}
|
||||
while (caddy.active) {
|
||||
usleep(10);
|
||||
}
|
||||
OPAL_LIST_DESTRUCT(&ilist);
|
||||
if (OPAL_SUCCESS != caddy.status) {
|
||||
OPAL_ERROR_LOG(caddy.status);
|
||||
return caddy.status;
|
||||
}
|
||||
caddy.status = -1;
|
||||
caddy.active = true;
|
||||
caddy.pdat = NULL;
|
||||
rc = opal_pmix.publish_nb(&ilist, opcbfunc, &caddy);
|
||||
if (OPAL_SUCCESS != rc) {
|
||||
OPAL_ERROR_LOG(rc);
|
||||
OPAL_LIST_DESTRUCT(&ilist);
|
||||
return rc;
|
||||
}
|
||||
while (caddy.active) {
|
||||
usleep(10);
|
||||
}
|
||||
OPAL_LIST_DESTRUCT(&ilist);
|
||||
if (OPAL_SUCCESS != caddy.status) {
|
||||
OPAL_ERROR_LOG(caddy.status);
|
||||
return caddy.status;
|
||||
}
|
||||
}
|
||||
|
||||
/* lookup the other side's info - if a non-blocking form
|
||||
* of lookup isn't available, then we use the blocking
|
||||
* form and trust that the underlying system will WAIT
|
||||
* until the other side publishes its data */
|
||||
/* lookup the other side's info - if a non-blocking form
|
||||
* of lookup isn't available, then we use the blocking
|
||||
* form and trust that the underlying system will WAIT
|
||||
* until the other side publishes its data */
|
||||
pdat = OBJ_NEW(opal_pmix_pdata_t);
|
||||
pdat->value.key = strdup(outdat->value.key);
|
||||
pdat->value.type = outdat->value.type;
|
||||
@ -214,6 +217,7 @@ int opal_pmix_base_exchange(opal_value_t *indat,
|
||||
return rc;
|
||||
}
|
||||
} else {
|
||||
caddy.status = -1;
|
||||
caddy.active = true;
|
||||
caddy.pdat = pdat;
|
||||
keys = NULL;
|
||||
|
@ -702,7 +702,6 @@ void orte_odls_base_spawn_proc(int fd, short sd, void *cbdata)
|
||||
opal_argv_free(argvptr);
|
||||
}
|
||||
if (ORTE_SUCCESS != rc) {
|
||||
opal_output(0, "%s:%d", __FILE__, __LINE__);
|
||||
state = ORTE_PROC_STATE_FAILED_TO_LAUNCH;
|
||||
goto errorout;
|
||||
}
|
||||
@ -798,6 +797,7 @@ void orte_odls_base_spawn_proc(int fd, short sd, void *cbdata)
|
||||
|
||||
errorout:
|
||||
ORTE_FLAG_UNSET(child, ORTE_PROC_FLAG_ALIVE);
|
||||
child->exit_code = rc;
|
||||
ORTE_ACTIVATE_PROC_STATE(&child->name, state);
|
||||
OBJ_RELEASE(cd);
|
||||
}
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user