- a = MSG_task_get(&task_bw, PORT_22);
- if (a == MSG_OK) {
- time1 = MSG_get_clock();
- sender_time = *((double *) (task_bw->data));
- time = sender_time;
- communication_time = time1 - time;
- INFO1("Task received : %s", task_bw->name);
- MSG_task_destroy(task_bw);
- INFO1("Communic. time %le", communication_time);
- INFO1("--- bw %f ----", task_comm_size_bw / communication_time);
- } else {
- xbt_assert0(0, "Unexpected behavior");
- }
+ a = MSG_task_receive(&task_bw,MSG_host_get_name(MSG_host_self()));
+
+ xbt_assert(a == MSG_OK, "Unexpected behavior");