mpi_array.distribution.BlockPartition¶
-
class
mpi_array.distribution.BlockPartition(globale_extent, dims, cart_coord_to_cart_rank, halo=0, order='C', inter_locale_rank_to_peer_rank=None)[source]¶ Bases:
mpi_array.distribution.DistributionBlock partition of an array (shape) over locales.
Methods
__init__(globale_extent, dims, ...[, halo, ...])Creates a block-partitioning of shapeover locales.create_globale_extent(globale_extent[, halo])Factory method for creating GlobaleExtentobject.create_locale_extents(struct_locale_extents)create_struct_locale_extents(num_locales, ndim)get_extent_for_rank(inter_locale_rank)Returns extent associated with the specified rank of the inter_locale_commcommunicator.get_peer_rank(inter_locale_rank)Returns the peer_rankrank (ofpeer_comm) which is is the equivalent process of theinter_locale_rankrank of theinter_locale_commcommunicator.initialise_struct_locale_extents(...)initialise_struct_locale_extents_halos(...)Trim locale extent halos so they don’t extend beyond the globale_extenthalo.Attributes
HILOglobale_extentA GlobaleExtentspecifying the globale array indexing extent.haloA (ndim, 2)shaped array ofintindicating the halo (ghost elements) for extents.locale_extentsSequence of LocaleExtentobjects wherelocale_extents[r]is the extent assigned to locale withinter_locale_commrankr.num_localesAn intspecifying the number of locales in this distribution.peer_ranks_per_localeA numpy.ndarrayof lengthnum_locales.struct_locale_extentsA structure numpy.ndarraywherestruct_locale_extents[r]is the extent assigned to locale withinter_locale_commrankr.