executing comes back (ON_FAILURE="RESTART" on deployment file,
MSG_process_auto_restart_set).
* Use the "msg_" prefix for all datatypes (instead of m_, msg_ and MSG_),
- please stop using the old ones.
+ please stop using the old ones, they are DEPRECATED.
+ * Deprecate MSG_clean(). No need to call it anymore.
Simix:
* Bug fixes around the resource failures: don't let the processes
res = MSG_action_trace_run(argv[3]); // it's ok to pass a NULL argument here
XBT_INFO("Simulation time %g", MSG_get_clock());
- MSG_clean();
if (res == MSG_OK)
return 0;
MSG_main();
- MSG_clean();
-
return 0;
}
MSG_main();
- MSG_clean();
-
return 0;
}
XBT_CRITICAL("Messages created: %ld", smx_total_comms);
XBT_INFO("Simulated time: %g", MSG_get_clock());
- MSG_clean();
chord_exit();
if (res == MSG_OK)
res = MSG_main();
XBT_INFO("Simulation time %g", MSG_get_clock());
- MSG_clean();
free(hosts);
free(hostnames);
xbt_dynar_free(&hosts_dynar);
XBT_INFO("GPU task %p was created", mytask);
- MSG_clean();
-
if (res == MSG_OK)
return 0;
else
res = test_all(argv[1], argv[2]);
- MSG_clean();
-
if (res == MSG_OK)
return 0;
else
exit(1);
}
res = test_all(argv[1], argv[2]);
- MSG_clean();
if (res == MSG_OK)
return 0;
exit(1);
}
res = test_all(argv[1], argv[2]);
- MSG_clean();
if (res == MSG_OK)
return 0;
exit(1);
}
res = test_all(argv[1], argv[2]);
- MSG_clean();
if (res == MSG_OK)
return 0;
res = MSG_main();
XBT_INFO("Simulation time %g", MSG_get_clock());
- MSG_clean();
if (res == MSG_OK)
return 0;
else
res = MSG_main();
XBT_INFO("Simulation time %g", MSG_get_clock());
- MSG_clean();
if (res == MSG_OK)
return 0;
else
XBT_CRITICAL("Messages created: %ld", smx_total_comms);
XBT_INFO("Simulated time: %g", MSG_get_clock());
- MSG_clean();
if (res == MSG_OK)
return 0;
XBT_INFO("Simulation time %g", MSG_get_clock());
- MSG_clean();
-
if (res == MSG_OK)
return 0;
else
MSG_init(&argc, argv);
res = test_all();
- MSG_clean();
if (res == MSG_OK)
return 0;
MSG_init(&argc, argv);
res = test_all(argv[1]);
- MSG_clean();
if (res == MSG_OK)
return 0;
exit(1);
}
res = test_all(argv[1]);
- MSG_clean();
if (res == MSG_OK)
return 0;
exit(1);
}
res = test_all(argv[1], argv[2]);
- MSG_clean();
if (res == MSG_OK)
return 0;
exit(1);
}
res = test_all(argv[1], argv[2]);
- MSG_clean();
if (res == MSG_OK)
return 0;
exit(1);
}
test_all(argv[1], argv[2]);
- res = MSG_clean();
if (res == MSG_OK)
return 0;
res = MSG_main();
XBT_INFO("Simulation time %g", MSG_get_clock());
- MSG_clean();
if (res == MSG_OK)
return 0;
MSG_main();
- MSG_clean();
-
return 0;
}
xbt_cond_destroy(cond);
xbt_mutex_destroy(mutex);
- if (res == MSG_OK)
- res = MSG_clean();
-
if (res == MSG_OK)
return 0;
else
res = test_all(argv[1], argv[2]);
- MSG_clean();
-
if (res == MSG_OK)
return 0;
else
exit(1);
}
res = test_all(argv[1]);
- MSG_clean();
if (res == MSG_OK)
return 0;
exit(1);
}
res = test_all(argv[1], argv[2]);
- MSG_clean();
if (res == MSG_OK)
return 0;
#endif
XBT_CRITICAL("Simulated time: %g", MSG_get_clock());
- MSG_clean();
-
if (res == MSG_OK)
return 0;
else
exit(1);
}
res = test_all(argv[1], argv[2]);
- MSG_clean();
#ifdef _MSC_VER
_set_output_format(prev_exponent_format);
exit(1);
}
res = test_all(argv[1], argv[2]);
- MSG_clean();
if (res == MSG_OK)
return 0;
XBT_INFO("Total simulation time: %le", MSG_get_clock());
- MSG_clean();
-
#ifdef _MSC_VER
_set_output_format(prev_exponent_format);
#endif
exit(1);
}
test_all(argv[1], argv[2]);
- res = MSG_clean();
if (res == MSG_OK)
return 0;
exit(1);
}
test_all(argv[1], argv[2]);
- res = MSG_clean();
if (res == MSG_OK)
return 0;
res = MSG_main();
XBT_INFO("Simulation time %g", MSG_get_clock());
- MSG_clean();
if (res == MSG_OK)
return 0;
else
res = MSG_main();
XBT_INFO("Simulation time %g", MSG_get_clock());
- MSG_clean();
+
if (res == MSG_OK)
return 0;
else
MSG_launch_application(deployment_file);
MSG_main();
- MSG_clean();
return 0;
}
MSG_launch_application(deployment_file);
MSG_main();
- MSG_clean();
return 0;
}
MSG_launch_application(deployment_file);
MSG_main();
- MSG_clean();
return 0;
}
xbt_dynar_free (&marks);
}
- MSG_clean();
return 0;
} /* end_of_main */
MSG_launch_application(deployment_file);
MSG_main();
- MSG_clean();
return 0;
} /* end_of_main */
MSG_launch_application(deployment_file);
MSG_main();
- MSG_clean();
return 0;
}
char *platform_file = argv[1];
MSG_create_environment(platform_file);
MSG_main();
- MSG_clean();
return 0;
}
FILE *fp;
fp = fopen ("triva_graph.plist", "w");
if (!fp){
- MSG_clean();
return 1;
}
fprintf (fp, "{\n node = (");
fprintf (fp, "}\n");
fclose (fp);
- MSG_clean();
return 0;
}
XBT_PUBLIC(void) MSG_init_nocheck(int *argc, char **argv);
XBT_PUBLIC(msg_error_t) MSG_main(void);
-XBT_PUBLIC(msg_error_t) MSG_clean(void);
XBT_PUBLIC(void) MSG_function_register(const char *name,
xbt_main_func_t code);
XBT_PUBLIC(void) MSG_function_register_default(xbt_main_func_t code);
#define MSG_process_change_host(h) MSG_process_migrate(MSG_process_self(),h);
XBT_PUBLIC(msg_error_t) MSG_get_errno(void);
+XBT_PUBLIC(msg_error_t) MSG_clean(void);
+
XBT_PUBLIC(msg_error_t) MSG_task_get(msg_task_t * task, m_channel_t channel);
XBT_PUBLIC(msg_error_t) MSG_task_get_with_timeout(msg_task_t * task,
m_channel_t channel,
*/
static int simgrid_gc(lua_State * L)
{
- if (sglua_is_maestro(L)) {
- MSG_clean();
- }
+ // There is no need to cleanup the C world anymore, as it gets cleaned at system process closing automatically
+ // Maybe at some point we'll want to reintroduce this, for example when encapsulating the simulation properly
+ //if (sglua_is_maestro(L)) {
+ // MSG_clean();
+ //}
return 0;
}
"Logging specific to MSG (kernel)");
MSG_Global_t msg_global = NULL;
+static void MSG_exit(void);
/********************************* MSG **************************************/
XBT_DEBUG("ADD MSG LEVELS");
MSG_HOST_LEVEL = xbt_lib_add_level(host_lib, (void_f_pvoid_t) __MSG_host_destroy);
+
+ atexit(MSG_exit);
}
#ifdef MSG_USE_DEPRECATED
}
/** \ingroup msg_simulation
- * \brief Clean the MSG simulation
+ * \brief Clean the MSG simulation.
+ *
+ * This function is called automatically when the system process stops, so I guess that calling it manually is useless nowadays.
*/
-msg_error_t MSG_clean(void)
-{
+static void MSG_exit(void) {
+ if (msg_global==NULL)
+ return;
XBT_DEBUG("Closing MSG");
#ifdef HAVE_TRACING
xbt_swag_free(msg_global->vms);
free(msg_global);
msg_global = NULL;
-
- return MSG_OK;
}
{
return msg_global->sent_msg;
}
+
+#ifdef MSG_USE_DEPRECATED
+msg_error_t MSG_clean(void) {
+ return MSG_OK;
+}
+#endif
MSG_create_environment(argv[1]);
MSG_launch_application(argv[1]);
res = MSG_main();
- MSG_clean();
+
if (res == MSG_OK)
return 0;
else
/* Run the example. */
res = MSG_main();
- MSG_clean();
-
if (res == MSG_OK)
return 0;
else
res = MSG_main();
XBT_INFO("Simulation time %g", MSG_get_clock());
- MSG_clean();
+
if (res == MSG_OK)
return 0;
else
if (status == 0){
XBT_INFO ("%s expects --cfg=tracing:1 --cfg=tracing/platform:1", argv[0]);
}
- MSG_clean();
#else
XBT_INFO ("works only if simgrid was compiled with tracing enabled.");
#endif