Skip to Content.
Sympa Menu

charm - Re: [charm] local access to chare, race condition

charm AT lists.cs.illinois.edu

Subject: Charm++ parallel programming system

List archive

Re: [charm] local access to chare, race condition


Chronological Thread 
  • From: Phil Miller <mille121 AT illinois.edu>
  • To: Nicolas Bock <nicolasbock AT gmail.com>
  • Cc: "charm AT cs.uiuc.edu" <charm AT cs.uiuc.edu>
  • Subject: Re: [charm] local access to chare, race condition
  • Date: Wed, 11 Sep 2013 12:34:44 -0700
  • List-archive: <http://lists.cs.uiuc.edu/pipermail/charm/>
  • List-id: CHARM parallel programming system <charm.cs.uiuc.edu>

I don't expect it to result in a data race, because 'ckLocal' works (IIRC) on a per-PE basis for all objects besides NodeGroup instances.

Also, you can achieve the same effect with less manual effort with the [inline] entry method attribute.


On Wed, Sep 11, 2013 at 12:18 PM, Nicolas Bock <nicolasbock AT gmail.com> wrote:
Hi,

suppose I have a chare array A, and a single chare B. The A chares calculate something and want to add their results to some data in B. This can be done by calling

CProxy_Data B;
B.add(data);

inside a method of A. As far as I understand it, the RTS guarantees that this will not lead to a data race since it will not allow A::add() to execute in parallel. But now suppose I check whether A is local to the B chares and do this instead:

BLocal = A.ckLocal();
if(BLocal != NULL) BLocal->add(data);

will this not result in a data race if there are more than one B chare on a node?

Thanks,

nick


_______________________________________________
charm mailing list
charm AT cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/charm





Archive powered by MHonArc 2.6.16.

Top of Page