pub enum BarrierAlgorithm {
Centralized,
BinaryTree,
Dissemination,
}Expand description
Selects which barrier algorithm a Node uses.
All algorithms are implemented over one-sided RDMA writes and spin-poll on a local memory region, so no CPU involvement is required on the remote side during the synchronization itself.
The algorithm is chosen once at node construction and cannot be changed
afterwards. The default used by Node::builder
is BinaryTree.
Variants§
Centralized
Leader-based barrier. The lowest-ranked participant collects a notification from every other peer, then broadcasts back. O(n) messages; simple and correct but does not scale with large groups.
BinaryTree
Tree-structured barrier. Peers are arranged in a binary tree by their position in the sorted peer list. A reduce phase propagates notifications from leaves up to the root, followed by a broadcast phase back down. O(log n) rounds; balanced and generally a good default.
Dissemination
Dissemination barrier. In each round every peer notifies the peer at
distance d to its right (circularly) and waits for the peer at
distance d to its left. The distance doubles each round: 1, 2, 4, …
Completes in ⌈log₂ n⌉ rounds with no designated leader and no single
point of contention.
Implementations§
Source§impl BarrierAlgorithm
impl BarrierAlgorithm
Sourcepub fn instance(
&self,
pd: &ProtectionDomain,
rank: usize,
world_size: usize,
) -> IbvResult<PreparedBarrier>
pub fn instance( &self, pd: &ProtectionDomain, rank: usize, world_size: usize, ) -> IbvResult<PreparedBarrier>
Creates a PreparedBarrier using this algorithm.
Trait Implementations§
Source§impl Clone for BarrierAlgorithm
impl Clone for BarrierAlgorithm
Source§fn clone(&self) -> BarrierAlgorithm
fn clone(&self) -> BarrierAlgorithm
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more