MPI_Win_allocate function

Creates an MPI Window object that allocates memory.

Syntax

int MPIAPI MPI_Win_allocate(
        MPI_Aint size,
        int      disp_unit,
        MPI_Info info,
        MPI_Comm comm,
  _Out_ void     *baseptr,
  _Out_ MPI_Win  *win
);

Parameters

  • size
    Size of the memory window in bytes.

  • disp_unit
    Local unit size for displacements, in bytes.

  • info
    Info argument.

  • comm
    Communicator.

  • baseptr [out]
    Initial address of the memory window.

  • win [out]
    Window object returned by the call.

Return value

Returns MPI_SUCCESS on success. Otherwise, the return value is an error code.

In Fortran, the return value is stored in the IERROR parameter.

Fortran

    MPI_WIN_ALLOCATE(SIZE, DISP_UNIT, INFO, COMM, BASEPTR, WIN, IERROR)
        <type> BASEPTR(*)
        INTEGER(KIND=MPI_ADDRESS_KIND) SIZE
        INTEGER DISP_UNIT, INFO, COMM, WIN, IERROR

Remarks

This is a collective call executed by all processes in the group of comm. On each process, it allocates memory of at least size bytes, returns a pointer to it, and returns a window object that can be used by all processes in comm to perform RMA operations. The returned memory consists of size bytes local to each process, starting at address baseptr and is associated with the window as if the user called MPI_Win_create on existing memory. The size argument may be different at each process and size = 0 is valid; however, a library might allocate and expose more memory in order to create a fast, globally symmetric allocation.

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 One-Sided Communications Functions