Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of scm.gforge.inria.fr:/gitroot/simgrid/simgrid into tomerge
[simgrid.git] / examples / msg / cloud / two_tasks_vm.c
index 5881fc5..a7d61c3 100644 (file)
@@ -5,7 +5,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include <stdio.h>
-#include "msg/msg.h"
+#include "simgrid/msg.h"
 #include "xbt/sysdep.h"
 
 #include "xbt/log.h"
@@ -71,11 +71,13 @@ static int master_main(int argc, char *argv[])
 
   while(MSG_get_clock()<100) {
        if (atask != NULL)
-         XBT_INFO("aTask remaining duration: %g", MSG_task_get_remaining_computation(atask));
+         XBT_INFO("aTask remaining duration: %g", MSG_task_get_flops_amount(atask));
        MSG_process_sleep(1);
   }
 
   MSG_process_sleep(10000);
+  MSG_vm_destroy(vm0);
+  xbt_dynar_free(&hosts_dynar);
   return 1;
 }
 
@@ -101,6 +103,7 @@ int main(int argc, char *argv[]){
 
   int res = MSG_main();
   XBT_INFO("Bye (simulation time %g)", MSG_get_clock());
+  xbt_dynar_free(&hosts_dynar);
 
   return !(res == MSG_OK);
 }