pyccel.stdlib.parallel.mpi module

pyccel.stdlib.parallel.mpi module#

Module containing the Cart class which maps MPI’s Cart concepts to a single place, providing a convenient interface with encapsulated MPI functionality. The functions of the Cart class are imported from the mpi module in pyccel.stdlib.parallel and are translated to the appropriate MPI calls in the target language. This may need removing with #251.

class pyccel.stdlib.parallel.mpi.Cart(npts, pads, periods, reorder)[source]View on GitHub#

Bases: object

A class to map MPI’s Cart concepts.

A class to map MPI’s Cart concepts. This may need removing with #251.

Parameters:
  • npts (tuple[int, ...]) – Number of points in each dimension, excluding the ghost regions.

  • pads (tuple[int, ...]) – Array padding, i.e. number of ghost points in each dimension.

  • periods (tuple[bool, ...]) – Whether the grid is periodic (true) or not (false) in each dimension.

  • reorder (bool) – MPI ranking may be reordered (true) or not (false).

communicate(u)[source]View on GitHub#
reduce(x)[source]View on GitHub#