Peano
Loading...
Searching...
No Matches
exaparty.api.graphcompiler.TaskGraph Namespace Reference

Functions

 translate_one_step_of_species_into_mesh_traversal (step, current_species_set, mesh_traversals, alter_particle_position, use_continuous_particles_sequences, StepType step_type, verbose, synchronise_task_graph_after_each_mesh_sweep=True)
 Translate one step of species into mesh traversal.
 
 map_onto_separate_mesh_traversals_constructing_task_graph (sequence_of_steps, ParticleSortingAndStorage particle_sorting_and_storage, StepType step_type, verbose)
 Simpest graph compiler constructing a task tree.
 
 add_clear_task_number_to_very_first_initialisation_step (algorithm_steps, species_sets, verbose)
 Take set of mesh run throughs (algorithm steps) and add clear task number action set.
 
 initialisation_steps_onto_task_graph_multiscale_sort_scattered_memory (species_sets, verbose)
 
 initialisation_steps_onto_task_graph_bucket_sort_scattered_memory (species_sets, verbose)
 
 initialisation_steps_onto_task_graph_multiscale_sort_coalesced_memory (species_sets, verbose)
 
 initialisation_steps_onto_task_graph_bucket_sort_coalesced_memory (species_sets, verbose)
 
 particle_steps_onto_task_graph_multiscale_sort_scattered_memory (species_sets, verbose)
 For a sequential ordering, i.e.
 
 particle_steps_onto_task_graph_bucket_sort_scattered_memory (species_sets, verbose)
 For a sequential ordering, i.e.
 
 particle_steps_onto_task_graph_multiscale_sort_coalesced_memory (species_sets, verbose)
 For a sequential ordering, i.e.
 
 particle_steps_onto_task_graph_bucket_sort_coalesced_memory (species_sets, verbose)
 For a sequential ordering, i.e.
 

Function Documentation

◆ add_clear_task_number_to_very_first_initialisation_step()

exaparty.api.graphcompiler.TaskGraph.add_clear_task_number_to_very_first_initialisation_step (   algorithm_steps,
  species_sets,
  verbose 
)

Take set of mesh run throughs (algorithm steps) and add clear task number action set.

Usually called on initialisation routines.

Definition at line 358 of file TaskGraph.py.

◆ initialisation_steps_onto_task_graph_bucket_sort_coalesced_memory()

exaparty.api.graphcompiler.TaskGraph.initialisation_steps_onto_task_graph_bucket_sort_coalesced_memory (   species_sets,
  verbose 
)
See also
map_onto_separate_mesh_traversals()
Parameters
concatenate_steps_of_species[Species] Sequence of particle species to be handled.
verbose{True, False}

Definition at line 473 of file TaskGraph.py.

References exaparty.api.graphcompiler.TaskGraph.map_onto_separate_mesh_traversals_constructing_task_graph().

Here is the call graph for this function:

◆ initialisation_steps_onto_task_graph_bucket_sort_scattered_memory()

exaparty.api.graphcompiler.TaskGraph.initialisation_steps_onto_task_graph_bucket_sort_scattered_memory (   species_sets,
  verbose 
)
See also
map_onto_separate_mesh_traversals()
Parameters
concatenate_steps_of_species[Species] Sequence of particle species to be handled.
verbose{True, False}

Definition at line 421 of file TaskGraph.py.

References exaparty.api.graphcompiler.TaskGraph.map_onto_separate_mesh_traversals_constructing_task_graph().

Here is the call graph for this function:

◆ initialisation_steps_onto_task_graph_multiscale_sort_coalesced_memory()

exaparty.api.graphcompiler.TaskGraph.initialisation_steps_onto_task_graph_multiscale_sort_coalesced_memory (   species_sets,
  verbose 
)
See also
map_onto_separate_mesh_traversals()
Parameters
concatenate_steps_of_species[Species] Sequence of particle species to be handled.
verbose{True, False}

Definition at line 447 of file TaskGraph.py.

References exaparty.api.graphcompiler.TaskGraph.map_onto_separate_mesh_traversals_constructing_task_graph().

Here is the call graph for this function:

◆ initialisation_steps_onto_task_graph_multiscale_sort_scattered_memory()

exaparty.api.graphcompiler.TaskGraph.initialisation_steps_onto_task_graph_multiscale_sort_scattered_memory (   species_sets,
  verbose 
)
See also
map_onto_separate_mesh_traversals()
Parameters
concatenate_steps_of_species[Species] Sequence of particle species to be handled.
verbose{True, False}

Definition at line 387 of file TaskGraph.py.

References exaparty.api.graphcompiler.TaskGraph.map_onto_separate_mesh_traversals_constructing_task_graph().

Here is the call graph for this function:

◆ map_onto_separate_mesh_traversals_constructing_task_graph()

exaparty.api.graphcompiler.TaskGraph.map_onto_separate_mesh_traversals_constructing_task_graph (   sequence_of_steps,
ParticleSortingAndStorage  particle_sorting_and_storage,
StepType  step_type,
  verbose 
)

Simpest graph compiler constructing a task tree.

This graph compiler is very very similar to Sequential.map_onto_separate_mesh_traversals(). It runs over the tree and generates one task per touchVertexFirstTime(), touchCellFirstTime() and touchVertexLastTime(). We end up with a task graph that resembles an overlay of a task tree and the graph belonging to a Cartesian mesh with a vertex-cell-vertex update sequence.

Whenever we spawn a task, we first generate a new task id. This is the number of this task which we store within the task and which the task has to free eventually. We also store this task within the associated mesh entity (vertex or cell) and hence can use the tree as a lookup mechanism of the task dependencies. That is, the indices within the tree are exclusively used for lookups and not for any semantics.

Realisation

This routine is actually a pure forward delegation. The actual tasking is injected by passing in translate_one_step_of_species_into_mesh_traversal() as functor. Therefore, this routine holds more information on the actual task semantics.

Parameters
sequence_of_steps[(Species,Step)] Sequence of tuples each consisting of one species and one step. Typically constructed through functions within SpeciesStepOrdering.py.
particle_sortingParticleSorting
observer_preambleString Usually people pass in "Init" or "Step" here to distinguish observers for the initialisation from the actual particle update steps.
verbose{True, False}
Returns
mesh_traversals

Definition at line 301 of file TaskGraph.py.

Referenced by exaparty.api.graphcompiler.TaskGraph.initialisation_steps_onto_task_graph_bucket_sort_coalesced_memory(), exaparty.api.graphcompiler.TaskGraph.initialisation_steps_onto_task_graph_bucket_sort_scattered_memory(), exaparty.api.graphcompiler.TaskGraph.initialisation_steps_onto_task_graph_multiscale_sort_coalesced_memory(), exaparty.api.graphcompiler.TaskGraph.initialisation_steps_onto_task_graph_multiscale_sort_scattered_memory(), exaparty.api.graphcompiler.TaskGraph.particle_steps_onto_task_graph_bucket_sort_coalesced_memory(), exaparty.api.graphcompiler.TaskGraph.particle_steps_onto_task_graph_bucket_sort_scattered_memory(), exaparty.api.graphcompiler.TaskGraph.particle_steps_onto_task_graph_multiscale_sort_coalesced_memory(), and exaparty.api.graphcompiler.TaskGraph.particle_steps_onto_task_graph_multiscale_sort_scattered_memory().

Here is the caller graph for this function:

◆ particle_steps_onto_task_graph_bucket_sort_coalesced_memory()

exaparty.api.graphcompiler.TaskGraph.particle_steps_onto_task_graph_bucket_sort_coalesced_memory (   species_sets,
  verbose 
)

For a sequential ordering, i.e.

1:1 mapping of steps per species onto traversals, it makes no real difference how we order the progress through the individual steps. So I just concatenate the steps per species.

See also
map_onto_separate_mesh_traversals()
Parameters
concatenate_steps_of_species[Species] Sequence of particle species to be handled.
verbose{True, False}

Definition at line 577 of file TaskGraph.py.

References exaparty.api.graphcompiler.TaskGraph.map_onto_separate_mesh_traversals_constructing_task_graph().

Here is the call graph for this function:

◆ particle_steps_onto_task_graph_bucket_sort_scattered_memory()

exaparty.api.graphcompiler.TaskGraph.particle_steps_onto_task_graph_bucket_sort_scattered_memory (   species_sets,
  verbose 
)

For a sequential ordering, i.e.

1:1 mapping of steps per species onto traversals, it makes no real difference how we order the progress through the individual steps. So I just concatenate the steps per species.

See also
map_onto_separate_mesh_traversals()
Parameters
concatenate_steps_of_species[Species] Sequence of particle species to be handled.
verbose{True, False}

Definition at line 525 of file TaskGraph.py.

References exaparty.api.graphcompiler.TaskGraph.map_onto_separate_mesh_traversals_constructing_task_graph().

Here is the call graph for this function:

◆ particle_steps_onto_task_graph_multiscale_sort_coalesced_memory()

exaparty.api.graphcompiler.TaskGraph.particle_steps_onto_task_graph_multiscale_sort_coalesced_memory (   species_sets,
  verbose 
)

For a sequential ordering, i.e.

1:1 mapping of steps per species onto traversals, it makes no real difference how we order the progress through the individual steps. So I just concatenate the steps per species.

See also
map_onto_separate_mesh_traversals()
Parameters
concatenate_steps_of_species[Species] Sequence of particle species to be handled.
verbose{True, False}

Definition at line 551 of file TaskGraph.py.

References exaparty.api.graphcompiler.TaskGraph.map_onto_separate_mesh_traversals_constructing_task_graph().

Here is the call graph for this function:

◆ particle_steps_onto_task_graph_multiscale_sort_scattered_memory()

exaparty.api.graphcompiler.TaskGraph.particle_steps_onto_task_graph_multiscale_sort_scattered_memory (   species_sets,
  verbose 
)

For a sequential ordering, i.e.

1:1 mapping of steps per species onto traversals, it makes no real difference how we order the progress through the individual steps. So I just concatenate the steps per species.

See also
map_onto_separate_mesh_traversals()
Parameters
concatenate_steps_of_species[Species] Sequence of particle species to be handled.
verbose{True, False}

Definition at line 499 of file TaskGraph.py.

References exaparty.api.graphcompiler.TaskGraph.map_onto_separate_mesh_traversals_constructing_task_graph().

Here is the call graph for this function:

◆ translate_one_step_of_species_into_mesh_traversal()

exaparty.api.graphcompiler.TaskGraph.translate_one_step_of_species_into_mesh_traversal (   step,
  current_species_set,
  mesh_traversals,
  alter_particle_position,
  use_continuous_particles_sequences,
StepType  step_type,
  verbose,
  synchronise_task_graph_after_each_mesh_sweep = True 
)

Translate one step of species into mesh traversal.

We create a new step and then add various different action sets depending on the context and behaviour. Once befilled, the new step is appended to mesh_traversals.

  1. If this is an initialisation sequence, then I clear all the task markers. This is to ensure that they do not hold any garbage. I can clear the set as often as I want. It is just important that I clear it at least once per particle species.
  2. Update the task markers. This is something each and every step in Peano does. As we inject the update into each and every action set, we become independent of the AMR and when it is actually realised.
  3. Pick computational kernel. This is where the actual computation per step is done. We have two fundamentally different kernels: one keeps track of (multiscale) neighbours, while the other just updates the particles within the octant (cell).
  4. If an action set alters the position or cut-off of a particle, then we append True to alter_particle_position. Otherwise, we append False. This is decided from step.effect, i.e. whether it is one of the CHANGE_POSITION_OR_INTERACTION_RADIUS(_AND_MIGHT_RERUN) variants.
    See also
    AlgorithmStep.may_trigger_rerun()
    Here's where the action set differs completely from the Sequential graph compiler. If we change a position, we erase all the task indices from the tree.

In general, we never assign any index to touchCellLastTime(), as ExaParty does not only one type of plug-in points. This is actually touchCellFirstTime() in the realisation, so one might be tempted to mask out touchCellLastTime() and only use task indices for touchCellFirstTime(). However, we have to plug into touchVertexLastTime(), too, and this one has to know about events within the adjacent cells. The action set AssignTaskNumbersToMesh memorises the touchCellLastTime() indices within the vertices, to we use the numbers from touchCellLastTime() but actually plug into touchCellFirstTime().

Parameters
current_species_setParticle You get a specific algorithmic step as input. The current_species_set highlights to which this step originally belonged to.
mesh_traversals[peano4.api.solversteps.Step] Inout parameter. We append a new step to this sequence.
alter_particle_position[Bool] Inout parameter. We append a new marker to this sequence.
synchronise_task_graph_after_each_mesh_sweepBool If set, the arising action set ill call a tarch::multicore::waitForAllTasks() after each mesh traversal.

Use it to construct task graphs

The routine is not expected to have an argument synchronise_task_graph_after_each_mesh_sweep in Sequential. But I want to use the routines from Sequential. So I give this value a default value. This way, I can reuse the routine in TaskGraph, where I simply redefine the default.

Definition at line 28 of file TaskGraph.py.

Referenced by exaparty.api.graphcompiler.MultisweepTaskGraph.translate_one_step_of_species_into_mesh_traversal().

Here is the caller graph for this function: