This repository contains the code for multiple reproducible reduction algorithms. It is used in Repro-RAxML-NG
-
MPI_Allreduce(not reproducible, used as baseline) - ReproBLAS achieves reproducibility through pre-rounding input data and using higher-precision accumulators
-
$k$ -Gather reduces k consecutive values in parallel linearily from left to right, gathers all intermediate results on root rank and reduces from left to right - Binary Tree Summation uses a binary tree to dictate reduction order independent of core count
- ReproRed (formerly Dual Tree Summation) decouples the tree used for communication from the tree used to dictate the reduction order, uses theoretically optimal message count.
Selection of the reduction algorithm happens via environment variables
REPR_REDUCE
: Chooses the reduction algorithm. Possible values:
ALLREDUCEBINARY_TREEDUAL_TREEKGATHERREPROBLAS
REPR_REDUCE_K
: Sets the parameter KGATHER and BINARY_TREE. Must be positive integer. Default 1.
REPR_REDUCE_M
: Sets degree of the communication tree for DUAL_TREE. See this visualization on how
REPR_REDUCE_TWOPHASE
: By default, this library will use allreduction algorithms where possible (ALLREDUCE and REPROBLAS). If the environment variable REPR_REDUCE_TWOPHASE is set to any value, it uses a two-phase approach of MPI_Reduce followed by an MPI_Bcast instead.