From b3558a8991f89d29cfe0741b17f2e31b73fc876c Mon Sep 17 00:00:00 2001 From: mattijs Date: Tue, 5 Jul 2011 17:29:30 +0100 Subject: [PATCH] ENH: codeStream: work with timeStampMaster --- .../functionEntries/codeStream/codeStream.C | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/OpenFOAM/db/dictionary/functionEntries/codeStream/codeStream.C b/src/OpenFOAM/db/dictionary/functionEntries/codeStream/codeStream.C index bab7ac3901..ebbb6efb81 100644 --- a/src/OpenFOAM/db/dictionary/functionEntries/codeStream/codeStream.C +++ b/src/OpenFOAM/db/dictionary/functionEntries/codeStream/codeStream.C @@ -197,8 +197,22 @@ Foam::functionEntries::codeStream::getFunction } } - // all processes must wait for compile to finish - reduce(create, orOp()); + // all processes must wait for compile to finish - except if this + // file is only read on the master + bool masterOnly = + ( + regIOobject::fileModificationChecking + == regIOobject::timeStampMaster + ) + || ( + regIOobject::fileModificationChecking + == regIOobject::inotifyMaster + ); + + if (!masterOnly) + { + reduce(create, orOp()); + } if (isA(topDict(parentDict))) {