From 8a2a4c408e5d333cbfd9abd041aa4b91e08e2565 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 5 May 2021 16:55:35 -0400 Subject: [PATCH] also skip warnings if per rank warning count is over. don't wait until total count is computed --- src/error.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/error.cpp b/src/error.cpp index 97bc7bbec1..5d9061b7ce 100644 --- a/src/error.cpp +++ b/src/error.cpp @@ -118,8 +118,8 @@ void Error::universe_one(const std::string &file, int line, const std::string &s void Error::universe_warn(const std::string &file, int line, const std::string &str) { - if ((allwarn > maxwarn) || (maxwarn < 0)) return; ++numwarn; + if ((numwarn > maxwarn) || (allwarn > maxwarn) || (maxwarn < 0)) return; if (universe->uscreen) fmt::print(universe->uscreen,"WARNING on proc {}: {} ({}:{})\n", universe->me,str,truncpath(file),line); @@ -250,8 +250,8 @@ void Error::_one(const std::string &file, int line, fmt::string_view format, void Error::warning(const std::string &file, int line, const std::string &str) { - if ((allwarn > maxwarn) || (maxwarn < 0)) return; ++numwarn; + if ((numwarn > maxwarn) || (allwarn > maxwarn) || (maxwarn < 0)) return; std::string mesg = fmt::format("WARNING: {} ({}:{})\n", str,truncpath(file),line); if (screen) fputs(mesg.c_str(),screen);