Manual Pages for UNIX Darwin command on man MPI_Init
MyWebUniversity

Manual Pages for UNIX Darwin command on man MPI_Init

MPIInit(3OpenMPI) MPIInit(3OpenMPI)

NAME

MMPPIIIInniitt - Initializes the MPI execution environment

SSYYNNTTAAXX CC SSyynnttaaxx

#include

int MPIInit(int *argc, char ***argv) FFoorrttrraann SSyynnttaaxx INCLUDE 'mpif.h'

MPIINIT(IERROR)

INTEGER IERROR

CC++++ SSyynnttaaxx

#include

void MPI::Init(int& argc, char**& argv) void MPI::Init() IINNPPUUTT PPAARRAAMMEETTEERRSS argc C/C++ only: Pointer to the number of arguments. argv C/C++ only: Argument vector. OOUUTTPPUUTT PPAARRAAMMEETTEERR

IERROR Fortran only: Error status (integer).

DESCRIPTION

This routine, or MPIInitthread, must be called before any other MPI routine (apart from MPIInitialized) is called. MPI can be initialized

at most once; subsequent calls to MPIInit or MPIInitthread are erro-

neous. All MPI programs must contain a call to MPIInit or MPIInitthread. Open MPI accepts the C/C++ argc and argv arguments to main, but neither modifies, interprets, nor distributes them: { /* declare variables */ MPIInit(&argc, &argv); /* parse arguments */ /* main program */ MPIFinalize(); } NNOOTTEESS The Fortran version does not have provisions for argc and argv and

takes only IERROR.

The MPI Standard does not say what a program can do before an MPIInit or after an MPIFinalize. In the Open MPI implementation, it should do as little as possible. In particular, avoid anything that changes the external state of the program, such as opening files, reading standard input, or writing to standard output. EERRRROORRSS Almost all MPI routines return an error value; C routines as the value

of the function and Fortran routines in the last argument. C++ func-

tions do not return errors. If the default error handler is set to

MPI::ERRORSTHROWEXCEPTIONS, then on error the C++ exception mechanism

will be used to throw an MPI:Exception object. Before the error value is returned, the current MPI error handler is called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with

MPICommseterrhandler; the predefined error handler MPIERRORSRETURN

may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. See the MPI man page for a full list of MPI error codes.

SEE ALSO

MPIInitthread MPIInitialized MPIFinalize Open MPI 1.2 September 2006 MPIInit(3OpenMPI)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™