A Generalization of the Allreduce Operation
Abstract
Allreduce is one of the most frequently used MPI collective operations, and thus its performance attracts much attention in the past decades. Many algorithms were developed with different properties and purposes. We present a novel approach to communication description based on the permutations inspired by the mathematics of a Rubik's cube where the moves form a mathematical structure called group. Similarly, cyclic communication patterns between a set of $P$ processes may be described by a permutation group. This new approach allows constructing a generalization of the widely used Allreduce algorithms such as Ring, Recursive Doubling and Recursive Halving. Using the developed approach we build an algorithm that successfully solves the wellknown problem of the nonpoweroftwo number of processes which breaks down the performance of many existing algorithms. The proposed algorithm provides a general solution for any number of processes with the dynamically changing amount of communication steps between $\lceil \log{P} \rceil$ for the latencyoptimal version and $2 \cdot \lceil \log{P} \rceil$ for the bandwidthoptimal case.
 Publication:

arXiv eprints
 Pub Date:
 April 2020
 arXiv:
 arXiv:2004.09362
 Bibcode:
 2020arXiv200409362K
 Keywords:

 Computer Science  Distributed;
 Parallel;
 and Cluster Computing