Commit c8a15546 authored by Thomas Witkowski's avatar Thomas Witkowski
Browse files

ParMetis support improved.

parent 6ef1e048
...@@ -44,7 +44,7 @@ available_tags=" CXX F77" ...@@ -44,7 +44,7 @@ available_tags=" CXX F77"
# ### BEGIN LIBTOOL CONFIG # ### BEGIN LIBTOOL CONFIG
# Libtool was configured on host deimos101: # Libtool was configured on host deimos104:
# Shell to use when invoking shell scripts. # Shell to use when invoking shell scripts.
SHELL="/bin/sh" SHELL="/bin/sh"
...@@ -6760,7 +6760,7 @@ build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac` ...@@ -6760,7 +6760,7 @@ build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac`
# End: # End:
# ### BEGIN LIBTOOL TAG CONFIG: CXX # ### BEGIN LIBTOOL TAG CONFIG: CXX
# Libtool was configured on host deimos101: # Libtool was configured on host deimos104:
# Shell to use when invoking shell scripts. # Shell to use when invoking shell scripts.
SHELL="/bin/sh" SHELL="/bin/sh"
...@@ -7065,7 +7065,7 @@ include_expsyms="" ...@@ -7065,7 +7065,7 @@ include_expsyms=""
# ### BEGIN LIBTOOL TAG CONFIG: F77 # ### BEGIN LIBTOOL TAG CONFIG: F77
# Libtool was configured on host deimos101: # Libtool was configured on host deimos104:
# Shell to use when invoking shell scripts. # Shell to use when invoking shell scripts.
SHELL="/bin/sh" SHELL="/bin/sh"
......
...@@ -2011,7 +2011,7 @@ namespace AMDiS { ...@@ -2011,7 +2011,7 @@ namespace AMDiS {
FUNCNAME("MeshDistributor::serialize()"); FUNCNAME("MeshDistributor::serialize()");
checkMeshChange(false); checkMeshChange(false);
partitioner->serialize(out); partitioner->serialize(out);
SerUtil::serialize(out, elemWeights); SerUtil::serialize(out, elemWeights);
......
...@@ -298,55 +298,8 @@ namespace AMDiS { ...@@ -298,55 +298,8 @@ namespace AMDiS {
tpwgts[i] = 1.0 / nparts; tpwgts[i] = 1.0 / nparts;
float scale = 10000.0 / maxWgt; float scale = 10000.0 / maxWgt;
// === Scale element weights. ===
int smin = 9999999;
int smax = 0;
int ssum = 0;
for (int i = 0; i < nElements; i++) {
wgts[i] = static_cast<int>(floatWgts[i] * scale);
smin = std::min(smin, wgts[i]);
smax = std::max(smax, wgts[i]);
ssum += wgts[i];
}
mpi::globalMin(smin);
mpi::globalMax(smax);
mpi::globalAdd(ssum);
MSG("DATA SMIN = %d SMAX = %d SSUM = %d\n", smin, smax, ssum);
int kpart = ssum / mpiSize;
int kpartMax = 0;
for (int i = 0; i < nElements; i++) for (int i = 0; i < nElements; i++)
if (wgts[i] < kpart) wgts[i] = static_cast<int>(floatWgts[i] * scale);
kpartMax = std::max(kpartMax, wgts[i]);
mpi::globalMax(kpartMax);
MSG("KPART MAX: %d\n", kpartMax);
smin = 9999999;
smax = 0;
ssum = 0;
for (int i = 0; i < nElements; i++) {
wgts[i] = std::min(wgts[i], kpartMax);
wgts[i] = std::max(wgts[i], 1);
smin = std::min(smin, wgts[i]);
smax = std::max(smax, wgts[i]);
ssum += wgts[i];
}
mpi::globalMin(smin);
mpi::globalMax(smax);
mpi::globalAdd(ssum);
MSG("DATA SMIN = %d SMAX = %d SSUM = %d\n", smin, smax, ssum);
// === Start ParMETIS. === // === Start ParMETIS. ===
......
...@@ -730,9 +730,9 @@ namespace AMDiS { ...@@ -730,9 +730,9 @@ namespace AMDiS {
{ {
FUNCNAME("ParallelDebug::printBoundaryInfo()"); FUNCNAME("ParallelDebug::printBoundaryInfo()");
int tmp = 1; int tmp = 0;
GET_PARAMETER(0, "parallel->debug->print boundary info", "%d", &tmp); GET_PARAMETER(0, "parallel->debug->print boundary info", "%d", &tmp);
if (tmp <= 0) if (tmp <= 1)
return; return;
for (InteriorBoundary::iterator it(pdb.myIntBoundary); !it.end(); ++it) { for (InteriorBoundary::iterator it(pdb.myIntBoundary); !it.end(); ++it) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment