charm AT lists.siebelschool.illinois.edu
Subject: Charm++ parallel programming system
List archive
- 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.
- Re: [charm] charm++ compiling problem, Phil Miller, 06/01/2010
- Message not available
- Re: [charm] charm++ compiling problem, Phil Miller, 06/01/2010
- <Possible follow-up(s)>
- Re: [charm] charm++ compiling problem, Phil Miller, 06/01/2010
- Message not available
Archive powered by MHonArc 2.6.16.