# 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
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)
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
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.
@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
# 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)
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
XBT_LOG_NEW_DEFAULT_CATEGORY(test, "Pstate properties test");
-static int dvfs(int argc, char *argv[])
+static int dvfs(int argc, char* argv[])
{
double workload = 100E6;
msg_host_t host = MSG_host_self();
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();
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);
return 0;
}
-int main(int argc, char *argv[])
+int main(int argc, char* argv[])
{
MSG_init(&argc, argv);