*/
int _sg_cfg_init_status = 0;
-/* instruct the upper layer (simix or simdag) to exit as soon as possible */
-bool _sg_cfg_exit_asap = false;
-
-#define sg_cfg_exit_early() \
- do { \
- _sg_cfg_exit_asap = true; \
- return; \
- } while (0)
-
/* Parse the command line, looking for options */
static void sg_config_cmd_line(int *argc, char **argv)
{
*argc = j;
}
if (shall_exit)
- sg_cfg_exit_early();
+ exit(0);
}
/* callback of the plugin variable */
if (value == "help") {
model_help("plugin", surf_plugin_description);
- sg_cfg_exit_early();
+ exit(0);
}
int plugin_id = find_model_description(surf_plugin_description, value);
if (value == "help") {
model_help("host", surf_host_model_description);
- sg_cfg_exit_early();
+ exit(0);
}
/* Make sure that the model exists */
if (value == "help") {
model_help("CPU", surf_cpu_model_description);
- sg_cfg_exit_early();
+ exit(0);
}
/* New Module missing */
if (value == "help") {
model_help("optimization", surf_optimization_mode_description);
- sg_cfg_exit_early();
+ exit(0);
}
/* New Module missing */
if (value == "help") {
model_help("storage", surf_storage_model_description);
- sg_cfg_exit_early();
+ exit(0);
}
find_model_description(surf_storage_model_description, value);
if (value == "help") {
model_help("network", surf_network_model_description);
- sg_cfg_exit_early();
+ exit(0);
}
/* New Module missing */
void sg_config_finalize()
{
- if (not _sg_cfg_init_status)
- return; /* Not initialized yet. Nothing to do */
-
simgrid::config::finalize();
_sg_cfg_init_status = 0;
}