Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Aland, Sebastian
amdis
Commits
63e723dc
Commit
63e723dc
authored
Sep 20, 2013
by
Praetorius, Simon
Browse files
allow for repartitioning in the 1st timestep
parent
24a02ba6
Changes
2
Hide whitespace changes
Inline
Side-by-side
AMDiS/src/parallel/MeshDistributor.cc
View file @
63e723dc
...
...
@@ -90,6 +90,7 @@ namespace AMDiS { namespace Parallel {
deserialized
(
false
),
writeSerializationFile
(
false
),
repartitioningAllowed
(
false
),
repartitionOnlyOnce
(
false
),
repartitionIthChange
(
20
),
repartitioningWaitAfterFail
(
20
),
nMeshChangesAfterLastRepartitioning
(
0
),
...
...
@@ -111,10 +112,12 @@ namespace AMDiS { namespace Parallel {
Parameters
::
get
(
name
+
"->repartitioning"
,
repartitioningAllowed
);
Parameters
::
get
(
name
+
"->debug output dir"
,
debugOutputDir
);
Parameters
::
get
(
name
+
"->repartition only once"
,
repartitionOnlyOnce
);
Parameters
::
get
(
name
+
"->repartition ith change"
,
repartitionIthChange
);
Parameters
::
get
(
name
+
"->repartition wait after fail"
,
repartitioningWaitAfterFail
);
Parameters
::
get
(
name
+
"->mesh adaptivity"
,
meshAdaptivity
);
nMeshChangesAfterLastRepartitioning
=
repartitionIthChange
-
1
;
// === Create partitioner object. ===
...
...
@@ -1178,9 +1181,11 @@ namespace AMDiS { namespace Parallel {
repartitioningFailed
--
;
}
else
if
(
tryRepartition
&&
repartitioningAllowed
&&
nMeshChangesAfterLastRepartitioning
>=
repartitionIthChange
)
{
(
repartitionOnlyOnce
||
nMeshChangesAfterLastRepartitioning
>=
repartitionIthChange
)
)
{
repartitionMesh
();
nMeshChangesAfterLastRepartitioning
=
0
;
if
(
repartitionOnlyOnce
)
repartitioningAllowed
=
false
;
}
else
{
MSG
(
"Repartitioning not tried because tryRepartitioning = %d repartitioningAllowed = %d nMeshChange = %d repartitionIthChange = %d
\n
"
,
tryRepartition
,
repartitioningAllowed
,
...
...
AMDiS/src/parallel/MeshDistributor.h
View file @
63e723dc
...
...
@@ -554,8 +554,11 @@ namespace AMDiS { namespace Parallel {
/// If true, it is possible to repartition the mesh during computations.
bool
repartitioningAllowed
;
/// repartition the mesh (only) the first time repartitionMesh() is called
bool
repartitionOnlyOnce
;
/// Stores the number of mesh changes that must lie in between to
/// Stores the number of mesh changes that must lie in between t
w
o
/// repartitionings.
int
repartitionIthChange
;
...
...
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