Charades
Classes | Macros | Functions
globals.h File Reference

Declarations for global variables and associated functions. More...

#include "typedefs.h"

Go to the source code of this file.

Classes

class  Globals
 PE-level variables which may change over time. More...
 

Macros

#define PE_VALUE(x)   get_globals()->x
 Macro to simplify global variable access.
 

Functions

void clear_globals ()
 sets all global variables to default values More...
 
Globalsget_globals ()
 returns a pointer to the local Globals object More...
 

Variables

LP Configuration
unsigned g_total_lps
 total number of LPs
 
unsigned g_num_chares
 total number of chares
 
unsigned g_lps_per_chare
 number of LPs per chare (if constant)
 
LPMapperg_lp_mapper
 mapper for placing and locating LPs
 
LPFactoryg_lp_factory
 factory for creating LPs based on global id
 
Event Configuration
Time g_tw_lookahead
 event lookahead (conservative)
 
uint32_t g_num_msg_types
 number of message types
 
uint32_t g_event_buffer_size
 event buffer size
 
Scheduler Configuration
unsigned g_tw_synchronization_protocol
 scheduler type
 
unsigned g_tw_mblock
 batch size for event execution
 
Time g_tw_ts_end
 end time of simulation
 
GVT Configuration
unsigned g_tw_gvt_scheme
 GVT algorithm.
 
unsigned g_tw_gvt_interval
 distance between GVT calls
 
unsigned g_tw_gvt_trigger
 unit of the GVT interval (time or events)
 
unsigned g_tw_gvt_phases
 number of phases in a phased gvt
 
unsigned g_tw_gvt_bucket_size
 size of each bucket in a bucketed gvt
 
unsigned g_tw_async_reduction
 use asynchronous reductions in GVTs
 
double g_tw_reserve_threshold
 
uint32_t g_tw_reserve_buckets
 
uint32_t g_tw_adaptive_buckets
 
uint32_t g_tw_clear_lag
 
uint32_t g_tw_clear_buckets
 
LB Configuration
uint32_t g_tw_ldb_continuous
 
uint32_t g_tw_ldb_first
 first interval to call lb
 
unsigned g_tw_ldb_interval
 number of intervals to wait before lb
 
unsigned g_tw_max_ldb
 max number of times to call lb
 
unsigned g_tw_ldb_metric
 metric used to measure LP load
 
unsigned g_tw_metric_ts_abs
 use absolute time or not
 
unsigned g_tw_metric_invert
 whether or not to invert metric
 
RNG Configuration
unsigned g_tw_rng_default
 
Misc Configuration
char g_output_dir [256]
 output directory for extra logging
 
unsigned gvt_print_interval
 frequency of progress print outs
 
unsigned g_tw_stat_interval
 frequency of logging stats (in GVTs)
 
long int g_tw_expected_events
 expected number of committed events
 

Detailed Description

Declarations for global variables and associated functions.

Most declarations in this file are for "constant" global variables that are set during startup based on model/simulator configuration and don't ever change. Variables that are global per PE, but will change at a PE level are wrapped in a small class which will be instantiated once on each PE.

Function Documentation

◆ clear_globals()

void clear_globals ( )

sets all global variables to default values

Todo:
Can these just be initialized at declaration? Especially if they are all moved to more appropriate modules.

◆ get_globals()

Globals* get_globals ( )

returns a pointer to the local Globals object

Store the pointer in a static variable for faster lookup

Variable Documentation

◆ g_tw_rng_default

unsigned g_tw_rng_default
Todo:
documentation needed