1
1

- Help message in case of MPI-application with two init or

calling init functions after finalize.

This commit was SVN r12858.
Этот коммит содержится в:
Rainer Keller 2006-12-14 19:58:04 +00:00
родитель 18da4c40d3
Коммит b99e5a71d1
3 изменённых файлов: 30 добавлений и 7 удалений

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

@ -5,7 +5,7 @@
* Copyright (c) 2004-2005 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* Copyright (c) 2004-2006 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
@ -20,6 +20,7 @@
#include <stdlib.h>
#include "opal/util/show_help.h"
#include "ompi/mpi/c/bindings.h"
#include "ompi/constants.h"
@ -44,12 +45,18 @@ int MPI_Init(int *argc, char ***argv)
/* Ensure that we were not already initialized or finalized */
if (ompi_mpi_finalized) {
/* JMS show_help */
if (0 == ompi_comm_rank(MPI_COMM_WORLD)) {
opal_show_help("help-mpi-api.txt", "mpi-function-after-finalize",
true, FUNC_NAME);
}
return ompi_errhandler_invoke(NULL, NULL, OMPI_ERRHANDLER_TYPE_COMM,
MPI_ERR_OTHER, FUNC_NAME);
} else if (ompi_mpi_initialized) {
/* JMS show_help */
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_OTHER, FUNC_NAME);
if (0 == ompi_comm_rank(MPI_COMM_WORLD)) {
opal_show_help("help-mpi-api.txt", "mpi-initialize-twice",
true, FUNC_NAME);
}
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_OTHER, FUNC_NAME);
}
/* check for environment overrides for required thread level. If

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

@ -5,7 +5,7 @@
* Copyright (c) 2004-2005 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* Copyright (c) 2004-2006 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
@ -18,6 +18,7 @@
#include "ompi_config.h"
#include "opal/util/show_help.h"
#include "ompi/mpi/c/bindings.h"
#include "ompi/constants.h"
@ -52,11 +53,17 @@ int MPI_Init_thread(int *argc, char ***argv, int required,
/* Ensure that we were not already initialized or finalized */
if (ompi_mpi_finalized) {
/* JMS show_help */
if (0 == ompi_comm_rank(MPI_COMM_WORLD)) {
opal_show_help("help-mpi-api.txt", "mpi-function-after-finalize",
true, FUNC_NAME);
}
return ompi_errhandler_invoke(NULL, NULL, OMPI_ERRHANDLER_TYPE_COMM,
MPI_ERR_OTHER, FUNC_NAME);
} else if (ompi_mpi_initialized) {
/* JMS show_help */
if (0 == ompi_comm_rank(MPI_COMM_WORLD)) {
opal_show_help("help-mpi-api.txt", "mpi-initialize-twice",
true, FUNC_NAME);
}
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_OTHER, FUNC_NAME);
}

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

@ -1,5 +1,7 @@
# -*- text -*-
#
# Copyright (c) 2006 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
@ -9,6 +11,13 @@
#
# This is the US/English general help file for Open MPI.
#
[mpi-function-after-finalize]
Calling any MPI-function after calling MPI_Finalize is erroneous.
The only exceptions are MPI_Initialized, MPI_Finalized and MPI_Get_version.
[mpi-initialize-twice]
Calling MPI_Init or MPI_Init_thread twice is erroneous.
[spawn-from-singleton]
This version of Open MPI does not support %s from a
"singleton" application. Specifically, you cannot invoke an MPI