Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
amdis
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Aland, Sebastian
amdis
Commits
5e861237
Commit
5e861237
authored
Aug 07, 2014
by
Siqi Ling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
small change in MeshDistributor
parent
8cb3442e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
13 deletions
+25
-13
AMDiS/src/parallel/MeshDistributor.cc
AMDiS/src/parallel/MeshDistributor.cc
+19
-12
AMDiS/src/parallel/MeshDistributor.h
AMDiS/src/parallel/MeshDistributor.h
+6
-1
No files found.
AMDiS/src/parallel/MeshDistributor.cc
View file @
5e861237
...
...
@@ -1448,7 +1448,7 @@ namespace AMDiS { namespace Parallel {
Parameters
::
get
(
"parallel->repartitioning->imbalance"
,
imbalanceRepartitionBound
);
//TODO:047
if
(
imbalanceFactor
>
imbalanceRepartitionBound
)
repartitioning
=
1
;
...
...
@@ -1481,9 +1481,6 @@ namespace AMDiS { namespace Parallel {
sumWeight
+=
it
->
second
;
}
//TODO:047
// elemWeights[0] = 10000.0;
mpi
::
globalMax
(
maxWeight
);
mpi
::
globalAdd
(
sumWeight
);
...
...
@@ -1491,7 +1488,7 @@ namespace AMDiS { namespace Parallel {
}
void
MeshDistributor
::
repartitionMesh
()
bool
MeshDistributor
::
repartitionMesh
()
{
FUNCNAME
(
"MeshDistributor::repartitionMesh()"
);
...
...
@@ -1500,7 +1497,7 @@ namespace AMDiS { namespace Parallel {
// === First, check if the load is unbalanced on the ranks. ===
if
(
!
isRepartitionNecessary
())
return
;
return
false
;
Timer
t
;
...
...
@@ -1520,7 +1517,10 @@ namespace AMDiS { namespace Parallel {
// === Create new element weights. ===
calculateElemWeights
();
int
externalWeight
=
0
;
Parameters
::
get
(
"parallel->use external weights"
,
externalWeight
);
if
(
!
externalWeight
)
calculateElemWeights
();
// === Run mesh partitioner to calculate a new mesh partitioning. ===
...
...
@@ -1535,8 +1535,7 @@ namespace AMDiS { namespace Parallel {
repartitioningFailed
=
repartitioningWaitAfterFail
;;
MSG
(
"Mesh partitioner created empty partition!
\n
"
);
MSG
(
"Mesh repartitioning needed %.5f seconds
\n
"
,
t
.
elapsed
());
// sleep(1);
return
;
return
false
;
}
...
...
@@ -1549,9 +1548,8 @@ namespace AMDiS { namespace Parallel {
if
(
!
partitioningSucceed
||
!
partitioner
->
meshChanged
())
{
mpiComm
.
Barrier
();
repartitioningFailed
=
repartitioningWaitAfterFail
;;
MSG
(
"Mesh repartitioning needed %.5f seconds
\n
"
,
t
.
elapsed
());
// sleep(1);
return
;
MSG
(
"Mesh repartitioning needed %.5f seconds
\n
"
,
t
.
elapsed
());
return
false
;
}
}
...
...
@@ -1598,12 +1596,17 @@ namespace AMDiS { namespace Parallel {
mpiComm
.
Barrier
();
MSG
(
"Mesh repartitioning needed %.5f seconds
\n
"
,
t
.
elapsed
());
return
true
;
}
void
MeshDistributor
::
quickRepartition
()
{
FUNCNAME
(
"MeshDistributor::quickRepartition()"
);
#if (DEBUG != 0)
MSG
(
"Run quickRepartition ...
\n
"
);
#endif
MPI
::
Intracomm
&
mpiComm
=
MPI
::
COMM_WORLD
;
// === Create map that maps macro element indices to pointers to the ===
// === macro elements. ===
...
...
@@ -1803,6 +1806,10 @@ namespace AMDiS { namespace Parallel {
{
FUNCNAME
(
"MeshDistributor::fullRepartition()"
);
#if (DEBUG != 0)
MSG
(
"Run fullRepartition ...
\n
"
);
#endif
TEST_EXIT
(
interchangeVectors
.
size
()
>
0
)
(
"There are no interchange vectors defined!
\n
"
);
...
...
AMDiS/src/parallel/MeshDistributor.h
View file @
5e861237
...
...
@@ -115,7 +115,7 @@ namespace AMDiS { namespace Parallel {
/// Checks if is required to repartition the mesh. If this is the case, a new
/// partition will be created and the mesh will be redistributed between the
/// ranks.
void
repartitionMesh
();
bool
repartitionMesh
();
void
quickRepartition
();
...
...
@@ -333,6 +333,11 @@ namespace AMDiS { namespace Parallel {
{
repartitioningAllowed
=
allowed
;
}
void
setElementWeights
(
std
::
map
<
int
,
double
>&
elWgts
)
{
elemWeights
=
elWgts
;
}
protected:
...
...
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