recursivedoubling
Recursive doubling, often written as recursivedoubling in some sources, is a communication pattern used in parallel computing and distributed systems to disseminate information and perform reductions across a set of processes or nodes. The technique organizes communication in log2(p) rounds, where p is the number of participating processes. In each round, every process exchanges data with a partner chosen so that the total set of known data doubles. After r rounds, a process has information from up to 2^r processes; after log2(p) rounds, each process can have information from all processes (assuming p is a power of two). The partner in round i is typically found by toggling the i-th bit in the process rank, e.g., exchanging with rank XOR 2^i.
Applications of recursive doubling include broadcast, allreduce, and allgather. In broadcast, a root process disseminates a
Complexity and performance characteristics depend on the underlying network. The number of rounds is O(log p),