ROOT-Sim core  3.0.0-rc.2
A General-Purpose Multi-threaded Parallel/Distributed Simulation Library
Functions | Variables
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.

Functions

void gvt_global_init (void)
 Initializes the gvt module in the node.
 
simtime_t gvt_phase_run (void)
 Executes a step of the GVT algorithm. More...
 
void gvt_on_msg_extraction (simtime_t msg_t)
 Informs the GVT subsystem that a new message is being processed. More...
 
void gvt_start_processing (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...
 
void gvt_msg_drain (void)
 Cleanup the distributed state of the GVT algorithm. More...
 
static void gvt_remote_msg_send (struct lp_msg *msg, nid_t dest_nid)
 
static void gvt_remote_anti_msg_send (struct lp_msg *msg, nid_t dest_nid)
 
static void gvt_remote_msg_receive (struct lp_msg *msg)
 
static void gvt_remote_anti_msg_receive (struct lp_msg *msg)
 

Variables

__thread _Bool gvt_phase
 
__thread uint32_t remote_msg_seq [2][MAX_NODES]
 
__thread uint32_t remote_msg_received [2]
 

Detailed Description

Global Virtual Time.

Function Documentation

◆ gvt_msg_drain()

void gvt_msg_drain ( void  )

Cleanup the distributed state of the GVT algorithm.

This function flushes the remaining remote messages, moreover it makes sure that all the nodes complete the potentially ongoing GVT algorithm so that MPI collectives are inactive.

◆ 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

◆ gvt_on_msg_extraction()

void gvt_on_msg_extraction ( simtime_t  msg_t)

Informs the GVT subsystem that a new message is being processed.

Parameters
msg_tthe timestamp of the message being processed

Called by the process layer when processing a new message; used in the actual GVT calculation

◆ gvt_phase_run()

simtime_t gvt_phase_run ( void  )

Executes a step of the GVT algorithm.

Returns
the latest GVT value or 0.0 if the algorithm must still complete

This function must be called several times by all the processing threads hosted in the nodes involved in the simulation before completing and returning a proper GVT value.

◆ gvt_start_processing()

void gvt_start_processing ( void  )

Handles a MSG_CTRL_GVT_START control message.

Called by the MPI layer in response to a MSG_CTRL_GVT_START control message, but also internally to start a new reduction