[Carpet] Carpet scheduling at evol
Erik Schnetter
schnetter at cct.lsu.edu
Sun Sep 9 18:44:39 CEST 2007
On Sep 7, 2007, at 13:40:29, Yosef Zlochower wrote:
> Hi,
>
> I have a question on the scheduling of routines at CCTK_EVOL when
> using carpet.
>
> Suppose I were to setup my thorn such that the three routines
>
> sub_local_1
> sub_level_2
> sub_local_3
>
> were executed in that order with PUGH (This is not necessarily
> accomplished in a straightforward way. The routines may be
> scheduled in different groups). I further specified the
> options: LOCAL for *_local_* routines, and LEVEL for the *_level_*
> routines.
> Now suppose that I have two levels of refinement (level 0,1) with
> level
> 1 having
> 2 components. Are the routines called in this order?
The scheduler calls all routines in level mode. If a routine is
scheduled in local mode, there will be a loop just around this
routine, looping over all components.
> cctk_iteration = 1;
>
> sub_local_1 (level=0, component=0)
> sub_level_2 (level=0)
> sub_local_3 (level=0, component=0)
>
> sub_local_1 (level=1, component=0)
> sub_level_2 (level=1)
> sub_local_3 (level=0, component=0)
> sub_local_1 (level=1, component=1)
> sub_local_3 (level=0, component=1)
>
> End of cctk_iteration = 1
No, this order looks incorrect. It should be instead
cctk_iteration = 1;
sub_local_1 (level=0, component=0)
sub_level_2 (level=0)
sub_local_3 (level=0, component=0)
sub_local_1 (level=1, component=0)
sub_local_1 (level=1, component=1)
sub_level_2 (level=1)
sub_local_3 (level=0, component=0)
sub_local_3 (level=0, component=1)
End of cctk_iteration = 1
Note that this assumes that all 3 routines are either called before
the fine grid recursion or after. If not, the order in which the
levels are called can differ. The loops over components are not
affected.
> Does the order depend on which groups the individual routines are
> scheduled in? Does it matter if a schedule group is controlled by
> a "while" expression?
No, the order does not depend on schedule groups. The schedule is
decided at startup and then kept fixed; the loops over components are
added later, at run time, when it is clear how many components there
are.
While loops are executed by the scheduler in level mode.
-erik
--
Erik Schnetter <schnetter at cct.lsu.edu>
My email is as private as my paper mail. I therefore support encrypting
and signing email messages. Get my PGP key from www.keyserver.net.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : /archives/developers/attachments/20070909/a3e86af3/attachment.pgp
More information about the developers
mailing list