simix_timers = xbt_heap_new(8, &free);
}
- sg_host_init();
SIMIX_STORAGE_LEVEL = xbt_lib_add_level(storage_lib, SIMIX_storage_destroy);
if (sg_cfg_get_boolean("clean_atexit"))
#endif
if (cleaned) return; // to avoid double cleaning by java and C
cleaned = 1;
- /* Kill everyone (except maestro) */
+ XBT_DEBUG("SIMIX_clean called. Simulation's over.");
+ if (!xbt_dynar_is_empty(simix_global->process_to_run) && SIMIX_get_clock() == 0.0) {
+ XBT_CRITICAL(" ");
+ XBT_CRITICAL("The time is still 0, and you still have processes ready to run.");
+ XBT_CRITICAL("It seems that you forgot to run the simulation that you setup.");
+ xbt_die("Bailing out to avoid that stop-before-start madness. Please fix your code.");
+ }
+ /* Kill all processes (but maestro) */
SIMIX_process_killall(simix_global->maestro_process, 1);
/* Exit the SIMIX network module */
char *hostname = NULL;
xbt_dynar_foreach(host_that_restart,iter,hostname) {
XBT_INFO("Restart processes on host: %s",hostname);
- SIMIX_host_autorestart(SIMIX_host_get_by_name(hostname));
+ SIMIX_host_autorestart(sg_host_by_name(hostname));
}
xbt_dynar_reset(host_that_restart);
}