Hi,

Could you please tell us how to replicate an array or variable across all
the places so that its accessible at all places.
Or is there a way to make a variable global so that it can be accessed
everywhere?

Thanks,
Sarat

On Mon, Dec 7, 2009 at 5:32 PM, Kshitij Mehta <kvm1...@gmail.com> wrote:

> Thats exactly what I want. I want an array to be available/replicated in
> all places.
> Also, I am not clear why I get the classCastException.
>
> Thanks, Kshitij
>
>
> On Mon, Dec 7, 2009 at 5:20 PM, Igor Peshansky <ig...@us.ibm.com> wrote:
>
>> Kshitij Mehta <kvm1...@gmail.com> wrote on 12/07/2009 05:53:30 PM:
>>
>> > Is there a way to make a variable global such that it is available on
>> all
>> > places? I want to avoid declaring it on one place and fetching it at
>> other
>> > places using a future.
>> >
>> > Also, I get a classCastException at the foll.statement:
>> > finish ateach(val p(t):Point(1) in Dist.makeUnique(Place.places))
>> >          {
>> >                 var tmp:Array[int](1) = (future
>> > (Place.place(0))aim_ATF_dim).force();
>> >                  Console.OUT.println(tmp(0));         // -----> gives a
>> > classCastException
>> >
>> > Any ideas?
>>
>> Hi, Kshitij,
>>
>> Even if you fetch an array to a remote location, its access will
>> be guarded by the distribution of that array.  If tmp(0) lives in
>> place 1, then accessing tmp(0) in place 1 will produce an exception.
>>
>> What exactly are you trying to achieve?  Do you want to have some
>> piece of data avaliable (i.e., replicated) in all places?
>>        Igor
>> --
>> 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/)
>>
>>
>
------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
X10-users mailing list
X10-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/x10-users

Reply via email to