⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mpi_init.3

📁 MPI stands for the Message Passing Interface. Written by the MPI Forum (a large committee comprising
💻 3
字号:
.\"Copyright 2006, Sun Microsystems, Inc..\" Copyright (c) 1996 Thinking Machines Corporation.TH MPI_Init 3OpenMPI "September 2006" "Open MPI 1.2" " ".SH NAME\fBMPI_Init\fP \- Initializes the MPI execution environment.SH SYNTAX.ft R.SH C Syntax.nf#include <mpi.h>int MPI_Init(int *\fIargc\fP, char ***\fIargv\fP).SH Fortran Syntax.nfINCLUDE 'mpif.h'MPI_INIT(\fIIERROR\fP)	INTEGER	\fIIERROR\fP .SH C++ Syntax.nf#include <mpi.h>void MPI::Init(int& \fIargc\fP, char**& \fIargv\fP)void MPI::Init().SH INPUT PARAMETERS.ft R.TP 1iargcC/C++ only: Pointer to the number of arguments..TP 1iargvC/C++ only: Argument vector..SH OUTPUT PARAMETER.ft R.TP 1iIERRORFortran only: Error status (integer). .SH DESCRIPTION.ft RThis routine, or MPI_Init_thread, must be called before any other MPIroutine (apart from MPI_Initialized) is called. MPI can be initializedat most once; subsequent calls to MPI_Init or MPI_Init_thread areerroneous..spAll MPI programs must contain a call to MPI_Init orMPI_Init_thread. Open MPI accepts the C/C++ \fIargc\fP and \fIargv\fParguments to main, but neither modifies, interprets, nor distributesthem:.sp.nf	{		/* declare variables */		MPI_Init(&argc, &argv);		/* parse arguments */		/* main program */ 		MPI_Finalize();	}.fi.SH NOTES.ft RThe Fortran version does not have provisions for \fIargc\fP and\fIargv\fP and takes only IERROR..spThe MPI Standard does not say what a program can do before an MPI_Initor after an MPI_Finalize. In the Open MPI implementation, it should doas little as possible. In particular, avoid anything that changes theexternal state of the program, such as opening files, reading standardinput, or writing to standard output..SH ERRORS.ft RAlmost all MPI routines return an error value; C routines asthe value of the function and Fortran routines in the last argument. C++functions do not return errors. If the default error handler is set toMPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanismwill be used to throw an MPI:Exception object..spBefore the error value is returned, the current MPI error handler iscalled. By default, this error handler aborts the MPI job, except forI/O function errors. The error handler may be changed withMPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURNmay be used to cause error values to be returned. Note that MPI does notguarantee that an MPI program can continue past an error. .spSee the MPI man page for a full list of MPI error codes..SH SEE ALSO.ft R.nfMPI_Init_threadMPI_InitializedMPI_Finalize' @(#)MPI_Init.3 1.24 06/03/09   

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -