The ROme OpTimistic Simulator  3.0.0
A General-Purpose Multithreaded Parallel/Distributed Simulation Platform
gvt.h File Reference

Global Virtual Time. More...

#include <core/core.h>
#include <lp/msg.h>
+ Include dependency graph for gvt.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define gvt_on_remote_msg_send(dest_nid)   __extension__({ remote_msg_sent[dest_nid]++; })
 
#define gvt_on_remote_msg_receive(msg_phase)
 
#define gvt_phase_get()   __extension__({ gvt_phase_green;})
 

Functions

void gvt_global_init (void)
 Initializes the gvt module in the node.
 
simtime_t gvt_phase_run (void)
 
void gvt_on_msg_process (simtime_t msg_t)
 
void gvt_on_start_ctrl_msg (void)
 Handles a MSG_CTRL_GVT_START control message. More...
 
void gvt_on_done_ctrl_msg (void)
 Handles a MSG_CTRL_GVT_DONE control message. More...
 

Variables

__thread bool gvt_phase_green
 
__thread unsigned remote_msg_sent [MAX_NODES]
 
atomic_int remote_msg_received [2]
 

Detailed Description

Global Virtual Time.

Definition in file gvt.h.

Macro Definition Documentation

◆ gvt_on_remote_msg_receive

#define gvt_on_remote_msg_receive (   msg_phase)
Value:
__extension__({ atomic_fetch_add_explicit(remote_msg_received + \
msg_phase, 1U, memory_order_relaxed); })

Definition at line 30 of file gvt.h.

Function Documentation

◆ gvt_on_done_ctrl_msg()

void gvt_on_done_ctrl_msg ( void  )

Handles a MSG_CTRL_GVT_DONE control message.

Called by the MPI layer in response to a MSG_CTRL_GVT_DONE control message

Definition at line 158 of file gvt.c.

◆ gvt_on_start_ctrl_msg()

void gvt_on_start_ctrl_msg ( void  )

Handles a MSG_CTRL_GVT_START control message.

Called by the MPI layer in response to a MSG_CTRL_GVT_START control message

Definition at line 145 of file gvt.c.