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

Number of processes in this communicator

Examples

See examples/simple.rs

Standard section(s)

6.4.1

The Rank that identifies the calling process within this communicator

Examples

See examples/simple.rs

Standard section(s)

6.4.1

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

Returns an AnyProcess identifier that can be used, e.g. as a Source in point to point communication.

A Process for the calling process

Compare two communicators.

See enum CommunicatorRelation.

Standard section(s)

6.4.1

Duplicate a communicator.

Examples

See examples/duplicate.rs

Standard section(s)

6.4.2

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

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

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

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

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

The group associated with this communicator

Standard section(s)

6.3.2

Abort program execution

Standard section(s)

8.7

Implementors