[Carpet] when does Carpet call scheduled routines?

Jonathan Thornburg jthorn at aei.mpg.de
Tue May 2 20:12:52 CEST 2006


Hi, Erik,

You wrote (with line numbers added so I can refer to things below)

1> do-meta-mode = true
2> loop over all models
3>     do-global-mode = true
4>     walk over all levels using the Berger-Oliger scheme
5>        foreach scheduled routine S encountered as we walk the schedule tree

I'm still a bit unsure about how these walks (your lines 4 and 5)
interact with the Cactus schedule as specified in schedule.ccl.

As I now understand it, ignoring multi-models (which you explained
clearly in a previous msg) the top-level control (= walking-sequence
of schedule bins) is that of your line 4, described in detail in
  Carpet/doc/schedule.tex .

Then within each schedule bin, the flesh topological-sorts scheduled
routines based on BEFORE, AFTER, and WHILE clauses as specified in
the union of all active thorns' schedule.ccl files.  This gives a
sequence of scheduled routines.

This is then precisely the sequence which your line 5 loops over.

Is this correct?


>           select case (S.schedule_options)
>           case (META)
>              if (do-meta-mode)
>                 call S in META mode
>           case (GLOBAL)
>              if (do-global-mode)
>                 call S on model M in GLOBAL mode
>           case (LEVEL)
>              call S on model M, level L, in LEVEL mode
>           case (SINGLEMAP)
>              foreach patch P in model M, level L
>                 call S on model M, level L, patch P, in SINGLEMAP mode
>           case (LOCAL)
>              foreach patch P in model M, level L
>                 foreach component C in model M, level L, patch P
>                    call S on model M, level L, patch P, component C 
> in LOCAL mode
>        do-global-mode = false
>     do-meta-mode = false
> 
> 
> 
> This does not yet take the LOOP-* modes into account.  They are 
> straightforward; I don't give the full algorithm because it would 
> take too much space and not be enlightening.  You can generate the 
> full algorithm according to:
> 
> If there is a LOOP-Y mode in addition to an X mode, then replace
> 
>     call S in X mode
> 
> by
> 
>     foreach ...
>        foreach ...
>           call S in Y mode
> 
> with the appropriate number and kind of foreach statements to get 
> from X mode to Y mode.

If I order the modes META > GLOBAL > LEVEL > SINGLEMAP > LOCAL,
then is it correct to say that
   OPTIONS: X LOOP-Y
is only meaningful when Y < X?

If X <= LEVEL, then the semantics seem to be identical to
   OPTIONS: Y
Is this correct?


thanks, ciao,

-- 
-- Jonathan Thornburg <jthorn at aei.mpg.de>
    Max-Planck-Institut fuer Gravitationsphysik (Albert-Einstein-Institut),
    Golm, Germany, "Old Europe"     http://www.aei.mpg.de/~jthorn/home.html
    "Washing one's hands of the conflict between the powerful and the
     powerless means to side with the powerful, not to be neutral."
                                       -- quote by Freire / poster by Oxfam




More information about the developers mailing list