Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add missing files -- sorry
authorMartin Quinson <martin.quinson@loria.fr>
Wed, 21 Oct 2015 23:00:23 +0000 (01:00 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Wed, 21 Oct 2015 23:00:23 +0000 (01:00 +0200)
examples/msg/energy/vm/CMakeLists.txt [new file with mode: 0644]
examples/msg/energy/vm/energy_vm.tesh [new file with mode: 0644]
tools/cmake/DefinePackages.cmake

diff --git a/examples/msg/energy/vm/CMakeLists.txt b/examples/msg/energy/vm/CMakeLists.txt
new file mode 100644 (file)
index 0000000..314be4c
--- /dev/null
@@ -0,0 +1,28 @@
+set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}")
+
+add_executable(energy_vm energy_vm.c)
+
+### Add definitions for compile
+target_link_libraries(energy_vm simgrid)
+
+set(tesh_files
+  ${tesh_files}
+  ${CMAKE_CURRENT_SOURCE_DIR}/energy_vm.tesh
+  PARENT_SCOPE
+  )
+
+set(xml_files
+  ${xml_files}
+  PARENT_SCOPE
+  )
+
+set(examples_src
+  ${examples_src}
+  ${CMAKE_CURRENT_SOURCE_DIR}/energy_vm.c
+  PARENT_SCOPE
+  )
+
+set(bin_files
+  ${bin_files}
+  PARENT_SCOPE
+  )
diff --git a/examples/msg/energy/vm/energy_vm.tesh b/examples/msg/energy/vm/energy_vm.tesh
new file mode 100644 (file)
index 0000000..ce66ee7
--- /dev/null
@@ -0,0 +1,23 @@
+#! ./tesh
+
+p Testing the mechanism for computing host energy consumption in case of VMs
+
+$ $SG_TEST_EXENV energy/vm/energy_vm$EXEEXT ${srcdir:=.}/../platforms/energy_platform.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+> [  0.000000] (1:dvfs@MyHost1) Creating and starting two VMs
+> [  0.000000] (0:@) Create VM(vm1)@PM(MyHost1) with 0 mounted disks
+> [  0.000000] (0:@) Create VM(vm2)@PM(MyHost3) with 0 mounted disks
+> [  0.000000] (1:dvfs@MyHost1) Create two tasks on Host1: one inside a VM, the other directly on the host
+> [  0.000000] (1:dvfs@MyHost1) Create two tasks on Host2: both directly on the host
+> [  0.000000] (1:dvfs@MyHost1) Create two tasks on Host3: both inside a VM
+> [  0.000000] (1:dvfs@MyHost1) 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)
+> [  5.000000] (1:dvfs@MyHost1) Wait another 5 seconds. The tasks stop at some point in between
+> [  6.000000] (4:p21@MyHost2) This worker is done.
+> [  6.000000] (5:p22@MyHost2) This worker is done.
+> [  6.000000] (3:p12@MyHost1) This worker is done.
+> [  6.000000] (2:p11@vm1) This worker is done.
+> [  6.000000] (6:p31@vm2) This worker is done.
+> [  6.000000] (7:p32@vm2) This worker is done.
+> [ 10.000000] (0:@) Total simulation time: 10.00; All hosts must have the exact same energy consumption.
+> [ 10.000000] (0:@) Total energy of host MyHost1: 1580.000000 Joules
+> [ 10.000000] (0:@) Total energy of host MyHost2: 1600.000000 Joules
+> [ 10.000000] (0:@) Total energy of host MyHost3: 1600.000000 Joules
index 7385866..06c0d93 100644 (file)
@@ -1057,6 +1057,7 @@ set(EXAMPLES_CMAKEFILES_TXT
   examples/msg/energy/consumption/CMakeLists.txt
   examples/msg/energy/onoff/CMakeLists.txt
   examples/msg/energy/pstate/CMakeLists.txt
+  examples/msg/energy/vm/CMakeLists.txt
   examples/msg/exception/CMakeLists.txt
   examples/msg/gpu/CMakeLists.txt
   examples/msg/gtnets/CMakeLists.txt