Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Backofen, Rainer
amdis
Commits
2eeaa8b6
Commit
2eeaa8b6
authored
Feb 10, 2011
by
Thomas Witkowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added simple partitioner.
parent
173ee421
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
75 additions
and
4 deletions
+75
-4
AMDiS/libtool
AMDiS/libtool
+3
-3
AMDiS/src/parallel/MeshDistributor.cc
AMDiS/src/parallel/MeshDistributor.cc
+4
-0
AMDiS/src/parallel/MeshPartitioner.h
AMDiS/src/parallel/MeshPartitioner.h
+6
-1
AMDiS/src/parallel/SimplePartitioner.h
AMDiS/src/parallel/SimplePartitioner.h
+62
-0
No files found.
AMDiS/libtool
View file @
2eeaa8b6
...
...
@@ -44,7 +44,7 @@ available_tags=" CXX F77"
# ### BEGIN LIBTOOL CONFIG
# Libtool was configured on host
p1q024
:
# Libtool was configured on host
deimos103
:
# Shell to use when invoking shell scripts.
SHELL
=
"/bin/sh"
...
...
@@ -6760,7 +6760,7 @@ build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac`
# End:
# ### BEGIN LIBTOOL TAG CONFIG: CXX
# Libtool was configured on host
p1q024
:
# Libtool was configured on host
deimos103
:
# Shell to use when invoking shell scripts.
SHELL
=
"/bin/sh"
...
...
@@ -7065,7 +7065,7 @@ include_expsyms=""
# ### BEGIN LIBTOOL TAG CONFIG: F77
# Libtool was configured on host
p1q024
:
# Libtool was configured on host
deimos103
:
# Shell to use when invoking shell scripts.
SHELL
=
"/bin/sh"
...
...
AMDiS/src/parallel/MeshDistributor.cc
View file @
2eeaa8b6
...
...
@@ -26,6 +26,7 @@
#include "parallel/MeshPartitioner.h"
#include "parallel/ParMetisPartitioner.h"
#include "parallel/ZoltanPartitioner.h"
#include "parallel/SimplePartitioner.h"
#include "parallel/MpiHelper.h"
#include "io/ElementFileWriter.h"
#include "io/MacroInfo.h"
...
...
@@ -105,6 +106,9 @@ namespace AMDiS {
if
(
partStr
==
"zoltan"
)
partitioner
=
new
ZoltanPartitioner
(
&
mpiComm
);
if
(
partStr
==
"simple"
)
partitioner
=
new
SimplePartitioner
(
&
mpiComm
);
tmp
=
0
;
GET_PARAMETER
(
0
,
name
+
"->box partitioning"
,
"%d"
,
&
tmp
);
partitioner
->
setBoxPartitioning
(
static_cast
<
bool
>
(
tmp
));
...
...
AMDiS/src/parallel/MeshPartitioner.h
View file @
2eeaa8b6
...
...
@@ -41,7 +41,12 @@ namespace AMDiS {
};
/**
* Abstract class for mesh partitioning. This class provides only a function
* for a random initial partitioning. A concrete partition must override the
* functions \ref MeshPartitioner::partition and
* \ref MeshPartitioner::createPartitionMap.
*/
class
MeshPartitioner
{
public:
...
...
AMDiS/src/parallel/SimplePartitioner.h
0 → 100644
View file @
2eeaa8b6
// ============================================================================
// == ==
// == AMDiS - Adaptive multidimensional simulations ==
// == ==
// == http://www.amdis-fem.org ==
// == ==
// ============================================================================
//
// Software License for AMDiS
//
// Copyright (c) 2010 Dresden University of Technology
// All rights reserved.
// Authors: Simon Vey, Thomas Witkowski et al.
//
// This file is part of AMDiS
//
// See also license.opensource.txt in the distribution.
/** \file SimplePartitioner.h */
#ifndef AMDIS_SIMPLE_PARTITIONER_H
#define AMDIS_SIMPLE_PARTITIONER_H
#include "AMDiS_fwd.h"
#include "Global.h"
#include "parallel/MeshPartitioner.h"
namespace
AMDiS
{
/**
* The "Simple partitioner" does not change the initial partitioning which is more
* or less a random assignment of elements to ranks. This partitioner may be useful
* for either debugging purposes or if the number of macro elements is equal to the
* number of processes. In this case, neither ParMetis nor Zoltan will be able to
* compute a valid partition. But a random one-to-one partition is the best possible
* in this case.
*/
class
SimplePartitioner
:
public
MeshPartitioner
{
public:
SimplePartitioner
(
MPI
::
Intracomm
*
comm
)
:
MeshPartitioner
(
comm
)
{}
~
SimplePartitioner
()
{}
/// \ref MeshPartitioner::partition
bool
partition
(
map
<
int
,
double
>
&
elemWeights
,
PartitionMode
mode
=
INITIAL
)
{
return
true
;
}
void
createPartitionMap
(
map
<
int
,
int
>&
pMap
)
{
pMap
=
partitionMap
;
}
};
}
#endif
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