Peano
Loading...
Searching...
No Matches
peano4.api.taskgraph.Task.Task.GridEntity Class Reference

Which kind of mesh entity a Task works on. More...

Inheritance diagram for peano4.api.taskgraph.Task.Task.GridEntity:
Collaboration diagram for peano4.api.taskgraph.Task.Task.GridEntity:

Public Member Functions

bool is_global (self)
 True for GLOBAL, GLOBAL_START_OF_STEP and GLOBAL_END_OF_STEP.

Static Public Attributes

int VERTEX = 1
int FACE = 2
int CELL = 3
int GLOBAL = 4
int GLOBAL_START_OF_STEP = 5
int GLOBAL_END_OF_STEP = 6

Detailed Description

Which kind of mesh entity a Task works on.

GLOBAL tasks do not work on any mesh entity at all. They only plug into prepareTraversal()/unprepareTraversal(), i.e. they realise global (per rank) activities such as triggering the load balancing. They therefore may not declare any cell, face or vertex data, may not repeat. Task graph compilers which fuse tasks append a GLOBAL task to the traversal holding its last dependency (peano4.api.taskgraph.compiler.FuseSteps.translate()). Other tasks may depend on a GLOBAL task. The compiler then does not fuse them into the traversal of the GLOBAL task, as the latter acts in the prepare and unprepare events of this traversal: they run in a later mesh sweep.

GLOBAL_START_OF_STEP and GLOBAL_END_OF_STEP are GLOBAL tasks that are tied to the beginning and the end of the whole task graph rather than to the traversal of their dependencies. Both do not require a mesh traversal of their own:

  • A GLOBAL_START_OF_STEP task runs first, i.e. its action sets are the first ones of the first traversal. It may not depend on any task. Other tasks may depend on it, but this is trivial.
  • A GLOBAL_END_OF_STEP task runs last, i.e. its action sets are the last ones of the last traversal, after all other tasks including the other GLOBAL tasks. Other GLOBAL_END_OF_STEP tasks may depend on it, which orders them among each other. A typical example is the global CFL condition, which reduces data in unprepareTraversal() only. If a task that is not an end-of-step task depends on it, it cannot run at the very end of the step. It then ends the traversal of its last dependency, as a GLOBAL task does, and the dependent task runs in a later traversal (peano4.api.taskgraph.Graph.Graph.anchored_end_of_step_tasks()).

Task graph compilers that do not fuse tasks guarantee the same order (peano4.api.taskgraph.Graph.Graph.ordered_tasks()).

Definition at line 114 of file Task.py.

Member Function Documentation

◆ is_global()

bool peano4.api.taskgraph.Task.Task.GridEntity.is_global ( self)

True for GLOBAL, GLOBAL_START_OF_STEP and GLOBAL_END_OF_STEP.

Definition at line 163 of file Task.py.

Field Documentation

◆ CELL

int peano4.api.taskgraph.Task.Task.GridEntity.CELL = 3
static

Definition at line 157 of file Task.py.

◆ FACE

int peano4.api.taskgraph.Task.Task.GridEntity.FACE = 2
static

Definition at line 156 of file Task.py.

◆ GLOBAL

int peano4.api.taskgraph.Task.Task.GridEntity.GLOBAL = 4
static

Definition at line 158 of file Task.py.

◆ GLOBAL_END_OF_STEP

int peano4.api.taskgraph.Task.Task.GridEntity.GLOBAL_END_OF_STEP = 6
static

Definition at line 160 of file Task.py.

◆ GLOBAL_START_OF_STEP

int peano4.api.taskgraph.Task.Task.GridEntity.GLOBAL_START_OF_STEP = 5
static

Definition at line 159 of file Task.py.

◆ VERTEX

int peano4.api.taskgraph.Task.Task.GridEntity.VERTEX = 1
static

Definition at line 155 of file Task.py.


The documentation for this class was generated from the following file: