Trait mpi::collective::Root

source ·
pub trait Root: AsCommunicator {
Show 25 methods // Required method fn root_rank(&self) -> Rank; // Provided methods fn broadcast_into<Buf>(&self, buffer: &mut Buf) where Buf: BufferMut + ?Sized { ... } fn gather_into<S>(&self, sendbuf: &S) where S: Buffer + ?Sized { ... } fn gather_into_root<S, R>(&self, sendbuf: &S, recvbuf: &mut R) where S: Buffer + ?Sized, R: BufferMut + ?Sized { ... } fn gather_varcount_into<S>(&self, sendbuf: &S) where S: Buffer + ?Sized { ... } fn gather_varcount_into_root<S, R>(&self, sendbuf: &S, recvbuf: &mut R) where S: Buffer + ?Sized, R: PartitionedBufferMut + ?Sized { ... } fn scatter_into<R>(&self, recvbuf: &mut R) where R: BufferMut + ?Sized { ... } fn scatter_into_root<S, R>(&self, sendbuf: &S, recvbuf: &mut R) where S: Buffer + ?Sized, R: BufferMut + ?Sized { ... } fn scatter_varcount_into<R>(&self, recvbuf: &mut R) where R: BufferMut + ?Sized { ... } fn scatter_varcount_into_root<S, R>(&self, sendbuf: &S, recvbuf: &mut R) where S: PartitionedBuffer + ?Sized, R: BufferMut + ?Sized { ... } fn reduce_into<S, O>(&self, sendbuf: &S, op: O) where S: Buffer + ?Sized, O: Operation { ... } fn reduce_into_root<S, R, O>(&self, sendbuf: &S, recvbuf: &mut R, op: O) where S: Buffer + ?Sized, R: BufferMut + ?Sized, O: Operation { ... } fn immediate_broadcast_into<'a, Buf, Sc>( &self, scope: Sc, buf: &'a mut Buf ) -> Request<'a, Buf, Sc> where Buf: 'a + BufferMut + ?Sized, Sc: Scope<'a> { ... } 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> { ... } 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> { ... } fn immediate_gather_varcount_into<'a, Sc, S>( &self, scope: Sc, sendbuf: &'a S ) -> Request<'a, S, Sc> where S: 'a + Buffer + ?Sized, Sc: Scope<'a> { ... } fn immediate_gather_varcount_into_root<'a, Sc, S, R>( &self, scope: Sc, sendbuf: &'a S, recvbuf: &'a mut R ) -> Request<'a, R, Sc> where S: 'a + Buffer + ?Sized, R: 'a + PartitionedBufferMut + ?Sized, Sc: Scope<'a> { ... } fn immediate_scatter_into<'a, Sc, R>( &self, scope: Sc, recvbuf: &'a mut R ) -> Request<'a, R, Sc> where R: 'a + BufferMut + ?Sized, Sc: Scope<'a> { ... } fn immediate_scatter_into_root<'a, Sc, S, R>( &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> { ... } fn immediate_scatter_varcount_into<'a, Sc, R>( &self, scope: Sc, recvbuf: &'a mut R ) -> Request<'a, R, Sc> where R: 'a + BufferMut + ?Sized, Sc: Scope<'a> { ... } fn immediate_scatter_varcount_into_root<'a, Sc, S, R>( &self, scope: Sc, sendbuf: &'a S, recvbuf: &'a mut R ) -> Request<'a, R, Sc> where S: 'a + PartitionedBuffer + ?Sized, R: 'a + BufferMut + ?Sized, Sc: Scope<'a> { ... } fn immediate_reduce_into<'a, Sc, S, O>( &self, scope: Sc, sendbuf: &'a S, op: O ) -> Request<'a, S, Sc> where S: 'a + Buffer + ?Sized, O: 'a + Operation, Sc: Scope<'a> { ... } fn immediate_reduce_into_root<'a, Sc, S, R, O>( &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: 'a + Operation, Sc: Scope<'a> { ... } fn spawn( &self, command: &Command, maxprocs: Rank ) -> Result<InterCommunicator, MpiError> { ... } fn spawn_multiple( &self, commands: &[Command], maxprocs: &[Rank] ) -> Result<InterCommunicator, MpiError> { ... }
}
Expand description

Something that can take the role of ‘root’ in a collective operation.

Many collective operations define a ‘root’ process that takes a special role in the communication. These collective operations are implemented as default methods of this trait.

Required Methods§

source

fn root_rank(&self) -> Rank

Rank of the root process

Provided Methods§

source

fn broadcast_into<Buf>(&self, buffer: &mut Buf)
where Buf: BufferMut + ?Sized,

Broadcast of the contents of a buffer

After the call completes, the Buffer on all processes in the Communicator of the Root &self will contain what it contains on the Root.

Examples

See examples/broadcast.rs

Standard section(s)

5.4

source

fn gather_into<S>(&self, sendbuf: &S)
where S: Buffer + ?Sized,

Gather contents of buffers on Root.

After the call completes, the contents of the Buffers on all ranks will be concatenated into the Buffer on Root.

All send Buffers must have the same count of elements.

This function must be called on all non-root processes.

Examples

See examples/gather.rs

Standard section(s)

5.5

source

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

Gather contents of buffers on Root.

After the call completes, the contents of the Buffers on all ranks will be concatenated into the Buffer on Root.

All send Buffers must have the same count of elements.

This function must be called on the root process.

Examples

See examples/gather.rs

Standard section(s)

5.5

source

fn gather_varcount_into<S>(&self, sendbuf: &S)
where S: Buffer + ?Sized,

Gather contents of buffers on Root.

After the call completes, the contents of the Buffers on all ranks will be concatenated into the Buffer on Root.

The send Buffers may contain different counts of elements on different processes. The distribution of elements in the receive Buffer is specified via Partitioned.

This function must be called on all non-root processes.

Examples

See examples/gather_varcount.rs

Standard section(s)

5.5

source

fn gather_varcount_into_root<S, R>(&self, sendbuf: &S, recvbuf: &mut R)

Gather contents of buffers on Root.

After the call completes, the contents of the Buffers on all ranks will be concatenated into the Buffer on Root.

The send Buffers may contain different counts of elements on different processes. The distribution of elements in the receive Buffer is specified via Partitioned.

This function must be called on the root process.

Examples

See examples/gather_varcount.rs

Standard section(s)

5.5

source

fn scatter_into<R>(&self, recvbuf: &mut R)
where R: BufferMut + ?Sized,

Scatter contents of a buffer on the root process to all processes.

After the call completes each participating process will have received a part of the send Buffer on the root process.

All send Buffers must have the same count of elements.

This function must be called on all non-root processes.

Examples

See examples/scatter.rs

Standard section(s)

5.6

source

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

Scatter contents of a buffer on the root process to all processes.

After the call completes each participating process will have received a part of the send Buffer on the root process.

All send Buffers must have the same count of elements.

This function must be called on the root process.

Examples

See examples/scatter.rs

Standard section(s)

5.6

source

fn scatter_varcount_into<R>(&self, recvbuf: &mut R)
where R: BufferMut + ?Sized,

Scatter contents of a buffer on the root process to all processes.

After the call completes each participating process will have received a part of the send Buffer on the root process.

The send Buffer may contain different counts of elements for different processes. The distribution of elements in the send Buffer is specified via Partitioned.

This function must be called on all non-root processes.

Examples

See examples/scatter_varcount.rs

Standard section(s)

5.6

source

fn scatter_varcount_into_root<S, R>(&self, sendbuf: &S, recvbuf: &mut R)

Scatter contents of a buffer on the root process to all processes.

After the call completes each participating process will have received a part of the send Buffer on the root process.

The send Buffer may contain different counts of elements for different processes. The distribution of elements in the send Buffer is specified via Partitioned.

This function must be called on the root process.

Examples

See examples/scatter_varcount.rs

Standard section(s)

5.6

source

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

Performs a global reduction under the operation op of the input data in sendbuf and stores the result on the Root process.

This function must be called on all non-root processes.

Examples

See examples/reduce.rs

Standard section(s)

5.9.1

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,

Performs a global reduction under the operation op of the input data in sendbuf and stores the result on the Root process.

This function must be called on the root process.

Examples

See examples/reduce.rs

Standard section(s)

5.9.1

source

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

Initiate broadcast of a value from the Root process to all other processes.

Examples

See examples/immediate_broadcast.rs

Standard section(s)

5.12.2

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

Initiate non-blocking gather of the contents of all sendbufs on Root &self.

This function must be called on all non-root processes.

Examples

See examples/immediate_gather.rs

Standard section(s)

5.12.3

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

Initiate non-blocking gather of the contents of all sendbufs on Root &self.

This function must be called on the root processes.

Examples

See examples/immediate_gather.rs

Standard section(s)

5.12.3

source

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

Initiate non-blocking gather of the contents of all sendbufs on Root &self.

This function must be called on all non-root processes.

Examples

See examples/immediate_gather_varcount.rs

Standard section(s)

5.12.3

source

fn immediate_gather_varcount_into_root<'a, Sc, S, R>( &self, scope: Sc, sendbuf: &'a S, recvbuf: &'a mut R ) -> Request<'a, R, Sc>
where S: 'a + Buffer + ?Sized, R: 'a + PartitionedBufferMut + ?Sized, Sc: Scope<'a>,

Initiate non-blocking gather of the contents of all sendbufs on Root &self.

This function must be called on the root processes.

Examples

See examples/immediate_gather_varcount.rs

Standard section(s)

5.12.3

source

fn immediate_scatter_into<'a, Sc, R>( &self, scope: Sc, recvbuf: &'a mut R ) -> Request<'a, R, Sc>
where R: 'a + BufferMut + ?Sized, Sc: Scope<'a>,

Initiate non-blocking scatter of the contents of sendbuf from Root &self.

This function must be called on all non-root processes.

Examples

See examples/immediate_scatter.rs

Standard section(s)

5.12.4

source

fn immediate_scatter_into_root<'a, Sc, S, R>( &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>,

Initiate non-blocking scatter of the contents of sendbuf from Root &self.

This function must be called on the root processes.

Examples

See examples/immediate_scatter.rs

Standard section(s)

5.12.4

source

fn immediate_scatter_varcount_into<'a, Sc, R>( &self, scope: Sc, recvbuf: &'a mut R ) -> Request<'a, R, Sc>
where R: 'a + BufferMut + ?Sized, Sc: Scope<'a>,

Initiate non-blocking scatter of the contents of sendbuf from Root &self.

This function must be called on all non-root processes.

Examples

See examples/immediate_scatter_varcount.rs

Standard section(s)

5.12.4

source

fn immediate_scatter_varcount_into_root<'a, Sc, S, R>( &self, scope: Sc, sendbuf: &'a S, recvbuf: &'a mut R ) -> Request<'a, R, Sc>
where S: 'a + PartitionedBuffer + ?Sized, R: 'a + BufferMut + ?Sized, Sc: Scope<'a>,

Initiate non-blocking scatter of the contents of sendbuf from Root &self.

This function must be called on the root processes.

Examples

See examples/immediate_scatter_varcount.rs

Standard section(s)

5.12.4

source

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

Initiates a non-blacking global reduction under the operation op of the input data in sendbuf and stores the result on the Root process.

This function must be called on all non-root processes.

Examples

See examples/immediate_reduce.rs

Standard section(s)

5.12.7

source

fn immediate_reduce_into_root<'a, Sc, S, R, O>( &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: 'a + Operation, Sc: Scope<'a>,

Initiates a non-blocking global reduction under the operation op of the input data in sendbuf and stores the result on the Root process.

Examples

See examples/immediate_reduce.rs

This function must be called on the root process.

Standard section(s)

5.12.7

source

fn spawn( &self, command: &Command, maxprocs: Rank ) -> Result<InterCommunicator, MpiError>

Spawns child processes

Standard sections

10.3.2, see MPI_Comm_spawn

source

fn spawn_multiple( &self, commands: &[Command], maxprocs: &[Rank] ) -> Result<InterCommunicator, MpiError>

Spawns child processes

Standard sections

10.3.3, see MPI_Comm_spawn_multiple

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<'a, C: 'a + Communicator> Root for Process<'a, C>