mpi_array.distribution.BlockPartition.__init__

BlockPartition.__init__(globale_extent, dims, cart_coord_to_cart_rank, halo=0, order='C', inter_locale_rank_to_peer_rank=None)[source]

Creates a block-partitioning of shape over locales.

Parameters:
  • globale_extent (GlobaleExtent) – The globale extent to be partitioned.
  • dims (sequence of int) – The number of partitions along each dimension, len(dims) == len(globale_extent.shape_n) and num_locales = numpy.product(dims).
  • halo (int, sequence of int or (len(shape), 2) shaped array.) – Number of ghost elements added per axis (low-index number of ghost elements may differ to the number of high-index ghost elements).
  • cart_coord_to_cart_rank (dict) – Mapping between cartesian communicator coordinate (mpi4py.MPI.CartComm.Get_coords()) and cartesian communicator rank.