Reproducible summation routines with C API.
| contrib | ||
| docs/images | ||
| include | ||
| libs/reproblas | ||
| src | ||
| test | ||
| .clang-format | ||
| CMakeLists.txt | ||
| README.md | ||
ReproRed
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.
Configuration
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
kforKGATHERandBINARY_TREE. Must be positive integer. Default 1. REPR_REDUCE_M- Sets degree of the communication tree for
DUAL_TREE. See this visualization on howmaffects where PEs send their intermediate results. Must be integer greater than 1. Default 2. REPR_REDUCE_TWOPHASE- By default, this library will use allreduction algorithms where possible (
ALLREDUCEandREPROBLAS). If the environment variableREPR_REDUCE_TWOPHASEis set to any value, it uses a two-phase approach ofMPI_Reducefollowed by anMPI_Bcastinstead.