MPI_Cart_shift function

Returns the shifted source and destination ranks, given a shift direction and amount.

Syntax

int MPIAPI MPI_Cart_shift(
        MPI_Comm comm,
        int      direction,
        int      disp,
  _Out_ int      *rank_source,
  _Out_ int      *rank_dest
);

Parameters

  • comm
    Communicator with cartesian structure.

  • direction
    Coordinate dimension of shift.

  • disp
    Displacement (> 0: upwards shift, < 0: downwards shift).

  • rank_source [out]
    Rank of source process.

  • rank_dest [out]
    Rank of destination process.

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_CART_SHIFT(COMM, DIRECTION, DISP, RANK_SOURCE, RANK_DEST, IERROR)
        INTEGER COMM, DIRECTION, DISP, RANK_SOURCE, RANK_DEST, IERROR

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 Process Topology Functions