avoid deck usage on non-root processes checking for TRACERS

This commit is contained in:
Arne Morten Kvarving 2020-01-22 15:32:04 +01:00
parent 27246b91f4
commit e2862a3a4d

View File

@ -96,8 +96,14 @@ public:
void init()
{
const Opm::Deck& deck = simulator_.vanguard().deck();
const auto& comm = simulator_.gridView().comm();
if (!deck.hasKeyword("TRACERS"))
bool has;
if (comm.rank() == 0)
has = deck.hasKeyword("TRACERS");
comm.broadcast(&has, 1, 0);
if (!has)
return; // tracer treatment is supposed to be disabled
if (!EWOMS_GET_PARAM(TypeTag, bool, EnableTracerModel)) {