charm AT lists.siebelschool.illinois.edu
Subject: Charm++ parallel programming system
List archive
- From: Jozsef Bakosi <jbakosi AT gmail.com>
- To: "charm AT cs.uiuc.edu" <charm AT cs.uiuc.edu>
- Subject: [charm] Multiple uses of a trigger in SDAG
- Date: Fri, 2 Sep 2016 14:47:05 -0600
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 be
executed? 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 I
had 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 not
seem like the it always does what I want. If I don't reactivate, I get a deadlock. I'm pretty
sure I'm using this incorrectly, also because this approach does not scale well as triggers
are reused.
Is this the proper way to think about this? Most likely not. I suspect I should not attempt to
reuse the same trigger multiple times and messing with reactivtation and just
create 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 on
callback2host() and callback2host_someotherway() )
dowork();
else
quit();
}
- [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.