14 #include <stdatomic.h>
22 #define termination_cant_end() (atomic_load_explicit(&nodes_to_end, memory_order_relaxed) > 0)
30 extern void termination_force(
void);
double simtime_t
Simulation time data type.
Definition: ROOT-Sim.h:27
Core ROOT-Sim functionalities.
int nid_t
Used to identify MPI nodes in a distributed environment.
Definition: core.h:72
LP construction functions.
A complete LP context.
Definition: lp.h:22
void termination_on_gvt(simtime_t current_gvt)
Update the termination module state after a GVT computation.
Definition: termination.c:73
void termination_on_ctrl_msg(void)
Compute termination operations after the receipt of a termination control message.
Definition: termination.c:61
void termination_on_msg_process(struct lp_ctx *lp, simtime_t msg_time)
Compute termination operations after a new message has been processed.
Definition: termination.c:47
void termination_on_lp_rollback(struct lp_ctx *lp, simtime_t msg_time)
Compute termination operations after a LP has been rollbacked.
Definition: termination.c:102
void termination_global_init(void)
Initialize the termination detection module node-wide.
Definition: termination.c:27
_Atomic nid_t nodes_to_end
The number of nodes that still need to continue running the simulation.
Definition: termination.c:15
void termination_lp_init(struct lp_ctx *lp)
Initialize the termination detection module LP-wide.
Definition: termination.c:36