- MSG_error_t res = MSG_OK;
-
- MSG_global_init(&argc, argv);
- if (argc < 3) {
- CRITICAL1("Usage: %s platform_file deployment_file\n", argv[0]);
- CRITICAL1("example: %s msg_platform.xml msg_deployment_suspend.xml\n",
- argv[0]);
- exit(1);
- }
- test_all(argv[1], argv[2]);
- res = MSG_clean();
-
- if (res == MSG_OK)
- return 0;
- else
- return 1;
-} /* end_of_main */
+ msg_error_t res = MSG_OK;
+
+ MSG_init(&argc, argv);
+ xbt_assert(argc > 1, "Usage: %s platform_file\n\tExample: %s msg_platform.xml\n", argv[0], argv[0]);
+
+ MSG_create_environment(argv[1]);
+ MSG_function_register("dream_master", dream_master);
+ MSG_process_create("dream_master", dream_master, NULL, xbt_dynar_getfirst_as(MSG_hosts_as_dynar(), msg_host_t));
+ res = MSG_main();
+
+ XBT_INFO("Simulation time %g", MSG_get_clock());
+ return res != MSG_OK;
+}