-/* Copyright (c) 2007-2015. The SimGrid Team.
- * All rights reserved. */
+/* Copyright (c) 2007-2017. 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 "simgrid/msg.h"
+#include "simgrid/plugins/live_migration.h"
XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, "Messages specific for this msg example");
MSG_process_create("worker0", worker_busy_loop_main, &task0, (msg_host_t)vm0);
MSG_process_create("worker1", worker_busy_loop_main, &task1, (msg_host_t)vm1);
- double task0_remain_prev = MSG_task_get_remaining_work_ratio(task0);
- double task1_remain_prev = MSG_task_get_remaining_work_ratio(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_host_get_speed(pm0);
for (int i = 0; i < 10; i++) {
MSG_vm_set_bound(vm1, new_bound);
MSG_process_sleep(100);
- double task0_remain_now = MSG_task_get_remaining_work_ratio(task0);
- double task1_remain_now = MSG_task_get_remaining_work_ratio(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;
{
/* Get the arguments */
MSG_init(&argc, argv);
+ MSG_vm_live_migration_plugin_init();
/* load the platform file */
xbt_assert(argc == 2, "Usage: %s platform_file\n\tExample: %s ../platforms/small_platform.xml\n", argv[0], argv[0]);