I think what you are seeing is that each place has it's own Console.OUT and OUT is only flushed on newlines. The only newlines are happening at place 0, so only the OUT stream at place 0 is getting flushed.
Arguably we should be flushing OUT in all places as part of tearing down the program execution, but I don't think we currently do that. --dave "Kröhnert,Manfred" <manfred.kroehn...@kit.edu> wrote on 06/08/2011 07:36:54 AM: > Hi everybody, > > I have the following code (X10 v2.1.2): > > val array = new Array[Int](20, 3); > val dist = Dist.makeBlock(array.region); > val distArray = DistArray.make(dist, ([i]: Point) => array(i)); > > Console.OUT.println("at Place print"); > for ([p]: Point in distArray.dist) { > at(distArray.dist(p)) {Console.OUT.print(distArray(p) + " ");} > } > > Console.OUT.println("\nprint at Place"); > for ([p]: Point in distArray.dist) { > Console.OUT.print((at(distArray.dist(p)) distArray(p)) + " "); > } > Console.OUT.println("\nFinished"); > > If I run the code with X10_NPLACES=1 I get the following expected output: > > at Place print > 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 > print at Place > 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 > Finished > > However, running the same code with X10_NPLACES=4 prints this (not > expected by me): > > at Place print > 3 3 3 3 3 > print at Place > 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 > Finished > > My possible explanation is that the use of Console.OUT is only > allowed in the home place of the running program or is something > different causing this behaviour? > > I also have one other question. > To copy the values of a DistArray into a normal Array I am currently > iterating over the DistArray and copying the values one after the > other into the Array. > Does an easier/shorter way exist to achieve this? > > Best Regards, > > Manfred > ------------------------------------------------------------------------------ > EditLive Enterprise is the world's most technically advanced content > authoring tool. Experience the power of Track Changes, Inline Image > Editing and ensure content is compliant with Accessibility Checking. > http://p.sf.net/sfu/ephox-dev2dev > _______________________________________________ > X10-users mailing list > X10-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/x10-users ------------------------------------------------------------------------------ EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image Editing and ensure content is compliant with Accessibility Checking. http://p.sf.net/sfu/ephox-dev2dev _______________________________________________ X10-users mailing list X10-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/x10-users