Skip to main content

Process

Struct Process 

Source
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§

Source§

impl<'a> Process<'a>

Source

pub fn rank(&self) -> Rank

The rank of this process within its communicator.

Source

pub fn is_self(&self) -> bool

Whether this handle refers to the calling process.

Trait Implementations§

Source§

impl<'a> Clone for Process<'a>

Source§

fn clone(&self) -> Process<'a>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a> Copy for Process<'a>

Source§

impl Destination for Process<'_>

Source§

fn destination_rank(&self) -> Rank

The rank being sent to.
Source§

fn send<Buf: Buffer + ?Sized>(&self, buf: &Buf)

Standard-mode blocking send (MPI_Send).
Source§

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>

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>

Fallible send with a tag.
Source§

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)

Buffered-mode send with a tag.
Source§

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)

Synchronous-mode send with a tag.
Source§

unsafe fn ready_send<Buf: Buffer + ?Sized>(&self, buf: &Buf)

Ready-mode send (MPI_Rsend). Read more
Source§

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>
where Buf: 'a + Buffer + ?Sized, Sc: Scope<'a>,

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>
where Buf: 'a + Buffer + ?Sized, Sc: Scope<'a>,

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>
where Buf: 'a + Buffer + ?Sized, Sc: Scope<'a>,

Non-blocking buffered send.
Source§

fn immediate_synchronous_send<'a, Sc, Buf>( &self, scope: Sc, buf: &'a Buf, ) -> Request<'a, Buf, Sc>
where Buf: 'a + Buffer + ?Sized, Sc: Scope<'a>,

Non-blocking synchronous send.
Source§

fn send_init<'a, Buf: Buffer + ?Sized>( &self, buf: &'a Buf, ) -> PersistentRequest<'a>

Create a persistent send request bound to buf (MPI_Send_init). start it (and wait) repeatedly to re-send the current buffer contents.
Source§

impl Root for Process<'_>

Source§

fn root_rank(&self) -> Rank

The rank of the root process.
Source§

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)

(non-root) Contribute to a gather (MPI_Gather).
Source§

fn gather_into_root<S, R>(&self, sendbuf: &S, recvbuf: &mut R)
where S: Buffer + ?Sized, R: BufferMut + ?Sized,

(root) Collect contributions from all ranks (MPI_Gather).
Source§

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)
where S: Buffer + ?Sized, R: BufferMut + ?Sized,

(root) Distribute slices of the send buffer to all ranks (MPI_Scatter).
Source§

fn reduce_into<S, O>(&self, sendbuf: &S, op: O)
where S: Buffer + ?Sized, O: Operation,

(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)
where S: Buffer + ?Sized, R: BufferMut + ?Sized, O: Operation,

(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)
where R: BufferMut + ?Sized, O: Operation,

(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)
where R: BufferMut + ?Sized,

(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)

(non-root) Contribute to a varying-count gather (MPI_Gatherv).
Source§

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)

(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)

(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>
where Buf: 'a + BufferMut + ?Sized, Sc: Scope<'a>,

Non-blocking broadcast (MPI_Ibcast).
Source§

fn immediate_gather_into<'a, S, Sc>( &self, scope: Sc, sendbuf: &'a S, ) -> Request<'a, S, Sc>
where S: 'a + Buffer + ?Sized, Sc: Scope<'a>,

(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>
where S: 'a + Buffer + ?Sized, R: 'a + BufferMut + ?Sized, Sc: Scope<'a>,

(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>
where R: 'a + BufferMut + ?Sized, Sc: Scope<'a>,

(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>
where S: 'a + Buffer + ?Sized, R: 'a + BufferMut + ?Sized, Sc: Scope<'a>,

(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>
where S: 'a + Buffer + ?Sized, O: Operation, Sc: Scope<'a>,

(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>
where S: 'a + Buffer + ?Sized, R: 'a + BufferMut + ?Sized, O: Operation, Sc: Scope<'a>,

(root) Non-blocking reduce (MPI_Ireduce).
Source§

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<'_>

Source§

fn source_rank(&self) -> Rank

The rank being received from (or MPI_ANY_SOURCE).
Source§

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)

Receive a single value with a specific tag.
Source§

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)

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

Receive into an existing buffer (MPI_Recv).
Source§

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

Blocking probe (MPI_Probe): wait for a matching message, describe it without receiving.
Source§

fn probe_with_tag(&self, tag: Tag) -> Status

Blocking probe with a tag.
Source§

fn immediate_probe(&self) -> Option<Status>

Non-blocking probe (MPI_Iprobe).
Source§

fn immediate_probe_with_tag(&self, tag: Tag) -> Option<Status>

Non-blocking probe with a tag.
Source§

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 matched_probe_with_tag(&self, tag: Tag) -> (Message, Status)

Matched probe with a tag.
Source§

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)>

Non-blocking matched probe with a tag.
Source§

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>

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>
where Buf: 'a + BufferMut + ?Sized, Sc: Scope<'a>,

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>
where Buf: 'a + BufferMut + ?Sized, Sc: Scope<'a>,

Non-blocking receive into a buffer, with a tag.
Source§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.