Reproducible summation routines with C API.
Find a file
2025-08-26 11:37:58 +02:00
contrib Add script to compute critical operations 2025-03-11 10:24:04 +01:00
docs/images Add topology class for m-ary tree 2025-01-19 15:01:34 +00:00
include Add Reduce-only variant for DTS, ReproBLAS and MPI_Reduce 2025-02-27 11:07:55 +00:00
libs/reproblas Ignore failing patch command 2025-06-06 10:41:55 +02:00
src Use allreduce variant by default 2025-05-27 18:29:09 +02:00
test Fix flaky unit test by passing the correct diminished communicator 2025-06-06 10:22:19 +02:00
.clang-format Functional dual tree implementation 2024-12-11 16:03:37 +00:00
CMakeLists.txt Use native compilation flags 2025-08-26 11:37:58 +02:00
README.md Add README 2025-05-28 11:50:57 +02:00

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:
  • ALLREDUCE
  • BINARY_TREE
  • DUAL_TREE
  • KGATHER
  • REPROBLAS
REPR_REDUCE_K
Sets the parameter k for 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 m affects 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 (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.