Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
sed -i -e 's/\t/ /g' [sources] Please people, stop using tabs
[simgrid.git] / examples / msg / cloud / multicore.c
index 64a00c3..c6bd09f 100644 (file)
@@ -1,11 +1,11 @@
-/* Copyright (c) 2007-2014. The SimGrid Team.
+/* Copyright (c) 2007-2015. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  * 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"         /* calloc, printf */
 
 /* Create a log channel to have nice outputs. */
@@ -29,22 +29,22 @@ static int worker_main(int argc, char *argv[])
 
 
 struct task_data {
-       msg_task_t task;
-       double prev_computation_amount;
-       double prev_clock;
+  msg_task_t task;
+  double prev_computation_amount;
+  double prev_clock;
 };
 
 
 static void task_data_init_clock(struct task_data *t)
 {
-  t->prev_computation_amount = MSG_task_get_remaining_computation(t->task);
+  t->prev_computation_amount = MSG_task_get_flops_amount(t->task);
   t->prev_clock = MSG_get_clock();
 }
 
 
 static void task_data_get_clock(struct task_data *t)
 {
-  double now_computation_amount = MSG_task_get_remaining_computation(t->task);
+  double now_computation_amount = MSG_task_get_flops_amount(t->task);
   double now_clock = MSG_get_clock();
 
   double done = t->prev_computation_amount - now_computation_amount;
@@ -177,7 +177,7 @@ static void test_vm_pin(void)
   msg_vm_t vm2 = MSG_vm_create_core(pm2, "VM2");
   msg_vm_t vm3 = MSG_vm_create_core(pm2, "VM3");
 
-  s_ws_params_t params;
+  s_vm_params_t params;
   memset(&params, 0, sizeof(params));
   params.ramsize = 1L * 1024 * 1024;
   params.skip_stage1 = 1;