From c7be95ea59ab1fce28f40a7f5a89390b6ab00e8d Mon Sep 17 00:00:00 2001 From: Thomas Witkowski <thomas.witkowski@gmx.de> Date: Wed, 13 Aug 2008 08:16:04 +0000 Subject: [PATCH] * Added AdaptInfo to debug server for parallel problem debugging --- AMDiS/src/AdaptBase.h | 8 ++++---- AMDiS/src/AdaptInstationary.cc | 10 +++++----- AMDiS/src/AdaptInstationary.h | 10 +++++----- AMDiS/src/BiCGStab.hh | 15 ++++++++++----- AMDiS/src/OEMSolver.h | 4 +++- AMDiS/src/ParallelProblem.cc | 9 +++++---- AMDiS/src/ParallelProblem.h | 4 ++-- 7 files changed, 34 insertions(+), 26 deletions(-) diff --git a/AMDiS/src/AdaptBase.h b/AMDiS/src/AdaptBase.h index 83660464..efcdea4b 100644 --- a/AMDiS/src/AdaptBase.h +++ b/AMDiS/src/AdaptBase.h @@ -43,11 +43,11 @@ namespace AMDiS { /** \brief * Constructor */ - AdaptBase(const ::std::string& name, + AdaptBase(const ::std::string& name, ProblemIterationInterface *problemIteration, - AdaptInfo *adaptInfo, - ProblemTimeInterface *problemTime = NULL, - AdaptInfo *initialAdaptInfo = NULL) + AdaptInfo *adaptInfo, + ProblemTimeInterface *problemTime = NULL, + AdaptInfo *initialAdaptInfo = NULL) : name_(name), problemIteration_(problemIteration), adaptInfo_(adaptInfo), diff --git a/AMDiS/src/AdaptInstationary.cc b/AMDiS/src/AdaptInstationary.cc index e6f67c81..23859e08 100644 --- a/AMDiS/src/AdaptInstationary.cc +++ b/AMDiS/src/AdaptInstationary.cc @@ -8,12 +8,12 @@ namespace AMDiS { - AdaptInstationary::AdaptInstationary(const char *name, + AdaptInstationary::AdaptInstationary(const char *name, ProblemIterationInterface *problemStat, - AdaptInfo *info, - ProblemTimeInterface *problemInstat, - AdaptInfo *initialInfo, - time_t initialTimestamp) + AdaptInfo *info, + ProblemTimeInterface *problemInstat, + AdaptInfo *initialInfo, + time_t initialTimestamp) : AdaptBase(name, problemStat, info, problemInstat, initialInfo), breakWhenStable(0) { diff --git a/AMDiS/src/AdaptInstationary.h b/AMDiS/src/AdaptInstationary.h index 0ca426ac..1b872b9e 100644 --- a/AMDiS/src/AdaptInstationary.h +++ b/AMDiS/src/AdaptInstationary.h @@ -54,12 +54,12 @@ namespace AMDiS { * Creates a AdaptInstationary object with the given name for the time * dependent problem problemInstat. */ - AdaptInstationary(const char *name_, + AdaptInstationary(const char *name_, ProblemIterationInterface *problemStat, - AdaptInfo *info, - ProblemTimeInterface *problemInstat, - AdaptInfo *initialInfo, - time_t initialTimestamp = 0); + AdaptInfo *info, + ProblemTimeInterface *problemInstat, + AdaptInfo *initialInfo, + time_t initialTimestamp = 0); /** \brief * Destructor diff --git a/AMDiS/src/BiCGStab.hh b/AMDiS/src/BiCGStab.hh index 692053b7..bbfd9679 100644 --- a/AMDiS/src/BiCGStab.hh +++ b/AMDiS/src/BiCGStab.hh @@ -6,7 +6,12 @@ namespace AMDiS template<typename VectorType> BiCGStab<VectorType>::BiCGStab(::std::string name) : OEMSolver<VectorType>(name), - r(NULL), rstar(NULL), p(NULL), v(NULL), t(NULL), xmin(NULL) + r(NULL), + rstar(NULL), + p(NULL), + v(NULL), + t(NULL), + xmin(NULL) {} template<typename VectorType> @@ -16,11 +21,11 @@ namespace AMDiS template<typename VectorType> void BiCGStab<VectorType>::init() { - r = this->vectorCreator->create(); + r = this->vectorCreator->create(); rstar = this->vectorCreator->create(); - p = this->vectorCreator->create(); - v = this->vectorCreator->create(); - t = this->vectorCreator->create(); + p = this->vectorCreator->create(); + v = this->vectorCreator->create(); + t = this->vectorCreator->create(); xmin = this->vectorCreator->create(); } diff --git a/AMDiS/src/OEMSolver.h b/AMDiS/src/OEMSolver.h index c938b216..81d47fde 100644 --- a/AMDiS/src/OEMSolver.h +++ b/AMDiS/src/OEMSolver.h @@ -299,7 +299,9 @@ namespace AMDiS { /** \brief * Sets \ref problem */ - void setName(::std::string name_) { name = name_; }; + void setName(::std::string name_) { + name = name_; + }; protected: /** \brief diff --git a/AMDiS/src/ParallelProblem.cc b/AMDiS/src/ParallelProblem.cc index 9665ab54..f77753ef 100644 --- a/AMDiS/src/ParallelProblem.cc +++ b/AMDiS/src/ParallelProblem.cc @@ -1,4 +1,4 @@ -#include "ParallelProblem.h" + "ParallelProblem.h" #include "ProblemScal.h" #include "ProblemVec.h" #include "ProblemInstat.h" @@ -75,7 +75,8 @@ namespace AMDiS { ProblemTimeInterface *timeIF) : iterationIF_(iterationIF), timeIF_(timeIF), - debugMode(0) + debugMode(0), + debugServerProcess(false) { mpiRank = MPI::COMM_WORLD.Get_rank(); mpiSize = MPI::COMM_WORLD.Get_size(); @@ -1727,7 +1728,7 @@ namespace AMDiS { } } - void ParallelProblemVec::startDebugServer() + void ParallelProblemVec::startDebugServer(AdaptInfo *adaptInfo) { FUNCNAME("ParallelProblemVec::startDebugServer()"); @@ -1842,7 +1843,7 @@ namespace AMDiS { /* ====== Finally, call debug function ====== */ - debugFunction(); + debugFunction(adaptInfo); } FREE_MEMORY(elDOFs, DegreeOfFreedom, numFcts); diff --git a/AMDiS/src/ParallelProblem.h b/AMDiS/src/ParallelProblem.h index 1763f7fc..6403a557 100644 --- a/AMDiS/src/ParallelProblem.h +++ b/AMDiS/src/ParallelProblem.h @@ -553,9 +553,9 @@ namespace AMDiS { return name_; }; - virtual void startDebugServer(); + virtual void startDebugServer(AdaptInfo *adaptInfo); - virtual void debugFunction() {}; + virtual void debugFunction(AdaptInfo *adaptInfo) {}; protected: ProblemVec *problem; -- GitLab