Commit 4930cf1a authored by Thomas Witkowski's avatar Thomas Witkowski
Browse files

Fixed same performance problems for parallel amdis.

parent 703f04f2
......@@ -44,7 +44,7 @@ available_tags=" CXX F77"
# ### BEGIN LIBTOOL CONFIG
# Libtool was configured on host p2d087:
# Libtool was configured on host p2d020:
# 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 p2d087:
# Libtool was configured on host p2d020:
# 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 p2d087:
# Libtool was configured on host p2d020:
# Shell to use when invoking shell scripts.
SHELL="/bin/sh"
......
......@@ -1157,39 +1157,14 @@ namespace AMDiS {
for (std::vector<AtomicBoundary>::iterator boundIt = it->second.begin();
boundIt != it->second.end(); ++boundIt) {
DofContainer dofs;
DofContainer &dofsToSend = sendDofs[it->first];
for (DofContainer::iterator iit = oldSendDofs[it->first].begin();
iit != oldSendDofs[it->first].end(); ++iit)
if (vertexDof[*iit])
dofsToSend.push_back(*iit);
switch (boundIt->rankObject.ithObjAtBoundary) {
case 0:
dofs.push_back(boundIt->rankObject.el->getDOF(1));
dofs.push_back(boundIt->rankObject.el->getDOF(2));
break;
case 1:
dofs.push_back(boundIt->rankObject.el->getDOF(0));
dofs.push_back(boundIt->rankObject.el->getDOF(2));
break;
case 2:
dofs.push_back(boundIt->rankObject.el->getDOF(0));
dofs.push_back(boundIt->rankObject.el->getDOF(1));
break;
default:
ERROR_EXIT("Should never happen!\n");
}
/*
for (DofContainer::iterator dofIt = dofs.begin(); dofIt != dofs.end(); ++dofIt)
if (find(dofsToSend.begin(), dofsToSend.end(), *dofIt) == dofsToSend.end())
if (find(oldSendDofs[it->first].begin(), oldSendDofs[it->first].end(), *dofIt) != oldSendDofs[it->first].end())
dofsToSend.push_back(*dofIt);
*/
dofs.clear();
DofContainer dofs;
addAllVertexDOFs(boundIt->rankObject.el, boundIt->rankObject.ithObjAtBoundary,
dofs);
addAllEdgeDOFs(boundIt->rankObject.el, boundIt->rankObject.ithObjAtBoundary,
......@@ -1210,17 +1185,8 @@ namespace AMDiS {
for (std::vector<AtomicBoundary>::iterator boundIt = it->second.begin();
boundIt != it->second.end(); ++boundIt) {
DofContainer dofs;
DofContainer &dofsToRecv = recvDofs[it->first];
/*
for (DofContainer::iterator iit = dofsToRecv.begin(); iit != dofsToRecv.end(); ++iit) {
DofContainer::iterator eraseIt = find(rankDOFs.begin(), rankDOFs.end(), *iit);
if (eraseIt != rankDOFs.end())
rankDOFs.erase(eraseIt);
}
*/
for (DofContainer::iterator iit = oldRecvDofs[it->first].begin();
iit != oldRecvDofs[it->first].end(); ++iit)
if (vertexDof[*iit]) {
......@@ -1232,62 +1198,16 @@ namespace AMDiS {
}
/* switch (boundIt->rankObject.ithObjAtBoundary) {
case 0:
if (boundIt->neighbourObject.ithObjAtBoundary == 0) {
dofs.push_back(boundIt->rankObject.el->getDOF(2));
dofs.push_back(boundIt->rankObject.el->getDOF(1));
} else {
dofs.push_back(boundIt->rankObject.el->getDOF(1));
dofs.push_back(boundIt->rankObject.el->getDOF(2));
}
break;
case 1:
if (boundIt->neighbourObject.ithObjAtBoundary == 0) {
dofs.push_back(boundIt->rankObject.el->getDOF(0));
dofs.push_back(boundIt->rankObject.el->getDOF(2));
} else {
dofs.push_back(boundIt->rankObject.el->getDOF(2));
dofs.push_back(boundIt->rankObject.el->getDOF(0));
}
break;
case 2:
dofs.push_back(boundIt->rankObject.el->getDOF(1));
dofs.push_back(boundIt->rankObject.el->getDOF(0));
break;
default:
ERROR_EXIT("Should never happen!\n");
}
for (DofContainer::iterator dofIt = dofs.begin(); dofIt != dofs.end(); ++dofIt) {
DofContainer::iterator eraseIt = find(rankDOFs.begin(), rankDOFs.end(), *dofIt);
if (eraseIt != rankDOFs.end()) {
if (mpiRank == 4)
std::cout << "ERASE a: " << **eraseIt << std::endl;
rankDOFs.erase(eraseIt);
}
if (find(dofsToRecv.begin(), dofsToRecv.end(), *dofIt) == dofsToRecv.end())
if (find(oldRecvDofs[it->first].begin(), oldRecvDofs[it->first].end(), *dofIt) != oldRecvDofs[it->first].end())
dofsToRecv.push_back(*dofIt);
}
*/
dofs.clear();
DofContainer dofs;
addAllEdgeDOFs(boundIt->rankObject.el, boundIt->rankObject.ithObjAtBoundary,
dofs);
addAllVertexDOFs(boundIt->rankObject.el, boundIt->rankObject.ithObjAtBoundary,
dofs);
for (int i = static_cast<int>(dofs.size()) - 1; i >= 0; i--) {
// TEST_EXIT_DBG(find(rankDOFs.begin(), rankDOFs.end(), dofs[i]) != rankDOFs.end())
// ("Should never happen!\n");
TEST_EXIT_DBG(find(dofsToRecv.begin(), dofsToRecv.end(), dofs[i]) == dofsToRecv.end())
("Should not happen!\n");
DofContainer::iterator eraseIt = find(rankDOFs.begin(), rankDOFs.end(), dofs[i]);
if (eraseIt != rankDOFs.end())
rankDOFs.erase(eraseIt);
......@@ -1871,5 +1791,4 @@ namespace AMDiS {
return flag;
}
}
......@@ -512,8 +512,6 @@ namespace AMDiS {
{
FUNCNAME("ProblemVec::estimate()");
VtkWriter::writeFile(solution->getDOFVector(0), "test.vtu");
clock_t first = clock();
#ifdef _OPENMP
......
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