charm AT lists.siebelschool.illinois.edu
Subject: Charm++ parallel programming system
List archive
- From: Phil Miller <mille121 AT illinois.edu>
- To: Jozsef Bakosi <jbakosi AT gmail.com>
- Cc: "charm AT cs.uiuc.edu" <charm AT cs.uiuc.edu>
- Subject: Re: [charm] Multiple uses of a trigger in SDAG
- Date: Fri, 2 Sep 2016 15:50:44 -0500
In short: each call to an entry method defined by a when clause will match to exactly one dynamic instance. If you have two "when A_ready()" clauses actively waiting for calls to A_ready(), it will take two calls to A_ready() on that chare to satisfy both of them.
On Fri, Sep 2, 2016 at 3:47 PM, Jozsef Bakosi <jbakosi AT gmail.com> wrote:
Hi folks,Is it possible to use a trigger multiple times in SDAG?Down below is a simplified example of performing a iteration, e.g., time stepping.Can I realistically assume that both use_AndB() and use_AandBandC() will beexecuted? Worded in another way: Is it okay to reuse the same triggers,A_ready() and B_ready(), in both when statements?I suspect the short answer is no, because in the past in similar situations Ihad to place A_ready() and B_ready() in use_AandB() and/or use_AandBandC()to reactivate the trigger for the other when statement, but that does notseem like the it always does what I want. If I don't reactivate, I get a deadlock. I'm prettysure I'm using this incorrectly, also because this approach does not scale well as triggersare reused.Is this the proper way to think about this? Most likely not. I suspect I should not attempt toreuse the same trigger multiple times and messing with reactivtation and justcreate new triggers that are used once.Can someone please explain this?Thanks,Jozsef----------group worker {entry void prepareA();entry void prepareB();entry void prepareC();entry void wait4_AandB() {when A_ready(), B_ready() serial {use_AandB();}};entry void wait4_AandBandC() {when A_ready(), B_ready(), C_ready() serial {use_AandBandC();}};entry void A_ready();entry void B_ready();entry void C_ready();}worker.C:---------void worker::getready() {wait4_AandB();wait4_AandBandC();}void worker::prepareA() {prepare_A();A_ready();}void worker::prepareB() {prepare_B();B_ready();}void worker::prepareC() {prepare_C();C_ready();}void worker::use_AandB() {callback2host();}void worker::use_AandBandC() {callback2host_someotherway();}Host object spawning work:--------------------------void dowork() {workerproxy.getready(); // not an entry method (not async)workerproxy.prepareA(); // entry method calls (all async)workerproxy.prepareB();workerproxy.prepareC();}void domorework() {if (need to do more work based oncallback2host() and callback2host_someotherway() )dowork();elsequit();}
- [charm] Multiple uses of a trigger in SDAG, Jozsef Bakosi, 09/02/2016
- Re: [charm] Multiple uses of a trigger in SDAG, Phil Miller, 09/02/2016
- Message not available
- [charm] Fwd: Multiple uses of a trigger in SDAG, Jozsef Bakosi, 09/03/2016
- Message not available
- Re: [charm] Multiple uses of a trigger in SDAG, Phil Miller, 09/02/2016
Archive powered by MHonArc 2.6.19.