The Cartesian topology

class mpi.topology.cartesian.Cartesian(communicator, dims, periodic=None, rank_reordering=False)

Cartesian topology class for pupyMPI. Supports n’th dimensional topologies with flexible size and with periodicity. Rank reordering not supported.

Note

if the periodic parameter is not supplied or contains less information than dims it is automatically extended as False for the remainder of the dimensions. It is considered an error to supply a dims list of 0 elements or where any element is not a positive integer.

get()

Get my grid coordinates based on my rank Original MPI 1.1 specification at http://www.mpi-forum.org/docs/mpi-11-html/node136.html#Node136

coords(rank)

The inverse mapping, rank-to-coordinates translation is provided by MPI_CART_COORDS

Original MPI 1.1 specification at http://www.mpi-forum.org/docs/mpi-11-html/node136.html#Node136

rank(coords)

Get my 1D rank from grid coordinates Original MPI 1.1 specification at http://www.mpi-forum.org/docs/mpi-11-html/node136.html#Node136

shift(direction, displacement, rank_source)

Shifts by rank in one coordinate direction. Displacement specifies step width. Original MPI 1.1 specification at http://www.mpi-forum.org/docs/mpi-11-html/node137.html#Node137

map()

MPI_CART_MAP computes an ‘’optimal’’ placement for the calling process on the physical machine. A possible implementation of this function is to always return the rank of the calling process, that is, not to perform any reordering.

This implementation does just that, as mapping to physical hardware is not supported.

Original MPI 1.1 specification at http://www.mpi-forum.org/docs/mpi-11-html/node139.html

Previous topic

Predefined operations for reduce, allreduce and scan

Next topic

Predefined constants

This Page