// Run a task
start = MSG_get_clock();
msg_task_t task1 = MSG_task_create ("t1", 100E6, 0, NULL);
- XBT_INFO("Run a task of %.0E flops",MSG_task_get_flops_amount(task1));
+ XBT_INFO("Run a task of %.0E flops", MSG_task_get_initial_flops_amount(task1));
MSG_task_execute (task1);
MSG_task_destroy(task1);
XBT_INFO("Task done (duration: %.2f s). Current peak speed=%.0E flop/s; Current consumption: from %.0fW to %.0fW"
// Run a second task
start = MSG_get_clock();
task1 = MSG_task_create ("t2", 100E6, 0, NULL);
- XBT_INFO("Run a task of %.0E flops",MSG_task_get_flops_amount(task1));
+ XBT_INFO("Run a task of %.0E flops", MSG_task_get_initial_flops_amount(task1));
MSG_task_execute (task1);
MSG_task_destroy(task1);
XBT_INFO("Task done (duration: %.2f s). Current peak speed=%.0E flop/s; Energy dissipated=%.0f J",
MSG_task_destroy(task);
break;
}
- //adding the value returned by MSG_task_get_compute_duration(task)
- //to the variable "task_computation"
- TRACE_host_variable_add(MSG_host_get_name(MSG_host_self()), "task_computation", MSG_task_get_flops_amount(task));
+ // adding the value returned by MSG_task_get_compute_duration(task) to the variable "task_computation"
+ TRACE_host_variable_add(MSG_host_get_name(MSG_host_self()), "task_computation",
+ MSG_task_get_initial_flops_amount(task));
MSG_task_execute(task);
MSG_task_destroy(task);
task = NULL;
XBT_PUBLIC(msg_error_t) MSG_process_sleep(double nb_sec);
XBT_PUBLIC(void) MSG_task_set_flops_amount(msg_task_t task, double flops_amount);
-/* Unable to compile that without -Werror=deprecated-declarations
-XBT_ATTRIB_DEPRECATED_v321( "Use MSG_task_get_initial_flops_amount if you want to get initial amounts of flops, or "
- "Use MSG_task_get_remaining_work_ratio to get task progress (in order "
- "to compute progress in flops)") static inline double MSG_task_get_flops_amount(msg_task_t task)
-{
- return MSG_task_get_flops_amount(task);
-}
-*/
-
-XBT_PUBLIC(double) MSG_task_get_flops_amount(msg_task_t task);
+XBT_ATTRIB_DEPRECATED_v321("Use MSG_task_get_initial_flops_amount if you want to get initial amounts of flops, or "
+ "Use MSG_task_get_remaining_work_ratio to get task progress (in order "
+ "to compute progress in flops)") XBT_PUBLIC(double)
+ MSG_task_get_flops_amount(msg_task_t task);
XBT_PUBLIC(double) MSG_task_get_initial_flops_amount(msg_task_t task);
XBT_PUBLIC(double) MSG_task_get_remaining_work_ratio(msg_task_t task);
XBT_PUBLIC(void) MSG_task_set_bytes_amount(msg_task_t task, double bytes_amount);
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_flops_amount(dp->task);
+ double remaining = MSG_task_get_remaining_work_ratio(dp->task);
double clock = MSG_get_clock();
if (vm == nullptr)
return;
- double remaining = MSG_task_get_flops_amount(task);
+ double remaining = MSG_task_get_remaining_work_ratio(task);
std::string key = simgrid::xbt::string_printf("%s-%p", task->name, task);
dirty_page_t dp = new s_dirty_page;
/* 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_flops_amount(task);
+ double remaining = MSG_task_get_remaining_work_ratio(task);
double clock = MSG_get_clock();
double updated = get_computed(key, vm, dp, remaining, clock); // was host instead of vm
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_flops_amount(task));
+ MSG_task_get_remaining_work_ratio(task));
MSG_task_destroy(task);
}