Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
1ead1759
Commit
1ead1759
authored
Sep 02, 2021
by
Mark Olesen
Browse files
BUG: error with empty distributed roots specification (fixes
#2196
)
parent
2fe94812
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/OpenFOAM/global/argList/argList.C
View file @
1ead1759
...
...
@@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2015-201
9
OpenCFD Ltd.
Copyright (C) 2015-20
2
1 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
...
...
@@ -1184,7 +1184,7 @@ void Foam::argList::parse
{
parRunControl_
.
distributed
(
true
);
source
=
"-roots"
;
if
(
roots
.
size
()
!=
1
)
if
(
roots
.
size
()
>
1
)
{
dictNProcs
=
roots
.
size
()
+
1
;
}
...
...
@@ -1193,6 +1193,7 @@ void Foam::argList::parse
{
roots
.
resize
(
Pstream
::
nProcs
()
-
1
,
fileName
::
null
);
parRunControl_
.
distributed
(
true
);
source
=
"-hostRoots"
;
ITstream
is
(
source
,
options_
[
"hostRoots"
]);
...
...
@@ -1231,7 +1232,7 @@ void Foam::argList::parse
}
}
if
(
roots
.
size
()
!=
1
)
if
(
roots
.
size
()
>
1
)
{
dictNProcs
=
roots
.
size
()
+
1
;
}
...
...
@@ -1259,6 +1260,12 @@ void Foam::argList::parse
{
parRunControl_
.
distributed
(
true
);
decompDict
.
readEntry
(
"roots"
,
roots
);
if
(
roots
.
empty
())
{
DetailInfo
<<
"WARNING: running distributed"
<<
" but did not specify roots!"
<<
nl
;
}
}
}
...
...
@@ -1326,8 +1333,8 @@ void Foam::argList::parse
{
options_
.
set
(
"case"
,
roots
[
slave
-
1
]
/
globalCase_
);
OPstream
to
Slave
(
Pstream
::
commsTypes
::
scheduled
,
slave
);
to
Slave
<<
args_
<<
options_
<<
roots
.
size
();
OPstream
to
Proc
(
Pstream
::
commsTypes
::
scheduled
,
slave
);
to
Proc
<<
args_
<<
options_
<<
parRunControl_
.
distributed
();
}
options_
.
erase
(
"case"
);
...
...
@@ -1377,24 +1384,24 @@ void Foam::argList::parse
slave
++
)
{
OPstream
to
Slave
(
Pstream
::
commsTypes
::
scheduled
,
slave
);
to
Slave
<<
args_
<<
options_
<<
roots
.
size
();
OPstream
to
Proc
(
Pstream
::
commsTypes
::
scheduled
,
slave
);
to
Proc
<<
args_
<<
options_
<<
parRunControl_
.
distributed
();
}
}
}
else
{
// Collect the master's argument list
label
nroots
;
bool
isDistributed
;
IPstream
fromMaster
(
Pstream
::
commsTypes
::
scheduled
,
Pstream
::
masterNo
()
);
fromMaster
>>
args_
>>
options_
>>
nroots
;
fromMaster
>>
args_
>>
options_
>>
isDistributed
;
parRunControl_
.
distributed
(
nroots
);
parRunControl_
.
distributed
(
isDistributed
);
// Establish rootPath_/globalCase_/case_ for slave
setCasePaths
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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