ROOT-Sim core
3.0.0-rc.2
A General-Purpose Multi-threaded Parallel/Distributed Simulation Library
|
Termination detection module. More...
Go to the source code of this file.
Macros | |
#define | termination_cant_end() (atomic_load_explicit(&nodes_to_end, memory_order_relaxed) > 0) |
Get the termination status of this simulation. 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_gvt (simtime_t current_gvt) |
Update the termination module state after a GVT computation. More... | |
void | termination_on_lp_rollback (struct lp_ctx *lp, simtime_t msg_time) |
Compute termination operations after a LP has been rollbacked. More... | |
void | termination_on_ctrl_msg (void) |
Compute termination operations after the receipt of a termination control message. | |
void | termination_force (void) |
Variables | |
_Atomic nid_t | nodes_to_end |
The number of nodes that still need to continue running the simulation. | |
Termination detection module.
#define termination_cant_end | ( | ) | (atomic_load_explicit(&nodes_to_end, memory_order_relaxed) > 0) |
Get the termination status of this simulation.
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 |