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 (ofpeer_comm
) which is is the equivalent process of theinter_locale_rank
rank of theinter_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 ofint
indicating the halo (ghost elements) for extents.locale_extents
Sequence of LocaleExtent
objects wherelocale_extents[r]
is the extent assigned to locale withinter_locale_comm
rankr
.num_locales
An int
specifying the number of locales in this distribution.peer_ranks_per_locale
A numpy.ndarray
of lengthnum_locales
.struct_locale_extents
A structure numpy.ndarray
wherestruct_locale_extents[r]
is the extent assigned to locale withinter_locale_comm
rankr
.