- if (cleaned) return; // to avoid double cleaning by java and C
- cleaned = 1;
- /* Kill everyone (except maestro) */
+ if (smx_cleaned) return; // to avoid double cleaning by java and C
+ smx_cleaned = 1;
+ 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) */