mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: decomposeParDict: operate with masterUncollated. Fixes #2368.
This commit is contained in:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user