Skip to Content.
Sympa Menu

charm - Re: [charm] [ppl] changing global (readonly) variables during runtime

charm AT lists.cs.illinois.edu

Subject: Charm++ parallel programming system

List archive

Re: [charm] [ppl] changing global (readonly) variables during runtime


Chronological Thread 
  • From: "Kale, Laxmikant V" <kale AT illinois.edu>
  • To: Evghenii Gaburov <e-gaburov AT northwestern.edu>, "charm AT cs.uiuc.edu" <charm AT cs.uiuc.edu>
  • Subject: Re: [charm] [ppl] changing global (readonly) variables during runtime
  • Date: Sun, 2 Oct 2011 04:42:45 +0000
  • Accept-language: en-US
  • List-archive: <http://lists.cs.uiuc.edu/pipermail/charm>
  • List-id: CHARM parallel programming system <charm.cs.uiuc.edu>

You should use a Chare Group, and explicitly broadcast them to each member
of the group. A Group has exactly one branch on a PE, and you can access
the local branch (local member of the Group) via regular method invocation
(or public data members).

If the array is large, you should consider a nodeGroup (on a multicore SMP
implementation)
--
Laxmikant (Sanjay) Kale http://charm.cs.uiuc.edu
<http://charm.cs.uiuc.edu/>
Professor, Computer Science
kale AT illinois.edu
201 N. Goodwin Avenue Ph: (217) 244-0094
Urbana, IL 61801-2302 FAX: (217) 265-6582






On 10/1/11 11:22 PM, "Evghenii Gaburov"
<e-gaburov AT northwestern.edu>
wrote:

>Hi All,
>
>In my Charm program I have an array declared as readonly:
>
>*.ci: readonly CkVec<boundary> domains_boundary;
>Main.h: extern CkVec<boundary> domains_boundary;
>Main.cpp: CkVec<boundary> domains_boundary;
>
>which holds boundaries of each of the chare domain (this is a part of the
>domain decomposition code).
>
>These arrays are initially set in the Mainchare constructor, however,
>they change dynamically during runtime as well (by a method in Mainchare,
>which is called outside the constructor from a threaded method). As I
>understand, the changes done outside the Mainchare constructor won't be
>communicated to other processors automatically.
>
>I was wondering how can I manually communicate the updated array to the
>rest of the processors?
>
>I cannot communicate these to each of the chare (which currently do),
>since once the number of chares becomes large (>1024), too much memory is
>consumed unnecessary (quadratic scaling with #chares)); so I want to keep
>these arrays as global arrays.
>
>Any suggestions/advice?
>
>Thanks!
>
>Cheers,
>Evghenii
>
>
>--
>Evghenii Gaburov,
>e-gaburov AT northwestern.edu
>
>
>
>
>
>
>
>_______________________________________________
>charm mailing list
>charm AT cs.uiuc.edu
>http://lists.cs.uiuc.edu/mailman/listinfo/charm
>_______________________________________________
>ppl mailing list
>ppl AT cs.uiuc.edu
>http://lists.cs.uiuc.edu/mailman/listinfo/ppl






Archive powered by MHonArc 2.6.16.

Top of Page