Function utils::isIORank
Defined in File MPIUtils.hpp
Function Documentation
-
inline auto utils::isIORank() -> bool
Return whether this process should print run-wide informational output.
Under MPI every rank runs the same setup code, so a message that is identical on every rank (a warning about the input deck, a run-wide summary) would otherwise be printed once per rank. Guard such a print with
if (utils::isIORank()). Do not guard an error, or a message that reports something particular to this rank (e.g. its own trial range): suppressing those on every rank but 0 would hide real failures.- Returns:
True when this build was not compiled with SLUG_MPI, or is running as a single rank, or is rank 0 of several; false on every other rank