diff --git a/src/OpenFOAM/db/dictionary/functionEntries/codeStream/codeStream.C b/src/OpenFOAM/db/dictionary/functionEntries/codeStream/codeStream.C
index bab7ac3901bf310109ef158857078a0b9dd53b6d..ebbb6efb816cd4e5be1c77ad4076aa5277ae1525 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<bool>());
+        // 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<bool>());
+        }
 
         if (isA<IOdictionary>(topDict(parentDict)))
         {