10.12., 9:00 - 11:00: Due to updates GitLab may be unavailable for some minutes between 09:00 and 11:00.

Commit 3f57cdaa authored by Philipp Samfaß's avatar Philipp Samfaß

fixed path when optimised kernels are used in NS + fixed heap overflows with...

fixed path when optimised kernels are used in NS + fixed heap overflows with optimised kernels in several solvers
parent e6dbacb6
......@@ -147,4 +147,4 @@
"architecture": "noarch",
"compiler_flags": "",
"linker_flags": ""
}
\ No newline at end of file
}
......@@ -2,7 +2,7 @@
#include "Scenarios/Scenario.h"
#ifdef OPT_KERNELS
#include "kernels/NavierStokes_NavierStokesSolver_ADERDG/Kernels.h"
#include "kernels/NavierStokes_NavierStokesSolver_ADERDG/aderdg/Kernels.h"
#endif
NavierStokes::PDE::PDE() :
......
......@@ -64,4 +64,4 @@ NavierStokes::ScenarioConfig NavierStokes::parseConfig(
auto ns = PDE(referenceViscosity, *scenario, useGravity, useBackgroundState);
return {ns, scenarioName, std::move(scenario), amrSettings};
}
\ No newline at end of file
}
......@@ -216,17 +216,6 @@ exahype::solvers::ADERDGSolver::ADERDGSolver(
_profiler->registerTag(tag);
}
#ifdef Parallel
_invalidExtrapolatedPredictor.resize(getBndFaceSize());
_invalidFluctuations.resize(getBndFluxSize());
std::fill_n(_invalidExtrapolatedPredictor.data(),_invalidExtrapolatedPredictor.size(),-1);
std::fill_n(_invalidFluctuations.data(),_invalidFluctuations.size(),-1);
_receivedExtrapolatedPredictor.resize(getBndFaceSize());
_receivedFluctuations.resize(getBndFluxSize());
_receivedUpdate.reserve(getUpdateSize());
#endif
}
int exahype::solvers::ADERDGSolver::getUnknownsPerFace() const {
......@@ -500,6 +489,19 @@ void exahype::solvers::ADERDGSolver::initSolver(
resetGlobalObservables(_nextGlobalObservables.data());
init(cmdlineargs,parserView); // call user define initalisiation
#ifdef Parallel
_invalidExtrapolatedPredictor.resize(getBndFaceSize());
_invalidFluctuations.resize(getBndFluxSize());
std::fill_n(_invalidExtrapolatedPredictor.data(),_invalidExtrapolatedPredictor.size(),-1);
std::fill_n(_invalidFluctuations.data(),_invalidFluctuations.size(),-1);
_receivedExtrapolatedPredictor.resize(getBndFaceSize());
_receivedFluctuations.resize(getBndFluxSize());
_receivedUpdate.reserve(getUpdateSize());
#endif
}
bool exahype::solvers::ADERDGSolver::isPerformingPrediction(
......@@ -2009,7 +2011,7 @@ void exahype::solvers::ADERDGSolver::mergeWithNeighbourData(
DataHeap::getInstance().receiveData( // TODO const-correct peano
const_cast<double*>(_receivedExtrapolatedPredictor.data()),dataPerFace,
fromRank, barycentre, level, peano::heap::MessageType::NeighbourCommunication);
solveRiemannProblemAtInterface(
cellDescription, face,
_receivedExtrapolatedPredictor.data(),
......
......@@ -103,10 +103,6 @@ exahype::solvers::FiniteVolumesSolver::FiniteVolumesSolver(
_profiler->registerTag(tag);
}
// TODO(WORKAROUND)
const int dataPerFace = getBndFaceSize();
_invalidExtrapolatedSolution.resize(dataPerFace);
std::fill_n(_invalidExtrapolatedSolution.data(),_invalidExtrapolatedSolution.size(),-1);
}
int exahype::solvers::FiniteVolumesSolver::getDataPerPatch() const {
......@@ -201,6 +197,11 @@ void exahype::solvers::FiniteVolumesSolver::initSolver(
_nextGlobalObservables.resize(_numberOfGlobalObservables);
resetGlobalObservables(_globalObservables.data() );
resetGlobalObservables(_nextGlobalObservables.data());
// TODO(WORKAROUND)
const int dataPerFace = getBndFaceSize();
_invalidExtrapolatedSolution.resize(dataPerFace);
std::fill_n(_invalidExtrapolatedSolution.data(),_invalidExtrapolatedSolution.size(),-1);
init(cmdlineargs,parserView); // call user defined initalisation
}
......
......@@ -63,17 +63,6 @@ exahype::solvers::LimitingADERDGSolver::LimitingADERDGSolver(
assertion(_solver->getTimeStepping()==_limiter->getTimeStepping());
#ifdef Parallel
// TODO(WORKAROUND): Not sure for what anymore
const int numberOfObservables = _solver->getDMPObservables();
_invalidObservables.resize(numberOfObservables);
std::fill_n(_invalidObservables.data(),_invalidObservables.size(),-1);
_receivedMax.resize(numberOfObservables);
_receivedMin.resize(numberOfObservables);
assertion( numberOfObservables==0 || !_receivedMax.empty());
assertion( numberOfObservables==0 || !_receivedMin.empty());
#endif
}
/** Wire through to limiting ADER-DG solver */
void exahype::solvers::LimitingADERDGSolver::updateMeshUpdateEvent(exahype::solvers::Solver::MeshUpdateEvent meshUpdateEvent) {
......@@ -115,6 +104,18 @@ void exahype::solvers::LimitingADERDGSolver::initSolver(
const std::vector<std::string>& cmdlineargs,
const exahype::parser::ParserView& parserView
) {
#ifdef Parallel
// TODO(WORKAROUND): Not sure for what anymore
const int numberOfObservables = _solver->getDMPObservables();
_invalidObservables.resize(numberOfObservables);
std::fill_n(_invalidObservables.data(),_invalidObservables.size(),-1);
_receivedMax.resize(numberOfObservables);
_receivedMin.resize(numberOfObservables);
assertion( numberOfObservables==0 || !_receivedMax.empty());
assertion( numberOfObservables==0 || !_receivedMin.empty());
#endif
_domainOffset=domainOffset;
_domainSize=domainSize;
std::pair<double,int> coarsestMeshInfo =
......
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