static int emigrant(int argc, char *argv[])
{
INFO0("Setting process category");
- TRACE_msg_set_process_category (MSG_process_self(), "emigrant");
- MSG_process_sleep (2);
+ TRACE_msg_set_process_category(MSG_process_self(), "emigrant");
+ MSG_process_sleep(2);
INFO0("Migrating to Tremblay");
MSG_process_change_host(MSG_get_host_by_name("Tremblay"));
- MSG_process_sleep (2);
+ MSG_process_sleep(2);
INFO0("Migrating to Jupiter");
MSG_process_change_host(MSG_get_host_by_name("Jupiter"));
- MSG_process_sleep (2);
+ MSG_process_sleep(2);
INFO0("Migrating to Fafard");
MSG_process_change_host(MSG_get_host_by_name("Fafard"));
- MSG_process_sleep (2);
+ MSG_process_sleep(2);
INFO0("Migrating to Ginette");
MSG_process_change_host(MSG_get_host_by_name("Ginette"));
- MSG_process_sleep (2);
+ MSG_process_sleep(2);
INFO0("Migrating to Bourassa");
MSG_process_change_host(MSG_get_host_by_name("Bourassa"));
- MSG_process_sleep (2);
+ MSG_process_sleep(2);
return 0;
}
exit(1);
}
- //starting the simulation trace
- TRACE_start ();
- TRACE_category ("emigrant");
-
/* Simulation setting */
MSG_create_environment(argv[1]);
+ /* declaring tracing category for the process (after environment creation) */
+ TRACE_category_with_color ("emigrant", "1 0 0");
+
/* Application deployment */
MSG_function_register("emigrant", emigrant);
MSG_launch_application(argv[2]);
if (res == MSG_OK)
res = MSG_clean();
- //ending the simulation trace
- TRACE_end();
-
if (res == MSG_OK)
return 0;
else