Commit 209f7b44 authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

changed DEBUG to NOT NDEBUG and removed separate debug target from cmake

parent a877b6da
......@@ -98,7 +98,7 @@ namespace AMDiS { namespace Parallel {
elInfo = stack.traverseNext(elInfo);
}
#if (DEBUG != 0)
#ifndef NDEBUG
DOFVector<WorldVector<double> > coords(feSpace, "dofCorrds");
feSpace->getMesh()->getDofIndexCoords(coords);
#endif
......@@ -173,7 +173,7 @@ namespace AMDiS { namespace Parallel {
el1->getAllDofs(feSpace, b1, dofs1, true, &dofGeoIndex1);
#if (DEBUG != 0)
#ifndef NDEBUG
if (feSpaces.size())
debug::testDofsByCoords(coords, dofs0, dofs1);
else
......@@ -222,7 +222,7 @@ namespace AMDiS { namespace Parallel {
el0->getAllDofs(feSpace, b0, dofs0, true, &dofGeoIndex0);
el1->getAllDofs(feSpace, b1, dofs1, true, &dofGeoIndex1);
#if (DEBUG != 0)
#ifndef NDEBUG
if (feSpaces.size())
debug::testDofsByCoords(coords, dofs0, dofs1);
else
......@@ -327,7 +327,7 @@ namespace AMDiS { namespace Parallel {
// Create traverse stack and traverse within the mesh until the element,
// which should be fitted to the mesh structure code, is reached.
TraverseStack stack;
#if (DEBUG != 0)
#ifndef NDEBUG
ElInfo *elInfo =
stack.traverseFirstOneMacro(mesh, boundEl.elIndex, -1, traverseFlag);
......
......@@ -177,7 +177,7 @@ namespace AMDiS
int firstRow = firstRow0 + firstRow1;
int mpiSize = MPI::COMM_WORLD.Get_size();
#if (DEBUG != 0)
#ifndef NDEBUG
int mpiRank = MPI::COMM_WORLD.Get_rank();
#endif
vector<int> allFirstRow0(mpiSize + 1, 0);
......@@ -303,7 +303,7 @@ namespace AMDiS
PCFactorSetMatSolverPackage(pc, matSolverPackage);
PCSetFromOptions(pc);
#if DEBUG != 0
#ifndef NDEBUG
MSG("PetscOptionsView:\n");
PetscViewer viewer;
PetscViewerCreate(PETSC_COMM_WORLD, &viewer);
......
......@@ -147,7 +147,7 @@ namespace AMDiS { namespace Parallel {
{
FUNCNAME("PetscSolverFeti::initialize()");
#if (DEBUG != 0)
#ifndef NDEBUG
MSG("Init FETI-DP on mesh level %d\n", meshLevel);
#endif
......@@ -751,7 +751,7 @@ namespace AMDiS { namespace Parallel {
MatAssemblyEnd(mat_lagrange, MAT_FINAL_ASSEMBLY);
#if (DEBUG != 0)
#ifndef NDEBUG
{
int nZeroRows = PetscSolverFetiDebug::testZeroRows(mat_lagrange);
int m,n;
......@@ -1833,7 +1833,7 @@ namespace AMDiS { namespace Parallel {
Vec nullSpaceBasis;
VecCreateNest(domainComm, 2, PETSC_NULL, vecArray, &nullSpaceBasis);
#if (DEBUG != 0)
#ifndef NDEBUG
PetscSolverFetiDebug::writeNullSpace(*this, nullSpaceBasis);
#endif
......@@ -1870,7 +1870,7 @@ namespace AMDiS { namespace Parallel {
return;
}
#if (DEBUG != 0)
#ifndef NDEBUG
PetscInt nRow, nCol;
MatGetLocalSize(subdomain->getMatInterior(), &nRow, &nCol);
mpi::globalAdd(nRow);
......
......@@ -44,7 +44,7 @@ namespace AMDiS { namespace Parallel {
int nRankRows = (*interiorMap)[feSpace].nRankDofs;
int nOverallRows = (*interiorMap)[feSpace].nOverallDofs;
#if (DEBUG != 0)
#ifndef NDEBUG
MSG("Fill petsc matrix 1 needed %.5f seconds\n", MPI::Wtime() - wtime);
#endif
......@@ -97,7 +97,7 @@ namespace AMDiS { namespace Parallel {
MatCreateNest(domainComm, nBlocks, PETSC_NULL, nBlocks, PETSC_NULL,
&(nestMat[0]), &getMatInterior());
#if (DEBUG != 0)
#ifndef NDEBUG
MSG("Fill petsc matrix 2 needed %.5f seconds\n", MPI::Wtime() - wtime);
#endif
......
......@@ -87,7 +87,7 @@ namespace AMDiS { namespace Parallel {
}
Parameters::get("parallel->print matrix info", printMatInfo);
#if DEBUG != 0
#ifndef NDEBUG
bool printOptionsInfo = false;
Parameters::get("parallel->debug->print options info", printOptionsInfo);
if (printOptionsInfo) {
......@@ -110,7 +110,7 @@ namespace AMDiS { namespace Parallel {
TEST_EXIT_DBG(interiorMap)("No parallel mapping object defined!\n");
TEST_EXIT_DBG(seqMat)("No DOF matrix defined!\n");
#if (DEBUG != 0)
#ifndef NDEBUG
Timer t;
#endif
......@@ -123,7 +123,7 @@ namespace AMDiS { namespace Parallel {
// === Create PETSc vector (solution and a temporary vector). ===
#if (DEBUG != 0)
#ifndef NDEBUG
MSG("Fill petsc matrix 1 needed %.5f seconds\n", t.elapsed());
t.reset();
#endif
......@@ -136,7 +136,7 @@ namespace AMDiS { namespace Parallel {
if ((*seqMat)[i][j])
setDofMatrix((*seqMat)[i][j], i, j);
#if (DEBUG != 0)
#ifndef NDEBUG
MSG("Fill petsc matrix 2 needed %.5f seconds\n", t.elapsed());
t.reset();
#endif
......@@ -162,7 +162,7 @@ namespace AMDiS { namespace Parallel {
initPreconditioner(*seqMat, mat[0][0]);
#if (DEBUG != 0)
#ifndef NDEBUG
MSG("Fill petsc matrix 3 needed %.5f seconds\n", t.elapsed());
#endif
......
......@@ -532,7 +532,7 @@ namespace AMDiS { namespace Parallel {
MPI::Request::Waitall(requestCounter, request);
#if (DEBUG != 0)
#ifndef NDEBUG
bool testall = MPI::Request::Testall(requestCounter, request);
TEST_EXIT(testall)("Should not happen!\n");
#endif
......
......@@ -140,7 +140,7 @@ namespace AMDiS { namespace Parallel {
zoltan.Set_Param("OBJ_WEIGHT_DIM", "1");
#if (DEBUG != 0)
#ifndef NDEBUG
zoltan.Set_Param("DEBUG_LEVEL", "1");
#else
zoltan.Set_Param("DEBUG_LEVEL", "0");
......
......@@ -127,7 +127,7 @@ namespace AMDiS {
MSG("Residual norm: ||b-Ax|| = %e\n", residual);
}
#if DEBUG != 0
#ifndef NDEBUG
if (getIterations() > 0) {
MSG("Nr. of iterations needed = %d\n", getIterations());
}
......
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