From 8a0c620164f51b5bfcf22286b2d43ae6a1b3893f Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Thu, 19 Jan 2017 14:44:59 +0100 Subject: [PATCH] If you don't start the processes, the VM are actually empty, bummer --- examples/java/energy/vm/EnergyVMRunner.java | 12 ++++++------ examples/java/energy/vm/energy_vm.tesh | 12 +++++++++--- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/examples/java/energy/vm/EnergyVMRunner.java b/examples/java/energy/vm/EnergyVMRunner.java index be5d65f21d..6b378128b1 100644 --- a/examples/java/energy/vm/EnergyVMRunner.java +++ b/examples/java/energy/vm/EnergyVMRunner.java @@ -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"); - 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"); - 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"); - 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)"); diff --git a/examples/java/energy/vm/energy_vm.tesh b/examples/java/energy/vm/energy_vm.tesh index da07646e25..3406aea0d5 100644 --- a/examples/java/energy/vm/energy_vm.tesh +++ b/examples/java/energy/vm/energy_vm.tesh @@ -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 +> [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] [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 -- 2.20.1