Function utils::mpiAnyRank

Function Documentation

inline auto utils::mpiAnyRank(const bool local) -> bool

Return whether a flag is true on any MPI rank.

A collective call (one MPI_Allreduce): every rank must call it at the same point. See mpiAgreeBatchStop() for the two-flag form used at the end of each batch of trials.

Parameters:

local – This rank’s own value of the flag

Returns:

local, unchanged, when SLUG_MPI is not defined or mpiSize() == 1; otherwise true if any rank passed true