X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/8b3658fa4a201ffb434857bb83a75b98aac5be79..aafaaf396698612d5174bb0780c0a548e5422d84:/examples/msg/cloud/masterslave_virtual_machines.c diff --git a/examples/msg/cloud/masterslave_virtual_machines.c b/examples/msg/cloud/masterslave_virtual_machines.c index bfbc81f6af..e1527eb61e 100644 --- a/examples/msg/cloud/masterslave_virtual_machines.c +++ b/examples/msg/cloud/masterslave_virtual_machines.c @@ -63,7 +63,11 @@ int master(int argc, char *argv[]) { argv[0] = xbt_strdup(slavename); argv[1] = bprintf("%d",i); argv[2] = NULL; - msg_vm_t vm = MSG_vm_start(slaves[i],2); + + char vmName[64]; + snprintf(vmName, 64, "vm_%d", i); + + msg_vm_t vm = MSG_vm_start(slaves[i],vmName,2); MSG_vm_bind(vm, MSG_process_create_with_arguments(slavename,slave_fun,NULL,slaves[i],2,argv)); } @@ -130,6 +134,9 @@ int master(int argc, char *argv[]) { MSG_task_send(finalize, mailbox_buffer); } + XBT_INFO("Wait a while before effective shutdown."); + MSG_process_sleep(2); + xbt_dynar_foreach(vms,i,vm) { MSG_vm_shutdown(vm); MSG_vm_destroy(vm);