Struct mpi::topology::InterCommunicator
source · pub struct InterCommunicator(/* private fields */);
Expand description
A communicator for inter-communication, which represents a point-to-point communication between disjoint groups
Standard Sections
6.6
Implementations§
source§impl InterCommunicator
impl InterCommunicator
sourcepub unsafe fn try_from_raw(raw: MPI_Comm) -> Option<Self>
pub unsafe fn try_from_raw(raw: MPI_Comm) -> Option<Self>
Construct an InterCommunicator
from a raw handle
sourcepub fn remote_size(&self) -> Rank
pub fn remote_size(&self) -> Rank
The number of processes in the remote group of comm
Standard Section(s)
6.6.1, See MPI_Comm_remote_size
sourcepub fn remote_group(&self) -> UserGroup
pub fn remote_group(&self) -> UserGroup
The remote group corresponding to the intercomm
Standard Section(s)
6.6.1, See MPI_Comm_remote_group
sourcepub fn merge(&self, merge_order: MergeOrder) -> SimpleCommunicator
pub fn merge(&self, merge_order: MergeOrder) -> SimpleCommunicator
Merge an InterCommunicator into a single UserCommunicator
To specify the ordering of merged ranks, every member of the one group
should call with MergeOrder::Low
and every member of the other group
should use MergeOrder::High
.
Standard section(s)
7.6.2
Trait Implementations§
source§impl AsCommunicator for InterCommunicator
impl AsCommunicator for InterCommunicator
§type Out = InterCommunicator
type Out = InterCommunicator
The type of the associated communicator
source§fn as_communicator(&self) -> &Self::Out
fn as_communicator(&self) -> &Self::Out
Returns the associated communicator.
source§impl AsRaw for InterCommunicator
impl AsRaw for InterCommunicator
source§impl Communicator for InterCommunicator
impl Communicator for InterCommunicator
source§fn target_size(&self) -> Rank
fn target_size(&self) -> Rank
Returns the number of processes available to communicate with in this
Communicator
. For
intra-communicators, this is equivalent to size
. For inter-communicators,
this is equivalent to remote_size
.source§fn rank(&self) -> Rank
fn rank(&self) -> Rank
The
Rank
that identifies the calling process within this communicator Read moresource§fn get_attr<A: Attribute>(&self, key: A) -> Option<&<A as Attribute>::Target>where
Self: Sized,
fn get_attr<A: Attribute>(&self, key: A) -> Option<&<A as Attribute>::Target>where
Self: Sized,
Get
Attribute
source§fn any_process(&self) -> AnyProcess<'_, Self>where
Self: Sized,
fn any_process(&self) -> AnyProcess<'_, Self>where
Self: Sized,
Returns an
AnyProcess
identifier that can be used, e.g. as a Source
in point to point
communication.source§fn this_process(&self) -> Process<'_, Self>where
Self: Sized,
fn this_process(&self) -> Process<'_, Self>where
Self: Sized,
A
Process
for the calling processsource§fn duplicate(&self) -> SimpleCommunicator
fn duplicate(&self) -> SimpleCommunicator
Duplicate a communicator. Read more
source§fn split_by_color(&self, color: Color) -> Option<SimpleCommunicator>
fn split_by_color(&self, color: Color) -> Option<SimpleCommunicator>
Split a communicator by color. Read more
source§fn split_by_color_with_key(
&self,
color: Color,
key: Key
) -> Option<SimpleCommunicator>
fn split_by_color_with_key( &self, color: Color, key: Key ) -> Option<SimpleCommunicator>
Split a communicator by color. Read more
Split the communicator into subcommunicators, each of which can create a shared memory
region. Read more
source§fn split_by_subgroup_collective<G>(
&self,
group: &G
) -> Option<SimpleCommunicator>
fn split_by_subgroup_collective<G>( &self, group: &G ) -> Option<SimpleCommunicator>
Split a communicator collectively by subgroup. Read more
source§fn split_by_subgroup<G>(&self, group: &G) -> Option<SimpleCommunicator>
fn split_by_subgroup<G>(&self, group: &G) -> Option<SimpleCommunicator>
Split a communicator by subgroup. Read more
source§fn split_by_subgroup_with_tag<G>(
&self,
group: &G,
tag: Tag
) -> Option<SimpleCommunicator>
fn split_by_subgroup_with_tag<G>( &self, group: &G, tag: Tag ) -> Option<SimpleCommunicator>
Split a communicator by subgroup Read more
source§fn test_inter(&self) -> bool
fn test_inter(&self) -> bool
Tests if the communicator is an inter-communicator. Read more
source§fn create_cartesian_communicator(
&self,
dims: &[Count],
periods: &[bool],
reorder: bool
) -> Option<CartesianCommunicator>
fn create_cartesian_communicator( &self, dims: &[Count], periods: &[bool], reorder: bool ) -> Option<CartesianCommunicator>
Creates a communicator with ranks laid out in a multi-dimensional space, allowing for easy
neighbor-to-neighbor communication, while providing MPI with information to allow it to
better optimize the physical locality of ranks that are logically close. Read more
source§fn cartesian_map(&self, dims: &[Count], periods: &[bool]) -> Option<Rank>
fn cartesian_map(&self, dims: &[Count], periods: &[bool]) -> Option<Rank>
Gets the target rank of this rank as-if
create_cartesian_communicator
had been called
with dims
, periods
, and reorder = true
. Read moresource§fn pack_size<Dt>(&self, incount: Count, datatype: &Dt) -> Count
fn pack_size<Dt>(&self, incount: Count, datatype: &Dt) -> Count
Gets the implementation-defined buffer size required to pack ‘incount’ elements of type
‘datatype’. Read more
source§fn pack<Buf>(&self, inbuf: &Buf) -> Vec<u8>
fn pack<Buf>(&self, inbuf: &Buf) -> Vec<u8>
Packs inbuf into a byte array with an implementation-defined format. Often paired with
unpack
to convert back into a specific datatype. Read moresource§fn pack_into<Buf>(
&self,
inbuf: &Buf,
outbuf: &mut [u8],
position: Count
) -> Count
fn pack_into<Buf>( &self, inbuf: &Buf, outbuf: &mut [u8], position: Count ) -> Count
Packs inbuf into a byte array with an implementation-defined format. Often paired with
unpack
to convert back into a specific datatype. Read moresource§impl FromRaw for InterCommunicator
impl FromRaw for InterCommunicator
source§unsafe fn from_raw(handle: <Self as AsRaw>::Raw) -> Self
unsafe fn from_raw(handle: <Self as AsRaw>::Raw) -> Self
Construct an InterCommunicator
from a raw handle without checking if it’s an Intercomm
handle
Safety
handle
must be a live MPI_Comm object.handle
must be an inter-comms or inter-comm parent handlehandle
must not be used after callingfrom_raw
.
Auto Trait Implementations§
impl RefUnwindSafe for InterCommunicator
impl !Send for InterCommunicator
impl !Sync for InterCommunicator
impl Unpin for InterCommunicator
impl UnwindSafe for InterCommunicator
Blanket Implementations§
source§impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
source§fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
Convert the given value into an approximately equivalent representation.
source§impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
§type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
The error type produced by a failed conversion.
source§fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
Convert the subject into an approximately equivalent representation.
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<C> CommunicatorCollectives for Cwhere
C: Communicator,
impl<C> CommunicatorCollectives for Cwhere
C: Communicator,
source§fn all_gather_into<S, R>(&self, sendbuf: &S, recvbuf: &mut R)
fn all_gather_into<S, R>(&self, sendbuf: &S, recvbuf: &mut R)
Gather contents of buffers on all participating processes. Read more
source§fn all_gather_varcount_into<S, R>(&self, sendbuf: &S, recvbuf: &mut R)
fn all_gather_varcount_into<S, R>(&self, sendbuf: &S, recvbuf: &mut R)
Gather contents of buffers on all participating processes. Read more
source§fn all_to_all_into<S, R>(&self, sendbuf: &S, recvbuf: &mut R)
fn all_to_all_into<S, R>(&self, sendbuf: &S, recvbuf: &mut R)
source§fn all_to_all_varcount_into<S, R>(&self, sendbuf: &S, recvbuf: &mut R)
fn all_to_all_varcount_into<S, R>(&self, sendbuf: &S, recvbuf: &mut R)
source§fn all_reduce_into<S, R, O>(&self, sendbuf: &S, recvbuf: &mut R, op: O)
fn all_reduce_into<S, R, O>(&self, sendbuf: &S, recvbuf: &mut R, op: O)
Performs a global reduction under the operation
op
of the input data in sendbuf
and
stores the result in recvbuf
on all processes. Read moresource§fn reduce_scatter_block_into<S, R, O>(
&self,
sendbuf: &S,
recvbuf: &mut R,
op: O
)
fn reduce_scatter_block_into<S, R, O>( &self, sendbuf: &S, recvbuf: &mut R, op: O )
Performs an element-wise global reduction under the operation
op
of the input data in
sendbuf
and scatters the result into equal sized blocks in the receive buffers on all
processes. Read moresource§fn scan_into<S, R, O>(&self, sendbuf: &S, recvbuf: &mut R, op: O)
fn scan_into<S, R, O>(&self, sendbuf: &S, recvbuf: &mut R, op: O)
Performs a global inclusive prefix reduction of the data in
sendbuf
into recvbuf
under
operation op
. Read moresource§fn exclusive_scan_into<S, R, O>(&self, sendbuf: &S, recvbuf: &mut R, op: O)
fn exclusive_scan_into<S, R, O>(&self, sendbuf: &S, recvbuf: &mut R, op: O)
Performs a global exclusive prefix reduction of the data in
sendbuf
into recvbuf
under
operation op
. Read moresource§fn immediate_barrier(&self) -> Request<'static, ()>
fn immediate_barrier(&self) -> Request<'static, ()>
Non-blocking barrier synchronization among all processes in a
Communicator
Read moresource§fn immediate_all_gather_into<'a, S, R, Sc>(
&self,
scope: Sc,
sendbuf: &'a S,
recvbuf: &'a mut R
) -> Request<'a, R, Sc>
fn immediate_all_gather_into<'a, S, R, Sc>( &self, scope: Sc, sendbuf: &'a S, recvbuf: &'a mut R ) -> Request<'a, R, Sc>
Initiate non-blocking gather of the contents of all
sendbuf
s into all rcevbuf
s on all
processes in the communicator. Read moresource§fn immediate_all_gather_varcount_into<'a, S, R, Sc>(
&self,
scope: Sc,
sendbuf: &'a S,
recvbuf: &'a mut R
) -> Request<'a, R, Sc>
fn immediate_all_gather_varcount_into<'a, S, R, Sc>( &self, scope: Sc, sendbuf: &'a S, recvbuf: &'a mut R ) -> Request<'a, R, Sc>
Initiate non-blocking gather of the contents of all
sendbuf
s into all rcevbuf
s on all
processes in the communicator. Read moresource§fn immediate_all_to_all_into<'a, S, R, Sc>(
&self,
scope: Sc,
sendbuf: &'a S,
recvbuf: &'a mut R
) -> Request<'a, R, Sc>
fn immediate_all_to_all_into<'a, S, R, Sc>( &self, scope: Sc, sendbuf: &'a S, recvbuf: &'a mut R ) -> Request<'a, R, Sc>
Initiate non-blocking all-to-all communication. Read more
source§fn immediate_all_to_all_varcount_into<'a, S, R, Sc>(
&self,
scope: Sc,
sendbuf: &'a S,
recvbuf: &'a mut R
) -> Request<'a, R, Sc>
fn immediate_all_to_all_varcount_into<'a, S, R, Sc>( &self, scope: Sc, sendbuf: &'a S, recvbuf: &'a mut R ) -> Request<'a, R, Sc>
Initiate non-blocking all-to-all communication. Read more
source§fn immediate_all_reduce_into<'a, S, R, O, Sc>(
&self,
scope: Sc,
sendbuf: &'a S,
recvbuf: &'a mut R,
op: O
) -> Request<'a, R, Sc>
fn immediate_all_reduce_into<'a, S, R, O, Sc>( &self, scope: Sc, sendbuf: &'a S, recvbuf: &'a mut R, op: O ) -> Request<'a, R, Sc>
Initiates a non-blocking global reduction under the operation
op
of the input data in
sendbuf
and stores the result in recvbuf
on all processes. Read moresource§fn immediate_reduce_scatter_block_into<'a, S, R, O, Sc>(
&self,
scope: Sc,
sendbuf: &'a S,
recvbuf: &'a mut R,
op: O
) -> Request<'a, R, Sc>
fn immediate_reduce_scatter_block_into<'a, S, R, O, Sc>( &self, scope: Sc, sendbuf: &'a S, recvbuf: &'a mut R, op: O ) -> Request<'a, R, Sc>
Initiates a non-blocking element-wise global reduction under the operation
op
of the
input data in sendbuf
and scatters the result into equal sized blocks in the receive
buffers on all processes. Read moresource§fn immediate_scan_into<'a, S, R, O, Sc>(
&self,
scope: Sc,
sendbuf: &'a S,
recvbuf: &'a mut R,
op: O
) -> Request<'a, R, Sc>
fn immediate_scan_into<'a, S, R, O, Sc>( &self, scope: Sc, sendbuf: &'a S, recvbuf: &'a mut R, op: O ) -> Request<'a, R, Sc>
Initiates a non-blocking global inclusive prefix reduction of the data in
sendbuf
into
recvbuf
under operation op
. Read moresource§impl<T, Dst> ConvAsUtil<Dst> for T
impl<T, Dst> ConvAsUtil<Dst> for T
source§impl<T> ConvUtil for T
impl<T> ConvUtil for T
source§fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
Approximate the subject to a given type with the default scheme.
source§fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>
Approximate the subject to a given type with a specific scheme.