Trait mpi::topology::Communicator
[−]
[src]
pub trait Communicator: AsRaw<Raw = MPI_Comm> { fn size(&self) -> Rank { ... } fn rank(&self) -> Rank { ... } fn process_at_rank(&self, r: Rank) -> Process<Self>
where
Self: Sized, { ... } fn any_process(&self) -> AnyProcess<Self>
where
Self: Sized, { ... } fn this_process(&self) -> Process<Self>
where
Self: Sized, { ... } fn compare<C: ?Sized>(&self, other: &C) -> CommunicatorRelation
where
C: Communicator, { ... } fn duplicate(&self) -> UserCommunicator { ... } fn split_by_color(&self, color: Color) -> Option<UserCommunicator> { ... } fn split_by_color_with_key(
&self,
color: Color,
key: Key
) -> Option<UserCommunicator> { ... } fn split_by_subgroup_collective<G: ?Sized>(
&self,
group: &G
) -> Option<UserCommunicator>
where
G: Group, { ... } fn split_by_subgroup<G: ?Sized>(
&self,
group: &G
) -> Option<UserCommunicator>
where
G: Group, { ... } fn split_by_subgroup_with_tag<G: ?Sized>(
&self,
group: &G,
tag: Tag
) -> Option<UserCommunicator>
where
G: Group, { ... } fn group(&self) -> UserGroup { ... } fn abort(&self, errorcode: c_int) -> ! { ... } }
Communicators are contexts for communication
Provided Methods
fn size(&self) -> Rank
fn rank(&self) -> Rank
The Rank
that identifies the calling process within this communicator
Examples
See examples/simple.rs
Standard section(s)
6.4.1
fn process_at_rank(&self, r: Rank) -> Process<Self> where
Self: Sized,
Self: Sized,
Bundles a reference to this communicator with a specific Rank
into a Process
.
Examples
See examples/broadcast.rs
examples/gather.rs
examples/send_receive.rs
fn any_process(&self) -> AnyProcess<Self> where
Self: Sized,
Self: Sized,
Returns an AnyProcess
identifier that can be used, e.g. as a Source
in point to point
communication.
fn this_process(&self) -> Process<Self> where
Self: Sized,
Self: Sized,
A Process
for the calling process
fn compare<C: ?Sized>(&self, other: &C) -> CommunicatorRelation where
C: Communicator,
C: Communicator,
fn duplicate(&self) -> UserCommunicator
fn split_by_color(&self, color: Color) -> Option<UserCommunicator>
Split a communicator by color.
Creates as many new communicators as distinct values of color
are given. All processes
with the same value of color
join the same communicator. A process that passes the
special undefined color will not join a new communicator and None
is returned.
Examples
See examples/split.rs
Standard section(s)
6.4.2
fn split_by_color_with_key(
&self,
color: Color,
key: Key
) -> Option<UserCommunicator>
&self,
color: Color,
key: Key
) -> Option<UserCommunicator>
Split a communicator by color.
Like split()
but orders processes according to the value of key
in the new
communicators.
Standard section(s)
6.4.2
fn split_by_subgroup_collective<G: ?Sized>(
&self,
group: &G
) -> Option<UserCommunicator> where
G: Group,
&self,
group: &G
) -> Option<UserCommunicator> where
G: Group,
Split a communicator collectively by subgroup.
Proceses pass in a group that is a subgroup of the group associated with the old
communicator. Different processes may pass in different groups, but if two groups are
different, they have to be disjunct. One new communicator is created for each distinct
group. The new communicator is returned if a process is a member of the group he passed in,
otherwise None
.
This call is a collective operation on the old communicator so all processes have to partake.
Examples
See examples/split.rs
Standard section(s)
6.4.2
fn split_by_subgroup<G: ?Sized>(&self, group: &G) -> Option<UserCommunicator> where
G: Group,
G: Group,
Split a communicator by subgroup.
Like split_by_subgroup_collective()
but not a collective operation.
Examples
See examples/split.rs
Standard section(s)
6.4.2
fn split_by_subgroup_with_tag<G: ?Sized>(
&self,
group: &G,
tag: Tag
) -> Option<UserCommunicator> where
G: Group,
&self,
group: &G,
tag: Tag
) -> Option<UserCommunicator> where
G: Group,
Split a communicator by subgroup
Like split_by_subgroup()
but can avoid collision of concurrent calls
(i.e. multithreaded) by passing in distinct tags.
Standard section(s)
6.4.2
fn group(&self) -> UserGroup
fn abort(&self, errorcode: c_int) -> !
Implementors
impl Communicator for SystemCommunicator
impl Communicator for UserCommunicator