Skip to Content.
Sympa Menu

charm - Re: [charm] [ppl] [ppl-local] Q on Entry method

charm AT lists.cs.illinois.edu

Subject: Charm++ parallel programming system

List archive

Re: [charm] [ppl] [ppl-local] Q on Entry method


Chronological Thread 
  • From: "Kale, Laxmikant V" <kale AT illinois.edu>
  • To: "Miller, Philip B" <mille121 AT illinois.edu>, Nikhil Jain <nikhil.life AT gmail.com>
  • Cc: Charm Mailing List <charm AT cs.illinois.edu>
  • Subject: Re: [charm] [ppl] [ppl-local] Q on Entry method
  • Date: Sat, 29 Dec 2012 01:18:23 +0000
  • Accept-language: en-US
  • List-archive: <http://lists.cs.uiuc.edu/pipermail/charm/>
  • List-id: CHARM parallel programming system <charm.cs.uiuc.edu>

And to cover another case: you should not haver a single method occur in
when blocks of two different sdag entry methods. (please confirm, and add
to documentation, one of you).


On 12/29/12 1:25 AM, "Phil Miller"
<mille121 AT illinois.edu>
wrote:

>On Fri, Dec 28, 2012 at 1:43 PM, Nikhil Jain
><nikhil.life AT gmail.com>
>wrote:
>> I think you have mis-interpreted my question - I knew how SDAG works.
>>The
>> question is different - let me try to rephrase it.
>>
>> 1 When a sdag method is being executed (which in turn is a series of
>> expected message flow), can a method which is not the next method as per
>> sdag flow be executed? If yes, what is restriction on such a message (am
>> sure at least it can't be a method which appears in the message flow of
>> sdag - how does Charm know?).
>
>Yes, other methods can execute. The runtime delivers a message to a
>particular entry method. That entry method's body runs.
>
>If the entry method was defined by the developer in a block of C++
>code, then there's no constraint - that block of C++ code will execute
>when the message gets delivered. SDAG doesn't say anything about
>methods it wasn't used to define.
>
>If the entry method was defined by a when clause in SDAG, then charmxi
>generated code *in that entry method* to decide what to do when a
>message gets delivered to it. If a flow of control has reached it, the
>flow of control proceeds through the subsequent block of code. If a
>flow of control hasn't reached it, then the generated code buffers the
>message. In a sense, a when clause is like a blocking receive - both
>the incoming message and the local flow of control have to reach it
>before code following it executes.
>
>All of this is handled by generated code in the chare's entry methods.
>None of it is handled by the runtime. You can see all of this code
>(it's not too hard to follow) in the generated def.h file for some
>chare class with SDAG code.
>
>> 2 If an sdag method is not being executed, can an entry method which is
>> defined using "when" inside an sdag method be executed? If yes, what if
>> the message which triggered the execution was meant for consumption in
>>an
>> sdag method which would have been invoked soon the chare - is it
>> programmer's responsibility to ensure that it doesn't happen?
>
>As described above, the entry method *will* execute. The first thing
>in its body is a check whether there's any trigger waiting on it. If
>there isn't, the generated code buffers the message so that a future
>trigger might find it. That is the essence of what SDAG provides -
>sequential flow of control.
>_______________________________________________
>charm mailing list
>charm AT cs.uiuc.edu
>http://lists.cs.uiuc.edu/mailman/listinfo/charm
>_______________________________________________
>ppl mailing list
>ppl AT cs.uiuc.edu
>http://lists.cs.uiuc.edu/mailman/listinfo/ppl






Archive powered by MHonArc 2.6.16.

Top of Page