pub struct Process<'a> { /* private fields */ }Expand description
A handle to a specific process in a communicator. Implements both
Source and Destination (and, via the collective module,
crate::collective::Root).
Implementations§
Trait Implementations§
impl<'a> Copy for Process<'a>
Source§impl Destination for Process<'_>
impl Destination for Process<'_>
Source§fn destination_rank(&self) -> Rank
fn destination_rank(&self) -> Rank
The rank being sent to.
Source§fn send_with_tag<Buf: Buffer + ?Sized>(&self, buf: &Buf, tag: Tag)
fn send_with_tag<Buf: Buffer + ?Sized>(&self, buf: &Buf, tag: Tag)
Standard-mode blocking send with a tag.
Source§fn try_send<Buf: Buffer + ?Sized>(&self, buf: &Buf) -> Result<(), MpiError>
fn try_send<Buf: Buffer + ?Sized>(&self, buf: &Buf) -> Result<(), MpiError>
Fallible send: returns an error instead of panicking if the transport
fails (e.g. the destination is unreachable). Honors the spirit of
crate::error::ErrorHandler::Return without changing the panic-based
default API.Source§fn try_send_with_tag<Buf: Buffer + ?Sized>(
&self,
buf: &Buf,
tag: Tag,
) -> Result<(), MpiError>
fn try_send_with_tag<Buf: Buffer + ?Sized>( &self, buf: &Buf, tag: Tag, ) -> Result<(), MpiError>
Fallible send with a tag.
Source§fn buffered_send<Buf: Buffer + ?Sized>(&self, buf: &Buf)
fn buffered_send<Buf: Buffer + ?Sized>(&self, buf: &Buf)
Buffered-mode send (
MPI_Bsend). Behaves as a standard send here since
the transport already buffers on the receiver side.Source§fn buffered_send_with_tag<Buf: Buffer + ?Sized>(&self, buf: &Buf, tag: Tag)
fn buffered_send_with_tag<Buf: Buffer + ?Sized>(&self, buf: &Buf, tag: Tag)
Buffered-mode send with a tag.
Source§fn synchronous_send<Buf: Buffer + ?Sized>(&self, buf: &Buf)
fn synchronous_send<Buf: Buffer + ?Sized>(&self, buf: &Buf)
Synchronous-mode send (
MPI_Ssend).Source§fn synchronous_send_with_tag<Buf: Buffer + ?Sized>(&self, buf: &Buf, tag: Tag)
fn synchronous_send_with_tag<Buf: Buffer + ?Sized>(&self, buf: &Buf, tag: Tag)
Synchronous-mode send with a tag.
Source§unsafe fn ready_send<Buf: Buffer + ?Sized>(&self, buf: &Buf)
unsafe fn ready_send<Buf: Buffer + ?Sized>(&self, buf: &Buf)
Ready-mode send (
MPI_Rsend). Read moreSource§unsafe fn ready_send_with_tag<Buf: Buffer + ?Sized>(&self, buf: &Buf, tag: Tag)
unsafe fn ready_send_with_tag<Buf: Buffer + ?Sized>(&self, buf: &Buf, tag: Tag)
Ready-mode send with a tag. Read more
Source§fn immediate_send<'a, Sc, Buf>(
&self,
scope: Sc,
buf: &'a Buf,
) -> Request<'a, Buf, Sc>
fn immediate_send<'a, Sc, Buf>( &self, scope: Sc, buf: &'a Buf, ) -> Request<'a, Buf, Sc>
Non-blocking standard send (
MPI_Isend), returning a Request.Source§fn immediate_send_with_tag<'a, Sc, Buf>(
&self,
scope: Sc,
buf: &'a Buf,
tag: Tag,
) -> Request<'a, Buf, Sc>
fn immediate_send_with_tag<'a, Sc, Buf>( &self, scope: Sc, buf: &'a Buf, tag: Tag, ) -> Request<'a, Buf, Sc>
Non-blocking standard send with a tag.
Source§fn immediate_buffered_send<'a, Sc, Buf>(
&self,
scope: Sc,
buf: &'a Buf,
) -> Request<'a, Buf, Sc>
fn immediate_buffered_send<'a, Sc, Buf>( &self, scope: Sc, buf: &'a Buf, ) -> Request<'a, Buf, Sc>
Non-blocking buffered send.
Source§fn immediate_synchronous_send<'a, Sc, Buf>(
&self,
scope: Sc,
buf: &'a Buf,
) -> Request<'a, Buf, Sc>
fn immediate_synchronous_send<'a, Sc, Buf>( &self, scope: Sc, buf: &'a Buf, ) -> Request<'a, Buf, Sc>
Non-blocking synchronous send.
Source§impl Root for Process<'_>
impl Root for Process<'_>
Source§fn broadcast_into<Buf: BufferMut + ?Sized>(&self, buffer: &mut Buf)
fn broadcast_into<Buf: BufferMut + ?Sized>(&self, buffer: &mut Buf)
Broadcast the root’s buffer to every rank (
MPI_Bcast).Source§fn gather_into<S: Buffer + ?Sized>(&self, sendbuf: &S)
fn gather_into<S: Buffer + ?Sized>(&self, sendbuf: &S)
(non-root) Contribute to a gather (
MPI_Gather).Source§fn gather_into_root<S, R>(&self, sendbuf: &S, recvbuf: &mut R)
fn gather_into_root<S, R>(&self, sendbuf: &S, recvbuf: &mut R)
(root) Collect contributions from all ranks (
MPI_Gather).Source§fn scatter_into<R: BufferMut + ?Sized>(&self, recvbuf: &mut R)
fn scatter_into<R: BufferMut + ?Sized>(&self, recvbuf: &mut R)
(non-root) Receive this rank’s slice of a scatter (
MPI_Scatter).Source§fn scatter_into_root<S, R>(&self, sendbuf: &S, recvbuf: &mut R)
fn scatter_into_root<S, R>(&self, sendbuf: &S, recvbuf: &mut R)
(root) Distribute slices of the send buffer to all ranks
(
MPI_Scatter).Source§fn reduce_into<S, O>(&self, sendbuf: &S, op: O)
fn reduce_into<S, O>(&self, sendbuf: &S, op: O)
(non-root) Contribute to a reduction whose result lands on the root
(
MPI_Reduce).Source§fn reduce_into_root<S, R, O>(&self, sendbuf: &S, recvbuf: &mut R, op: O)
fn reduce_into_root<S, R, O>(&self, sendbuf: &S, recvbuf: &mut R, op: O)
(root) Reduce contributions from all ranks into
recvbuf
(MPI_Reduce).Source§fn reduce_into_root_in_place<R, O>(&self, buf: &mut R, op: O)
fn reduce_into_root_in_place<R, O>(&self, buf: &mut R, op: O)
(root) In-place reduce: the root’s
buf supplies its contribution and
receives the result (MPI_Reduce with MPI_IN_PLACE). Non-root ranks
call Root::reduce_into as usual.Source§fn gather_into_root_in_place<R>(&self, buf: &mut R)
fn gather_into_root_in_place<R>(&self, buf: &mut R)
(root) In-place gather: the root’s
buf holds its own block at slot
root on entry and every rank’s block on return (MPI_Gather with
MPI_IN_PLACE). Non-root ranks call Root::gather_into.Source§fn gather_varcount_into<S: Buffer + ?Sized>(&self, sendbuf: &S)
fn gather_varcount_into<S: Buffer + ?Sized>(&self, sendbuf: &S)
(non-root) Contribute to a varying-count gather (
MPI_Gatherv).Source§fn gather_varcount_into_root<S, R>(&self, sendbuf: &S, recvbuf: &mut R)
fn gather_varcount_into_root<S, R>(&self, sendbuf: &S, recvbuf: &mut R)
(root) Collect varying-count contributions (
MPI_Gatherv).Source§fn scatter_varcount_into<R: BufferMut + ?Sized>(&self, recvbuf: &mut R)
fn scatter_varcount_into<R: BufferMut + ?Sized>(&self, recvbuf: &mut R)
(non-root) Receive this rank’s slice of a varying-count scatter
(
MPI_Scatterv).Source§fn scatter_varcount_into_root<S, R>(&self, sendbuf: &S, recvbuf: &mut R)
fn scatter_varcount_into_root<S, R>(&self, sendbuf: &S, recvbuf: &mut R)
(root) Distribute varying-count slices to all ranks (
MPI_Scatterv).Source§fn immediate_broadcast_into<'a, Buf, Sc>(
&self,
scope: Sc,
buffer: &'a mut Buf,
) -> Request<'a, Buf, Sc>
fn immediate_broadcast_into<'a, Buf, Sc>( &self, scope: Sc, buffer: &'a mut Buf, ) -> Request<'a, Buf, Sc>
Non-blocking broadcast (
MPI_Ibcast).Source§fn immediate_gather_into<'a, S, Sc>(
&self,
scope: Sc,
sendbuf: &'a S,
) -> Request<'a, S, Sc>
fn immediate_gather_into<'a, S, Sc>( &self, scope: Sc, sendbuf: &'a S, ) -> Request<'a, S, Sc>
(non-root) Non-blocking gather (
MPI_Igather).Source§fn immediate_gather_into_root<'a, S, R, Sc>(
&self,
scope: Sc,
sendbuf: &'a S,
recvbuf: &'a mut R,
) -> Request<'a, R, Sc>
fn immediate_gather_into_root<'a, S, R, Sc>( &self, scope: Sc, sendbuf: &'a S, recvbuf: &'a mut R, ) -> Request<'a, R, Sc>
(root) Non-blocking gather (
MPI_Igather).Source§fn immediate_scatter_into<'a, R, Sc>(
&self,
scope: Sc,
recvbuf: &'a mut R,
) -> Request<'a, R, Sc>
fn immediate_scatter_into<'a, R, Sc>( &self, scope: Sc, recvbuf: &'a mut R, ) -> Request<'a, R, Sc>
(non-root) Non-blocking scatter (
MPI_Iscatter).Source§fn immediate_scatter_into_root<'a, S, R, Sc>(
&self,
scope: Sc,
sendbuf: &'a S,
recvbuf: &'a mut R,
) -> Request<'a, R, Sc>
fn immediate_scatter_into_root<'a, S, R, Sc>( &self, scope: Sc, sendbuf: &'a S, recvbuf: &'a mut R, ) -> Request<'a, R, Sc>
(root) Non-blocking scatter (
MPI_Iscatter).Source§fn immediate_reduce_into<'a, S, O, Sc>(
&self,
scope: Sc,
sendbuf: &'a S,
op: O,
) -> Request<'a, S, Sc>
fn immediate_reduce_into<'a, S, O, Sc>( &self, scope: Sc, sendbuf: &'a S, op: O, ) -> Request<'a, S, Sc>
(non-root) Non-blocking reduce (
MPI_Ireduce).Source§fn immediate_reduce_into_root<'a, S, R, O, Sc>(
&self,
scope: Sc,
sendbuf: &'a S,
recvbuf: &'a mut R,
op: O,
) -> Request<'a, R, Sc>
fn immediate_reduce_into_root<'a, S, R, O, Sc>( &self, scope: Sc, sendbuf: &'a S, recvbuf: &'a mut R, op: O, ) -> Request<'a, R, Sc>
(root) Non-blocking reduce (
MPI_Ireduce).Source§fn spawn(
&self,
program: &str,
args: &[String],
maxprocs: Rank,
) -> Result<InterCommunicator, MpiError>
fn spawn( &self, program: &str, args: &[String], maxprocs: Rank, ) -> Result<InterCommunicator, MpiError>
Spawn
maxprocs copies of program (with args) as a new MPI world and
return an inter-communicator to them (MPI_Comm_spawn). Collective over
the root’s communicator; the spawned children obtain the matching parent
inter-communicator via crate::topology::Communicator::parent.Source§impl Source for Process<'_>
impl Source for Process<'_>
Source§fn source_rank(&self) -> Rank
fn source_rank(&self) -> Rank
The rank being received from (or
MPI_ANY_SOURCE).Source§fn receive<Msg: Equivalence>(&self) -> (Msg, Status)
fn receive<Msg: Equivalence>(&self) -> (Msg, Status)
Receive a single value (
MPI_Recv).Source§fn receive_with_tag<Msg: Equivalence>(&self, tag: Tag) -> (Msg, Status)
fn receive_with_tag<Msg: Equivalence>(&self, tag: Tag) -> (Msg, Status)
Receive a single value with a specific tag.
Source§fn receive_vec<Msg: Equivalence>(&self) -> (Vec<Msg>, Status)
fn receive_vec<Msg: Equivalence>(&self) -> (Vec<Msg>, Status)
Receive a variable number of values into a new
Vec.Source§fn receive_vec_with_tag<Msg: Equivalence>(&self, tag: Tag) -> (Vec<Msg>, Status)
fn receive_vec_with_tag<Msg: Equivalence>(&self, tag: Tag) -> (Vec<Msg>, Status)
Receive a variable number of values into a new
Vec, with a tag.Source§fn receive_into<Buf: BufferMut + ?Sized>(&self, buf: &mut Buf) -> Status
fn receive_into<Buf: BufferMut + ?Sized>(&self, buf: &mut Buf) -> Status
Receive into an existing buffer (
MPI_Recv).Source§fn receive_into_with_tag<Buf: BufferMut + ?Sized>(
&self,
buf: &mut Buf,
tag: Tag,
) -> Status
fn receive_into_with_tag<Buf: BufferMut + ?Sized>( &self, buf: &mut Buf, tag: Tag, ) -> Status
Receive into an existing buffer, with a tag.
Source§fn probe(&self) -> Status
fn probe(&self) -> Status
Blocking probe (
MPI_Probe): wait for a matching message, describe it
without receiving.Source§fn probe_with_tag(&self, tag: Tag) -> Status
fn probe_with_tag(&self, tag: Tag) -> Status
Blocking probe with a tag.
Source§fn immediate_probe(&self) -> Option<Status>
fn immediate_probe(&self) -> Option<Status>
Non-blocking probe (
MPI_Iprobe).Source§fn matched_probe(&self) -> (Message, Status)
fn matched_probe(&self) -> (Message, Status)
Matched probe (
MPI_Mprobe): remove a matching message from the queue
and return a Message to receive it.Source§fn immediate_matched_probe(&self) -> Option<(Message, Status)>
fn immediate_matched_probe(&self) -> Option<(Message, Status)>
Non-blocking matched probe (
MPI_Improbe).Source§fn immediate_matched_probe_with_tag(
&self,
tag: Tag,
) -> Option<(Message, Status)>
fn immediate_matched_probe_with_tag( &self, tag: Tag, ) -> Option<(Message, Status)>
Non-blocking matched probe with a tag.
Source§fn immediate_receive<Msg: Equivalence>(&self) -> ReceiveFuture<Msg>
fn immediate_receive<Msg: Equivalence>(&self) -> ReceiveFuture<Msg>
Non-blocking receive of a single value, returning a
ReceiveFuture.Source§fn immediate_receive_with_tag<Msg: Equivalence>(
&self,
tag: Tag,
) -> ReceiveFuture<Msg>
fn immediate_receive_with_tag<Msg: Equivalence>( &self, tag: Tag, ) -> ReceiveFuture<Msg>
Non-blocking receive of a single value with a tag.
Source§fn immediate_receive_into<'a, Sc, Buf>(
&self,
scope: Sc,
buf: &'a mut Buf,
) -> Request<'a, Buf, Sc>
fn immediate_receive_into<'a, Sc, Buf>( &self, scope: Sc, buf: &'a mut Buf, ) -> Request<'a, Buf, Sc>
Non-blocking receive into an existing buffer (
MPI_Irecv), returning a
Request that must be completed via wait/test.Source§fn immediate_receive_into_with_tag<'a, Sc, Buf>(
&self,
scope: Sc,
buf: &'a mut Buf,
tag: Tag,
) -> Request<'a, Buf, Sc>
fn immediate_receive_into_with_tag<'a, Sc, Buf>( &self, scope: Sc, buf: &'a mut Buf, tag: Tag, ) -> Request<'a, Buf, Sc>
Non-blocking receive into a buffer, with a tag.
Source§fn receive_init<'a, Buf: BufferMut + ?Sized>(
&self,
buf: &'a mut Buf,
) -> PersistentRequest<'a>
fn receive_init<'a, Buf: BufferMut + ?Sized>( &self, buf: &'a mut Buf, ) -> PersistentRequest<'a>
Create a persistent receive request bound to
buf (MPI_Recv_init).
start it (and wait) repeatedly to re-post the receive.Auto Trait Implementations§
impl<'a> Freeze for Process<'a>
impl<'a> RefUnwindSafe for Process<'a>
impl<'a> Send for Process<'a>
impl<'a> Sync for Process<'a>
impl<'a> Unpin for Process<'a>
impl<'a> UnsafeUnpin for Process<'a>
impl<'a> UnwindSafe for Process<'a>
Blanket Implementations§
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