Hi David, I checked this example code with the latest svn version and it doesn't work in the case of copying the data back from a remote array to a local array.
I compiled the x10 version with following command: ant dist -Doptimize=true -DNO_CHECKS=true And I compiled the sourcecode with this command: x10c++ -O -NO_CHECKS -x10rt standalone -o test Test.x10 The output is: Expected to find 1 at [1] but found 0 Expected to find 2 at [2] but found 0 Expected to find 3 at [3] but found 0 Expected to find 4 at [4] but found 0 Expected to find 5 at [5] but found 0 Expected to find 6 at [6] but found 0 Expected to find 7 at [7] but found 0 Expected to find 8 at [8] but found 0 Expected to find 9 at [9] but found 0 Expected to find 10 at [10] but found 0 I don't know what I am doing wrong. 2011/3/25 David P Grove <gro...@us.ibm.com> > > > Sascha Roloff <sascha.rol...@googlemail.com> wrote on 03/24/2011 08:54:55 > AM: > > > > Can anybody give me a working example of copying data from a RemoteArray > to > > a local Array? > > > > Hi, > > Here's an example pulled from our nightly regression test suite. > > > public def run() { > val localA = new Array[int](R1,(p:Point)=>p(0)); > val localB = new Array[int](R2,(p:Point(2))=>10*p(1)+p(0)); > val remoteA = at (here.next()) new RemoteArray[int](new Array > [int](R1)); > val remoteB = at (here.next()) new RemoteArray[int](new Array > [int](R2)); > val finalA = new Array[int](R1); > val finalB = new Array[int](R2); > var fail:boolean = false; > > finish { > Array.asyncCopy(localA, 0, remoteA, 0, 81); > Array.asyncCopy(localB, remoteB); > } > finish { > Array.asyncCopy(remoteA, 0, finalA, 0, 81); > Array.asyncCopy(remoteB, finalB); > } > > for (p in localA) { > if (localA(p) != finalA(p)) { > Console.OUT.println("Expected to find "+localA(p)+" at "+p+" > but fo > und "+finalA(p)); > fail = true; > } > } > > for (p in localB) { > if (localB(p) != finalB(p)) { > Console.OUT.println("Expected to find "+localB(p)+" at "+p+" > but fo > und "+finalB(p)); > fail = true; > } > } > > ------------------------------------------------------------------------------ > Enable your software for Intel(R) Active Management Technology to meet the > growing manageability and security demands of your customers. Businesses > are taking advantage of Intel(R) vPro (TM) technology - will your software > be a part of the solution? Download the Intel(R) Manageability Checker > today! http://p.sf.net/sfu/intel-dev2devmar > _______________________________________________ > X10-users mailing list > X10-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/x10-users > ------------------------------------------------------------------------------ Enable your software for Intel(R) Active Management Technology to meet the growing manageability and security demands of your customers. Businesses are taking advantage of Intel(R) vPro (TM) technology - will your software be a part of the solution? Download the Intel(R) Manageability Checker today! http://p.sf.net/sfu/intel-dev2devmar _______________________________________________ X10-users mailing list X10-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/x10-users