Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix the masterslave example
authorJonathan Rouzaud-Cornabas <jonathan.rouzaud-cornabas@ens-lyon.fr>
Thu, 30 Aug 2012 13:14:39 +0000 (15:14 +0200)
committerJonathan Rouzaud-Cornabas <jonathan.rouzaud-cornabas@ens-lyon.fr>
Thu, 30 Aug 2012 13:14:39 +0000 (15:14 +0200)
examples/cloud/Master.java

index 2a46bc5..1551521 100644 (file)
@@ -30,7 +30,7 @@ public class Master extends Process {
                for (int i = 0; i < slavesCount; i++) {
                        Slave slave = new Slave(hosts[i],i);
                        slave.start();
                for (int i = 0; i < slavesCount; i++) {
                        Slave slave = new Slave(hosts[i],i);
                        slave.start();
-                       VM vm = new VM(hosts[i],1);
+                       VM vm = new VM(hosts[i],hosts[i]+"_"+i,1);
                        vm.bind(slave);
                        vms.add(vm);
                }
                        vm.bind(slave);
                        vms.add(vm);
                }
@@ -93,4 +93,4 @@ public class Master extends Process {
                        task.send("slave_" + i);
                }
        }
                        task.send("slave_" + i);
                }
        }
-}
\ No newline at end of file
+}