From: Martin Quinson Date: Tue, 21 Jul 2015 22:32:24 +0000 (+0200) Subject: make simix more resilient to PEBKAC X-Git-Tag: v3_12~444 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/06b7d3e4e520b44ecb753776c98df3204c32bc8f?ds=sidebyside make simix more resilient to PEBKAC --- diff --git a/src/simix/smx_global.c b/src/simix/smx_global.c index f5ea654e2b..34918944e9 100644 --- a/src/simix/smx_global.c +++ b/src/simix/smx_global.c @@ -242,7 +242,14 @@ void SIMIX_clean(void) #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 */