- Introduced new function simgrid::s4u::Host::get_actor_count. This function
returns the number of actors running on a specific host.
+ Simix:
+ - Add parameter --cfg=simix/breakpoint to raise a SIGTRAP at given time.
+
SMPI:
- Replay: The replay file has been re-written in C++.
- Replay: Tags used for messages sent via MPI_Send / MPI_Recv are now
the C++ API has been slightly improved.
Fixed bugs:
+ - #143: Setting a breakpoint at a given time
- #258: daemonized actors hang after all non-daemonized actors have completed
----------------------------------------------------------------------------
- \c path: \ref options_generic_path
- \c plugin: \ref options_generic_plugin
+- \c simix/breakpoint: \ref options_generic_breakpoint
+
- \c storage/max_file_descriptors: \ref option_model_storage_maxfd
- \c surf/precision: \ref options_model_precision
--cfg=path:toto --cfg=path:tutu
\endverbatim
+\subsection options_generic_breakpoint Set a breakpoint
+
+\verbatim
+--cfg=simix/breakpoint:3.1416
+\endverbatim
+
+This configuration option sets a breakpoint: when the simulated clock reaches
+the given time, a SIGTRAP is raised. This can be used to stop the execution and
+get a backtrace with a debugger.
+
+It is also possible to set the breakpoint from inside the debugger, by writing
+in global variable simgrid::simix::breakpoint. For example, with gdb:
+
+\verbatim
+set variable simgrid::simix::breakpoint = 3.1416
+\endverbatim
+
\subsection options_generic_exit Behavior on Ctrl-C
By default, when Ctrl-C is pressed, the status of all existing
simgrid::xbt::signal<void()> onDeadlock;
+simgrid::config::Flag<double> breakpoint{"simix/breakpoint",
+ "When non-negative, raise a SIGTRAP after given (simulated) time", -1.0};
}
}
do {
XBT_DEBUG("New Schedule Round; size(queue)=%zu", simix_global->process_to_run.size());
+ if (simgrid::simix::breakpoint >= 0.0 && time >= simgrid::simix::breakpoint) {
+ XBT_DEBUG("Breakpoint reached (%g)", simgrid::simix::breakpoint.get());
+ simgrid::simix::breakpoint = -1.0;
+ raise(SIGTRAP);
+ }
+
SIMIX_execute_tasks();
while (not simix_global->process_to_run.empty()) {