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();
if ((maxwarn > 0) && (warnbefore == 0) && (ntotal[1] > maxwarn)) {
warnbefore = 1;
error->warning(FLERR,fmt::format("Too many warnings: {} vs {}. All "
"future warnings will be suppressed.\n",
ntotal[1],maxwarn));
if (comm->me == 0)
error->message(FLERR,fmt::format("WARNING: Too many warnings: {} vs {}. All "
"future warnings will be suppressed",
ntotal[1],maxwarn));
}
error->set_allwarn(ntotal[1]);