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: Evghenii Gaburov <e-gaburov AT northwestern.edu>
  • To: "Kale, Laxmikant V" <kale AT illinois.edu>
  • Cc: "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 14:29:02 +0000
  • Accept-language: en-US
  • List-archive: <http://lists.cs.uiuc.edu/pipermail/charm>
  • List-id: CHARM parallel programming system <charm.cs.uiuc.edu>

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











Archive powered by MHonArc 2.6.16.

Top of Page