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: Phil Miller <mille121 AT illinois.edu>
  • To: Evghenii Gaburov <e-gaburov AT northwestern.edu>
  • Cc: Charm Mailing List <charm AT cs.illinois.edu>
  • Subject: Re: [charm] [ppl] changing global (readonly) variables during runtime
  • Date: Sun, 2 Oct 2011 10:03:47 -0500
  • List-archive: <http://lists.cs.uiuc.edu/pipermail/charm>
  • List-id: CHARM parallel programming system <charm.cs.uiuc.edu>

There's no hidden machinery involved. Getting the local object's
pointer is essentially a table lookup, and the local pointer really is
just a simple local pointer. Any data movement will be a result of
messages sent by your code.

The things to be cautious of with NodeGroup objects if you're running
an '-smp' or 'multicore-' build of Charm++ is that it is then a shared
memory construct, with the concurrency control issues that entails. If
you're not using an SMP or multicore version of Charm++, then it's no
different from a Group.

On Sun, Oct 2, 2011 at 09:29, Evghenii Gaburov
<e-gaburov AT northwestern.edu>
wrote:
> Thanks for quick reply!
>
>> If the array is large, you should consider a nodeGroup (on a multicore SMP
>> implementation)
> I tried nodeGroup and it works great, memory consumption drops dramatically!
>
> One question though, I access a CkVec<boundary> array via
>
> myChare::do_work()
> {
>  domains = (globalDomains*)CkLocalNodeBranch(globalDomainsNodeGroup);
>  const CkVec<boundary> &proc = domains->domainsBoundary;
>  do_stuff(procs[thisIndex]);
> }
>
> is there some potential (performance) penalty involved in such access? Is
> it as simple as
> the globalDomains::domainsBoundary address space is visible by all
> processes on a node,
> or there is some (hidden) machinery involved in moving data around?
>
> Thanks!
>
> Cheers,
>  Evghenii
>
>
>
>> --
>> 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
>>
>
> --
> 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