From: Samuel Lepetit Date: Wed, 4 Jul 2012 14:35:16 +0000 (+0200) Subject: Update cloud example to use MSG_vm_reboot. Update the tesh file X-Git-Tag: v3_8~334 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/b4ded7fdcd100a44224a46313dad6d86edbf89c0?hp=21810fadd901ebf49d9c91084e4d1e6f20f462f1;ds=sidebyside Update cloud example to use MSG_vm_reboot. Update the tesh file --- diff --git a/examples/msg/cloud/masterslave_virtual_machines.c b/examples/msg/cloud/masterslave_virtual_machines.c index 4d6a84d794..d1df1c7edb 100644 --- a/examples/msg/cloud/masterslave_virtual_machines.c +++ b/examples/msg/cloud/masterslave_virtual_machines.c @@ -66,6 +66,7 @@ int master(int argc, char *argv[]) { MSG_vm_bind(vm, MSG_process_create_with_arguments(slavename,slave_fun,NULL,slaves[i],2,argv)); } + xbt_dynar_t vms = MSG_vms_as_dynar(); XBT_INFO("Launched %ld VMs", xbt_dynar_length(vms)); @@ -99,6 +100,10 @@ int master(int argc, char *argv[]) { MSG_vm_bind(vm, MSG_process_create_with_arguments(slavename,slave_fun,NULL,slaves[i],2,argv)); } + XBT_INFO("Reboot all the VMs"); + for (i=0;i=2, "slave processes need to be given their rank as parameter"); mailbox_name=bprintf("Slave_%s",argv[1]); - + XBT_INFO("Slave listenning on %s",argv[1]); while (1) { res = MSG_task_receive(&(task),mailbox_name); xbt_assert(res == MSG_OK, "MSG_task_get failed"); diff --git a/examples/msg/cloud/masterslave_virtual_machines.tesh b/examples/msg/cloud/masterslave_virtual_machines.tesh index f63e78db99..e3e62a5373 100644 --- a/examples/msg/cloud/masterslave_virtual_machines.tesh +++ b/examples/msg/cloud/masterslave_virtual_machines.tesh @@ -116,3 +116,4 @@ $ $SG_TEST_EXENV ${bindir:=.}/cloud/masterslave_virtual_machines$EXEEXT ${srcdir > [ 2835.981646] (0:@) Simulation time 2835.98 > [ 2835.981646] (11:Slave 9@Provost) Received "finalize" from mailbox Slave_9 > [ 2835.981646] (1:master@Jacquelin) Goodbye now! +