X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/485a433d6e5df32fcc54eed7804af70974d8acc4..eba5ae1edf4ba60747de3d624ab2a34bdc2f5b84:/examples/msg/cloud-simple/cloud-simple.c diff --git a/examples/msg/cloud-simple/cloud-simple.c b/examples/msg/cloud-simple/cloud-simple.c index d62c24c9b4..9be4c049c7 100644 --- a/examples/msg/cloud-simple/cloud-simple.c +++ b/examples/msg/cloud-simple/cloud-simple.c @@ -109,14 +109,11 @@ static void launch_communication_worker(msg_host_t tx_host, msg_host_t rx_host) 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, 1, msg_host_t); - msg_host_t pm2 = xbt_dynar_get_as(hosts_dynar, 2, 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("Tremblay"); + msg_host_t pm2 = MSG_host_by_name("Bourassa"); msg_vm_t vm0, vm1; - XBT_INFO("## Test 1 (started): check computation on normal PMs"); XBT_INFO("### Put a task on a PM"); @@ -256,7 +253,6 @@ static int master_main(int argc, char *argv[]) MSG_vm_destroy(vm0); XBT_INFO("## Test 6 (ended)"); - xbt_dynar_free(&hosts_dynar); return 0; } @@ -279,14 +275,11 @@ int main(int argc, char *argv[]) xbt_assert(argc == 2); 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); - xbt_dynar_free(&hosts_dynar); + msg_host_t pm0 = MSG_host_by_name("Fafard"); launch_master(pm0); int res = MSG_main(); XBT_INFO("Bye (simulation time %g)", MSG_get_clock()); - xbt_dynar_free(&hosts_dynar); return !(res == MSG_OK); }