Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
the on_exit() of each actor is also executed when the simulation deadlocks
[simgrid.git] / src / simix / smx_global.cpp
1 /* Copyright (c) 2007-2020. The SimGrid Team. All rights reserved.          */
2
3 /* This program is free software; you can redistribute it and/or modify it
4  * under the terms of the license (GNU LGPL) which comes with this package. */
5
6 #include "mc/mc.h"
7 #include "simgrid/s4u/Engine.hpp"
8 #include "simgrid/s4u/Host.hpp"
9 #include "src/smpi/include/smpi_actor.hpp"
10
11 #include "simgrid/sg_config.hpp"
12 #include "src/kernel/activity/ExecImpl.hpp"
13 #include "src/kernel/activity/IoImpl.hpp"
14 #include "src/kernel/activity/MailboxImpl.hpp"
15 #include "src/kernel/activity/SleepImpl.hpp"
16 #include "src/kernel/activity/SynchroRaw.hpp"
17 #include "src/mc/mc_record.hpp"
18 #include "src/mc/mc_replay.hpp"
19 #include "src/simix/smx_private.hpp"
20 #include "src/surf/StorageImpl.hpp"
21 #include "src/surf/xml/platf.hpp"
22
23 #if SIMGRID_HAVE_MC
24 #include "src/mc/remote/Client.hpp"
25 #endif
26
27
28 XBT_LOG_NEW_CATEGORY(simix, "All SIMIX categories");
29 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_kernel, simix, "Logging specific to SIMIX (kernel)");
30
31 std::unique_ptr<simgrid::simix::Global> simix_global;
32
33 void (*SMPI_switch_data_segment)(simgrid::s4u::ActorPtr) = nullptr;
34
35 namespace simgrid {
36 namespace simix {
37 config::Flag<double> cfg_verbose_exit{"debug/verbose-exit", {"verbose-exit"}, "Display the actor status at exit", true};
38 } // namespace simix
39 } // namespace simgrid
40
41 XBT_ATTRIB_NORETURN static void inthandler(int)
42 {
43   if (simgrid::simix::cfg_verbose_exit) {
44     XBT_INFO("CTRL-C pressed. The current status will be displayed before exit (disable that behavior with option "
45              "'debug/verbose-exit').");
46     simix_global->display_all_actor_status();
47   }
48   else {
49     XBT_INFO("CTRL-C pressed, exiting. Hiding the current process status since 'debug/verbose-exit' is set to false.");
50   }
51   exit(1);
52 }
53
54 #ifndef _WIN32
55 static void segvhandler(int signum, siginfo_t* siginfo, void* /*context*/)
56 {
57   if ((siginfo->si_signo == SIGSEGV && siginfo->si_code == SEGV_ACCERR) || siginfo->si_signo == SIGBUS) {
58     fprintf(stderr,
59             "Access violation or Bus error detected.\n"
60             "This probably comes from a programming error in your code, or from a stack\n"
61             "overflow. If you are certain of your code, try increasing the stack size\n"
62             "   --cfg=contexts/stack-size=XXX (current size is %u KiB).\n"
63             "\n"
64             "If it does not help, this may have one of the following causes:\n"
65             "a bug in SimGrid, a bug in the OS or a bug in a third-party libraries.\n"
66             "Failing hardware can sometimes generate such errors too.\n"
67             "\n"
68             "If you think you've found a bug in SimGrid, please report it along with a\n"
69             "Minimal Working Example (MWE) reproducing your problem and a full backtrace\n"
70             "of the fault captured with gdb or valgrind.\n",
71             smx_context_stack_size / 1024);
72   } else  if (siginfo->si_signo == SIGSEGV) {
73     fprintf(stderr, "Segmentation fault.\n");
74 #if HAVE_SMPI
75     if (smpi_enabled() && smpi_cfg_privatization() == SmpiPrivStrategies::NONE) {
76 #if HAVE_PRIVATIZATION
77       fprintf(stderr, "Try to enable SMPI variable privatization with --cfg=smpi/privatization:yes.\n");
78 #else
79       fprintf(stderr, "Sadly, your system does not support --cfg=smpi/privatization:yes (yet).\n");
80 #endif /* HAVE_PRIVATIZATION */
81     }
82 #endif /* HAVE_SMPI */
83   }
84   std::raise(signum);
85 }
86
87 unsigned char sigsegv_stack[SIGSTKSZ]; /* alternate stack for SIGSEGV handler */
88
89 /**
90  * Install signal handler for SIGSEGV.  Check that nobody has already installed
91  * its own handler.  For example, the Java VM does this.
92  */
93 static void install_segvhandler()
94 {
95   stack_t stack;
96   stack_t old_stack;
97   stack.ss_sp = sigsegv_stack;
98   stack.ss_size = sizeof sigsegv_stack;
99   stack.ss_flags = 0;
100
101   if (sigaltstack(&stack, &old_stack) == -1) {
102     XBT_WARN("Failed to register alternate signal stack: %s", strerror(errno));
103     return;
104   }
105   if (not(old_stack.ss_flags & SS_DISABLE)) {
106     XBT_DEBUG("An alternate stack was already installed (sp=%p, size=%zu, flags=%x). Restore it.", old_stack.ss_sp,
107               old_stack.ss_size, (unsigned)old_stack.ss_flags);
108     sigaltstack(&old_stack, nullptr);
109   }
110
111   struct sigaction action;
112   struct sigaction old_action;
113   action.sa_sigaction = &segvhandler;
114   action.sa_flags = SA_ONSTACK | SA_RESETHAND | SA_SIGINFO;
115   sigemptyset(&action.sa_mask);
116
117   /* Linux tend to raise only SIGSEGV where other systems also raise SIGBUS on severe error */
118   for (int sig : {SIGSEGV, SIGBUS}) {
119     if (sigaction(sig, &action, &old_action) == -1) {
120       XBT_WARN("Failed to register signal handler for signal %d: %s", sig, strerror(errno));
121       continue;
122     }
123     if ((old_action.sa_flags & SA_SIGINFO) || old_action.sa_handler != SIG_DFL) {
124       XBT_DEBUG("A signal handler was already installed for signal %d (%p). Restore it.", sig,
125                 (old_action.sa_flags & SA_SIGINFO) ? (void*)old_action.sa_sigaction : (void*)old_action.sa_handler);
126       sigaction(sig, &old_action, nullptr);
127     }
128   }
129 }
130
131 #endif /* _WIN32 */
132
133 /********************************* SIMIX **************************************/
134 namespace simgrid {
135 namespace simix {
136
137 Timer* Timer::set(double date, xbt::Task<void()>&& callback)
138 {
139   Timer* timer   = new Timer(date, std::move(callback));
140   timer->handle_ = simix_timers.emplace(std::make_pair(date, timer));
141   return timer;
142 }
143
144 /** @brief cancels a timer that was added earlier */
145 void Timer::remove()
146 {
147   simix_timers.erase(handle_);
148   delete this;
149 }
150
151 /** Execute all the tasks that are queued, e.g. `.then()` callbacks of futures. */
152 bool Global::execute_tasks()
153 {
154   xbt_assert(tasksTemp.empty());
155
156   if (tasks.empty())
157     return false;
158
159   do {
160     // We don't want the callbacks to modify the vector we are iterating over:
161     tasks.swap(tasksTemp);
162
163     // Execute all the queued tasks:
164     for (auto& task : tasksTemp)
165       task();
166
167     tasksTemp.clear();
168   } while (not tasks.empty());
169
170   return true;
171 }
172
173 void Global::empty_trash()
174 {
175   while (not actors_to_destroy.empty()) {
176     kernel::actor::ActorImpl* actor = &actors_to_destroy.front();
177     actors_to_destroy.pop_front();
178     XBT_DEBUG("Getting rid of %s (refcount: %d)", actor->get_cname(), actor->get_refcount());
179     intrusive_ptr_release(actor);
180   }
181 #if SIMGRID_HAVE_MC
182   xbt_dynar_reset(dead_actors_vector);
183 #endif
184 }
185 /**
186  * @brief Executes the actors in actors_to_run.
187  *
188  * The actors in actors_to_run are run (in parallel if possible). On exit, actors_to_run is empty, and actors_that_ran
189  * contains the list of actors that just ran.  The two lists are swapped so, be careful when using them before and after
190  * a call to this function.
191  */
192 void Global::run_all_actors()
193 {
194   simix_global->context_factory->run_all();
195
196   actors_to_run.swap(actors_that_ran);
197   actors_to_run.clear();
198 }
199
200 /** Wake up all actors waiting for a Surf action to finish */
201 void Global::wake_all_waiting_actors()
202 {
203   for (auto const& model : all_existing_models) {
204     kernel::resource::Action* action;
205
206     XBT_DEBUG("Handling the failed actions (if any)");
207     while ((action = model->extract_failed_action())) {
208       XBT_DEBUG("   Handling Action %p", action);
209       if (action->get_activity() != nullptr)
210         kernel::activity::ActivityImplPtr(action->get_activity())->post();
211     }
212     XBT_DEBUG("Handling the terminated actions (if any)");
213     while ((action = model->extract_done_action())) {
214       XBT_DEBUG("   Handling Action %p", action);
215       if (action->get_activity() == nullptr)
216         XBT_DEBUG("probably vcpu's action %p, skip", action);
217       else
218         kernel::activity::ActivityImplPtr(action->get_activity())->post();
219     }
220   }
221 }
222
223 void Global::display_all_actor_status()
224 {
225   XBT_INFO("%zu actors are still running, waiting for something.", process_list.size());
226   /*  List the actors and their state */
227   XBT_INFO("Legend of the following listing: \"Actor <pid> (<name>@<host>): <status>\"");
228   for (auto const& kv : process_list) {
229     kernel::actor::ActorImpl* actor = kv.second;
230
231     if (actor->waiting_synchro) {
232       const char* synchro_description = "unknown";
233       // we don't care about the Activity type to get its name, use RawImpl
234       const char* name = boost::static_pointer_cast<kernel::activity::ActivityImpl_T<kernel::activity::RawImpl>>(
235                              actor->waiting_synchro)
236                              ->get_cname();
237
238       if (boost::dynamic_pointer_cast<kernel::activity::ExecImpl>(actor->waiting_synchro) != nullptr)
239         synchro_description = "execution";
240
241       if (boost::dynamic_pointer_cast<kernel::activity::CommImpl>(actor->waiting_synchro) != nullptr)
242         synchro_description = "communication";
243
244       if (boost::dynamic_pointer_cast<kernel::activity::SleepImpl>(actor->waiting_synchro) != nullptr)
245         synchro_description = "sleeping";
246
247       if (boost::dynamic_pointer_cast<kernel::activity::RawImpl>(actor->waiting_synchro) != nullptr)
248         synchro_description = "synchronization";
249
250       if (boost::dynamic_pointer_cast<kernel::activity::IoImpl>(actor->waiting_synchro) != nullptr)
251         synchro_description = "I/O";
252
253       XBT_INFO("Actor %ld (%s@%s): waiting for %s activity %p (%s) in state %d to finish", actor->get_pid(),
254                actor->get_cname(), actor->get_host()->get_cname(), synchro_description,
255                (xbt_log_no_loc ? (void*)0xDEADBEEF : actor->waiting_synchro.get()), name,
256                (int)actor->waiting_synchro->state_);
257     } else {
258       XBT_INFO("Actor %ld (%s@%s)", actor->get_pid(), actor->get_cname(), actor->get_host()->get_cname());
259     }
260   }
261 }
262
263 config::Flag<double> cfg_breakpoint{
264     "debug/breakpoint", {"simix/breakpoint"}, "When non-negative, raise a SIGTRAP after given (simulated) time", -1.0};
265 } // namespace simix
266 } // namespace simgrid
267
268 static simgrid::kernel::actor::ActorCode maestro_code;
269 void SIMIX_set_maestro(void (*code)(void*), void* data)
270 {
271 #ifdef _WIN32
272   XBT_INFO("WARNING, SIMIX_set_maestro is believed to not work on windows. Please help us investigating this issue if you need that feature");
273 #endif
274   maestro_code = std::bind(code, data);
275 }
276
277 /**
278  * @ingroup SIMIX_API
279  * @brief Initialize SIMIX internal data.
280  */
281 void SIMIX_global_init(int *argc, char **argv)
282 {
283 #if SIMGRID_HAVE_MC
284   // The communication initialization is done ASAP.
285   // We need to communicate  initialization of the different layers to the model-checker.
286   simgrid::mc::Client::initialize();
287 #endif
288
289   if (simix_global == nullptr) {
290     surf_init(argc, argv); /* Initialize SURF structures */
291
292     simix_global.reset(new simgrid::simix::Global());
293     simix_global->maestro_ = nullptr;
294     SIMIX_context_mod_init();
295
296     // Either create a new context with maestro or create
297     // a context object with the current context maestro):
298     simgrid::kernel::actor::create_maestro(maestro_code);
299
300     /* Prepare to display some more info when dying on Ctrl-C pressing */
301     std::signal(SIGINT, inthandler);
302
303 #ifndef _WIN32
304     install_segvhandler();
305 #endif
306     /* register a function to be called by SURF after the environment creation */
307     sg_platf_init();
308     simgrid::s4u::Engine::on_platform_created.connect(surf_presolve);
309   }
310
311   if (simgrid::config::get_value<bool>("debug/clean-atexit"))
312     atexit(SIMIX_clean);
313 }
314
315 int smx_cleaned = 0;
316 /**
317  * @ingroup SIMIX_API
318  * @brief Clean the SIMIX simulation
319  *
320  * This functions remove the memory used by SIMIX
321  */
322 void SIMIX_clean()
323 {
324   if (smx_cleaned)
325     return; // to avoid double cleaning by java and C
326
327   smx_cleaned = 1;
328   XBT_DEBUG("SIMIX_clean called. Simulation's over.");
329   if (not simix_global->actors_to_run.empty() && SIMIX_get_clock() <= 0.0) {
330     XBT_CRITICAL("   ");
331     XBT_CRITICAL("The time is still 0, and you still have processes ready to run.");
332     XBT_CRITICAL("It seems that you forgot to run the simulation that you setup.");
333     xbt_die("Bailing out to avoid that stop-before-start madness. Please fix your code.");
334   }
335
336 #if HAVE_SMPI
337   if (simix_global->process_list.size() > 0) {
338     if(smpi_process()->initialized()){
339       xbt_die("Process exited without calling MPI_Finalize - Killing simulation");
340     }else{
341       XBT_WARN("Process called exit when leaving - Skipping cleanups");
342       return;
343     }
344   }
345 #endif
346
347   /* Kill all processes (but maestro) */
348   simix_global->maestro_->kill_all();
349   simix_global->run_all_actors();
350   simix_global->empty_trash();
351
352   /* Exit the SIMIX network module */
353   SIMIX_mailbox_exit();
354
355   while (not simgrid::simix::simix_timers.empty()) {
356     delete simgrid::simix::simix_timers.top().second;
357     simgrid::simix::simix_timers.pop();
358   }
359   /* Free the remaining data structures */
360   simix_global->actors_to_run.clear();
361   simix_global->actors_that_ran.clear();
362   simix_global->actors_to_destroy.clear();
363   simix_global->process_list.clear();
364
365 #if SIMGRID_HAVE_MC
366   xbt_dynar_free(&simix_global->actors_vector);
367   xbt_dynar_free(&simix_global->dead_actors_vector);
368 #endif
369
370   /* Let's free maestro now */
371   delete simix_global->maestro_;
372   simix_global->maestro_ = nullptr;
373
374   /* Finish context module and SURF */
375   SIMIX_context_mod_exit();
376
377   surf_exit();
378
379   simix_global = nullptr;
380 }
381
382 /**
383  * @ingroup SIMIX_API
384  * @brief A clock (in second).
385  *
386  * @return Return the clock.
387  */
388 double SIMIX_get_clock()
389 {
390   if(MC_is_active() || MC_record_replay_is_active()){
391     return MC_process_clock_get(SIMIX_process_self());
392   }else{
393     return surf_get_clock();
394   }
395 }
396
397 /** Handle any pending timer. Returns if something was actually run. */
398 static bool SIMIX_execute_timers()
399 {
400   bool result = false;
401   while (not simgrid::simix::simix_timers.empty() && SIMIX_get_clock() >= simgrid::simix::simix_timers.top().first) {
402     result = true;
403     // FIXME: make the timers being real callbacks (i.e. provide dispatchers that read and expand the args)
404     smx_timer_t timer = simgrid::simix::simix_timers.top().second;
405     simgrid::simix::simix_timers.pop();
406     timer->callback();
407     delete timer;
408   }
409   return result;
410 }
411
412 /**
413  * @ingroup SIMIX_API
414  * @brief Run the main simulation loop.
415  */
416 void SIMIX_run()
417 {
418   if (MC_record_replay_is_active()) {
419     simgrid::mc::replay(MC_record_path);
420     return;
421   }
422
423   double time = 0;
424
425   do {
426     XBT_DEBUG("New Schedule Round; size(queue)=%zu", simix_global->actors_to_run.size());
427
428     if (simgrid::simix::cfg_breakpoint >= 0.0 && surf_get_clock() >= simgrid::simix::cfg_breakpoint) {
429       XBT_DEBUG("Breakpoint reached (%g)", simgrid::simix::cfg_breakpoint.get());
430       simgrid::simix::cfg_breakpoint = -1.0;
431 #ifdef SIGTRAP
432       std::raise(SIGTRAP);
433 #else
434       std::raise(SIGABRT);
435 #endif
436     }
437
438     simix_global->execute_tasks();
439
440     while (not simix_global->actors_to_run.empty()) {
441       XBT_DEBUG("New Sub-Schedule Round; size(queue)=%zu", simix_global->actors_to_run.size());
442
443       /* Run all processes that are ready to run, possibly in parallel */
444       simix_global->run_all_actors();
445
446       /* answer sequentially and in a fixed arbitrary order all the simcalls that were issued during that sub-round */
447
448       /* WARNING, the order *must* be fixed or you'll jeopardize the simulation reproducibility (see RR-7653) */
449
450       /* Here, the order is ok because:
451        *
452        *   Short proof: only maestro adds stuff to the actors_to_run array, so the execution order of user contexts do
453        *   not impact its order.
454        *
455        *   Long proof: actors remain sorted through an arbitrary (implicit, complex but fixed) order in all cases.
456        *
457        *   - if there is no kill during the simulation, actors remain sorted according by their PID.
458        *     Rationale: This can be proved inductively.
459        *        Assume that actors_to_run is sorted at a beginning of one round (it is at round 0: the deployment file
460        *        is parsed linearly).
461        *        Let's show that it is still so at the end of this round.
462        *        - if an actor is added when being created, that's from maestro. It can be either at startup
463        *          time (and then in PID order), or in response to a process_create simcall. Since simcalls are handled
464        *          in arbitrary order (inductive hypothesis), we are fine.
465        *        - If an actor is added because it's getting killed, its subsequent actions shouldn't matter
466        *        - If an actor gets added to actors_to_run because one of their blocking action constituting the meat
467        *          of a simcall terminates, we're still good. Proof:
468        *          - You are added from ActorImpl::simcall_answer() only. When this function is called depends on the
469        *            resource kind (network, cpu, disk, whatever), but the same arguments hold. Let's take communications
470        *            as an example.
471        *          - For communications, this function is called from SIMIX_comm_finish().
472        *            This function itself don't mess with the order since simcalls are handled in FIFO order.
473        *            The function is called:
474        *            - before the comm starts (invalid parameters, or resource already dead or whatever).
475        *              The order then trivial holds since maestro didn't interrupt its handling of the simcall yet
476        *            - because the communication failed or were canceled after startup. In this case, it's called from
477        *              the function we are in, by the chunk:
478        *                       set = model->states.failed_action_set;
479        *                       while ((synchro = extract(set)))
480        *                          SIMIX_simcall_post((smx_synchro_t) synchro->data);
481        *              This order is also fixed because it depends of the order in which the surf actions were
482        *              added to the system, and only maestro can add stuff this way, through simcalls.
483        *              We thus use the inductive hypothesis once again to conclude that the order in which synchros are
484        *              popped out of the set does not depend on the user code's execution order.
485        *            - because the communication terminated. In this case, synchros are served in the order given by
486        *                       set = model->states.done_action_set;
487        *                       while ((synchro = extract(set)))
488        *                          SIMIX_simcall_post((smx_synchro_t) synchro->data);
489        *              and the argument is very similar to the previous one.
490        *            So, in any case, the orders of calls to CommImpl::finish() do not depend on the order in which user
491        *            actors are executed.
492        *          So, in any cases, the orders of actors within actors_to_run do not depend on the order in which
493        *          user actors were executed previously.
494        *     So, if there is no killing in the simulation, the simulation reproducibility is not jeopardized.
495        *   - If there is some actor killings, the order is changed by this decision that comes from user-land
496        *     But this decision may not have been motivated by a situation that were different because the simulation is
497        *     not reproducible.
498        *     So, even the order change induced by the actor killing is perfectly reproducible.
499        *
500        *   So science works, bitches [http://xkcd.com/54/].
501        *
502        *   We could sort the actors_that_ran array completely so that we can describe the order in which simcalls are
503        *   handled (like "according to the PID of issuer"), but it's not mandatory (order is fixed already even if
504        *   unfriendly).
505        *   That would thus be a pure waste of time.
506        */
507
508       for (auto const& actor : simix_global->actors_that_ran) {
509         if (actor->simcall.call_ != SIMCALL_NONE) {
510           actor->simcall_handle(0);
511         }
512       }
513
514       simix_global->execute_tasks();
515       do {
516         simix_global->wake_all_waiting_actors();
517       } while (simix_global->execute_tasks());
518
519       /* If only daemon processes remain, cancel their actions, mark them to die and reschedule them */
520       if (simix_global->process_list.size() == simix_global->daemons.size())
521         for (auto const& dmon : simix_global->daemons) {
522           XBT_DEBUG("Kill %s", dmon->get_cname());
523           simix_global->maestro_->kill(dmon);
524         }
525     }
526
527     time = simgrid::simix::Timer::next();
528     if (time > -1.0 || not simix_global->process_list.empty()) {
529       XBT_DEBUG("Calling surf_solve");
530       time = surf_solve(time);
531       XBT_DEBUG("Moving time ahead : %g", time);
532     }
533
534     /* Notify all the hosts that have failed */
535     /* FIXME: iterate through the list of failed host and mark each of them */
536     /* as failed. On each host, signal all the running processes with host_fail */
537
538     // Execute timers and tasks until there isn't anything to be done:
539     bool again = false;
540     do {
541       again = SIMIX_execute_timers();
542       if (simix_global->execute_tasks())
543         again = true;
544       simix_global->wake_all_waiting_actors();
545     } while (again);
546
547     /* Clean actors to destroy */
548     simix_global->empty_trash();
549
550     XBT_DEBUG("### time %f, #processes %zu, #to_run %zu", time, simix_global->process_list.size(),
551               simix_global->actors_to_run.size());
552
553     if (time < 0. && simix_global->actors_to_run.empty() && not simix_global->process_list.empty()) {
554       if (simix_global->process_list.size() <= simix_global->daemons.size()) {
555         XBT_CRITICAL("Oops! Daemon actors cannot do any blocking activity (communications, synchronization, etc) "
556                      "once the simulation is over. Please fix your on_exit() functions.");
557       } else {
558         XBT_CRITICAL("Oops! Deadlock or code not perfectly clean.");
559       }
560       simix_global->display_all_actor_status();
561       simgrid::s4u::Engine::on_deadlock();
562       for (auto const& kv : simix_global->process_list) {
563         XBT_DEBUG("Kill %s", kv.second->get_cname());
564         simix_global->maestro_->kill(kv.second);
565       }
566     }
567   } while (time > -1.0 || not simix_global->actors_to_run.empty());
568
569   if (not simix_global->process_list.empty())
570     THROW_IMPOSSIBLE;
571
572   simgrid::s4u::Engine::on_simulation_end();
573 }
574
575 double SIMIX_timer_next() // XBT_ATTRIB_DEPRECATED_v329
576 {
577   return simgrid::simix::Timer::next();
578 }
579
580 smx_timer_t SIMIX_timer_set(double date, void (*callback)(void*), void* arg) // XBT_ATTRIB_DEPRECATED_v329
581 {
582   return simgrid::simix::Timer::set(date, std::bind(callback, arg));
583 }
584
585 /** @brief cancels a timer that was added earlier */
586 void SIMIX_timer_remove(smx_timer_t timer) // XBT_ATTRIB_DEPRECATED_v329
587 {
588   timer->remove();
589 }
590
591 /** @brief Returns the date at which the timer will trigger (or 0 if nullptr timer) */
592 double SIMIX_timer_get_date(smx_timer_t timer) // XBT_ATTRIB_DEPRECATED_v329
593 {
594   return timer ? timer->get_date() : 0;
595 }
596
597 void SIMIX_display_process_status() // XBT_ATTRIB_DEPRECATED_v329
598 {
599   simix_global->display_all_actor_status();
600 }
601
602 int SIMIX_is_maestro()
603 {
604   if (simix_global == nullptr) // SimDag
605     return true;
606   const simgrid::kernel::actor::ActorImpl* self = SIMIX_process_self();
607   return self == nullptr || self == simix_global->maestro_;
608 }