Skip to content
Snippets Groups Projects
Commit 504f5a8a authored by mattijs's avatar mattijs
Browse files

BUG: decomposeParDict: operate with masterUncollated. Fixes #2368.

parent 8e552bd2
Branches
Tags
No related merge requests found
......@@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2015-2021 OpenCFD Ltd.
Copyright (C) 2015-2022 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -1354,7 +1354,9 @@ void Foam::argList::parse
// Disable any parallel comms happening inside the fileHandler
// since we are on master. This can happen e.g. inside
// the masterUncollated/collated handler.
// the masterUncollated/collated handler. Note that we
// also have to protect the actual dictionary parsing since
// it might trigger file access (e.g. #include, #codeStream)
const bool oldParRun = Pstream::parRun(false);
autoPtr<ISstream> dictStream
......@@ -1362,8 +1364,6 @@ void Foam::argList::parse
fileHandler().NewIFstream(source)
);
Pstream::parRun(oldParRun); // Restore parallel state
if (dictStream && dictStream->good())
{
dictionary decompDict(*dictStream);
......@@ -1412,6 +1412,8 @@ void Foam::argList::parse
}
}
Pstream::parRun(oldParRun); // Restore parallel state
if (Pstream::nProcs() == 1)
{
Warning
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment