-/* 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. */
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;
-/* Copyright (c) 2014-2015. The SimGrid Team.
- * All rights reserved. */
+/* Copyright (c) 2014-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. */
while(MSG_get_clock()<100) {
if (atask != NULL)
- XBT_INFO("aTask remaining duration: %g", MSG_task_get_remaining_work_ratio(atask));
+ XBT_INFO("aTask remaining duration: %g", MSG_task_get_flops_amount(atask));
MSG_process_sleep(1);
}
jxbt_throw_notbound(env, "task", jtask);
return -1;
}
- return (jdouble)MSG_task_get_remaining_work_ratio(ptask);
+ return (jdouble)MSG_task_get_flops_amount(ptask);
}
JNIEXPORT void JNICALL Java_org_simgrid_msg_Task_setName(JNIEnv *env, jobject jtask, jobject jname) {
for (auto const& elm : vm->pimpl_vm_->dp_objs) {
dirty_page_t dp = elm.second;
- double remaining = MSG_task_get_remaining_work_ratio(dp->task);
+ double remaining = MSG_task_get_flops_amount(dp->task);
dp->prev_clock = MSG_get_clock();
dp->prev_remaining = remaining;
XBT_DEBUG("%s@%s remaining %f", elm.first.c_str(), vm->getCname(), remaining);
for (auto const& elm : vm->pimpl_vm_->dp_objs) {
const std::string& key = elm.first;
dirty_page_t dp = elm.second;
- double remaining = MSG_task_get_remaining_work_ratio(dp->task);
+ double remaining = MSG_task_get_flops_amount(dp->task);
double clock = MSG_get_clock();
/* If we are in the middle of dirty page tracking, we record how much computation has been done until now, and keep
* the information for the lookup_() function that will called soon. */
if (vm->pimpl_vm_->dp_enabled) {
- double remaining = MSG_task_get_remaining_work_ratio(task);
+ double remaining = MSG_task_get_flops_amount(task);
double clock = MSG_get_clock();
double updated = get_computed(key, vm, dp, remaining, clock); // was host instead of vm
-/* Copyright (c) 2010-2015. The SimGrid Team.
- * All rights reserved. */
+/* Copyright (c) 2010-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. */
MSG_task_execute(task);
double end = MSG_get_clock();
XBT_INFO("Task \"%s\" done in %f (amount %f)", MSG_task_get_name(task), end - start,
- MSG_task_get_remaining_work_ratio(task));
+ MSG_task_get_flops_amount(task));
MSG_task_destroy(task);
}