From a45e8bea053fc00b3a406bb7c9ed8768b2a19e7a Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Mon, 29 Jan 2007 21:56:15 +0000 Subject: [PATCH] Fixes trac:830. Put in argument checking for MPI_INIT_THREAD. This commit was SVN r13353. The following Trac tickets were found above: Ticket 830 --> https://svn.open-mpi.org/trac/ompi/ticket/830 --- ompi/mpi/c/init_thread.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ompi/mpi/c/init_thread.c b/ompi/mpi/c/init_thread.c index 870c76368a..0c49648817 100644 --- a/ompi/mpi/c/init_thread.c +++ b/ompi/mpi/c/init_thread.c @@ -39,6 +39,12 @@ int MPI_Init_thread(int *argc, char ***argv, int required, int err; MPI_Comm null = NULL; + if ( MPI_PARAM_CHECK ) { + if (required < MPI_THREAD_SINGLE || required > MPI_THREAD_MULTIPLE) { + ompi_mpi_errors_are_fatal_comm_handler(NULL, NULL, FUNC_NAME); + } + } + /* * A thread compliant MPI implementation will be able to return provided * = MPI_THREAD_MULTIPLE. Such an implementation may always return provided