Next: The Schedule Block
Up: Scheduling
Previous: Groups
Contents
Schedule Options
The options define various characteristics of the schedule item.
- AS
- This assigns a new name to a function for scheduling purposes. This
is used, for instance, to allow a thorn to schedule something before
or after a routine from another implementation; two thorns providing this
implementation can schedule a routine AS the same thing, thus
allowing other thorns to operate independently of which one is active.
- WHILE
- This specifies a CCTK_INT grid scalar which is used to
control the execution of this item. As long as the grid scalar has
a nonzero value, the schedule item will be executed repeatedly. This
allows dynamic behaviour with scheduling.
- IF
- This specifies a CCTK_INT grid scalar which is used to
control the execution of this item. If the grid scalar has a
nonzero value, the schedule item will be executed, otherwise the item
will be ignored. This allows dynamic behaviour with scheduling.
If both an IF and a WHILE clause are present, then
the schedule is executed according to the following pseudocode:
IF condition
WHILE condition
SCHEDULE item
END WHILE
END IF
- BEFORE or AFTER
- These specify either
- a function or group before or after which this item will be
scheduled, or
- a list of functions and/or groups; this item will be scheduled
(once) before any of them or after all of them respectively.
Note that a single schedule item may have multiple BEFORE
and/or AFTER options; the scheduler will honor all of these
(or abort with a fatal error). For example,
schedule FOO BEFORE A BEFORE B BEFORE C ...
schedules FOO before any of A, B, or C.
This can also be written
schedule FOO BEFORE (A B C) ...
Note that the set of all BEFORE/AFTER options in
all active schedule blocks of all active thorns, must specify
a (directed) graph with no cycles; if there are any cycles, then the
scheduler will abort with a fatal error.
Next: The Schedule Block
Up: Scheduling
Previous: Groups
Contents
|