-/* Copyright (c) 2007-2013. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2007-2014. 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" /* Yeah! If you want to use msg, you need to include msg/msg.h */
+#include "simgrid/msg.h" /* Yeah! If you want to use msg, you need to include simgrid/msg.h */
#include "xbt/sysdep.h" /* calloc, printf */
/* Create a log channel to have nice outputs. */
{
char **argv = xbt_new(char *, 5);
argv[0] = xbt_strdup(pr_name);
- argv[1] = bprintf("%lf", computation_amount);
+ argv[1] = bprintf("%f", computation_amount);
argv[2] = bprintf("%d", use_bound);
- argv[3] = bprintf("%lf", bound);
+ argv[3] = bprintf("%f", bound);
argv[4] = NULL;
MSG_process_create_with_arguments(pr_name, worker_main, NULL, host, 4, argv);
msg_process_t pr1 = MSG_process_create("worker1", worker_busy_loop_main, &task1, vm1);
- double task0_remain_prev = MSG_task_get_remaining_computation(task0);
- double task1_remain_prev = MSG_task_get_remaining_computation(task1);
+ double task0_remain_prev = MSG_task_get_flops_amount(task0);
+ double task1_remain_prev = MSG_task_get_flops_amount(task1);
{
const double cpu_speed = MSG_get_host_speed(pm0);
MSG_vm_set_bound(vm1, new_bound);
MSG_process_sleep(100);
- double task0_remain_now = MSG_task_get_remaining_computation(task0);
- double task1_remain_now = MSG_task_get_remaining_computation(task1);
+ double task0_remain_now = MSG_task_get_flops_amount(task0);
+ double task1_remain_now = MSG_task_get_flops_amount(task1);
double task0_flops_per_sec = task0_remain_prev - task0_remain_now;
double task1_flops_per_sec = task1_remain_prev - task1_remain_now;
{
msg_host_t vm0 = MSG_vm_create_core(pm0, "VM0");
- s_ws_params_t params;
+ s_vm_params_t params;
memset(¶ms, 0, sizeof(params));
params.ramsize = 1L * 1000 * 1000 * 1000; // 1Gbytes
MSG_host_set_params(vm0, ¶ms);