The code fragment I sent seems actually to work, I should have used static def println(s:String) = Console.ERR.println(s);
instead of static def println(s:String) = Console.OUT.println(s); (OUT : buffered output, ERR : non buffered output ?) Anyway, any comments are welcome, Marc -------- Message d'origine-------- De: TAJCHMAN Marc Date: sam. 31/10/2009 00:35 À: x10-users@lists.sourceforge.net Objet : consecutive parallel loop Hi, Could you tell what's wrong with the code below ? //-------------------------------------------------- public class test1 { static def println(s:String) = Console.OUT.println(s); public def run() { D : Dist = Dist.makeUnique(); println("a"); finish ateach(p:Point in D) { println("run1 at " + here); } println("b"); finish ateach(p:Point in D) { println("run2 at " + here); } println("c"); } public static def main(var args: Rail[String]!) { println("\nstart"); new test1().run(); println("\nend"); } } //-------------------------------------------------- I was expecting output like this (using 3 places) ================= start a run1 at (Place 0) run1 at (Place 2) run1 at (Place 1) b run2 at (Place 2) run2 at (Place 0) run2 at (Place 1) c end ================= but I obtain ================= start a run1 at (Place 0) run1 at (Place 1) run1 at (Place 2) b run2 at (Place 0) c end run2 at (Place 1) run2 at (Place 2) ================= or ================= start a run1 at (Place 0) b run2 at (Place 0) c end run1 at (Place 1) run2 at (Place 1) run1 at (Place 2) run2 at (Place 2) ================= I tried to use clocks but didn't succeed to improve the code behavior. Thanks in advance, Marc ------------------------------------------------------------------------------------ Marc Tajchman Laboratoire de Génie Logiciel et de Simulation Software Engineering and Computer Simulation Laboratory CEA-DEN/DANS/DM2S/SFME/LGLS Tél : +33/1 69 08 73 27 Fax : +33/1 69 08 52 42 mailto:marc.tajch...@cea.fr ------------------------------------------------------------------------------------ Ce message électronique et tous les fichiers attachés qu'il contient sont confidentiels et destinés exclusivement à l'usage de la personne à laquelle ils sont adressés. Si vous avez reçu ce message par erreur, merci d'en avertir immédiatement son émetteur et de ne pas en conserver de copie. This e-mail and any files transmitted with it are confidential and intended solely for the use of the individual to whom they are addressed. If you have received this e-mail in error please inform the sender immediately, without keeping any copy thereof. ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ X10-users mailing list X10-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/x10-users