charm AT lists.siebelschool.illinois.edu
Subject: Charm++ parallel programming system
List archive
- From: Eric Bohm <ebohm AT illinois.edu>
- To: <charm AT cs.uiuc.edu>
- Subject: Re: [charm] operator overloading possible?
- Date: Tue, 18 Jun 2013 12:07:13 -0500
- List-archive: <http://lists.cs.uiuc.edu/pipermail/charm/>
- List-id: CHARM parallel programming system <charm.cs.uiuc.edu>
That usage is not currently supported
in that form. The * operator would have to be able to take two
chares as messages as input, and modify the chare b with the
result. In the general case, where b is on node 1 and a is on
node 2, this would have to block in order to send a request to
node 2 to get copies of a. This reduces to the semantic of having
a future for remote element a.
This case further illuminates the difficulty of naively implementing such a function in a distributed system. To consider the operands as remote futures and naively instantiate a local copy means that we would make two copies of a, send them to node 1, and then multiply them to update the contents of b. It would have been half as network intensive to take the square of "a" on node 2 and pass that to node 1. However, that network optimized implementation would shift the computation to node 2, which might be undesirable from a load balance perspective. In general, we do not send chares as operands in messages to avoid blurring the distinction (not to mention the type inheritance confusion entanglements) between persistent parallel computational entities with a globally unique identity, and ephemeral messages which carry data between them. Charm++ supports futures (see section 12.3 of the manual), however it supports chares containing futures or using futures, not chares as futures. On 06/17/2013 04:41 PM, Nicolas Bock wrote: Hi list,
is it possible to overload an operator in Charm++?
Let's say I have a chare that represents a vector and I would
like to be able to do something like this:
Vector a;
Vector b;
b = a*a;
Thanks already,
nick
_______________________________________________ charm mailing list charm AT cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/charm |
- [charm] operator overloading possible?, Nicolas Bock, 06/17/2013
- Re: [charm] operator overloading possible?, Eric Bohm, 06/18/2013
- Re: [charm] operator overloading possible?, Kale, Laxmikant V, 06/18/2013
- Re: [charm] operator overloading possible?, Nicolas Bock, 06/18/2013
- Re: [charm] operator overloading possible?, Kale, Laxmikant V, 06/18/2013
- Re: [charm] operator overloading possible?, Nicolas Bock, 06/18/2013
- Re: [charm] operator overloading possible?, Kale, Laxmikant V, 06/18/2013
- Re: [charm] operator overloading possible?, Nicolas Bock, 06/18/2013
- Re: [charm] operator overloading possible?, Kale, Laxmikant V, 06/18/2013
- Re: [charm] operator overloading possible?, Eric Bohm, 06/18/2013
Archive powered by MHonArc 2.6.16.