void (*SMPI_switch_data_segment)(int) = nullptr;
int _sg_do_verbose_exit = 1;
-static void inthandler(int ignored)
+static void inthandler(int)
{
if ( _sg_do_verbose_exit ) {
XBT_INFO("CTRL-C pressed. The current status will be displayed before exit (disable that behavior with option 'verbose-exit').");
}
#ifndef _WIN32
-static void segvhandler(int signum, siginfo_t *siginfo, void *context)
+static void segvhandler(int signum, siginfo_t* siginfo, void* /*context*/)
{
if (siginfo->si_signo == SIGSEGV && siginfo->si_code == SEGV_ACCERR) {
fprintf(stderr, "Access violation detected.\n"
if (smx_cleaned)
return; // to avoid double cleaning by java and C
+ smx_cleaned = 1;
+ XBT_DEBUG("SIMIX_clean called. Simulation's over.");
+ if (not simix_global->process_to_run.empty() && 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.");
+ }
+
#if HAVE_SMPI
if (SIMIX_process_count()>0){
if(smpi_process()->initialized()){
}
#endif
- smx_cleaned = 1;
- XBT_DEBUG("SIMIX_clean called. Simulation's over.");
- if (not simix_global->process_to_run.empty() && 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);
SIMIX_context_runall();
*/
void SIMIX_run()
{
- if (MC_record_path) {
+ if (not MC_record_path.empty()) {
simgrid::mc::replay(MC_record_path);
return;
}