Skip to Content.
Sympa Menu

charm - Re: [charm] SADG Issue

charm AT lists.cs.illinois.edu

Subject: Charm++ parallel programming system

List archive

Re: [charm] SADG Issue


Chronological Thread 
  • From: Jonathan Lifflander <jliffl2 AT illinois.edu>
  • To: Eduard Llamosí <llamosi.e AT husky.neu.edu>
  • Cc: charm AT cs.uiuc.edu
  • Subject: Re: [charm] SADG Issue
  • Date: Wed, 27 Feb 2013 11:54:04 +0800
  • List-archive: <http://lists.cs.uiuc.edu/pipermail/charm/>
  • List-id: CHARM parallel programming system <charm.cs.uiuc.edu>

Hey,

When you are using parameter marshalling (I'm assuming that "Input" is
not a message), the first parameter you send becomes the reference
number that is matched to "iter".

So you should add an integer as the first parameter, like this:

entry void runForever() {
for (iter = 0; iter < nIters; ++iter) {
// Match to only accept inputs for the current iteration
when iterationWork[iter](int ref, Input in) {
// Do something
}
}
};

When you send a to this, you can send the reference number that you
want to match. For instance, if you want a reference number of 10, you
could make the following call:

proxy. iterationWork(10, Input(...));

I'm attaching some slides used in a class that was taught at UIUC,
which include examples of how to use reference numbers and more
explanation.

Jonathan

On Tue, Feb 26, 2013 at 2:43 AM, Eduard Llamosí
<llamosi.e AT husky.neu.edu>
wrote:
> Greetings,
>
> I'm trying to figure out SADG quirk for a program I'm working on. If we have
> a definition similar to this one within a chare:
>
> entry void runForever() {
> for (iter = 0; iter < nIters; ++iter) {
> // Match to only accept inputs for the current iteration
> when iterationWork[iter](Input in) {
> // Do something
> }
> }
> };
>
> How can we invoke the iterationWork method for a particular iteration? If we
> simply invoke it like this:
>
> workerProxy.iterationWork(in);
>
> it seems to always invoke iteration 0.
>
> The manual seems to only cover the receiving end of this matter.
>
> Kind regards,
>
> Eduard Llamosi
>
> _______________________________________________
> charm mailing list
> charm AT cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/charm
>

Attachment: lec6-sdag.pdf
Description: Adobe PDF document



  • [charm] SADG Issue, Eduard Llamosí, 02/25/2013
    • Re: [charm] SADG Issue, Jonathan Lifflander, 02/26/2013

Archive powered by MHonArc 2.6.16.

Top of Page