Ensure that we don't try to call orte_show_help() before orte_init()
succeeds. This commit was SVN r18458.
Этот коммит содержится в:
родитель
763f5259a8
Коммит
a9e26c33e0
@ -38,6 +38,7 @@
|
|||||||
#include "opal/util/argv.h"
|
#include "opal/util/argv.h"
|
||||||
#include "opal/util/stacktrace.h"
|
#include "opal/util/stacktrace.h"
|
||||||
#include "opal/util/num_procs.h"
|
#include "opal/util/num_procs.h"
|
||||||
|
#include "opal/util/show_help.h"
|
||||||
#include "opal/runtime/opal.h"
|
#include "opal/runtime/opal.h"
|
||||||
#include "opal/event/event.h"
|
#include "opal/event/event.h"
|
||||||
|
|
||||||
@ -242,6 +243,7 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided)
|
|||||||
/* see comment below about sched_yield */
|
/* see comment below about sched_yield */
|
||||||
int num_processors;
|
int num_processors;
|
||||||
#endif
|
#endif
|
||||||
|
bool orte_setup = false;
|
||||||
|
|
||||||
/* Setup enough to check get/set MCA params */
|
/* Setup enough to check get/set MCA params */
|
||||||
|
|
||||||
@ -298,6 +300,7 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided)
|
|||||||
error = "ompi_mpi_init: orte_init failed";
|
error = "ompi_mpi_init: orte_init failed";
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
orte_setup = true;
|
||||||
|
|
||||||
/* check for timing request - get stop time and report elapsed time if so */
|
/* check for timing request - get stop time and report elapsed time if so */
|
||||||
if (timing && 0 == ORTE_PROC_MY_NAME->vpid) {
|
if (timing && 0 == ORTE_PROC_MY_NAME->vpid) {
|
||||||
@ -748,9 +751,16 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided)
|
|||||||
error:
|
error:
|
||||||
if (ret != OMPI_SUCCESS) {
|
if (ret != OMPI_SUCCESS) {
|
||||||
const char *err_msg = opal_strerror(ret);
|
const char *err_msg = opal_strerror(ret);
|
||||||
|
/* If ORTE was not setup yet, don't use orte_show_help */
|
||||||
|
if (orte_setup) {
|
||||||
orte_show_help("help-mpi-runtime",
|
orte_show_help("help-mpi-runtime",
|
||||||
"mpi_init:startup:internal-failure", true,
|
"mpi_init:startup:internal-failure", true,
|
||||||
"MPI_INIT", "MPI_INIT", error, err_msg, ret);
|
"MPI_INIT", "MPI_INIT", error, err_msg, ret);
|
||||||
|
} else {
|
||||||
|
opal_show_help("help-mpi-runtime",
|
||||||
|
"mpi_init:startup:internal-failure", true,
|
||||||
|
"MPI_INIT", "MPI_INIT", error, err_msg, ret);
|
||||||
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user