Peano 4
Loading...
Searching...
No Matches
ccz4-main.cpp
Go to the documentation of this file.
1// **********************************************************************************************
2// This file is modifed from the original version generated by exahype2.
3// You are free to change the content here, but do not delete it or the
4// auto-generated main file will disable the additional step and causing compiling errors.
5// in some circumstance.
6// **********************************************************************************************
7
8#include <iomanip>
9
10#include "config.h"
11#include "Constants.h"
12#include "ccz4-main.h"
13#include "exahype2/UnitTests.h"
15#include "observers/CreateGrid.h"
16#include "observers/CreateGridAndConvergeLoadBalancing.h"
17#include "observers/CreateGridButPostponeRefinement.h"
18#include "observers/InitGrid.h"
19#include "observers/PlotSolution.h"
20#include "observers/TimeStep.h"
21#include "peano4/peano.h"
22#include "peano4/UnitTests.h"
23#include "repositories/DataRepository.h"
24#include "repositories/SolverRepository.h"
25#include "repositories/StepRepository.h"
26#include "tarch/UnitTests.h"
29#include "tarch/logging/Log.h"
38#include "tarch/timing/Watch.h"
41
43#if defined(USE_ADDITIONAL_MESH_TRAVERSAL)
44 #include "observers/AdditionalMeshTraversal.h"
45#endif
47
48using namespace applications::exahype2::ccz4;
49
51
52
57
58
68 static bool gridConstructed = false;
69 static bool gridInitialised = false;
70 static bool gridBalanced = false;
71 static double nextMaxPlotTimeStamp = FirstPlotTimeStamp;
72 static double nextMinPlotTimeStamp = FirstPlotTimeStamp;
73 static bool haveJustWrittenSnapshot = false;
74 static bool haveReceivedNoncriticialAssertion = false;
75 static bool addGridSweepWithoutGridRefinementNext = false;
77 std::numeric_limits<double>::max()
78 );
79 static int globalNumberOfTrees = 0;
80 bool continueToSolve = true;
81
82 if (tarch::hasNonCriticalAssertionBeenViolated() and not haveReceivedNoncriticialAssertion) {
84 repositories::StepRepository::toProgramStep(repositories::StepRepository::Steps::PlotSolution)
85 );
86 haveReceivedNoncriticialAssertion = true;
88 "selectNextAlgorithmicStep()", "non-critical assertion has been triggered in code. Dump final state and terminate"
89 );
91 continueToSolve = false;
92 } else if (gridConstructed and not gridBalanced) {
93 if (not repositories::loadBalancer.isEnabled(true) and not repositories::loadBalancer.hasSplitRecently()) {
94 logInfo("selectNextAlgorithmicStep()", "all ranks have switched off their load balancing");
95 gridBalanced = true;
96 } else {
97 logInfo(
98 "selectNextAlgorithmicStep()", "wait for load balancing to become stable: " << repositories::loadBalancer
99 );
100 }
101
102 peano4::parallel::Node::getInstance().setNextProgramStep(repositories::StepRepository::toProgramStep(
103 repositories::StepRepository::Steps::CreateGridAndConvergeLoadBalancing
104 ));
105 } else if (gridBalanced and not gridInitialised) {
107 repositories::StepRepository::toProgramStep(repositories::StepRepository::Steps::InitGrid)
108 );
109
110 gridInitialised = true;
111 } else if (not gridConstructed) {
112 if (tarch::la::max(peano4::parallel::SpacetreeSet::getInstance().getGridStatistics().getMinH()) < tarch::la::max(minH)) {
114 logDebug(
115 "selectNextAlgorithmicStep()", "mesh has refined, so reset minH=" << minH << " and postpone further refinement"
116 );
117 addGridSweepWithoutGridRefinementNext = true;
118 } else if (repositories::loadBalancer.getGlobalNumberOfTrees() > globalNumberOfTrees) {
119 logInfo("selectNextAlgorithmicStep()", "mesh has rebalanced recently, so postpone further refinement)");
120 addGridSweepWithoutGridRefinementNext = true;
121 globalNumberOfTrees = repositories::loadBalancer.getGlobalNumberOfTrees();
122 }
123 else if (
124 peano4::parallel::SpacetreeSet::getInstance().getGridStatistics().getStationarySweeps()>5
125 and
126 // ensure that a proper creation has been ran before, so the mesh had the opportunity
127 // to refine further if it has not done yet
128 repositories::StepRepository::toStepEnum( peano4::parallel::Node::getInstance().getCurrentProgramStep() ) == repositories::StepRepository::Steps::CreateGrid
129 ) {
130 logInfo(
131 "selectNextAlgorithmicStep()", "grid has been stationary for quite some time. Terminate grid construction"
132 );
133 addGridSweepWithoutGridRefinementNext = false;
134 gridConstructed = true;
135 } else {
136 logInfo(
137 "selectNextAlgorithmicStep()",
138 "mesh rebalancing seems to be stationary, so study whether to refine mesh further in next sweep: "
140 );
141 addGridSweepWithoutGridRefinementNext = false;
142 globalNumberOfTrees = repositories::loadBalancer.getGlobalNumberOfTrees();
143 }
144
145 // Actual grid traversal choice
146 if (addGridSweepWithoutGridRefinementNext) {
147 peano4::parallel::Node::getInstance().setNextProgramStep(repositories::StepRepository::toProgramStep(
148 repositories::StepRepository::Steps::CreateGridButPostponeRefinement
149 ));
150 } else {
152 repositories::StepRepository::toProgramStep(repositories::StepRepository::Steps::CreateGrid)
153 );
154 }
155
156 continueToSolve = true;
157 } else {
159 #if defined(USE_ADDITIONAL_MESH_TRAVERSAL)
160 if (repositories::isFirstGridSweepOfTimeStep()
161 and
162 repositories::StepRepository::toStepEnum( peano4::parallel::Node::getInstance().getCurrentProgramStep() ) != repositories::StepRepository::Steps::AdditionalMeshTraversal
163 ) {
165 repositories::StepRepository::toProgramStep( repositories::StepRepository::Steps::AdditionalMeshTraversal )
166 );
167 continueToSolve = true;
168 } else
169 #endif
171 if (TimeInBetweenPlots > 0.0 and repositories::getMinTimeStamp() < MinTerminalTime and repositories::getMaxTimeStamp() < MaxTerminalTime and (repositories::getMinTimeStamp() >= nextMinPlotTimeStamp or repositories::getMaxTimeStamp() >= nextMaxPlotTimeStamp) and repositories::mayPlot()) {
172 if (repositories::getMinTimeStamp() >= nextMinPlotTimeStamp) {
173 nextMinPlotTimeStamp += TimeInBetweenPlots;
174 }
175 if (repositories::getMaxTimeStamp() >= nextMaxPlotTimeStamp) {
176 nextMaxPlotTimeStamp += TimeInBetweenPlots;
177 }
178
179 if (nextMinPlotTimeStamp < repositories::getMinTimeStamp()) {
181 "selectNextAlgorithmicStep()",
182 "code is asked to plot every dt="
183 << TimeInBetweenPlots << ", but this seems to be less than the time step size of the solvers. "
184 << "So postpone next plot to t=" << (repositories::getMinTimeStamp() + TimeInBetweenPlots)
185 );
186 nextMinPlotTimeStamp = repositories::getMinTimeStamp() + TimeInBetweenPlots;
187 } else if (nextMaxPlotTimeStamp < repositories::getMaxTimeStamp()) {
189 "selectNextAlgorithmicStep()",
190 "code is asked to plot every dt="
191 << TimeInBetweenPlots << ", but this seems to be less than the time step size of the solvers. "
192 << "So postpone next plot to t=" << (repositories::getMaxTimeStamp() + TimeInBetweenPlots)
193 );
194 nextMaxPlotTimeStamp = repositories::getMaxTimeStamp() + TimeInBetweenPlots;
195 }
196
197 nextMaxPlotTimeStamp = std::max(nextMaxPlotTimeStamp, nextMinPlotTimeStamp);
198
200 repositories::StepRepository::toProgramStep(repositories::StepRepository::Steps::PlotSolution)
201 );
202 haveJustWrittenSnapshot = true;
203 continueToSolve = true;
204 } else if (repositories::getMinTimeStamp() < MinTerminalTime and repositories::getMaxTimeStamp() < MaxTerminalTime) {
206 repositories::StepRepository::toProgramStep(repositories::StepRepository::Steps::TimeStep)
207 );
208 continueToSolve = true;
209 haveJustWrittenSnapshot = false;
210 } else {
211 if (not haveJustWrittenSnapshot and TimeInBetweenPlots > 0.0 and repositories::mayPlot()) {
213 repositories::StepRepository::toProgramStep(repositories::StepRepository::Steps::PlotSolution)
214 );
215 continueToSolve = true; // don't want to terminate immediately
216 haveJustWrittenSnapshot = true;
217 nextMinPlotTimeStamp = std::numeric_limits<double>::max();
218 nextMaxPlotTimeStamp = std::numeric_limits<double>::max();
219 } else if (not haveJustWrittenSnapshot and TimeInBetweenPlots > 0.0 and not repositories::mayPlot()) {
220 continueToSolve = true; // don't want to terminate immediately but to wait for incomplete time steps to complete
221 } else {
222 continueToSolve = false;
223 }
224 }
225 }
226
227 return continueToSolve;
228}
229
230
231void step() {
233 auto stepName = repositories::StepRepository::toStepEnum(stepIdentifier);
234
235 static tarch::logging::Log _log("");
236#if PeanoDebug > 0
237#else
238 if (tarch::mpi::Rank::getInstance().isGlobalMaster())
239#endif
240 logInfo("step()", "run " << repositories::StepRepository::toString(stepName));
241
242 static tarch::timing::Watch watch("::", "step()", false);
243
244 static int creepingNumberOfLocalCells = 0;
245
246 switch (stepName) {
247 case repositories::StepRepository::Steps::CreateGridButPostponeRefinement: {
248 tarch::logging::LogFilter::getInstance().switchProgramPhase("create-grid-but-postpone-refinement");
249
251
252 repositories::startGridConstructionStep();
253
254 OTTER_DEFINE_TASK(step_task, OTTER_NULL_TASK, otter_add_to_pool, otter::label::step);
255 OTTER_TASK_START(step_task);
256
257 observers::CreateGridButPostponeRefinement observer;
258 watch.start();
260 watch.stop();
262
263 OTTER_TASK_WAIT_FOR(step_task, children);
264 OTTER_TASK_END(step_task);
266 OTTER_TASK_WAIT_FOR(OTTER_NULL_TASK, descendants);
267
268 repositories::finishGridConstructionStep();
269 } break;
270 case repositories::StepRepository::Steps::CreateGrid: {
272
274
275 repositories::startGridConstructionStep();
276
277 OTTER_DEFINE_TASK(step_task, OTTER_NULL_TASK, otter_add_to_pool, otter::label::step);
278 OTTER_TASK_START(step_task);
279
280 observers::CreateGrid observer;
281 watch.start();
283 watch.stop();
285
286 OTTER_TASK_WAIT_FOR(step_task, children);
287 OTTER_TASK_END(step_task);
289 OTTER_TASK_WAIT_FOR(OTTER_NULL_TASK, descendants);
290
291 repositories::finishGridConstructionStep();
292
293 // We always overestimate so give the convergence the opportunity to catch up. The constant
294 // here is a magic one.
297 } break;
298 case repositories::StepRepository::Steps::CreateGridAndConvergeLoadBalancing: {
299 if (creepingNumberOfLocalCells < ::toolbox::loadbalancing::getWeightOfHeaviestLocalSpacetree() - 1) {
300 logInfo(
301 "step()",
302 "it seems the grid has just refined before we switched to the phase where we make the load balancing converge. Wait for a few iterations more to give load balancing chance to catch up"
303 );
306 }
307
308 tarch::logging::LogFilter::getInstance().switchProgramPhase("create-grid-and-converge-load-balancing");
309
311
312 // The smaller here corresponds to the -1 below
313 if (::toolbox::loadbalancing::getWeightOfHeaviestLocalSpacetree() < 0 and repositories::loadBalancer.isEnabled(false)) {
314 logInfo("step()", "rank is degenerated so disable load balancing temporarily");
315 repositories::loadBalancer.enable(false);
316 }
317 if (
319 and
320 repositories::loadBalancer.isEnabled(false)
321 ) {
322 logInfo(
323 "step()",
324 "grid construction and decomposition on this rank seem to be stable as we have around "
325 << creepingNumberOfLocalCells << " local cells in the heaviest tree. Disable load balancing temporarily"
326 );
327 repositories::loadBalancer.enable(false);
328 }
329
330 repositories::startGridConstructionStep();
331
332 OTTER_DEFINE_TASK(step_task, OTTER_NULL_TASK, otter_add_to_pool, otter::label::step);
333 OTTER_TASK_START(step_task);
334
335 observers::CreateGridButPostponeRefinement observer;
336 watch.start();
338 watch.stop();
340
341 OTTER_TASK_WAIT_FOR(step_task, children);
342 OTTER_TASK_END(step_task);
344 OTTER_TASK_WAIT_FOR(OTTER_NULL_TASK, descendants);
345
346 repositories::finishGridConstructionStep();
347
348 if (
350 and
351 not repositories::loadBalancer.hasSplitRecently()
352 and
353 repositories::loadBalancer.isEnabled(false)
354 ) {
355 logInfo(
356 "step()",
357 "have to decrement local cell counter "
358 << creepingNumberOfLocalCells << " as maximum weight is "
360 );
361 creepingNumberOfLocalCells = (creepingNumberOfLocalCells
363 / 2;
364 }
365 } break;
366 case repositories::StepRepository::Steps::InitGrid: {
368 repositories::loadBalancer.enable(false);
369
371
372 repositories::startGridInitialisationStep();
373
374 OTTER_DEFINE_TASK(step_task, OTTER_NULL_TASK, otter_add_to_pool, otter::label::step);
375 OTTER_TASK_START(step_task);
376
377 observers::InitGrid observer;
378 watch.start();
380 watch.stop();
382
383 OTTER_TASK_WAIT_FOR(step_task, children);
384 OTTER_TASK_END(step_task);
386 OTTER_TASK_WAIT_FOR(OTTER_NULL_TASK, descendants);
387
388 repositories::finishGridInitialisationStep();
389 } break;
390 case repositories::StepRepository::Steps::PlotSolution: {
392 const double minTimeStamp = repositories::getMinTimeStamp();
393 const double maxTimeStamp = repositories::getMaxTimeStamp();
394 const double minTimeStepSize = repositories::getMinTimeStepSize();
395 const double maxTimeStepSize = repositories::getMaxTimeStepSize();
396
398
399 repositories::startPlottingStep(minTimeStamp, maxTimeStamp, minTimeStepSize, maxTimeStepSize);
400
401 OTTER_DEFINE_TASK(step_task, OTTER_NULL_TASK, otter_add_to_pool, otter::label::step);
402 OTTER_TASK_START(step_task);
403
404 observers::PlotSolution observer;
405 watch.start();
407 watch.stop();
409
410 OTTER_TASK_WAIT_FOR(step_task, children);
411 OTTER_TASK_END(step_task);
413 OTTER_TASK_WAIT_FOR(OTTER_NULL_TASK, descendants);
414
415 repositories::finishPlottingStep();
416 } break;
417 case repositories::StepRepository::Steps::TimeStep: {
419 if (repositories::loadBalancer.isEnabled(false)) {
420 logInfo("step()", "disable load balancing throughout initialisation (to be removed in later releases)");
421 repositories::loadBalancer.enable(false);
422 }
423
424 const double minTimeStamp = repositories::getMinTimeStamp();
425 const double maxTimeStamp = repositories::getMaxTimeStamp();
426 const double minTimeStepSize = repositories::getMinTimeStepSize();
427 const double maxTimeStepSize = repositories::getMaxTimeStepSize();
428 const double minMeshSize = repositories::getMinMeshSize();
429 const double maxMeshSize = repositories::getMaxMeshSize();
430
432
433 repositories::startTimeStep(minTimeStamp, maxTimeStamp, minTimeStepSize, maxTimeStepSize);
434
435 OTTER_DEFINE_TASK(step_task, OTTER_NULL_TASK, otter_add_to_pool, otter::label::step);
436 OTTER_TASK_START(step_task);
437
438 observers::TimeStep observer;
439 watch.start();
441 watch.stop();
443
444 OTTER_TASK_WAIT_FOR(step_task, children);
445 OTTER_TASK_END(step_task);
447 OTTER_TASK_WAIT_FOR(OTTER_NULL_TASK, descendants);
448
449 repositories::finishTimeStep();
450 } break;
452 #if defined(USE_ADDITIONAL_MESH_TRAVERSAL)
453 case repositories::StepRepository::Steps::AdditionalMeshTraversal:
454 {
455 tarch::logging::LogFilter::getInstance().switchProgramPhase( "additional-MeshTraversal" );
456
457 repositories::suspendSolversForOneGridSweep();
458 observers::AdditionalMeshTraversal observer;
460 }
461 break;
462 #endif
464 case repositories::StepRepository::Steps::Undef:
465 assertion(false);
466 break;
467 }
468}
469
470int main(int argc, char** argv) {
471 const int ExitCodeSuccess = 0;
472 const int ExitCodeUnitTestsFailed = 1;
473 const int ExitCodeInvalidArguments = 2;
474 const int ExitCodeInvalidBuild = 3;
475
476 static tarch::timing::Watch watch("::", "main()", false);
477
479
480 // Do this early, so people can use logInfo properly.
481 repositories::initLogFilters();
482
486
487 peano4::initSingletons(DomainOffset, DomainSize, PeriodicBC);
488
489 repositories::initSharedMemoryAndGPUEnvironment();
490
491 if (tarch::mpi::Rank::getInstance().getNumberOfRanks() > 1 and tarch::multicore::Core::getInstance().getNumberOfThreads() <= 1) {
492 logError("main()", "MPI runs without multithreading are not supported currently.");
493 return ExitCodeInvalidBuild;
494 }
495
497
498 repositories::DataRepository::initDatatypes();
499
500 #if PeanoDebug >= 2
502 unitTests->addTestCase(peano4::getUnitTests());
503 unitTests->addTestCase(tarch::getUnitTests());
506 unitTests->run();
507 if (unitTests->getNumberOfErrors() != 0) {
508 logError("main()", "unit tests failed. Quit.");
509 tarch::mpi::Rank::abort(ExitCodeUnitTestsFailed);
510 }
511 delete unitTests;
512#endif
513
514 repositories::startSimulation();
515
517
519
520#if defined(SharedOMP)
521#pragma omp parallel
522 {
523#pragma omp master
524 {
525#endif
526
527#if defined(UseSmartMPI)
528 const bool isGlobalMaster = tarch::mpi::Rank::getInstance().isGlobalMaster() and smartmpi::isComputeRank();
529 const bool isPeanoComputeNode = not tarch::mpi::Rank::getInstance().isGlobalMaster() and smartmpi::isComputeRank();
530#else
531 const bool isGlobalMaster = tarch::mpi::Rank::getInstance().isGlobalMaster();
532 const bool isPeanoComputeNode = not tarch::mpi::Rank::getInstance().isGlobalMaster();
533#endif
534
535 if (isGlobalMaster) {
536 while (selectNextAlgorithmicStep()) {
537 watch.start();
538 step();
539 watch.stop();
540
542 logInfo("main()", "time per mesh sweep (current/average): " << std::fixed << std::setprecision(2) << watch.getCalendarTime() << " / " << timePerMeshSwepMeasurement.getValue() );
543 }
544
545 logInfo("main()", "terminated successfully");
546 logInfo(
547 "main()",
548 "initial grid construction: " << gridConstructionMeasurement.getAccumulatedValue(
550 );
551 logInfo(
552 "main()",
553 "plotting: " << plotMeasurement.getAccumulatedValue() << "s\t" << plotMeasurement.toString()
554 );
555 logInfo(
556 "main()",
557 "time stepping: " << timeStepMeasurement.getAccumulatedValue(
558 ) << "s\t" << timeStepMeasurement.toString()
559 );
560 logInfo(
561 "main()",
562 "average time per mesh sweep: " << timePerMeshSwepMeasurement.getValue() << "\t" << timePerMeshSwepMeasurement.toString()
563 );
564 } else if (isPeanoComputeNode) {
565 while (peano4::parallel::Node::getInstance().continueToRun()) {
566 step();
567 }
568 }
569#if defined(UseSmartMPI)
570 else {
571 while (smartmpi::continueToRun()) {
572 smartmpi::tick();
573 }
574 }
575#endif
576
577#if defined(SharedOMP)
578 }
579 }
580#endif
581
583
585
586 repositories::finishSimulation();
587
589 repositories::DataRepository::shutdownDatatypes();
593
594 return ExitCodeSuccess;
595}
#define assertion(expr)
#define logError(methodName, logMacroMessageStream)
Wrapper macro around tarch::tarch::logging::Log to improve logging.
Definition Log.h:464
#define logDebug(methodName, logMacroMessageStream)
Definition Log.h:50
#define logWarning(methodName, logMacroMessageStream)
Wrapper macro around tarch::tarch::logging::Log to improve logging.
Definition Log.h:440
#define logInfo(methodName, logMacroMessageStream)
Wrapper macro around tarch::tarch::logging::Log to improve logging.
Definition Log.h:411
tarch::timing::Measurement gridConstructionMeasurement
Definition ccz4-main.cpp:54
int main(int argc, char **argv)
Main routine of the SPH code.
tarch::logging::Log _log("::")
tarch::timing::Measurement timeStepMeasurement
Definition ccz4-main.cpp:55
bool selectNextAlgorithmicStep()
Decide which step to run next.
Definition ccz4-main.cpp:67
tarch::timing::Measurement plotMeasurement
Definition ccz4-main.cpp:56
void step()
tarch::timing::Measurement timePerMeshSwepMeasurement
Definition ccz4-main.cpp:53
int getCurrentProgramStep() const
Definition Node.cpp:447
void setNextProgramStep(int number)
The user tells the set which program step to use, i.e.
Definition Node.cpp:441
static Node & getInstance()
This operation returns the singleton instance.
Definition Node.cpp:108
peano4::grid::GridStatistics getGridStatistics() const
Return statistics object for primary spacetree.
static SpacetreeSet & getInstance()
void traverse(peano4::grid::TraversalObserver &observer)
Invoke traverse on all spacetrees in parallel.
void switchProgramPhase(const std::string &activeProgramPhase)
static LogFilter & getInstance()
Log Device.
Definition Log.h:516
void writeToCSV(std::string filename="statistics")
Write data to csv file.
static Statistics & getInstance()
This is not the canonical realisation of singletons as I use it usually for stats in Peano.
bool isGlobalMaster() const
Is this node the global master process, i.e.
Definition Rank.cpp:419
static Rank & getInstance()
This operation returns the singleton instance.
Definition Rank.cpp:538
static void abort(int errorCode)
A proper abort in an MPI context has to use MPI_Abort.
Definition Rank.cpp:591
static Core & getInstance()
Definition Core.cpp:55
int getNumberOfThreads() const
Returns the number of threads that is used.
Definition Core.cpp:66
int getNumberOfErrors() const
Definition TestCase.cpp:11
void addTestCase(const std::string &fullQualifiedPath, TestCase *testCase)
Adds a new test case.
virtual void run()
Runs all test cases assigned.
double getAccumulatedValue() const
std::string toString() const
void setValue(const double &value)
Set the value.
A simple class that has to be included to measure the clock ticks required for an operation.
Definition Watch.h:45
double getCalendarTime()
This method returns the elapsed calendar time between the start and stop command of the timer,...
Definition Watch.cpp:74
void stop()
Stop timer.
Definition Watch.cpp:55
void start()
(Re)Start the Timer
Definition Watch.cpp:48
std::string toString(Filter filter)
Definition convert.cpp:170
tarch::tests::TestCase * getUnitTests()
Please destroy after usage.
Definition UnitTests.cpp:21
static const char * step
Definition otter.h:106
static const char * create_grid
Definition otter.h:119
static const char * init
Definition otter.h:116
static const char * plot
Definition otter.h:117
static const char * timestep
Definition otter.h:118
static const char * create_grid_converge
Definition otter.h:121
static const char * create_grid_no_refine
Definition otter.h:120
tarch::tests::TestCase * getUnitTests()
Please destroy after usage.
Definition UnitTests.cpp:11
void shutdownSingletons()
The very first thing I have to do is to shut down Node.
Definition peano.cpp:155
void fillLookupTables()
Fill Lookup Tables.
Definition peano.cpp:92
void runTestsAndBenchmarks()
Runs GPU Offloading tests, GPU Bandwidth benchmarks and prints the benchmark results.
Definition peano.cpp:163
int initParallelEnvironment(int *argc, char ***argv)
Init Parallel Environment.
Definition peano.cpp:106
void initSingletons(const tarch::la::Vector< Dimensions, double > &offset, const tarch::la::Vector< Dimensions, double > &width, const std::bitset< Dimensions > &periodicBC=0)
Fire up all the singletons.
Definition peano.cpp:138
void shutdownParallelEnvironment()
Shutdown all the parallel environment, i.e.
Definition peano.cpp:132
double max(double a, double b, double c)
I need the maximum of three values all the time, to I decided to write a function for this.
Definition Scalar.cpp:8
void shutdownSmartMPI()
Definition multicore.cpp:27
void initSmartMPI()
Switch on SmartMPI.
Definition multicore.cpp:11
tarch::tests::TestCase * getUnitTests()
Please destroy after usage.
Definition UnitTests.cpp:17
bool hasNonCriticalAssertionBeenViolated()
void shutdownNonCriticalAssertionEnvironment()
peano4::shutdownParallelEnvironment().
void initNonCriticalAssertionEnvironment()
Register the assertion tag from the global communicator.
tarch::tests::TestCase * getUnitTests()
Please destroy after usage.
Definition UnitTests.cpp:11
int getWeightOfHeaviestLocalSpacetree()
This is a helper routine which is used by ExaHyPE's default main for for example.
#define OTTER_FINALISE()
Definition otter.h:131
#define OTTER_TASK_WAIT_FOR(...)
Definition otter.h:142
#define OTTER_POOL_POP(...)
Definition otter.h:136
#define OTTER_TASK_END(...)
Definition otter.h:141
#define OTTER_INITIALISE()
Definition otter.h:130
#define OTTER_PHASE_SWITCH(...)
Definition otter.h:145
#define OTTER_TASK_START(...)
Definition otter.h:140
#define OTTER_DEFINE_TASK(...)
Definition otter.h:133
tarch::la::Vector< Dimensions, double > getMinH() const
Simple vector class.
Definition Vector.h:134