Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
small fixes to output so that RL works again
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Fri, 26 Nov 2010 14:28:56 +0000 (14:28 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Fri, 26 Nov 2010 14:28:56 +0000 (14:28 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@8674 48e7efb5-ca39-0410-a469-dd3cf9ba447f

examples/gras/pmm/pmm.c
examples/gras/pmm/pmm.xml

index 7e7d35d..8205689 100644 (file)
@@ -10,7 +10,7 @@
 #include "xbt/matrix.h"
 #include "amok/peermanagement.h"
 
-#define PROC_MATRIX_SIZE 2
+#define PROC_MATRIX_SIZE 3
 #define NEIGHBOR_COUNT PROC_MATRIX_SIZE - 1
 #define SLAVE_COUNT (PROC_MATRIX_SIZE*PROC_MATRIX_SIZE)
 
@@ -115,11 +115,11 @@ int master(int argc, char *argv[])
   /* friends, we're ready. Come and play */
   INFO0("Wait for peers for 2 sec");
   gras_msg_handleall(2);
-  do {
+  while (xbt_dynar_length(peers) < SLAVE_COUNT) {
     INFO2("Got only %ld pals (of %d). Wait 2 more seconds",
         xbt_dynar_length(peers),SLAVE_COUNT);
     gras_msg_handleall(2);
-  } while (xbt_dynar_length(peers) < SLAVE_COUNT);
+  }
   INFO1("Good. Got %ld pals", xbt_dynar_length(peers));
 
   for (i = 0; i < xbt_dynar_length(peers) && i < SLAVE_COUNT; i++) {
@@ -415,7 +415,6 @@ int slave(int argc, char *argv[])
       gras_os_sleep(0.5);
     }
   }
-  INFO2("Connected to master: %s:%d",gras_socket_peer_name(master),gras_socket_peer_port(master));
 
   /* Join and run the group */
   rank = amok_pm_group_join(master, "pmm");
index 687aa8e..69e2ab2 100644 (file)
   <process host="Jean_Yves" function="slave"><argument value="Jacquelin:4242"/><argument value="1"/></process>
   <process host="TeX"       function="slave"><argument value="Jacquelin:4242"/><argument value="2"/></process>
   <process host="Geoff"     function="slave"><argument value="Jacquelin:4242"/><argument value="3"/></process>
-<!--  <process host="Disney"    function="slave"><argument value="Jacquelin:4242"/><argument value="4"/></process>
+  <process host="Disney"    function="slave"><argument value="Jacquelin:4242"/><argument value="4"/></process>
   <process host="iRMX"      function="slave"><argument value="Jacquelin:4242"/><argument value="5"/></process>
   <process host="McGee"     function="slave"><argument value="Jacquelin:4242"/><argument value="6"/></process>
   <process host="Gatien"    function="slave"><argument value="Jacquelin:4242"/><argument value="7"/></process>
   <process host="Laroche"   function="slave"><argument value="Jacquelin:4242"/><argument value="8"/></process>
--->
 </platform>