must use Error::message() to print the warning about suppressed warnings

This commit is contained in:
Axel Kohlmeyer
2021-05-05 16:55:59 -04:00
parent 8a2a4c408e
commit 92058b32ea

View File

@ -418,9 +418,10 @@ bigint Thermo::lost_check()
int maxwarn = error->get_maxwarn(); int maxwarn = error->get_maxwarn();
if ((maxwarn > 0) && (warnbefore == 0) && (ntotal[1] > maxwarn)) { if ((maxwarn > 0) && (warnbefore == 0) && (ntotal[1] > maxwarn)) {
warnbefore = 1; warnbefore = 1;
error->warning(FLERR,fmt::format("Too many warnings: {} vs {}. All " if (comm->me == 0)
"future warnings will be suppressed.\n", error->message(FLERR,fmt::format("WARNING: Too many warnings: {} vs {}. All "
ntotal[1],maxwarn)); "future warnings will be suppressed",
ntotal[1],maxwarn));
} }
error->set_allwarn(ntotal[1]); error->set_allwarn(ntotal[1]);