mpi_array.distribution.SingleLocaleDistribution

class mpi_array.distribution.SingleLocaleDistribution(globale_extent, num_locales, inter_locale_rank=0, halo=0, inter_locale_rank_to_peer_rank=None)[source]

Bases: mpi_array.distribution.Distribution

Distribution where entire globale extent elements occur on just a single locale.

Methods

__init__(globale_extent, num_locales[, ...]) Initialise.
create_globale_extent(globale_extent[, halo]) Factory method for creating GlobaleExtent object.
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_comm communicator.
get_peer_rank(inter_locale_rank) Returns the peer_rank rank (of peer_comm) which is is the equivalent process of the inter_locale_rank rank of the inter_locale_comm communicator.
initialise_struct_locale_extents(...)
initialise_struct_locale_extents_halos(...) Trim locale extent halos so they don’t extend beyond the globale_extent halo.

Attributes

HI
LO
globale_extent A GlobaleExtent specifying the globale array indexing extent.
halo A (ndim, 2) shaped array of int indicating the halo (ghost elements) for extents.
locale_extents Sequence of LocaleExtent objects where locale_extents[r] is the extent assigned to locale with inter_locale_comm rank r.
num_locales An int specifying the number of locales in this distribution.
peer_ranks_per_locale A numpy.ndarray of length num_locales.
struct_locale_extents A structure numpy.ndarray where struct_locale_extents[r] is the extent assigned to locale with inter_locale_comm rank r.