Blame man/man3/MPI_Init.3

Packit Service c5cf8c
.TH MPI_Init 3 "11/12/2019" " " "MPI"
Packit Service c5cf8c
.SH NAME
Packit Service c5cf8c
MPI_Init \-  Initialize the MPI execution environment 
Packit Service c5cf8c
.SH SYNOPSIS
Packit Service c5cf8c
.nf
Packit Service c5cf8c
int MPI_Init(int *argc, char ***argv)
Packit Service c5cf8c
.fi
Packit Service c5cf8c
.SH INPUT PARAMETERS
Packit Service c5cf8c
.PD 0
Packit Service c5cf8c
.TP
Packit Service c5cf8c
.B argc 
Packit Service c5cf8c
- Pointer to the number of arguments
Packit Service c5cf8c
.PD 1
Packit Service c5cf8c
.PD 0
Packit Service c5cf8c
.TP
Packit Service c5cf8c
.B argv 
Packit Service c5cf8c
- Pointer to the argument vector
Packit Service c5cf8c
.PD 1
Packit Service c5cf8c
Packit Service c5cf8c
.SH THREAD AND SIGNAL SAFETY
Packit Service c5cf8c
This routine must be called by one thread only.  That thread is called
Packit Service c5cf8c
the 
Packit Service c5cf8c
.B main thread
Packit Service c5cf8c
and must be the thread that calls 
Packit Service c5cf8c
.I MPI_Finalize
Packit Service c5cf8c
\&.
Packit Service c5cf8c
Packit Service c5cf8c
Packit Service c5cf8c
.SH NOTES
Packit Service c5cf8c
The MPI standard does not say what a program can do before an 
Packit Service c5cf8c
.I MPI_INIT
Packit Service c5cf8c
or
Packit Service c5cf8c
after an 
Packit Service c5cf8c
.I MPI_FINALIZE
Packit Service c5cf8c
\&.
Packit Service c5cf8c
In the MPICH implementation, you should do
Packit Service c5cf8c
as little as possible.  In particular, avoid anything that changes the
Packit Service c5cf8c
external state of the program, such as opening files, reading standard
Packit Service c5cf8c
input or writing to standard output.
Packit Service c5cf8c
Packit Service c5cf8c
.SH NOTES FOR C
Packit Service c5cf8c
As of MPI-2, 
Packit Service c5cf8c
.I MPI_Init
Packit Service c5cf8c
will accept NULL as input parameters. Doing so
Packit Service c5cf8c
will impact the values stored in 
Packit Service c5cf8c
.I MPI_INFO_ENV
Packit Service c5cf8c
\&.
Packit Service c5cf8c
Packit Service c5cf8c
Packit Service c5cf8c
.SH NOTES FOR FORTRAN
Packit Service c5cf8c
The Fortran binding for 
Packit Service c5cf8c
.I MPI_Init
Packit Service c5cf8c
has only the error return
Packit Service c5cf8c
.nf
Packit Service c5cf8c
subroutine MPI_INIT(ierr)
Packit Service c5cf8c
integer ierr
Packit Service c5cf8c
.fi
Packit Service c5cf8c
Packit Service c5cf8c
Packit Service c5cf8c
.SH ERRORS
Packit Service c5cf8c
Packit Service c5cf8c
All MPI routines (except 
Packit Service c5cf8c
.I MPI_Wtime
Packit Service c5cf8c
and 
Packit Service c5cf8c
.I MPI_Wtick
Packit Service c5cf8c
) return an error value;
Packit Service c5cf8c
C routines as the value of the function and Fortran routines in the last
Packit Service c5cf8c
argument.  Before the value is returned, the current MPI error handler is
Packit Service c5cf8c
called.  By default, this error handler aborts the MPI job.  The error handler
Packit Service c5cf8c
may be changed with 
Packit Service c5cf8c
.I MPI_Comm_set_errhandler
Packit Service c5cf8c
(for communicators),
Packit Service c5cf8c
.I MPI_File_set_errhandler
Packit Service c5cf8c
(for files), and 
Packit Service c5cf8c
.I MPI_Win_set_errhandler
Packit Service c5cf8c
(for
Packit Service c5cf8c
RMA windows).  The MPI-1 routine 
Packit Service c5cf8c
.I MPI_Errhandler_set
Packit Service c5cf8c
may be used but
Packit Service c5cf8c
its use is deprecated.  The predefined error handler
Packit Service c5cf8c
.I MPI_ERRORS_RETURN
Packit Service c5cf8c
may be used to cause error values to be returned.
Packit Service c5cf8c
Note that MPI does 
Packit Service c5cf8c
.B not
Packit Service c5cf8c
guarentee that an MPI program can continue past
Packit Service c5cf8c
an error; however, MPI implementations will attempt to continue whenever
Packit Service c5cf8c
possible.
Packit Service c5cf8c
Packit Service c5cf8c
.PD 0
Packit Service c5cf8c
.TP
Packit Service c5cf8c
.B MPI_SUCCESS 
Packit Service c5cf8c
- No error; MPI routine completed successfully.
Packit Service c5cf8c
.PD 1
Packit Service c5cf8c
.PD 0
Packit Service c5cf8c
.TP
Packit Service c5cf8c
.B MPI_ERR_OTHER 
Packit Service c5cf8c
- This error class is associated with an error code that 
Packit Service c5cf8c
indicates that an attempt was made to call 
Packit Service c5cf8c
.I MPI_INIT
Packit Service c5cf8c
a second time.
Packit Service c5cf8c
.I MPI_INIT
Packit Service c5cf8c
may only be called once in a program.
Packit Service c5cf8c
.PD 1
Packit Service c5cf8c
Packit Service c5cf8c
.SH SEE ALSO
Packit Service c5cf8c
MPI_Init_thread, MPI_Finalize
Packit Service c5cf8c
.br