ROOT-Sim core
3.0.0-rc.2
A General-Purpose Multi-threaded Parallel/Distributed Simulation Library
|
Termination detection module. More...
Functions | |
void | termination_global_init (void) |
Initialize the termination detection module node-wide. | |
void | termination_lp_init (struct lp_ctx *lp) |
Initialize the termination detection module LP-wide. | |
void | termination_on_msg_process (struct lp_ctx *lp, simtime_t msg_time) |
Compute termination operations after a new message has been processed. More... | |
void | termination_on_ctrl_msg (void) |
Compute termination operations after the receipt of a termination control message. | |
void | termination_on_gvt (simtime_t current_gvt) |
Update the termination module state after a GVT computation. More... | |
void | RootsimStop (void) |
Force termination of the simulation. | |
void | termination_on_lp_rollback (struct lp_ctx *lp, simtime_t msg_time) |
Compute termination operations after a LP has been rollbacked. More... | |
Variables | |
_Atomic nid_t | nodes_to_end |
The number of nodes that still need to continue running the simulation. | |
static _Atomic rid_t | thr_to_end |
The number of local threads that still need to continue running the simulation. | |
static __thread uint64_t | lps_to_end |
The number of thread-locally bounded LPs that still need to continue running the simulation. | |
static __thread simtime_t | max_t |
The maximum speculative time at which a thread-local LP declared its intention to terminate. More... | |
Termination detection module.
void termination_on_gvt | ( | simtime_t | current_gvt | ) |
Update the termination module state after a GVT computation.
Here we check if the simulation, from the point of view of the current thread, can be terminated. If also all the other processing threads on the node are willing to end the simulation, a termination control message is broadcast to the other nodes.
Compute termination operations after a LP has been rollbacked.
msg_time | the timestamp of the straggler or anti message which caused the rollback |
Compute termination operations after a new message has been processed.
msg_time | the timestamp of the freshly processed message |
|
static |
The maximum speculative time at which a thread-local LP declared its intention to terminate.
FIXME: a wrong high termination time during a speculative trajectory forces the simulation to uselessly continue