Edit

Share via


MPI_Init function

Initializes the calling MPI process’s execution environment for single threaded execution.

Syntax

int MPIAPI MPI_Init(
  _In_opt_ int                        *argc,
           _In_opt_count_(*argc) char ***argv
);

Parameters

  • argc [in, optional]
    A pointer to the number of arguments for the program. This value can be NULL.

  • argv
    A pointer to the argument list for the program. This value can be NULL.

Return value

MPI_SUCCESS if the function returns successfully. Other error codes if the call failed for other reasons (such as invalid arguments). In Fortran the return value is stored in the IERROR parameter.

Fortran

    MPI_INIT(IERROR)
        INTEGER IERROR

Remarks

This function must be called by one thread only. That thread will be known as the “Main Thread” and must be the same thread to call MPI_Finalize.

The Fortran binding of MPI_Init does not accept the ARGC and ARGV parameters.

Requirements

Product

HPC Pack 2012 MS-MPI Redistributable Package, HPC Pack 2008 R2 MS-MPI Redistributable Package, HPC Pack 2008 MS-MPI Redistributable Package or HPC Pack 2008 Client Utilities

Header

Mpi.h; Mpif.h

Library

Msmpi.lib

DLL

Msmpi.dll

See also

MPI Management Functions

MPI_Finalize

MPI_Init_thread