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))) {