Hi Igor,

thank you, this explains and solves the problem.

Ales

On Fri, Oct 10, 2008 at 3:46 PM, Igor Peshansky <[EMAIL PROTECTED]> wrote:

> Hi, Ales,
>
> X10 does have the facility to check at run time whether the reference
> is to a local object or to a "remote" object (the "remote" is in quotes
> because on a shared memory implementation there isn't that much of a
> difference).  However, that facility is turned off by default.  To turn
> it on, run the program giving the -BAD_PLACE_RUNTIME_CHECK=true argument
> to the "x10" script.
>        Igor
>
> "Ales Kozumplik" <[EMAIL PROTECTED]> wrote on 10/10/2008 09:08:14
> AM:
>
> > Hi,
> >
> > I'm getting a bit confused here: I have declared an array distributed
> across
> > several places. When I make a function that reads and modifies every
> element
> > of this array, the program builds and runs without throwing an
> exception.
> >
> > Isn't this contradicting e.g. paragraph 2.3 in the Report where it's
> said
> > that:
> >
> > """
> >                                             an activity may
> synchronously
> > access
> > data items only in the current place (the place in which the activity is
> > running).
> > It may atomically update one or more data items, but only in the current
> > place.
> > To read a remote location, an activity must spawn another activity
> > asynchronously
> > (ยง14.2).
> > """
> > ?
> >
> > Or does this simply mean that spawning the activity and forcing futures
> > happens 'behind the scenes' ? I'm attaching my program below, perhaps
> I've
> > misunderstood some of the concepts. I'm using X10 1.7.
> >
> > Thank you,
> > Ales
> >
> > === ===
> > class AsyncArr
> > {
> >     val VECTLENGTH = 8;
> >     val Reg:Region = 0..VECTLENGTH-1;
> >     val Distr  = dist.makeBlock(Reg);
> >
> >     public def run() : void
> >     {
> >         System.out.println(Distr);
> >         val a = Array.make[int](Distr, (p(i) : Point) => i);
> >         for (var i:int = 0; i < VECTLENGTH; i++)
> >         {
> >             a(i) = a(i)*2;
> >             System.out.println(a(i));
> >         }
> >     }
> >
> >     public static def main(var args: Rail[String])
> >     {
> >         new AsyncArr().run();
> >     }
> > }
> >
> -------------------------------------------------------------------------
> > This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> > Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> > Grand prize is a trip for two to an Open Source event anywhere in the
> world
> > http://moblin-contest.org/redirect.php?banner_id=100&url=/
> > _______________________________________________
> > X10-users mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/x10-users
> --
> Igor Peshansky  (note the spelling change!)
> IBM T.J. Watson Research Center
> XJ: No More Pain for XML's Gain (http://www.research.ibm.com/xj/)
> X10: Parallel Productivity and Performance (http://x10.sf.net/)
>
>
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
X10-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/x10-users

Reply via email to