|
Peano
|
Functions | |
| bool | isValid (Invariant policy, bool workOnParticle, bool particleIsLocal, int numberOfUpdates, int numberOfMaskOuts) |
| Is current state that's to be updated valid. | |
| bool | previousStepsAllHaveToAccessAtLeastOnce (Invariant policy) |
| Do all previous steps have to alter state at least once. | |
| int | firstFutureStepThatHasToBeCleared (Invariant policy, int numberOfSteps) |
| Which future steps should be checked. | |
| template<typename Particle > | |
| static std::string | outputParticle (const Particle *particle, PAlgorithmStepEnum< Particle > algorithmStep, PSweepStageEnum< Particle > sweepStageMarkerEnum, const int errors) |
| This function is meant to be called on a particle on which dependency issues in the main algorithm steps have been detected. | |
| template<typename Particle > | |
| static std::string | outputParticle (const Particle *particle, PInitStepEnum< Particle > algorithmStep, PSweepStageEnum< Particle > sweepStageMarkerEnum, const int errors) |
| int | checkPastStages (Invariant policy, bool isLocal, const int currentStep, const int currentStage, const int nsteps, const int nstages, const int *sweepStateProgression) |
| Check that all previous steps and stages. | |
| int | checkFutureStages (Invariant policy, const int currentStep, const int currentStage, const int nsteps, const int nstages, const int *sweepStateProgression) |
| Check that all steps and stages after the current one have not been done yet. | |
| int exaparty::dependencychecks::internal::checkFutureStages | ( | Invariant | policy, |
| const int | currentStep, | ||
| const int | currentStage, | ||
| const int | nsteps, | ||
| const int | nstages, | ||
| const int * | sweepStateProgression | ||
| ) |
Check that all steps and stages after the current one have not been done yet.
| currentStep | integer value of the current algorithm step |
| currentStage | integer value of the current sweep stage |
| nsteps | Total number of algorithm steps |
| nstages | Total number of sweep stages |
| sweepStateProgression | integer array carrying flags/counters of completed sweep stages and algorithm steps of a particle |
| int exaparty::dependencychecks::internal::checkPastStages | ( | Invariant | policy, |
| bool | isLocal, | ||
| const int | currentStep, | ||
| const int | currentStage, | ||
| const int | nsteps, | ||
| const int | nstages, | ||
| const int * | sweepStateProgression | ||
| ) |
Check that all previous steps and stages.
If we are given a non-local particle, we can only check the current stage and see if it has not been touched at all. Particles may change their state between two steps, so we cannot really say anything about
If the policy says previousStepsAllHaveToAccessAtLeastOnce(), Ibefore the current one have been completed.
| currentStep | integer value of the current algorithm step |
| currentStage | integer value of the current sweep stage |
| nsteps | Total number of algorithm steps |
| nstages | Total number of sweep stages |
| sweepStateProgression | integer array carrying flags/counters of completed sweep stages and algorithm steps of a particle |
| int exaparty::dependencychecks::internal::firstFutureStepThatHasToBeCleared | ( | Invariant | policy, |
| int | numberOfSteps | ||
| ) |
Which future steps should be checked.
This routine returns the relative step in the future which has to be cleared at this point (so no updated or masked out marker set). Invoked in the Nth step and return n, we check all steps starting from N+n if they are cleared.
If you return 0, then this implies that all future steps have to be cleared. If you return numberOfSteps, we don't check any future step.
| bool exaparty::dependencychecks::internal::isValid | ( | Invariant | policy, |
| bool | workOnParticle, | ||
| bool | particleIsLocal, | ||
| int | numberOfUpdates, | ||
| int | numberOfMaskOuts | ||
| ) |
Is current state that's to be updated valid.
This routine is called by the mark operations after(!) it has altered the two counters numberOfUpdates and numberOfMaskOuts. The actual validation usually is enforced by assertions, but this has to happen outside. The routine here only determines if a state is valid or not.
|
static |
This function is meant to be called on a particle on which dependency issues in the main algorithm steps have been detected.
If the consistency checks fail, this routine should be used to write the full current state of a problematic particle to screen. After that, the routine aborts.
It is important that we use the log functionality of tarch::logging, as it allows us to distinguish from which rank messages come from. It also enables us to integrate the messages into mainstream performance analysis workflows.
Even though it might seem to be appealing, the output routine may not contain any assertion: We use it within assertions, so if there's another assertion in there, we won't get the full output.
I originally inserted some assertions of the type
into the source code. While this seems to be convenient (check that there's no garbage here), it is the wrong place to add these assertions: If an assertion fails due to garbage somewhere and wants to plot the particle status, then the plotting itself should not raise yet another assertion. Therefore, I now dump the value as "invalid" and outsource the actual consistency check ensuring that a value is not invalid to checkFutureStages() and checkPastStages().
| particle | the problematic particle |
| algorithmStepMarkerEnum | Enum representing algorithm step particle is currently in |
| sweepStageMarkerEnum | Enum representing traversal sweep stage particle is currently in |
| errors | Number of errors that have been detected. If errors == 0, this function can be used to just print out the current state, and won't abort when finished. |
| call_identifier | Additional information on which dependency check failed to be printed to screen before exiting. |
|
static |
| bool exaparty::dependencychecks::internal::previousStepsAllHaveToAccessAtLeastOnce | ( | Invariant | policy | ) |
Do all previous steps have to alter state at least once.