mpi_array.distribution.Distribution¶
-
class
mpi_array.distribution.
Distribution
(globale_extent, locale_extents, halo=0, globale_extent_type=<class 'mpi_array.distribution.GlobaleExtent'>, locale_extent_type=<class 'mpi_array.distribution.LocaleExtent'>, inter_locale_rank_to_peer_rank=None)[source]¶ Bases:
object
Describes the apportionment of array extents amongst locales.
Methods
__init__
(globale_extent, locale_extents[, ...])Construct. 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
The “high index” indices. LO
The “low index” indices. 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
.