int MPI_Init(int *argc, char ***argv)
MPI_INIT(IERROR)
INTEGER IERROR
This routine must be called before any other MPI routine. It must be called at most once; subsequent calls are erroneous (see MPI_INITIALIZED).
All MPI programs must contain a call to MPI_INIT; this routine must be called before any other MPI routine (apart from MPI_INITIALIZED) is called. The version for ANSI C accepts the argc and argv that are provided by the arguments to main:
int main(argc, argv) int argc; char **argv; { MPI_Init(&argc, &argv); /* parse arguments */ /* main program */ MPI_Finalize(); /* see below */ }The Fortran version takes only IERROR.
An MPI implementation is free to require that the arguments in the C binding must be the arguments to main.
int MPI_Finalize(void)
MPI_FINALIZE(IERROR)
INTEGER IERROR
This routines cleans up all MPI state. Once this routine is called, no MPI routine (even MPI_INIT) may be called. The user must ensure that all pending communications involving a process completes before the process calls MPI_FINALIZE.
Enhancement/Corection in the MPI-1.2 Standard:
int MPI_Initialized(int *flag)
MPI_INITIALIZED(FLAG, IERROR)
LOGICAL FLAG
INTEGER IERROR
This routine may be used to determine whether MPI_INIT has been called. It is the only routine that may be called before MPI_INIT is called.
Enhancement/Corection in the MPI-1.2 Standard:
int MPI_Abort(MPI_Comm comm, int errorcode)
MPI_ABORT(COMM, ERRORCODE, IERROR)
INTEGER COMM, ERRORCODE, IERROR
This routine makes a ``best attempt'' to abort all tasks in the group of comm. This function does not require that the invoking environment take any action with the error code. However, a Unix or POSIX environment should handle this as a return errorcode from the main program or an abort(errorcode).
MPI implementations are required to define the behavior of MPI_ABORT at least for a comm of MPI_COMM_WORLD. MPI implementations may ignore the comm argument and act as if the comm was MPI_COMM_WORLD.
MPI-Standard for MARMOT