charm AT lists.siebelschool.illinois.edu
Subject: Charm++ parallel programming system
List archive
- From: Phil Miller <mille121 AT illinois.edu>
- To: Nikhil Jain <nikhil.life AT gmail.com>
- Cc: Charm Mailing List <charm AT cs.illinois.edu>
- Subject: Re: [charm] [ppl-local] Q on Entry method
- Date: Fri, 28 Dec 2012 13:29:01 -0600
- List-archive: <http://lists.cs.uiuc.edu/pipermail/charm/>
- List-id: CHARM parallel programming system <charm.cs.uiuc.edu>
On Fri, Dec 28, 2012 at 1:04 PM, Nikhil Jain
<nikhil.life AT gmail.com>
wrote:
> On 12/28/12 1:00 PM, "Miller, Philip B"
> <mille121 AT illinois.edu>
> wrote:
>
>>On Fri, Dec 28, 2012 at 12:59 PM, Nikhil Jain
>><nikhil.life AT gmail.com>
>>wrote:
>>> Can an entry method, Method A, defined in sdag function Method B using
>>> "when" construct be invoked when a chare's code flow is not inside
>>>Method B?
>>> Generalizing the question, can a chare have two active code sections
>>>one
>>> of which can be a sdag method waiting for message, and the second can be
>>> either a method defined inside sdag using when, another sdag method or a
>>> non-sdag entry method.
>>
>>Yes, to all of that.
>
> If the answer is yes, how does sdag differentiates among message meant for
> the currently executed sdag function (from user's logical view), and an
> independent function that should be invoked regardless of state in sdag
> flow.
The message delivered to method A is buffered until control flow in
method B reaches a 'when A(msg* m)' statement. If control has already
reached than, then A executes when the message gets delivered.
You can in some sense view a call to SDAG-defined method B as creating
a thread of execution inside a chare. It has access to shared state -
the chare's member variables - but its own flow of control. As the
thread encounters when statements, it either finds them already
satisfied with a delivered message, and continues forward execution,
or it blocks to await the arrival. A's body can only execute when
there's a flow of control that's reached it.
- Re: [charm] [ppl-local] Q on Entry method, Phil Miller, 12/28/2012
Archive powered by MHonArc 2.6.16.