MPI_Cart_shift - Returns the shifted source and
destination ranks, given a shift direction and amount
SYNOPSIS
C:
#include <mpi.h>
int MPI_Cart_shift ( comm, direction, displ, source, dest )
MPI_Comm comm;
int direction;
int displ;
int *source;
int *dest;
C++:
#include <mpi.h>
void Cartcomm::Shift(
int direction,
int disp,
int& rank_source,
int& rank_dest) const
Fortran:
INCLUDE "mpif.h" (or USE MPI)
INTEGER comm, direction, disp, rank_source,
rank_dest, ierror
CALL MPI_CART_SHIFT(comm, direction, disp,
rank_source, rank_dest, ierror)
STANDARDS
This release implements the MPI 1.2 standard, as
documented by the MPI Forum in the spring 1997 release of
MPI: A Message Passing Interface Standard.
DESCRIPTION
The MPI_Cart_shift routine returns the shifted source and
destination ranks, given a shift direction and amount.
This routine accepts the following parameters:
comm Specifies a communicator with Cartesian
structure (handle)
direction Specifies the coordinate dimension of the
shift (integer)
shift; <0 indicates downward shift)
(integer)
source Returns the rank of the source process
(integer)
dest Returns the rank of the destination process
(integer)
ierror Specifies the return code value for
successful completion, which is in
MPI_SUCCESS. MPI_SUCCESS is defined in the
mpif.h file.
NOTES
The direction argument is in the range [0,n-1] for an n-
dimensional Cartesian mesh.
Man(1) output converted with
man2html