-int main(int argc, char *argv[]){
- MSG_error_t res = MSG_OK;
-
- /* Check the given arguments */
- MSG_global_init(&argc,argv);
- if (argc < 4) {
- printf ("Usage: %s platform_file deployment_file action_files\n",argv[0]);
- printf ("example: %s msg_platform.xml msg_deployment.xml actions\n",argv[0]);
- exit(1);
- }
-
- /* Simulation setting */
- MSG_create_environment(argv[1]);
-
- /* No need to register functions as in classical MSG programs: the actions get started anyway */
- MSG_launch_application(argv[2]);
-
- /* Action registration */
- MSG_action_register("send", send);
- MSG_action_register("recv", recv);
- MSG_action_register("sleep", sleep);
- MSG_action_register("compute", sleep);
-
- /* Actually do the simulation using MSG_action_trace_run */
- res = MSG_action_trace_run(argv[3]);
-
- INFO1("Simulation time %g",MSG_get_clock());
- MSG_clean();
-
- if(res==MSG_OK)
- return 0;
- else
- return 1;
-} /* end_of_main */
+int main(int argc, char *argv[])
+{
+ MSG_error_t res = MSG_OK;
+
+ /* Check the given arguments */
+ MSG_global_init(&argc, argv);
+ if (argc < 4) {
+ printf("Usage: %s platform_file deployment_file action_files\n", argv[0]);
+ printf("example: %s msg_platform.xml msg_deployment.xml actions\n",
+ argv[0]);
+ exit(1);
+ }
+
+ /* Simulation setting */
+ MSG_create_environment(argv[1]);
+
+ /* No need to register functions as in classical MSG programs: the actions get started anyway */
+ MSG_launch_application(argv[2]);
+
+ /* Action registration */
+ MSG_action_register("send", send);
+ MSG_action_register("recv", recv);
+ MSG_action_register("sleep", sleep);
+ MSG_action_register("compute", compute);
+
+ /* Actually do the simulation using MSG_action_trace_run */
+ res = MSG_action_trace_run(argv[3]);
+
+ INFO1("Simulation time %g", MSG_get_clock());
+ MSG_clean();
+
+ if (res == MSG_OK)
+ return 0;
+ else
+ return 1;
+} /* end_of_main */