[Carpet] Carpet scheduling question
Erik Schnetter
schnetter at cct.lsu.edu
Tue Aug 22 15:04:38 CEST 2006
On Aug 22, 2006, at 07:44:33, Thomas Radke wrote:
> Jonathan Thornburg wrote:
>> Hi, Erik,
>>
>> Suppose I write in a schedule.ccl
>>
>> schedule A in CCTK_POSTINITIAL
>> {
>> } "routine A"
>> schedule B in CCTK_POSTINITIAL after A
>> {
>> options: global
>> } "routine B"
>>
>> Consider a grid with 3 refinement levels and 1 component on each
>> level.
>>
>> Then (based on Thomas Radke's and my study of the Carpet source
>> code and
>> on your E-mail
>> http://lists.carpetcode.org/archives/developers/2006-May/
>> 001572.html
>> ) I believe this results in an execution sequence of
>> call A in local mode on level 2, component 0
>> call B in global mode
>> call A in local mode on level 1, component 0
>> call A in local mode on level 0, component 0
>>
>> My question is, is it possible to get an execution sequence of
>> call A in local mode on level 2, component 0
>> call A in local mode on level 1, component 0
>> call A in local mode on level 0, component 0
>> call B in global mode
>> and if so, how? Luca would like to do this for global reductions,
>> and
>> I think others would also be interested in this...
>
> Here my guess for a correct answer: routine A needs to be scheduled in
> global-loop-local mode, routine B after A in global mode.
Yes, this is correct. See e.g. AEIDevelopment/ADMMass for an example.
If you have just a few routines, then using the scheduler for this is
feasible. If you have more routines or more complicated scheduling
requirements, then you can also loop over levels or switch between
modes yourself. You can do this within your routine. You can also
view this as a "scheduling script" which you write in C++, making use
of the looping and mode management macros in Carpet's modes.hh. Such
a "script" (which is nothing more than a scheduled routine) is much
easier to read that a schedule.ccl.
You can also schedule groups or functions from such a script by
calling the Call*Group and Call*Function routines declared in
carpet_public.h.
Some restrictions apply.
-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/20060822/ba155fd3/attachment.pgp
More information about the developers
mailing list