Skip to main content

Node

Struct Node 

Source
pub struct Node { /* private fields */ }
Expand description

A ranked RDMA network node with barrier synchronization.

Wraps a MultiChannel with a rank, world size, and a Barrier for collective synchronization across all nodes in the network.

Implementations§

Source§

impl Node

Source

pub fn builder<'f1>() -> NodeBuilder<'f1>

Source§

impl Node

Source

pub fn barrier( &mut self, peers: &[usize], timeout: Duration, ) -> Result<(), BarrierError>

Synchronizes with the given peers, blocking until all have reached the barrier or timeout.

Source

pub fn barrier_unchecked( &mut self, peers: &[usize], timeout: Duration, ) -> Result<(), BarrierError>

Like barrier, but skips validation of the peer list.

Source§

impl Node

Source

pub fn send<'op>( &'op mut self, wr: PeerSendWorkRequest<'op, 'op>, ) -> TransportResult<WorkSuccess>

Posts a send to the work request’s target peer and blocks until it completes.

Source

pub fn receive<'op>( &'op mut self, wr: PeerReceiveWorkRequest<'op, 'op>, ) -> TransportResult<WorkSuccess>

Posts a receive to the work request’s target peer and blocks until it completes.

Source

pub fn write<'op>( &'op mut self, wr: PeerWriteWorkRequest<'op, 'op>, ) -> TransportResult<WorkSuccess>

Posts an RDMA write to the work request’s target peer and blocks until it completes.

Source

pub fn read<'op>( &'op mut self, wr: PeerReadWorkRequest<'op, 'op>, ) -> TransportResult<WorkSuccess>

Posts an RDMA read to the work request’s target peer and blocks until it completes.

Source§

impl Node

Source

pub unsafe fn send_unpolled<'data>( &mut self, wr: PeerSendWorkRequest<'_, 'data>, ) -> IbvResult<PendingWork<'data>>

Posts a send to the target peer without polling for completion.

§Safety

See Channel::send_unpolled.

Source

pub unsafe fn receive_unpolled<'data>( &mut self, wr: PeerReceiveWorkRequest<'_, 'data>, ) -> IbvResult<PendingWork<'data>>

Posts a receive to the target peer without polling for completion.

§Safety

See Channel::receive_unpolled.

Source

pub unsafe fn write_unpolled<'data>( &mut self, wr: PeerWriteWorkRequest<'_, 'data>, ) -> IbvResult<PendingWork<'data>>

Posts an RDMA write to the target peer without polling for completion.

§Safety

See Channel::write_unpolled.

Source

pub unsafe fn read_unpolled<'data>( &mut self, wr: PeerReadWorkRequest<'_, 'data>, ) -> IbvResult<PendingWork<'data>>

Posts an RDMA read to the target peer without polling for completion.

§Safety

See Channel::read_unpolled.

Source§

impl Node

Source

pub fn scatter_send<'op, I>( &'op mut self, wrs: I, ) -> TransportResult<Vec<WorkSuccess>>
where I: IntoIterator<Item = PeerSendWorkRequest<'op, 'op>>,

Posts sends to multiple peers and blocks until all complete.

Source

pub fn scatter_write<'op, I>( &'op mut self, wrs: I, ) -> TransportResult<Vec<WorkSuccess>>
where I: IntoIterator<Item = PeerWriteWorkRequest<'op, 'op>>,

Posts RDMA writes to multiple peers and blocks until all complete.

Source

pub fn gather_receive<'op, I>( &'op mut self, wrs: I, ) -> TransportResult<Vec<WorkSuccess>>
where I: IntoIterator<Item = PeerReceiveWorkRequest<'op, 'op>>,

Posts receives from multiple peers and blocks until all complete.

Source

pub fn gather_read<'op, I>( &'op mut self, wrs: I, ) -> TransportResult<Vec<WorkSuccess>>
where I: IntoIterator<Item = PeerReadWorkRequest<'op, 'op>>,

Posts RDMA reads from multiple peers and blocks until all complete.

Source

pub fn multicast_send<'op, I>( &'op mut self, peers: I, wr: SendWorkRequest<'op, 'op>, ) -> TransportResult<Vec<WorkSuccess>>
where I: IntoIterator<Item = usize>,

Posts the same send to multiple peers and blocks until all complete.

Source§

impl Node

Source

pub unsafe fn scatter_send_unpolled<'wr, 'data, I>( &mut self, wrs: I, ) -> IbvResult<Vec<PendingWork<'data>>>
where I: IntoIterator<Item = PeerSendWorkRequest<'wr, 'data>>, 'data: 'wr,

Posts sends to multiple peers without polling for completion.

§Safety

See Channel::send_unpolled.

Source

pub unsafe fn scatter_write_unpolled<'wr, 'data, I>( &mut self, wrs: I, ) -> IbvResult<Vec<PendingWork<'data>>>
where I: IntoIterator<Item = PeerWriteWorkRequest<'wr, 'data>>, 'data: 'wr,

Posts RDMA writes to multiple peers without polling for completion.

§Safety

See Channel::write_unpolled.

Source

pub unsafe fn gather_receive_unpolled<'wr, 'data, I>( &mut self, wrs: I, ) -> IbvResult<Vec<PendingWork<'data>>>
where I: IntoIterator<Item = PeerReceiveWorkRequest<'wr, 'data>>, 'data: 'wr,

Posts receives from multiple peers without polling for completion.

§Safety

See Channel::receive_unpolled.

Source

pub unsafe fn gather_read_unpolled<'wr, 'data, I>( &mut self, wrs: I, ) -> IbvResult<Vec<PendingWork<'data>>>
where I: IntoIterator<Item = PeerReadWorkRequest<'wr, 'data>>, 'data: 'wr,

Posts RDMA reads from multiple peers without polling for completion.

§Safety

See Channel::read_unpolled.

Source

pub unsafe fn multicast_send_unpolled<'wr, 'data, I>( &mut self, peers: I, wr: SendWorkRequest<'wr, 'data>, ) -> IbvResult<Vec<PendingWork<'data>>>
where I: IntoIterator<Item = usize>,

Posts the same send to multiple peers without polling for completion.

§Safety

See Channel::send_unpolled.

Source§

impl Node

Source

pub fn scope<'env, F, T, E>(&'env mut self, f: F) -> Result<T, ScopeError<E>>
where F: for<'scope> FnOnce(&mut PollingScope<'scope, 'env, Node>) -> Result<T, E>,

Opens a polling scope that automatically polls all outstanding work requests when it ends.

See Channel::scope for details on the scoping mechanism.

Source

pub fn manual_scope<'env, F, T, E>(&'env mut self, f: F) -> Result<T, E>
where F: for<'scope> FnOnce(&mut PollingScope<'scope, 'env, Node>) -> Result<T, E>,

Opens a polling scope that enforces manual polling of all work requests.

See Channel::manual_scope for details.

Source§

impl Node

Source

pub fn pd(&self) -> &ProtectionDomain

Returns the protection domain this node belongs to.

Source

pub fn world_size(&self) -> usize

Returns the total number of nodes in the network.

Source

pub fn rank(&self) -> usize

Returns this node’s rank (index) in the network.

Trait Implementations§

Source§

impl Debug for Node

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Node

§

impl !RefUnwindSafe for Node

§

impl !Send for Node

§

impl !Sync for Node

§

impl Unpin for Node

§

impl UnsafeUnpin for Node

§

impl !UnwindSafe for Node

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