MPI_INIT(3)MPI_INIT(3)NAMEMPI_Init - Initializes the MPI execution environment
SYNOPSIS
C:
#include <mpi.h>
int MPI_Init(argc,argv)
int *argc;
char ***argv;
C++:
#include <mpi.h>
void Init()
Fortran:
INCLUDE "mpif.h" (or USE MPI)
INTEGER error
CALL MPI_INIT(error)STANDARDS
This release implements the MPI 1.2 standard, as documented by the MPI
Forum in the spring 1997 release of MPI: A Message Passing Interface
Standard.
DESCRIPTION
The MPI_Init routine initializes the MPI execution environment. This
routine accepts the following parameters:
argc Specifies a pointer to the number of arguments
argv Specifies a pointer to the argument vector
ierror Specifies the return code value for successful completion,
which is in MPI_SUCCESS. MPI_SUCCESS is defined in the mpif.h
file.
MPI specifies no command-line arguments, but does allow an MPI
implementation to make use of them.
Page 1
MPI_INIT(3)MPI_INIT(3)NOTES
The Fortran binding for this routine has only the error return argument
(MPI_INIT(ierror)).
Because the Fortran and C versions of MPI_Init are different, there is a
restriction on who can call MPI_Init. The version (Fortran or C) must
match the main program. That is, if the main program is in C, the C
version of MPI_Init must be called. If the main program is in Fortran,
the Fortran version must be called.
On exit from this routine, all processes will have a copy of the argument
list. This is .ft3 not required by the MPI standard, and truly portable
codes should not rely on it. This is provided as a service by this
implementation (an MPI implementation is allowed to distribute the
command line arguments but is not required to).
Command line arguments are not provided to Fortran programs. More
precisely, nonstandard Fortran routines such as GETARG(3F) and IARGC(3F)
have undefined behavior in MPI and in this implementation.
The MPI standard does not say what a program can do before an MPI_Init
operation or after an MPI_Finalize(3) operation.
Shared-memory mode uses no signals. TCP mode uses SIGUSR1.
SEE ALSOGETARG(3F), IARGC(3F), MPI_Finalize(3)
Page 2