A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
today is doomsday: platform.xml is sacrificed for the greater good
[simgrid.git]
/
examples
/
msg
/
cloud-capping
/
cloud-capping.c
diff --git
a/examples/msg/cloud-capping/cloud-capping.c
b/examples/msg/cloud-capping/cloud-capping.c
index
c3b0f7d
..
bf6bff6
100644
(file)
--- a/
examples/msg/cloud-capping/cloud-capping.c
+++ b/
examples/msg/cloud-capping/cloud-capping.c
@@
-55,6
+55,7
@@
static int worker_busy_loop_main(int argc, char *argv[])
{
msg_task_t *task = MSG_process_get_data(MSG_process_self());
MSG_task_execute(*task);
+ MSG_task_destroy(*task);
return 0;
}
@@
-64,8
+65,7
@@
static int worker_busy_loop_main(int argc, char *argv[])
static void test_dynamic_change(void)
{
- xbt_dynar_t hosts_dynar = MSG_hosts_as_dynar();
- msg_host_t pm0 = xbt_dynar_get_as(hosts_dynar, 0, msg_host_t);
+ msg_host_t pm0 = MSG_host_by_name("Fafard");
msg_host_t vm0 = MSG_vm_create_core(pm0, "VM0");
msg_host_t vm1 = MSG_vm_create_core(pm0, "VM1");
@@
-195,10
+195,8
@@
static void test_two_tasks(msg_host_t hostA, msg_host_t hostB)
static int master_main(int argc, char *argv[])
{
- xbt_dynar_t hosts_dynar = MSG_hosts_as_dynar();
- msg_host_t pm0 = xbt_dynar_get_as(hosts_dynar, 0, msg_host_t);
- msg_host_t pm1 = xbt_dynar_get_as(hosts_dynar, 0, msg_host_t);
- xbt_dynar_free(&hosts_dynar);
+ msg_host_t pm0 = MSG_host_by_name("Fafard");
+ msg_host_t pm1 = MSG_host_by_name("Fafard");
XBT_INFO("# 1. Put a single task on a PM. ");
test_one_task(pm0);
@@
-311,8
+309,7
@@
int main(int argc, char *argv[])
MSG_create_environment(argv[1]);
- xbt_dynar_t hosts_dynar = MSG_hosts_as_dynar();
- msg_host_t pm0 = xbt_dynar_get_as(hosts_dynar, 0, msg_host_t);
+ msg_host_t pm0 = MSG_host_by_name("Fafard");
launch_master(pm0);
int res = MSG_main();