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"
# ### BEGIN LIBTOOL CONFIG
# Libtool was configured on host deimos101:
# Libtool was configured on host deimos104:
# 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 deimos101:
# Libtool was configured on host deimos104:
# 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 deimos101:
# Libtool was configured on host deimos104:
# Shell to use when invoking shell scripts.
SHELL="/bin/sh"
......
......@@ -2011,7 +2011,7 @@ namespace AMDiS {
FUNCNAME("MeshDistributor::serialize()");
checkMeshChange(false);
partitioner->serialize(out);
SerUtil::serialize(out, elemWeights);
......
......@@ -298,55 +298,8 @@ namespace AMDiS {
tpwgts[i] = 1.0 / nparts;
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++)
if (wgts[i] < kpart)
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);
wgts[i] = static_cast<int>(floatWgts[i] * scale);
// === Start ParMETIS. ===
......
......@@ -730,9 +730,9 @@ namespace AMDiS {
{
FUNCNAME("ParallelDebug::printBoundaryInfo()");
int tmp = 1;
int tmp = 0;
GET_PARAMETER(0, "parallel->debug->print boundary info", "%d", &tmp);
if (tmp <= 0)
if (tmp <= 1)
return;
for (InteriorBoundary::iterator it(pdb.myIntBoundary); !it.end(); ++it) {
......
Markdown is supported
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