From: Martin Quinson Date: Sun, 17 Dec 2017 14:46:22 +0000 (+0100) Subject: convert another example to S4U (and document it) X-Git-Tag: v3.18~21 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/7756b80bb83689b3f050d20e9173d2e88a527636 convert another example to S4U (and document it) --- diff --git a/examples/msg/CMakeLists.txt b/examples/msg/CMakeLists.txt index a53a953cec..da49ac2f0b 100644 --- a/examples/msg/CMakeLists.txt +++ b/examples/msg/CMakeLists.txt @@ -1,7 +1,7 @@ # C examples foreach(x app-masterworker cloud-capping cloud-masterworker cloud-migration - dht-pastry energy-onoff energy-vm platform-failures + dht-pastry energy-vm platform-failures process-create synchro-semaphore trace-categories trace-route-user-variables trace-link-user-variables trace-masterworker @@ -50,7 +50,6 @@ set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/dht-kademlia/dht-k ${CMAKE_CURRENT_SOURCE_DIR}/network-ns3/network-ns3.tesh PARENT_SCOPE) set(xml_files ${xml_files} ${CMAKE_CURRENT_SOURCE_DIR}/app-masterworker/app-masterworker-multicore_d.xml ${CMAKE_CURRENT_SOURCE_DIR}/app-masterworker/app-masterworker-vivaldi_d.xml - ${CMAKE_CURRENT_SOURCE_DIR}/energy-onoff/platform_onoff.xml ${CMAKE_CURRENT_SOURCE_DIR}/network-ns3/3hosts_2links_d.xml ${CMAKE_CURRENT_SOURCE_DIR}/network-ns3/3links-timer_d.xml ${CMAKE_CURRENT_SOURCE_DIR}/network-ns3/3links_d.xml @@ -63,7 +62,7 @@ set(xml_files ${xml_files} ${CMAKE_CURRENT_SOURCE_DIR}/app-masterworker/a foreach(x app-masterworker cloud-capping cloud-masterworker cloud-migration dht-pastry dht-kademlia platform-failures - energy-onoff energy-vm + energy-vm process-create synchro-semaphore) ADD_TESH_FACTORIES(msg-${x} "thread;ucontext;raw;boost" diff --git a/examples/msg/energy-onoff/energy-onoff.c b/examples/msg/energy-onoff/energy-onoff.c deleted file mode 100644 index cd82406db1..0000000000 --- a/examples/msg/energy-onoff/energy-onoff.c +++ /dev/null @@ -1,101 +0,0 @@ -/* Copyright (c) 2007-2010, 2013-2015. The SimGrid Team. - * All rights reserved. */ - -/* This program is free software; you can redistribute it and/or modify it - * under the terms of the license (GNU LGPL) which comes with this package. */ - -#include "simgrid/msg.h" -#include "simgrid/plugins/energy.h" - -XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, "Messages specific for this msg example"); - -static void simulate_bootup(msg_host_t host) { - int previous_pstate = MSG_host_get_pstate(host); - - XBT_INFO("Switch to virtual pstate 3, that encodes the shutting down state in the XML file of that example"); - MSG_host_set_pstate(host,3); - - msg_host_t host_list[1] = {host}; - double flops_amount[1] = {1}; - double bytes_amount[1] = {0}; - - XBT_INFO("Actually start the host"); - MSG_host_on(host); - - XBT_INFO("Simulate the boot up by executing one flop on that host"); - // We use a parallel task to run some task on a remote host. - msg_task_t bootup = MSG_parallel_task_create("boot up", 1, host_list, flops_amount, bytes_amount, NULL); - MSG_task_execute(bootup); - MSG_task_destroy(bootup); - - XBT_INFO("Switch back to previously selected pstate %d", previous_pstate); - MSG_host_set_pstate(host, previous_pstate); -} - -static void simulate_shutdown(msg_host_t host) { - int previous_pstate = MSG_host_get_pstate(host); - - XBT_INFO("Switch to virtual pstate 4, that encodes the shutting down state in the XML file of that example"); - MSG_host_set_pstate(host,4); - - msg_host_t host_list[1] = {host}; - double flops_amount[1] = {1}; - double bytes_amount[1] = {0}; - - XBT_INFO("Simulate the shutdown by executing one flop on that remote host (using a parallel task)"); - msg_task_t shutdown = MSG_parallel_task_create("shutdown", 1, host_list, flops_amount, bytes_amount, NULL); - MSG_task_execute(shutdown); - MSG_task_destroy(shutdown); - - XBT_INFO("Switch back to previously selected pstate %d", previous_pstate); - MSG_host_set_pstate(host, previous_pstate); - - XBT_INFO("Actually shutdown the host"); - MSG_host_off(host); -} - -static int onoff(int argc, char *argv[]) { - msg_host_t host1 = MSG_host_by_name("MyHost1"); - - XBT_INFO("Energetic profile: %s", MSG_host_get_property_value(host1,"watt_per_state")); - XBT_INFO("Initial peak speed=%.0E flop/s; Energy dissipated =%.0E J", MSG_host_get_speed(host1), - sg_host_get_consumed_energy(host1)); - - XBT_INFO("Sleep for 10 seconds"); - MSG_process_sleep(10); - XBT_INFO("Done sleeping. Current peak speed=%.0E; Energy dissipated=%.2f J", MSG_host_get_speed(host1), - sg_host_get_consumed_energy(host1)); - - simulate_shutdown(host1); - XBT_INFO("Host1 is now OFF. Current peak speed=%.0E flop/s; Energy dissipated=%.0f J", MSG_host_get_speed(host1), - sg_host_get_consumed_energy(host1)); - - XBT_INFO("Sleep for 10 seconds"); - MSG_process_sleep(10); - XBT_INFO("Done sleeping. Current peak speed=%.0E; Energy dissipated=%.2f J", MSG_host_get_speed(host1), - sg_host_get_consumed_energy(host1)); - - simulate_bootup(host1); - XBT_INFO("Host1 is now ON again. Current peak speed=%.0E flop/s; Energy dissipated=%.0f J", MSG_host_get_speed(host1), - sg_host_get_consumed_energy(host1)); - - return 0; -} - -int main(int argc, char *argv[]) -{ - sg_host_energy_plugin_init(); - MSG_init(&argc, argv); - - xbt_assert(argc == 2, "Usage: %s platform_file\n\tExample: %s msg_platform.xml\n", argv[0], argv[0]); - - MSG_create_environment(argv[1]); - - MSG_process_create("onoff_test", onoff, NULL, MSG_get_host_by_name("MyHost2")); - - msg_error_t res = MSG_main(); - - XBT_INFO("Total simulation time: %.2f", MSG_get_clock()); - - return res != MSG_OK; -} diff --git a/examples/msg/energy-onoff/energy-onoff.tesh b/examples/msg/energy-onoff/energy-onoff.tesh deleted file mode 100644 index 94f529abf2..0000000000 --- a/examples/msg/energy-onoff/energy-onoff.tesh +++ /dev/null @@ -1,52 +0,0 @@ -#! ./tesh - -p Testing the mechanism for computing host energy consumption - -! output sort 19 -$ ${bindir:=.}/energy-onoff$EXEEXT ${srcdir:=.}/platform_onoff.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" -> [ 0.000000] (1:onoff_test@MyHost2) Energetic profile: 95.0:200.0,93.0:170.0,90.0:150.0, 120:120,110:110 -> [ 0.000000] (1:onoff_test@MyHost2) Initial peak speed=1E+08 flop/s; Energy dissipated =0E+00 J -> [ 0.000000] (1:onoff_test@MyHost2) Sleep for 10 seconds -> [ 10.000000] (1:onoff_test@MyHost2) Done sleeping. Current peak speed=1E+08; Energy dissipated=950.00 J -> [ 10.000000] (1:onoff_test@MyHost2) Switch to virtual pstate 4, that encodes the shutting down state in the XML file of that example -> [ 10.000000] (1:onoff_test@MyHost2) Simulate the shutdown by executing one flop on that remote host (using a parallel task) -> [ 16.997901] (1:onoff_test@MyHost2) Switch back to previously selected pstate 0 -> [ 16.997901] (1:onoff_test@MyHost2) Actually shutdown the host -> [ 16.997901] (1:onoff_test@MyHost2) Host1 is now OFF. Current peak speed=1E+08 flop/s; Energy dissipated=1720 J -> [ 16.997901] (1:onoff_test@MyHost2) Sleep for 10 seconds -> [ 26.997901] (1:onoff_test@MyHost2) Done sleeping. Current peak speed=1E+08; Energy dissipated=1819.77 J -> [ 26.997901] (1:onoff_test@MyHost2) Switch to virtual pstate 3, that encodes the shutting down state in the XML file of that example -> [ 26.997901] (1:onoff_test@MyHost2) Actually start the host -> [ 26.997901] (1:onoff_test@MyHost2) Simulate the boot up by executing one flop on that host -> [176.997893] (0:maestro@) Total energy consumption: 37519.557482 Joules (used hosts: 37519.557482 Joules; unused/idle hosts: 0.000000) -> [176.997893] (0:maestro@) Total simulation time: 177.00 -> [176.997893] (0:maestro@) Energy consumption of host MyHost1: 19819.768169 Joules -> [176.997893] (0:maestro@) Energy consumption of host MyHost2: 17699.789313 Joules -> [176.997893] (1:onoff_test@MyHost2) Switch back to previously selected pstate 0 -> [176.997893] (1:onoff_test@MyHost2) Host1 is now ON again. Current peak speed=1E+08 flop/s; Energy dissipated=19820 J - -! output sort 19 -$ ${bindir:=.}/energy-onoff$EXEEXT ${srcdir:=.}/platform_onoff.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=host/model:ptask_L07 -> [ 0.000000] (0:maestro@) Configuration change: Set 'host/model' to 'ptask_L07' -> [ 0.000000] (0:maestro@) Switching to the L07 model to handle parallel tasks. -> [ 0.000000] (1:onoff_test@MyHost2) Energetic profile: 95.0:200.0,93.0:170.0,90.0:150.0, 120:120,110:110 -> [ 0.000000] (1:onoff_test@MyHost2) Initial peak speed=1E+08 flop/s; Energy dissipated =0E+00 J -> [ 0.000000] (1:onoff_test@MyHost2) Sleep for 10 seconds -> [ 10.000000] (1:onoff_test@MyHost2) Done sleeping. Current peak speed=1E+08; Energy dissipated=950.00 J -> [ 10.000000] (1:onoff_test@MyHost2) Switch to virtual pstate 4, that encodes the shutting down state in the XML file of that example -> [ 10.000000] (1:onoff_test@MyHost2) Simulate the shutdown by executing one flop on that remote host (using a parallel task) -> [ 16.997901] (1:onoff_test@MyHost2) Switch back to previously selected pstate 0 -> [ 16.997901] (1:onoff_test@MyHost2) Actually shutdown the host -> [ 16.997901] (1:onoff_test@MyHost2) Host1 is now OFF. Current peak speed=1E+08 flop/s; Energy dissipated=1720 J -> [ 16.997901] (1:onoff_test@MyHost2) Sleep for 10 seconds -> [ 26.997901] (1:onoff_test@MyHost2) Done sleeping. Current peak speed=1E+08; Energy dissipated=1819.77 J -> [ 26.997901] (1:onoff_test@MyHost2) Switch to virtual pstate 3, that encodes the shutting down state in the XML file of that example -> [ 26.997901] (1:onoff_test@MyHost2) Actually start the host -> [ 26.997901] (1:onoff_test@MyHost2) Simulate the boot up by executing one flop on that host -> [176.997893] (0:maestro@) Total energy consumption: 37519.557482 Joules (used hosts: 37519.557482 Joules; unused/idle hosts: 0.000000) -> [176.997893] (0:maestro@) Total simulation time: 177.00 -> [176.997893] (0:maestro@) Energy consumption of host MyHost1: 19819.768169 Joules -> [176.997893] (0:maestro@) Energy consumption of host MyHost2: 17699.789313 Joules -> [176.997893] (1:onoff_test@MyHost2) Switch back to previously selected pstate 0 -> [176.997893] (1:onoff_test@MyHost2) Host1 is now ON again. Current peak speed=1E+08 flop/s; Energy dissipated=19820 J - diff --git a/examples/msg/energy-onoff/platform_onoff.xml b/examples/msg/energy-onoff/platform_onoff.xml deleted file mode 100644 index 5010de2b47..0000000000 --- a/examples/msg/energy-onoff/platform_onoff.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/s4u/CMakeLists.txt b/examples/s4u/CMakeLists.txt index 010edb3dae..2af150664e 100644 --- a/examples/s4u/CMakeLists.txt +++ b/examples/s4u/CMakeLists.txt @@ -2,7 +2,7 @@ foreach (example actor-create actor-daemon actor-join actor-kill actor-lifetime app-chainsend app-masterworker app-pingpong app-token-ring async-wait async-waitany async-waitall cloud-simple - energy-exec energy-link energy-vm + energy-exec energy-boot energy-link energy-vm exec-async exec-basic exec-dvfs exec-monitor exec-ptask exec-remote io-file-system io-file-remote io-storage-raw mutex @@ -55,6 +55,7 @@ set(xml_files ${xml_files} ${CMAKE_CURRENT_SOURCE_DIR}/actor-create/s4u-a ${CMAKE_CURRENT_SOURCE_DIR}/async-waitall/s4u-async-waitall_d.xml ${CMAKE_CURRENT_SOURCE_DIR}/async-wait/s4u-async-wait_d.xml ${CMAKE_CURRENT_SOURCE_DIR}/dht-chord/s4u-dht-chord_d.xml + ${CMAKE_CURRENT_SOURCE_DIR}/energy-boot/platform_boot.xml ${CMAKE_CURRENT_SOURCE_DIR}/io-file-remote/s4u-io-file-remote_d.xml ${CMAKE_CURRENT_SOURCE_DIR}/platform-properties/s4u-platform-properties_d.xml ${CMAKE_CURRENT_SOURCE_DIR}/replay-comm/s4u-replay-comm-split_d.xml @@ -72,7 +73,7 @@ foreach(example actor-create actor-daemon actor-join actor-kill actor-lifetime a async-wait async-waitall async-waitany cloud-simple dht-chord - energy-exec energy-link energy-vm + energy-exec energy-boot energy-link energy-vm exec-async exec-basic exec-dvfs exec-monitor exec-ptask exec-remote platform-properties plugin-hostload mutex io-file-system io-file-remote io-storage-raw diff --git a/examples/s4u/README.doc b/examples/s4u/README.doc index 7c8a609304..cafaae8e98 100644 --- a/examples/s4u/README.doc +++ b/examples/s4u/README.doc @@ -244,6 +244,12 @@ result in short reads and short write, as in reality. This example shows how to retrieve and display the energy consumed by the network during communications. + - Modeling the shutdown and boot of hosts + @ref examples/s4u/energy-boot/platform_boot.xml + @ref examples/s4u/energy-boot/s4u-energy-boot.cpp\n + Simple example of model of model for the energy consumption during + the host boot and shutdown periods. + @section s4u_ex_tracing Tracing and visualization features Tracing can be activated by various configuration options which @@ -310,20 +316,22 @@ than the previous examples. @example examples/s4u/async-wait/s4u-async-wait.cpp @example examples/s4u/async-waitall/s4u-async-waitall.cpp @example examples/s4u/async-waitany/s4u-async-waitany.cpp -@example examples/s4u/dht-chord/s4u-dht-chord.cpp -@example examples/s4u/exec-basic/s4u-exec-basic.cpp -@example examples/s4u/exec-async/s4u-exec-async.cpp -@example examples/s4u/exec-dvfs/s4u-exec-dvfs.cpp -@example examples/s4u/exec-monitor/s4u-exec-monitor.cpp -@example examples/s4u/exec-ptask/s4u-exec-ptask.cpp -@example examples/s4u/exec-remote/s4u-exec-remote.cpp @example examples/s4u/app-bittorrent/s4u-bittorrent.cpp @example examples/s4u/app-chainsend/s4u-app-chainsend.cpp @example examples/s4u/app-masterworker/s4u-app-masterworker.cpp @example examples/s4u/app-pingpong/s4u-app-pingpong.cpp @example examples/s4u/app-token-ring/s4u-app-token-ring.cpp +@example examples/s4u/dht-chord/s4u-dht-chord.cpp +@example examples/s4u/energy-boot/platform_boot.xml +@example examples/s4u/energy-boot/s4u-energy-boot.cpp @example examples/s4u/energy-exec/s4u-energy-exec.cpp @example examples/s4u/energy-link/s4u-energy-link.cpp +@example examples/s4u/exec-basic/s4u-exec-basic.cpp +@example examples/s4u/exec-async/s4u-exec-async.cpp +@example examples/s4u/exec-dvfs/s4u-exec-dvfs.cpp +@example examples/s4u/exec-monitor/s4u-exec-monitor.cpp +@example examples/s4u/exec-ptask/s4u-exec-ptask.cpp +@example examples/s4u/exec-remote/s4u-exec-remote.cpp @example examples/s4u/io-file-system/s4u-io-file-system.cpp @example examples/s4u/io-file-remote/s4u-io-file-remote.cpp @example examples/s4u/io-storage-raw/s4u-io-storage-raw.cpp diff --git a/examples/s4u/energy-boot/platform_boot.xml b/examples/s4u/energy-boot/platform_boot.xml new file mode 100644 index 0000000000..f137829fab --- /dev/null +++ b/examples/s4u/energy-boot/platform_boot.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/s4u/energy-boot/s4u-energy-boot.cpp b/examples/s4u/energy-boot/s4u-energy-boot.cpp new file mode 100644 index 0000000000..4be7995588 --- /dev/null +++ b/examples/s4u/energy-boot/s4u-energy-boot.cpp @@ -0,0 +1,115 @@ +/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved. */ + +/* This program is free software; you can redistribute it and/or modify it + * under the terms of the license (GNU LGPL) which comes with this package. */ + +/* This is an example of how the bootup and shutdown periods can be modeled + * with SimGrid, takes both the time and overall consumption into account. + * + * The main idea is to augment the platform description to declare fake + * pstate that represent these states. The CPU speed of these state is zero + * (the CPU delivers 0 flop per second when booting) while the energy + * consumption is the one measured on average on the modeled machine. + * + * When you want to bootup the machine, you set it into the pstate encoding + * the boot (3 in this example), and leave it so for the right time using a + * sleep_for(). During that time no other execution can progress since the + * resource speed is set at 0 flop/s in this fake pstate. Once this is over, + * the boot is done and we switch back to the regular pstate. Conversely, + * the fake pstate 4 is used to encode the shutdown delay. + * + * Some people don't like the idea to add fake pstates for the boot time, and + * would like SimGrid to provide a "cleaner" model for that. But the "right" + * model depends on the study you want to conduct. If you want to study the + * instantaneous consumption of a rebooting data center, the model used here + * is not enough since it considers only the average consumption over the boot, + * while the instantaneous consumption changes dramatically. Conversely, a + * model taking the instantaneous changes into account will be very difficult + * to instantiate correctly (which values will you use?), so it's not adapted + * to most studies. At least, fake pstates allow you to do exactly what you + * need for your very study. + */ + +#include "simgrid/s4u.hpp" +#include "simgrid/plugins/energy.h" + +XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_test, "Messages specific for this example"); + +static void simulate_bootup(simgrid::s4u::Host* host) +{ + int previous_pstate = host->getPstate(); + + XBT_INFO("Switch to virtual pstate 3, that encodes the 'booting up' state in that platform"); + host->setPstate(3); + + XBT_INFO("Actually start the host"); + host->turnOn(); + + XBT_INFO("Wait 150s to simulate the boot time."); + simgrid::s4u::this_actor::sleep_for(150); + + XBT_INFO("The host is now up and running. Switch back to previous pstate %d", previous_pstate); + host->setPstate(previous_pstate); +} + +static void simulate_shutdown(simgrid::s4u::Host* host) +{ + int previous_pstate = host->getPstate(); + + XBT_INFO("Switch to virtual pstate 4, that encodes the 'shutting down' state in that platform"); + host->setPstate(4); + + XBT_INFO("Wait 7 seconds to simulate the shutdown time."); + simgrid::s4u::this_actor::sleep_for(7); + + XBT_INFO("Switch back to previous pstate %d, that will be used on reboot.", previous_pstate); + host->setPstate(previous_pstate); + + XBT_INFO("Actually shutdown the host"); + host->turnOff(); +} + +static int monitor() +{ + simgrid::s4u::Host* host1 = simgrid::s4u::Host::by_name("MyHost1"); + + XBT_INFO("Initial pstate: %d; Energy dissipated so far:%.0E J", host1->getPstate(), + sg_host_get_consumed_energy(host1)); + + XBT_INFO("Sleep for 10 seconds"); + simgrid::s4u::this_actor::sleep_for(10); + XBT_INFO("Done sleeping. Current pstate: %d; Energy dissipated so far: %.2f J", host1->getPstate(), + sg_host_get_consumed_energy(host1)); + + simulate_shutdown(host1); + XBT_INFO("Host1 is now OFF. Current pstate: %d; Energy dissipated so far: %.2f J", host1->getPstate(), + sg_host_get_consumed_energy(host1)); + + XBT_INFO("Sleep for 10 seconds"); + simgrid::s4u::this_actor::sleep_for(10); + XBT_INFO("Done sleeping. Current pstate: %d; Energy dissipated so far: %.2f J", host1->getPstate(), + sg_host_get_consumed_energy(host1)); + + simulate_bootup(host1); + XBT_INFO("Host1 is now ON again. Current pstate: %d; Energy dissipated so far: %.2f J", host1->getPstate(), + sg_host_get_consumed_energy(host1)); + + return 0; +} + +int main(int argc, char* argv[]) +{ + sg_host_energy_plugin_init(); + simgrid::s4u::Engine e(&argc, argv); + + xbt_assert(argc == 2, "Usage: %s platform_file\n\tExample: %s platform.xml\n", argv[0], argv[0]); + + e.loadPlatform(argv[1]); + simgrid::s4u::Actor::createActor("Boot Monitor", simgrid::s4u::Host::by_name("MyHost2"), monitor); + + e.run(); + + XBT_INFO("End of simulation."); + + return 0; +} diff --git a/examples/s4u/energy-boot/s4u-energy-boot.tesh b/examples/s4u/energy-boot/s4u-energy-boot.tesh new file mode 100644 index 0000000000..6f9f4c9f40 --- /dev/null +++ b/examples/s4u/energy-boot/s4u-energy-boot.tesh @@ -0,0 +1,47 @@ +#! ./tesh + +p Modeling the host energy consumption during boot and shutdown + +$ ${bindir:=.}/s4u-energy-boot$EXEEXT ${srcdir:=.}/platform_boot.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" +> [ 0.000000] (1:Boot Monitor@MyHost2) Initial pstate: 0; Energy dissipated so far:0E+00 J +> [ 0.000000] (1:Boot Monitor@MyHost2) Sleep for 10 seconds +> [ 10.000000] (1:Boot Monitor@MyHost2) Done sleeping. Current pstate: 0; Energy dissipated so far: 950.00 J +> [ 10.000000] (1:Boot Monitor@MyHost2) Switch to virtual pstate 4, that encodes the 'shutting down' state in that platform +> [ 10.000000] (1:Boot Monitor@MyHost2) Wait 7 seconds to simulate the shutdown time. +> [ 17.000000] (1:Boot Monitor@MyHost2) Switch back to previous pstate 0, that will be used on reboot. +> [ 17.000000] (1:Boot Monitor@MyHost2) Actually shutdown the host +> [ 17.000000] (1:Boot Monitor@MyHost2) Host1 is now OFF. Current pstate: 0; Energy dissipated so far: 1720.00 J +> [ 17.000000] (1:Boot Monitor@MyHost2) Sleep for 10 seconds +> [ 27.000000] (1:Boot Monitor@MyHost2) Done sleeping. Current pstate: 0; Energy dissipated so far: 1820.00 J +> [ 27.000000] (1:Boot Monitor@MyHost2) Switch to virtual pstate 3, that encodes the 'booting up' state in that platform +> [ 27.000000] (1:Boot Monitor@MyHost2) Actually start the host +> [ 27.000000] (1:Boot Monitor@MyHost2) Wait 150s to simulate the boot time. +> [177.000000] (1:Boot Monitor@MyHost2) The host is now up and running. Switch back to previous pstate 0 +> [177.000000] (1:Boot Monitor@MyHost2) Host1 is now ON again. Current pstate: 0; Energy dissipated so far: 19820.00 J +> [177.000000] (0:maestro@) Total energy consumption: 37520.000000 Joules (used hosts: 37520.000000 Joules; unused/idle hosts: 0.000000) +> [177.000000] (0:maestro@) End of simulation. +> [177.000000] (0:maestro@) Energy consumption of host MyHost1: 19820.000000 Joules +> [177.000000] (0:maestro@) Energy consumption of host MyHost2: 17700.000000 Joules + +$ ${bindir:=.}/s4u-energy-boot$EXEEXT ${srcdir:=.}/platform_boot.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=host/model:ptask_L07 +> [ 0.000000] (0:maestro@) Configuration change: Set 'host/model' to 'ptask_L07' +> [ 0.000000] (0:maestro@) Switching to the L07 model to handle parallel tasks. +> [ 0.000000] (1:Boot Monitor@MyHost2) Initial pstate: 0; Energy dissipated so far:0E+00 J +> [ 0.000000] (1:Boot Monitor@MyHost2) Sleep for 10 seconds +> [ 10.000000] (1:Boot Monitor@MyHost2) Done sleeping. Current pstate: 0; Energy dissipated so far: 950.00 J +> [ 10.000000] (1:Boot Monitor@MyHost2) Switch to virtual pstate 4, that encodes the 'shutting down' state in that platform +> [ 10.000000] (1:Boot Monitor@MyHost2) Wait 7 seconds to simulate the shutdown time. +> [ 17.000000] (1:Boot Monitor@MyHost2) Switch back to previous pstate 0, that will be used on reboot. +> [ 17.000000] (1:Boot Monitor@MyHost2) Actually shutdown the host +> [ 17.000000] (1:Boot Monitor@MyHost2) Host1 is now OFF. Current pstate: 0; Energy dissipated so far: 1720.00 J +> [ 17.000000] (1:Boot Monitor@MyHost2) Sleep for 10 seconds +> [ 27.000000] (1:Boot Monitor@MyHost2) Done sleeping. Current pstate: 0; Energy dissipated so far: 1820.00 J +> [ 27.000000] (1:Boot Monitor@MyHost2) Switch to virtual pstate 3, that encodes the 'booting up' state in that platform +> [ 27.000000] (1:Boot Monitor@MyHost2) Actually start the host +> [ 27.000000] (1:Boot Monitor@MyHost2) Wait 150s to simulate the boot time. +> [177.000000] (1:Boot Monitor@MyHost2) The host is now up and running. Switch back to previous pstate 0 +> [177.000000] (1:Boot Monitor@MyHost2) Host1 is now ON again. Current pstate: 0; Energy dissipated so far: 19820.00 J +> [177.000000] (0:maestro@) Total energy consumption: 37520.000000 Joules (used hosts: 37520.000000 Joules; unused/idle hosts: 0.000000) +> [177.000000] (0:maestro@) End of simulation. +> [177.000000] (0:maestro@) Energy consumption of host MyHost1: 19820.000000 Joules +> [177.000000] (0:maestro@) Energy consumption of host MyHost2: 17700.000000 Joules