- a = MSG_task_receive(&task_la,MSG_host_get_name(MSG_host_self()));
- if (a == MSG_OK) {
- time1 = MSG_get_clock();
- sender_time = *((double *) (task_la->data));
- time = sender_time;
- communication_time = time1 - time;
- XBT_INFO("Task received : %s", task_la->name);
- xbt_free(task_la->data);
- MSG_task_destroy(task_la);
- XBT_INFO("Communic. time %e", communication_time);
- XBT_INFO("--- la %f ----", communication_time);
- } else {
- xbt_die("Unexpected behavior");
- }
+ int a = MSG_task_receive(&task_la,MSG_host_get_name(MSG_host_self()));
+
+ xbt_assert(a == MSG_OK, "Unexpected behavior");
+
+ double time1 = MSG_get_clock();
+ double sender_time = *((double *) (task_la->data));
+ double time = sender_time;
+ double communication_time = time1 - time;
+ XBT_INFO("Task received : %s", task_la->name);
+ xbt_free(task_la->data);
+ MSG_task_destroy(task_la);
+ XBT_INFO("Communic. time %e", communication_time);
+ XBT_INFO("--- la %f ----", communication_time);