Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
If you don't start the processes, the VM are actually empty, bummer
authorMartin Quinson <martin.quinson@loria.fr>
Thu, 19 Jan 2017 13:44:59 +0000 (14:44 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Thu, 19 Jan 2017 13:44:59 +0000 (14:44 +0100)
examples/java/energy/vm/EnergyVMRunner.java
examples/java/energy/vm/energy_vm.tesh

index be5d65f..6b37812 100644 (file)
@@ -55,16 +55,16 @@ public class EnergyVMRunner extends Process {
     vmHost3.start();
 
     Msg.info("Create two tasks on Host1: one inside a VM, the other directly on the host");
     vmHost3.start();
 
     Msg.info("Create two tasks on Host1: one inside a VM, the other directly on the host");
-    new DummyProcess (vmHost1, "p11"); 
-    new DummyProcess (host1, "p12"); 
+    new DummyProcess (vmHost1, "p11").start()
+    new DummyProcess (host1, "p12").start()
 
     Msg.info("Create two tasks on Host2: both directly on the host");
 
     Msg.info("Create two tasks on Host2: both directly on the host");
-    new DummyProcess (host2, "p21"); 
-    new DummyProcess (host2, "p22"); 
+    new DummyProcess (host2, "p21").start()
+    new DummyProcess (host2, "p22").start()
 
     Msg.info("Create two tasks on Host3: both inside a VM");
 
     Msg.info("Create two tasks on Host3: both inside a VM");
-    new DummyProcess (vmHost3, "p31"); 
-    new DummyProcess (vmHost3, "p312"); 
+    new DummyProcess (vmHost3, "p31").start()
+    new DummyProcess (vmHost3, "p312").start()
 
     Msg.info("Wait 5 seconds. The tasks are still running (they run for 3 seconds, but 2 tasks are co-located, "
              + "so they run for 6 seconds)"); 
 
     Msg.info("Wait 5 seconds. The tasks are still running (they run for 3 seconds, but 2 tasks are co-located, "
              + "so they run for 6 seconds)"); 
index da07646..3406aea 100644 (file)
@@ -8,7 +8,13 @@ $ java -classpath ${classpath:=.} energy/vm/Main ${srcdir:=.}/../platforms/energ
 > [MyHost1:energy VM runner:(1) 0.000000] [jmsg/INFO] Create two tasks on Host3: both inside a VM
 > [MyHost1:energy VM runner:(1) 0.000000] [jmsg/INFO] Wait 5 seconds. The tasks are still running (they run for 3 seconds, but 2 tasks are co-located, so they run for 6 seconds)
 > [MyHost1:energy VM runner:(1) 5.000000] [jmsg/INFO] Wait another 5 seconds. The tasks stop at some point in between
 > [MyHost1:energy VM runner:(1) 0.000000] [jmsg/INFO] Create two tasks on Host3: both inside a VM
 > [MyHost1:energy VM runner:(1) 0.000000] [jmsg/INFO] Wait 5 seconds. The tasks are still running (they run for 3 seconds, but 2 tasks are co-located, so they run for 6 seconds)
 > [MyHost1:energy VM runner:(1) 5.000000] [jmsg/INFO] Wait another 5 seconds. The tasks stop at some point in between
+> [MyHost2:p21:(4) 6.000000] [jmsg/INFO] This worker is done.
+> [MyHost2:p22:(5) 6.000000] [jmsg/INFO] This worker is done.
+> [MyHost1:p12:(3) 6.000000] [jmsg/INFO] This worker is done.
+> [vmHost1:p11:(2) 6.000000] [jmsg/INFO] This worker is done.
+> [vmHost3:p31:(6) 6.000000] [jmsg/INFO] This worker is done.
+> [vmHost3:p312:(7) 6.000000] [jmsg/INFO] This worker is done.
 > [10.000000] [jmsg/INFO] MSG_main finished; Cleaning up the simulation...
 > [10.000000] [jmsg/INFO] MSG_main finished; Cleaning up the simulation...
-> [10.000000] [surf_energy/INFO] Total energy of host MyHost1: 1000.000000 Joules
-> [10.000000] [surf_energy/INFO] Total energy of host MyHost2: 1000.000000 Joules
-> [10.000000] [surf_energy/INFO] Total energy of host MyHost3: 1000.000000 Joules
+> [10.000000] [surf_energy/INFO] Total energy of host MyHost1: 1120.000000 Joules
+> [10.000000] [surf_energy/INFO] Total energy of host MyHost2: 1120.000000 Joules
+> [10.000000] [surf_energy/INFO] Total energy of host MyHost3: 1120.000000 Joules