1
1

Add a few checks to ensure that MPI_INIT(NULL, NULL) and

MPI_INIT_THREAD(NULL, NULL, ...) will work properly.

This commit was SVN r2362.
Этот коммит содержится в:
Jeff Squyres 2004-08-28 16:30:29 +00:00
родитель e929014423
Коммит e2aaf64239
3 изменённых файлов: 16 добавлений и 2 удалений

Просмотреть файл

@ -58,6 +58,10 @@ int MPI_Init(int *argc, char ***argv)
little in this function as possible so that if it's profiled, we
don't lose anything) */
err = ompi_mpi_init(*argc, *argv, required, &provided);
if (NULL != argc && NULL != argv) {
err = ompi_mpi_init(*argc, *argv, required, &provided);
} else {
err = ompi_mpi_init(NULL, NULL, required, &provided);
}
OMPI_ERRHANDLER_RETURN(err, null, err, FUNC_NAME);
}

Просмотреть файл

@ -42,6 +42,10 @@ int MPI_Init_thread(int *argc, char ***argv, int required,
little in this function as possible so that if it's profiled, we
don't lose anything) */
err = ompi_mpi_init(*argc, *argv, required, provided);
if (NULL != argc && NULL != argv) {
err = ompi_mpi_init(*argc, *argv, required, provided);
} else {
err = ompi_mpi_init(NULL, NULL, required, provided);
}
OMPI_ERRHANDLER_RETURN(err, null, err, FUNC_NAME);
}

Просмотреть файл

@ -171,6 +171,12 @@ int ompi_cmd_line_parse(ompi_cmd_line_t *cmd, bool ignore_unknown,
bool is_unknown;
bool is_option;
/* Bozo check */
if (0 == argc || NULL == argv) {
return OMPI_SUCCESS;
}
/* Thread serialization */
ompi_mutex_lock(&cmd->lcl_mutex);