Commit bcb22679 authored by Mark Olesen's avatar Mark Olesen
Browse files

ENH: reduce verbosity of safe warning (fixes #881)

- in places where we use std::cerr instead or Warning or FatalError.
  We only want messages from one process though.
parent e769daf9
......@@ -24,6 +24,7 @@ License
\*---------------------------------------------------------------------------*/
#include "dictionary.H"
#include "Pstream.H"
// * * * * * * * * * * * * * * * Local Functions * * * * * * * * * * * * * * //
......@@ -65,7 +66,14 @@ Foam::dictionary::const_searcher Foam::dictionary::csearchCompat
if (finder.found())
{
if (shouldWarnVersion(iter.second))
// Only want a single warning (on master), but guard with a
// parRun check to avoid Pstream::master() when Pstream has not
// yet been initialized
if
(
shouldWarnVersion(iter.second)
&& (Pstream::parRun() ? Pstream::master() : true)
)
{
std::cerr
<< "--> FOAM IOWarning :" << nl
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment