Skip to Content.
Sympa Menu

charm - Re: [charm] charm++ compiling problem

charm AT lists.cs.illinois.edu

Subject: Charm++ parallel programming system

List archive

Re: [charm] charm++ compiling problem


Chronological Thread 
  • From: Phil Miller <mille121 AT illinois.edu>
  • To: Haowei Huang <huangh AT in.tum.de>
  • Cc: Charm Mailing List <charm AT cs.illinois.edu>
  • Subject: Re: [charm] charm++ compiling problem
  • Date: Tue, 1 Jun 2010 13:18:36 -0500
  • List-archive: <http://lists.cs.uiuc.edu/pipermail/charm>
  • List-id: CHARM parallel programming system <charm.cs.uiuc.edu>

On Fri, May 28, 2010 at 15:02, Haowei Huang
<huangh AT in.tum.de>
wrote:
>    Another question, For example, I define a Patch object and a patchArray
> then Patch
> has properties and methods.
>
>   we could reference the methods in Patch but couldn't reference properties:
>
>     patchArray(x,y,z).property;
>     patchArray(x,y,z).function();
>
>    when I use first statement I encounter a compiling error:
>    class CProxyElement_Patch’ has no member named ‘property
>
>    Do you have any idea about it? Thank you.

You're trying to treat a chare as if it were a common object. A chare
is an object that can be located anywhere in a distributed parallel
system. Thus, barring advanced techniques, you can't directly access
properties of it. If you really need a value out of some chare, you
can write a synchronous entry method with a non-void return type to
get that value. The caller will have to be a threaded entry method or
some other thread object. This is generally not a good structure to
use.

Related to this is that method calls on a chare's proxy (which is what
subscripting the array proxy gets you) generates a message that will
invoke an entry method sometime later, when the message has been
delivered and scheduled. This is the 'asynchronous remote method
invocation' that's central to the Charm++ programming model. Again, if
you really need to directly call a method on a chare object, there are
advanced techniques to do so (inline entry methods, local pointers),
but those are not the natural constructs that beginners should work
with.





Archive powered by MHonArc 2.6.16.

Top of Page