- char *task_name = get_mig_task_name(vm_name, src_pm_name, dst_pm_name, stage);
- msg_task_t task = MSG_task_create(task_name, 0, size, NULL);
-
-
- double clock_sta = MSG_get_clock();
-
-#ifdef USE_MICRO_TASK
- // const double alpha = 0.1L * 1.0E8 / (32L * 1024 * 1024);
- // const double alpha = 0.25L * 1.0E8 / (85L * 1024 * 1024);
- // const double alpha = 0.20L * 1.0E8 / (85L * 1024 * 1024);
- // const double alpha = 0.25L * 1.0E8 / (85L * 1024 * 1024);
- // const double alpha = 0.32L * 1.0E8 / (24L * 1024 * 1024); // makes super good values for 32 mbytes/s
- //const double alpha = 0.32L * 1.0E8 / (32L * 1024 * 1024);
- // const double alpha = 0.56L * 1.0E8 / (80L * 1024 * 1024);
- ////const double alpha = 0.20L * 1.0E8 / (80L * 1024 * 1024);
- // const double alpha = 0.56L * 1.0E8 / (90L * 1024 * 1024);
- // const double alpha = 0.66L * 1.0E8 / (90L * 1024 * 1024);
-
- // const double alpha = 0.20L * 1.0E8 / (80L * 1024 * 1024);
- const double alpha = 0.22L * 1.0E8 / (80L * 1024 * 1024);
-
- task_send_bounded_with_cpu_overhead(task, mbox, mig_speed, alpha);
-
-#else
- msg_error_t ret;
- if (mig_speed > 0)
- ret = MSG_task_send_bounded(task, mbox, mig_speed);
- else
- ret = MSG_task_send(task, mbox);
- xbt_assert(ret == MSG_OK);
-#endif
-
- double clock_end = MSG_get_clock();
- double duration = clock_end - clock_sta;
- double actual_speed = size / duration;
-#ifdef USE_MICRO_TASK
- double cpu_utilization = size * alpha / duration / 1.0E8;
-#else
- double cpu_utilization = 0;
-#endif
-
-
-
-
- if (stage == 2)
- XBT_INFO("mig-stage%d.%d: sent %f duration %f actual_speed %f (target %f) cpu %f", stage, stage2_round, size, duration, actual_speed, mig_speed, cpu_utilization);
- else
- XBT_INFO("mig-stage%d: sent %f duration %f actual_speed %f (target %f) cpu %f", stage, size, duration, actual_speed, mig_speed, cpu_utilization);
-
- xbt_free(task_name);
-
-
-
-#ifdef USE_MICRO_TASK
- /* The name of a micro task starts with __micro, which does not match the
- * special name that finalizes the receiver loop. Thus, we send the special task.
- **/
- {
- if (stage == 3) {
- char *task_name = get_mig_task_name(vm_name, src_pm_name, dst_pm_name, stage);
- msg_task_t task = MSG_task_create(task_name, 0, 0, NULL);
- msg_error_t ret = MSG_task_send(task, mbox);
- xbt_assert(ret == MSG_OK);
- xbt_free(task_name);
- }
- }
-#endif