Template Function opensn::RunWithCollectiveErrors

Function Documentation

template<typename Function>
void opensn::RunWithCollectiveErrors(const Function &function)

Runs rank-local work that makes no MPI calls and propagates a failure to every rank.

If the work throws on any rank, every rank throws std::runtime_error with the message from the lowest failing rank, so no rank is left waiting in a later collective. Collective.