Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
b64ada3d
Commit
b64ada3d
authored
Jul 09, 2020
by
mattijs
Browse files
BUG: argList: use fileHandler to read decomposeParDict. Fixes
#1765
parent
c06c63f4
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/OpenFOAM/global/argList/argList.C
View file @
b64ada3d
...
...
@@ -29,7 +29,6 @@ License
#include
"argList.H"
#include
"OSspecific.H"
#include
"clock.H"
#include
"IFstream.H"
#include
"dictionary.H"
#include
"IOobject.H"
#include
"JobInfo.H"
...
...
@@ -1252,17 +1251,29 @@ void Foam::argList::parse
// Use values from decomposeParDict, the location was already
// established above.
IFstream
decompDictStream
(
source
);
// Disable any parallel comms happening inside the fileHandler
// since we are on master. This can happen e.g. inside
// the masterUncollated/collated handler.
const
bool
oldParRun
=
Pstream
::
parRun
();
Pstream
::
parRun
()
=
false
;
if
(
!
decompDictStream
.
good
())
autoPtr
<
ISstream
>
decompDictStream
(
fileHandler
().
NewIFstream
(
source
)
);
if
(
!
decompDictStream
.
valid
()
||
!
decompDictStream
->
good
())
{
FatalError
<<
"Cannot read decomposeParDict from "
<<
decompDictStream
.
name
()
<<
exit
(
FatalError
);
<<
source
<<
exit
(
FatalError
);
}
dictionary
decompDict
(
decompDictStream
);
dictionary
decompDict
(
*
decompDictStream
);
// Restore parallel behaviour
Pstream
::
parRun
()
=
oldParRun
;
decompDict
.
readEntry
(
"numberOfSubdomains"
,
dictNProcs
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment