Liebe Gitlab-Nutzer, lieber Gitlab-Nutzer, es ist nun möglich sich mittels des ZIH-Logins/LDAP an unserem Dienst anzumelden. Ein Anmelden über dieses erzeugt ein neues Konto. Das alte Konto ist über den Reiter "Standard" erreichbar. Die Administratoren

Dear Gitlab user, it is now possible to log in to our service using the ZIH login/LDAP. Logging in via this will create a new account. The old account can be accessed via the "Standard" tab. The administrators

Commit 3e8be011 authored by Thomas Witkowski's avatar Thomas Witkowski
Browse files

Removed unnecessary output messages in parallel code.

parent 729ab8dc
...@@ -411,11 +411,6 @@ namespace AMDiS { ...@@ -411,11 +411,6 @@ namespace AMDiS {
Element *nb = elInfoOld->neighbour[2]; Element *nb = elInfoOld->neighbour[2];
if (nb) { if (nb) {
// MSG("OLDINFO HAS EL %d mit PTR %p\n", elInfoOld->getElement()->getIndex(),
// elInfoOld->getElement());
// MSG("1 ALS NACHBAR HABEN WIR %d mit PTR %p\n", nb->getIndex(), nb);
TEST_EXIT_DBG(elInfoOld->oppVertex[2] == 2) TEST_EXIT_DBG(elInfoOld->oppVertex[2] == 2)
("Fill child %d of element %d (mel %d): Invalid neighbour %d!\n", ("Fill child %d of element %d (mel %d): Invalid neighbour %d!\n",
ichild, ichild,
...@@ -429,8 +424,6 @@ namespace AMDiS { ...@@ -429,8 +424,6 @@ namespace AMDiS {
("Missing second child in element %d!\n", nb->getIndex()); ("Missing second child in element %d!\n", nb->getIndex());
nb = nb->getSecondChild(); nb = nb->getSecondChild();
// MSG("2 ALS NACHBAR HABEN WIR %d mit PTR %p (is LEAF: %d)\n",
// nb->getIndex(), nb, nb->isLeaf());
if (nb->getFirstChild()) { if (nb->getFirstChild()) {
oppVertex[0] = 2; oppVertex[0] = 2;
...@@ -450,7 +443,6 @@ namespace AMDiS { ...@@ -450,7 +443,6 @@ namespace AMDiS {
} }
nb = nb->getFirstChild(); nb = nb->getFirstChild();
// MSG("3 ALS NACHBAR HABEN WIR %d\n", nb->getIndex());
} else { } else {
oppVertex[0] = 1; oppVertex[0] = 1;
......
...@@ -26,8 +26,10 @@ namespace AMDiS { ...@@ -26,8 +26,10 @@ namespace AMDiS {
if (!admin) { if (!admin) {
const DOFAdmin *admin_local = NULL; const DOFAdmin *admin_local = NULL;
const DimVec<int> *ndof = NULL; const DimVec<int> *ndof = NULL;
ndof = basFcts->getNumberOfDofs(); ndof = basFcts->getNumberOfDofs();
TEST_EXIT(ndof)("no n_dof or basFcts->n_dof\n"); TEST_EXIT(ndof)("no n_dof or basFcts->n_dof\n");
for (int i = 0; i < mesh->getNumberOfDOFAdmin(); i++) { for (int i = 0; i < mesh->getNumberOfDOFAdmin(); i++) {
admin_local = &(mesh->getDofAdmin(i)); admin_local = &(mesh->getDofAdmin(i));
int j = 0; int j = 0;
...@@ -38,6 +40,7 @@ namespace AMDiS { ...@@ -38,6 +40,7 @@ namespace AMDiS {
break; break;
admin_local = NULL; admin_local = NULL;
} }
if (!admin_local) if (!admin_local)
admin_local = mesh->createDOFAdmin(name, *ndof); admin_local = mesh->createDOFAdmin(name, *ndof);
...@@ -48,6 +51,7 @@ namespace AMDiS { ...@@ -48,6 +51,7 @@ namespace AMDiS {
} }
FiniteElemSpace::FiniteElemSpace() FiniteElemSpace::FiniteElemSpace()
{} {}
...@@ -98,7 +102,7 @@ namespace AMDiS { ...@@ -98,7 +102,7 @@ namespace AMDiS {
void FiniteElemSpace::clear() void FiniteElemSpace::clear()
{ {
for (int i = 0; i < static_cast<int>(feSpaces.size()); i++) { for (unsigned int i = 0; i < feSpaces.size(); i++) {
if (feSpaces[i]) { if (feSpaces[i]) {
delete feSpaces[i]; delete feSpaces[i];
feSpaces[i] = NULL; feSpaces[i] = NULL;
......
...@@ -191,7 +191,7 @@ namespace AMDiS { ...@@ -191,7 +191,7 @@ namespace AMDiS {
} }
if (sstr.length() > 0) if (sstr.length() > 0)
vecVal->push_back(atof(sstr.c_str())); vecVal->push_back(atof(sstr.c_str()));
if(vecVal->size()==0) if (vecVal->size() == 0)
WARNING("no values in parameter vector!\n"); WARNING("no values in parameter vector!\n");
} }
break; break;
...@@ -221,7 +221,7 @@ namespace AMDiS { ...@@ -221,7 +221,7 @@ namespace AMDiS {
} }
if (sstr.length() > 0) if (sstr.length() > 0)
vecVal->push_back(atoi(sstr.c_str())); vecVal->push_back(atoi(sstr.c_str()));
if(vecVal->size()==0) if (vecVal->size() == 0)
WARNING("no values in parameter vector!\n"); WARNING("no values in parameter vector!\n");
} }
break; break;
...@@ -691,11 +691,11 @@ namespace AMDiS { ...@@ -691,11 +691,11 @@ namespace AMDiS {
if (key.size() == 0 || par.size() == 0) if (key.size() == 0 || par.size() == 0)
return; return;
std::string file_str; std::string file_str = "";
if(file != NULL) if (file != NULL)
file_str = std::string(file); file_str = std::string(file);
std::string fname_str; std::string fname_str = "";
if(fname != NULL) if (fname != NULL)
fname_str = std::string(fname); fname_str = std::string(fname);
singlett->addParam(key, par, file_str, line, fname_str); singlett->addParam(key, par, file_str, line, fname_str);
......
...@@ -41,11 +41,6 @@ namespace AMDiS { ...@@ -41,11 +41,6 @@ namespace AMDiS {
return (*dof1 < *dof2); return (*dof1 < *dof2);
} }
bool cmpElement(MacroElement* lhs, MacroElement* rhs)
{
return lhs->getIndex() < rhs->getIndex();
}
MeshDistributor::MeshDistributor(std::string str) MeshDistributor::MeshDistributor(std::string str)
: probStat(0), : probStat(0),
...@@ -63,6 +58,7 @@ namespace AMDiS { ...@@ -63,6 +58,7 @@ namespace AMDiS {
repartitioningAllowed(false), repartitioningAllowed(false),
nTimestepsAfterLastRepartitioning(0), nTimestepsAfterLastRepartitioning(0),
repartCounter(0), repartCounter(0),
debugOutputDir(""),
lastMeshChangeIndex(0) lastMeshChangeIndex(0)
{ {
FUNCNAME("MeshDistributor::ParalleDomainBase()"); FUNCNAME("MeshDistributor::ParalleDomainBase()");
...@@ -74,6 +70,8 @@ namespace AMDiS { ...@@ -74,6 +70,8 @@ namespace AMDiS {
int tmp = 0; int tmp = 0;
GET_PARAMETER(0, name + "->repartitioning", "%d", &tmp); GET_PARAMETER(0, name + "->repartitioning", "%d", &tmp);
repartitioningAllowed = (tmp > 0); repartitioningAllowed = (tmp > 0);
GET_PARAMETER(0, name + "->debug output dir", &debugOutputDir);
} }
...@@ -145,8 +143,8 @@ namespace AMDiS { ...@@ -145,8 +143,8 @@ namespace AMDiS {
GET_PARAMETER(0, "dbg->write part mesh", "%d", &writePartMesh); GET_PARAMETER(0, "dbg->write part mesh", "%d", &writePartMesh);
if (writePartMesh > 0) { if (writePartMesh > 0) {
debug::writeElementIndexMesh(mesh, "elementIndex.vtu"); debug::writeElementIndexMesh(mesh, debugOutputDir + "elementIndex.vtu");
writePartitioningMesh("part.vtu"); writePartitioningMesh(debugOutputDir + "part.vtu");
} else { } else {
MSG("Skip write part mesh!\n"); MSG("Skip write part mesh!\n");
} }
...@@ -192,7 +190,7 @@ namespace AMDiS { ...@@ -192,7 +190,7 @@ namespace AMDiS {
ParallelDebug::testCommonDofs(*this, true); ParallelDebug::testCommonDofs(*this, true);
ParallelDebug::testGlobalIndexByCoords(*this); ParallelDebug::testGlobalIndexByCoords(*this);
debug::writeMesh(feSpace, -1, "macro_mesh"); debug::writeMesh(feSpace, -1, debugOutputDir + "macro_mesh");
MSG("Debug mode tests finished!\n"); MSG("Debug mode tests finished!\n");
#endif #endif
...@@ -210,10 +208,6 @@ namespace AMDiS { ...@@ -210,10 +208,6 @@ namespace AMDiS {
if (globalRefinement > 0) { if (globalRefinement > 0) {
refineManager->globalRefine(mesh, globalRefinement); refineManager->globalRefine(mesh, globalRefinement);
#if (DEBUG != 0)
debug::writeMesh(feSpace, -1, "gr_mesh");
#endif
updateLocalGlobalNumbering(); updateLocalGlobalNumbering();
...@@ -497,7 +491,7 @@ namespace AMDiS { ...@@ -497,7 +491,7 @@ namespace AMDiS {
FUNCNAME("MeshDistributor::checkMeshChange()"); FUNCNAME("MeshDistributor::checkMeshChange()");
#if (DEBUG != 0) #if (DEBUG != 0)
debug::writeMesh(feSpace, -1, "before_check_mesh"); debug::writeMesh(feSpace, -1, debugOutputDir + "before_check_mesh");
#endif #endif
// === If mesh has not been changed on all ranks, return. === // === If mesh has not been changed on all ranks, return. ===
...@@ -554,7 +548,7 @@ namespace AMDiS { ...@@ -554,7 +548,7 @@ namespace AMDiS {
} while (recvAllValues != 0); } while (recvAllValues != 0);
#if (DEBUG != 0) #if (DEBUG != 0)
debug::writeMesh(feSpace, -1, "mesh"); debug::writeMesh(feSpace, -1, debugOutputDir + "mesh");
#endif #endif
INFO(info, 8)("Parallel mesh adaption needed %.5f seconds\n", INFO(info, 8)("Parallel mesh adaption needed %.5f seconds\n",
...@@ -575,10 +569,10 @@ namespace AMDiS { ...@@ -575,10 +569,10 @@ namespace AMDiS {
nTimestepsAfterLastRepartitioning++; nTimestepsAfterLastRepartitioning++;
if (repartitioningAllowed) { if (repartitioningAllowed) {
// if (nTimestepsAfterLastRepartitioning >= 20) { if (nTimestepsAfterLastRepartitioning >= 20) {
repartitionMesh(); repartitionMesh();
nTimestepsAfterLastRepartitioning = 0; nTimestepsAfterLastRepartitioning = 0;
// } }
} }
} }
...@@ -995,10 +989,9 @@ namespace AMDiS { ...@@ -995,10 +989,9 @@ namespace AMDiS {
return; return;
#if (DEBUG != 0) #if (DEBUG != 0)
// if (repartCounter == 0) { if (repartCounter == 0) {
{
std::stringstream oss; std::stringstream oss;
oss << "partitioning-" << repartCounter << ".vtu"; oss << debugOutputDir << "partitioning-" << repartCounter << ".vtu";
DOFVector<double> tmpa(feSpace, "tmp"); DOFVector<double> tmpa(feSpace, "tmp");
tmpa.set(mpiRank); tmpa.set(mpiRank);
VtkWriter::writeFile(&tmpa, oss.str()); VtkWriter::writeFile(&tmpa, oss.str());
...@@ -1049,9 +1042,7 @@ namespace AMDiS { ...@@ -1049,9 +1042,7 @@ namespace AMDiS {
} }
} }
bool (*fn_pt)(MacroElement*, MacroElement*) = cmpElement; std::set<MacroElement*> allMacroEl;
std::set<MacroElement* , bool(*)(MacroElement*, MacroElement*)> allMacroEl(fn_pt);
for (std::set<MacroElement*>::iterator it = newMacroEl.begin(); for (std::set<MacroElement*>::iterator it = newMacroEl.begin();
it != newMacroEl.end(); ++it) it != newMacroEl.end(); ++it)
allMacroEl.insert(*it); allMacroEl.insert(*it);
...@@ -1195,7 +1186,7 @@ namespace AMDiS { ...@@ -1195,7 +1186,7 @@ namespace AMDiS {
#if (DEBUG != 0) #if (DEBUG != 0)
std::stringstream oss; std::stringstream oss;
oss << "partitioning-" << repartCounter << ".vtu"; oss << debugOutputDir << "partitioning-" << repartCounter << ".vtu";
DOFVector<double> tmpa(feSpace, "tmp"); DOFVector<double> tmpa(feSpace, "tmp");
tmpa.set(mpiRank); tmpa.set(mpiRank);
VtkWriter::writeFile(&tmpa, oss.str()); VtkWriter::writeFile(&tmpa, oss.str());
...@@ -1220,7 +1211,7 @@ namespace AMDiS { ...@@ -1220,7 +1211,7 @@ namespace AMDiS {
ParallelDebug::testCommonDofs(*this, true); ParallelDebug::testCommonDofs(*this, true);
ParallelDebug::testGlobalIndexByCoords(*this); ParallelDebug::testGlobalIndexByCoords(*this);
debug::writeMesh(feSpace, -1, "macro_mesh"); debug::writeMesh(feSpace, -1, debugOutputDir + "macro_mesh");
MSG("Debug mode tests finished!\n"); MSG("Debug mode tests finished!\n");
#endif #endif
...@@ -1801,13 +1792,13 @@ namespace AMDiS { ...@@ -1801,13 +1792,13 @@ namespace AMDiS {
#if (DEBUG != 0) #if (DEBUG != 0)
std::stringstream oss; std::stringstream oss;
oss << "elementIndex-" << mpiRank << ".vtu"; oss << debugOutputDir << "elementIndex-" << mpiRank << ".vtu";
debug::writeElementIndexMesh(mesh, oss.str()); debug::writeElementIndexMesh(mesh, oss.str());
debug::testSortedDofs(mesh, elMap); debug::testSortedDofs(mesh, elMap);
ParallelDebug::testCommonDofs(*this, true); ParallelDebug::testCommonDofs(*this, true);
ParallelDebug::testGlobalIndexByCoords(*this); ParallelDebug::testGlobalIndexByCoords(*this);
ParallelDebug::writeDebugFile(*this, "mpi-dbg", "dat"); ParallelDebug::writeDebugFile(*this, debugOutputDir + "mpi-dbg", "dat");
#if 0 #if 0
MSG("------------- Debug information -------------\n"); MSG("------------- Debug information -------------\n");
......
...@@ -571,6 +571,9 @@ namespace AMDiS { ...@@ -571,6 +571,9 @@ namespace AMDiS {
int repartCounter; int repartCounter;
/// Directory name where all debug output files should be written to.
std::string debugOutputDir;
/** \brief /** \brief
* Stores the mesh change index. This is used to recognize changes in the mesh * Stores the mesh change index. This is used to recognize changes in the mesh
* structure (e.g. through refinement or coarsening managers). * structure (e.g. through refinement or coarsening managers).
......
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