# Topology

MPI.Cart_coords!Function
Cart_coords!(comm::Comm, rank::Integer, coords)

Determine coordinates of a given process in Cartesian communicator.

source
MPI.Cart_createFunction
comm_cart = Cart_create(comm_old::Comm, [ndims::Integer], dims, periods, reorder)

Create new MPI communicator with Cartesian structure from an existent communicator.

source
MPI.Cart_getFunction
dims, periods, coords = Cart_get(comm::Comm)

Obtain information on the Cartesian topology of dimension N underlying the communicator comm. This is specified by two Cint arrays of N elements for the number of processes and periodicity properties along each Cartesian dimension. A third Cint array is returned, containing the Cartesian coordinates of the calling process.

source
MPI.Cart_rankFunction
rank = Cart_rank(comm::Comm, coords)

Determine process rank in communicator comm with Cartesian structure. The coords array specifies the Cartesian coordinates of the process.

source
MPI.Cart_shiftFunction
rank_source, rank_dest = Cart_shift(comm::Comm, direction::Integer, disp::Integer)

Return the source and destination ranks associated to a shift along a given direction.

source
MPI.Cart_subFunction
comm_sub = Cart_sub(comm::Comm, remain_dims)

Create lower-dimensional Cartesian communicator from existent Cartesian topology.

remain_dims should be a boolean vector specifying the dimensions that should be kept in the generated subgrid.

source
MPI.Cartdim_getFunction
ndims = Cartdim_get(comm::Comm)

Return number of dimensions of the Cartesian topology associated with the communicator comm.

MPI.Dims_create!Function
Dims_create!(nnodes::Integer, [ndims::Integer], dims)
Create a division of nnodes processes in a Cartesian grid.