[Carpet] when does Carpet call scheduled routines?

Erik Schnetter schnetter at cct.lsu.edu
Mon May 1 02:01:57 CEST 2006


On Apr 30, 2006, at 09:23:40, Jonathan Thornburg wrote:

> Hi, Erik,
>
> In a previous message, I wrote
>> I'm confused about when Carpet scheduled routines which are scheduled
>> in other than local mode.  I had thought that Carpet's basic  
>> algorithm
>> was this:
> [[...]]
>> However, this doesn't seem to match Carpet's actual behavior.
>> Can you tell me what Carpet's algorithm actually is, preferably at a
>> roughly similar level of abstraction to what I wrote above?
>
> To give a specific context for my questions, attached is a tarball of
> a toy test thorn I've written, whose behavior I don't understand.

The main problem with this thorn's schedule.ccl is that it tries to  
control schedule items with variables that are set in global mode.   
The Berger-Oliger algorithm requires that one uses level mode for  
this.  All schedule items are executed independently on each  
refinement level, since the refinement levels are evolved  
independently (sequentially).

The implicit "if" statement around the global mode routines make it  
that your loop condition is not properly set up, hence you see an  
infinite loop.

The schedule statements like "after", "before", "while" etc. are  
handled by the flesh, not by the driver, and they are implicitly  
handled in level mode.  This is similar to the I/O routines, which  
are also called by the flesh, hence implicitly in level mode.  The  
scheduler in the flesh does not know about mesh refinement -- and  
since changing the scheduler was not feasible when this part of  
Carpet was designed, I had to resort to introducing these modes.  And  
since the time evolution in the Berger-Oliger scheme happens level by  
level, the driver calls the scheduler always in level mode.

Note that you can execute schedule bins from C code by calling  
functions like CallScheduleGroup.  Such functions can easily be  
written for every driver.  This gives you more control, and allows  
you to describe complex control logic rather easily in C code, which  
is much more readable than a large set of interdependent schedule items.

-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/20060430/1ad07a31/attachment.pgp 


More information about the developers mailing list