Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
integrate examples/s4u/energy-pstate + move the msg version away
authorMartin Quinson <martin.quinson@loria.fr>
Sat, 2 Dec 2017 21:17:56 +0000 (22:17 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Sat, 2 Dec 2017 21:17:56 +0000 (22:17 +0100)
examples/msg/CMakeLists.txt
examples/msg/README.doc
examples/s4u/README.doc
teshsuite/msg/CMakeLists.txt
teshsuite/msg/energy-pstate/energy-pstate.c [moved from examples/msg/energy-pstate/energy-pstate.c with 89% similarity]
teshsuite/msg/energy-pstate/energy-pstate.tesh [moved from examples/msg/energy-pstate/energy-pstate.tesh with 100% similarity]

index b525bb8..9c6caf6 100644 (file)
@@ -1,7 +1,7 @@
 # C examples
 foreach(x app-masterworker app-pingpong app-token-ring 
           cloud-capping cloud-masterworker cloud-migration cloud-simple cloud-two-tasks
-          dht-pastry energy-consumption energy-onoff energy-pstate energy-vm platform-failures 
+          dht-pastry energy-consumption energy-onoff energy-vm platform-failures 
           io-file io-remote task-priority 
           plugin-hostload
           process-create process-join
@@ -79,7 +79,7 @@ set(xml_files    ${xml_files}     ${CMAKE_CURRENT_SOURCE_DIR}/app-masterworker/a
 foreach(x app-chainsend app-masterworker app-pingpong app-token-ring
           cloud-capping cloud-masterworker cloud-migration cloud-simple 
           cloud-two-tasks dht-pastry dht-kademlia platform-failures io-file io-remote task-priority
-         energy-consumption energy-onoff energy-pstate energy-vm
+         energy-consumption energy-onoff energy-vm
          plugin-hostload
           process-create process-join process-startkilltime
           platform-properties synchro-semaphore)
index 00c8f32..00970c1 100644 (file)
@@ -50,12 +50,6 @@ documentation, but it should remain readable directly.
     You can specify a start time and a kill time in the deployment
     file. See all *_d.xml files in this directory.
 
-  - <b>Using Pstates on a host</b>
-    @ref examples/msg/energy-pstate/energy-pstate.c\n
-    Show how define a set of pstates for a host and how the current
-    pstate can be accessed/changed with @ref MSG_get_host_current_power_peak and @ref  MSG_set_host_pstate.
-    See also the platform XML file for have a details on how to declare the CPU capacity for each pstate.
-
 @section msg_ex_tracing Tracing and visualization features
 
 Tracing can be activated by various configuration options which
index 5583e38..a19f874 100644 (file)
@@ -102,7 +102,7 @@ documentation, but it should remain readable directly.
     Actors can move or be moved from a host to another with the @ref migrate method.
 
   - <b>Using Pstates on a host</b>
-    @ref examples/s4u/energy-pstate/s4u-energy-pstate.c\n
+    @ref examples/s4u/energy-pstate/s4u-energy-pstate.cpp\n
     Show how define a set of pstates for a host and how the current
     pstate can be accessed/changed with @ref getPstateSpeed and @ref  sg_host_set_pstate.
     See also the platform XML file for have a details on how to declare the CPU capacity for each pstate.
@@ -178,6 +178,7 @@ simulated storages.
 @example examples/s4u/app-token-ring/s4u-app-token-ring.cpp
 @example examples/s4u/app-masterworker/s4u-app-masterworker.cpp
 @example examples/s4u/app-pingpong/s4u-app-pingpong.cpp
+@example examples/s4u/energy-pstate/s4u-energy-pstate.cpp
 @example examples/s4u/io-file-remote/s4u-io-file-remote.cpp
 @example examples/s4u/io-raw-storage/s4u-io-raw-storage.cpp
 @example examples/s4u/mutex/s4u-mutex.cpp
index 7def179..b9b2851 100644 (file)
@@ -1,9 +1,9 @@
 # C examples
 foreach(x actions-comm actions-storage
           async-wait async-waitall async-waitany
-          cloud-sharing get_sender host_on_off host_on_off_recv host_on_off_processes
+          cloud-sharing get_sender host_on_off host_on_off_recv host_on_off_processes    
           process-daemon process-kill process-migration process-suspend process-yield
-          energy-ptask
+          energy-ptask energy-pstate
           io-raw-storage
           trace_integration)
   add_executable       (${x}  ${x}/${x}.c)
@@ -67,6 +67,7 @@ foreach(x
     actions-comm actions-storage
     async-wait async-waitall async-waitany
     app-bittorrent
+    energy-pstate
     host_on_off host_on_off_processes host_on_off_recv
     get_sender
     task_destroy_cancel task_listen_from task_progress 
similarity index 89%
rename from examples/msg/energy-pstate/energy-pstate.c
rename to teshsuite/msg/energy-pstate/energy-pstate.c
index de0d0d1..7bb46d6 100644 (file)
@@ -16,7 +16,7 @@
 
 XBT_LOG_NEW_DEFAULT_CATEGORY(test, "Pstate properties test");
 
-static int dvfs(int argc, char *argv[])
+static int dvfs(int argc, charargv[])
 {
   double workload = 100E6;
   msg_host_t host = MSG_host_self();
@@ -28,8 +28,8 @@ static int dvfs(int argc, char *argv[])
   XBT_INFO("Current power peak=%f", current_peak);
 
   // Run a task
-  msg_task_t task1 = MSG_task_create ("t1", workload, 0, NULL);
-  MSG_task_execute (task1);
+  msg_task_t task1 = MSG_task_create("t1", workload, 0, NULL);
+  MSG_task_execute(task1);
   MSG_task_destroy(task1);
 
   double task_time = MSG_get_clock();
@@ -49,15 +49,15 @@ static int dvfs(int argc, char *argv[])
   XBT_INFO("Current power peak=%f", current_peak);
 
   // Run a second task
-  task1 = MSG_task_create ("t1", workload, 0, NULL);
-  MSG_task_execute (task1);
+  task1 = MSG_task_create("t1", workload, 0, NULL);
+  MSG_task_execute(task1);
   MSG_task_destroy(task1);
 
   task_time = MSG_get_clock() - task_time;
   XBT_INFO("Task2 simulation time: %e", task_time);
 
   // Verify the default pstate is set to 0
-  host = MSG_host_by_name("MyHost2");
+  host    = MSG_host_by_name("MyHost2");
   int nb2 = MSG_host_get_nb_pstates(host);
   XBT_INFO("Count of Processor states=%d", nb2);
 
@@ -66,7 +66,7 @@ static int dvfs(int argc, char *argv[])
   return 0;
 }
 
-int main(int argc, char *argv[])
+int main(int argc, charargv[])
 {
   MSG_init(&argc, argv);