ROSS
ross-global.c
Go to the documentation of this file.
1 #include <ross.h>
2 
3  /*
4  * LP data structures are allocated dynamically when the
5  * process starts up based on the number it requires.
6  *
7  * g_tw_nlp -- Number of LPs on this processor
8  * g_tw_lp_offset -- global id of g_tw_lp[0] (on this processor)
9  * g_tw_nkp -- Number of KPs on this processor
10  IF this is 1, then it gets over written as nkp_per_pe * g_tw_npe
11  thus it is total KPs in simulation, not on this processor
12  * g_tw_lp -- Public LP object array (on this processor)
13  * g_tw_kp -- Public KP object array (on this processor)
14  * g_tw_fossil_attempts -- Number of times fossil_collect is called
15  * g_tw_nRNG_per_lp -- Number of RNG per LP
16  */
17 
22 
26 tw_lp **g_tw_lp = NULL;
27 tw_kp **g_tw_kp = NULL;
29 unsigned int g_tw_nRNG_per_lp = 1;
32 unsigned int g_tw_sim_started = 0;
33 size_t g_tw_msg_sz;
34 size_t g_tw_delta_sz = 0;
35 uint32_t g_tw_buddy_alloc = 0; /**< Allocation for buddy system */
37 uint32_t g_tw_avl_node_count = 18;
38 
39 /** Tunable LZ4 param. Higher = faster with less compression.
40  17 is a good value for speed with 1 being the default value. */
41 unsigned int g_tw_lz4_knob = 17;
42 
43 size_t g_tw_event_msg_sz = 0;
44 
45  /*
46  * Minimum lookahead for a model -- model defined when
47  * using the Simple Synchronization Protocol (conservative)
48  */
49 double g_tw_lookahead=0.005;
50 
51  /*
52  * Minimum detected timestamp offset used by the simulation at
53  * runtime, can be used to help tune conservative protocol runs.
54  */
55 double g_tw_min_detected_offset=DBL_MAX;
56 
57  /**
58  * Number of messages to process at once out of the PQ before
59  * returning back to handling things like GVT, message recption,
60  * etc. AKA the "batch" parameter to ROSS.
61  */
62 unsigned int g_tw_mblock = 16;
63 unsigned int g_tw_gvt_interval = 16;
64 unsigned long long g_tw_max_opt_lookahead = ULLONG_MAX;
65 unsigned long long g_tw_gvt_realtime_interval; // calculated at runtime
66 unsigned long long g_tw_gvt_interval_start_cycles = 0;
67 
68 double g_tw_ts_end = 100000.0;
69 
70 /*
71  * g_tw_pe -- Public PE pointer
72  * g_tw_events_per_pe -- Number of events to place in for each PE.
73  * MUST be > 1 because of abort buffer.
74  */
75 tw_pe *g_tw_pe = NULL;
76 unsigned int g_tw_events_per_pe = 2048;
77 /** Number of extra events allocated per PE. Command-line customizable. */
78 unsigned int g_tw_events_per_pe_extra = 0;
79 
80 unsigned int g_tw_gvt_threshold = 1000;
81 unsigned int g_tw_gvt_done = 0;
82 
83  /*
84  * Network variables:
85  * g_tw_masternode -- pointer to GVT net node, for GVT comp
86  */
87 unsigned int g_tw_net_device_size = 0;
90 
91 FILE *g_tw_csv = NULL;
92 
93 
94 /*
95  *
96  */
97 
98 unsigned long long g_tw_clock_rate=1000000000.0; // Default to 1 GHz
99 
100 // LP Type Mapping
unsigned int g_tw_mblock
Definition: ross-global.c:62
unsigned int g_tw_sim_started
Definition: ross-global.c:32
int g_tw_fossil_attempts
Definition: ross-global.c:28
uint32_t g_tw_buddy_alloc
Definition: ross-global.c:35
unsigned int g_tw_events_per_pe_extra
Definition: ross-global.c:78
unsigned long long g_tw_gvt_interval_start_cycles
Definition: ross-global.c:66
size_t g_tw_delta_sz
Definition: ross-global.c:34
tw_lpid g_tw_rng_default
Definition: ross-global.c:30
unsigned long long g_tw_max_opt_lookahead
Definition: ross-global.c:64
tw_lptype * g_tw_lp_types
Definition: ross-global.c:101
tw_peid g_tw_mynode
Definition: ross-global.c:88
tw_peid g_tw_masternode
Definition: ross-global.c:89
unsigned int g_tw_events_per_pe
Definition: ross-global.c:76
unsigned int g_tw_gvt_threshold
Definition: ross-global.c:80
tw_synch g_tw_synchronization_protocol
Definition: ross-global.c:18
Holds the entire PE state.
Definition: ross-types.h:375
double g_tw_min_detected_offset
Definition: ross-global.c:55
uint32_t g_tw_avl_node_count
Definition: ross-global.c:37
tw_lp_map
Definition: ross-types.h:37
int32_t * tw_seed
Definition: rand-clcg4.h:4
uint64_t tw_lpid
Definition: ross.h:160
Function Pointers for ROSS Event Handlers.
Definition: ross-types.h:87
FILE * g_tw_csv
Definition: ross-global.c:91
tw_pe * g_tw_pe
Definition: ross-global.c:75
tw_typemap_f g_tw_lp_typemap
Definition: ross-global.c:102
tw_lpid(* tw_typemap_f)(tw_lpid gid)
Definition: ross-types.h:99
unsigned int g_tw_gvt_interval
Definition: ross-global.c:63
tw_lpid g_tw_lp_offset
Definition: ross-global.c:24
unsigned int g_tw_gvt_done
Definition: ross-global.c:81
size_t g_tw_event_msg_sz
Definition: ross-global.c:43
buddy_list_bucket_t * g_tw_buddy_master
Definition: ross-global.c:36
map_local_f g_tw_custom_lp_global_to_local_map
Definition: ross-global.c:19
unsigned int g_tw_net_device_size
Definition: ross-global.c:87
tw_kp ** g_tw_kp
Definition: ross-global.c:27
unsigned int g_tw_lz4_knob
Definition: ross-global.c:41
unsigned long long g_tw_gvt_realtime_interval
Definition: ross-global.c:65
tw_lpid map_onetype(tw_lpid gid)
Definition: tw-setup.c:538
unsigned long long g_tw_clock_rate
Definition: ross-global.c:98
double g_tw_ts_end
Definition: ross-global.c:68
unsigned long tw_peid
Definition: ross.h:147
enum tw_synch_e tw_synch
Definition: ross-types.h:35
tw_lp ** g_tw_lp
Definition: ross-global.c:26
tw_peid tw_kpid
Definition: ross-types.h:45
tw_kpid g_tw_nkp
Definition: ross-global.c:25
void(* map_custom_f)(void)
Definition: ross-types.h:75
size_t g_tw_msg_sz
Definition: ross-global.c:33
unsigned int g_tw_nRNG_per_lp
Definition: ross-global.c:29
double g_tw_lookahead
Definition: ross-global.c:49
tw_seed g_tw_rng_seed
Definition: ross-global.c:31
tw_lpid g_tw_nlp
Definition: ross-global.c:23
map_custom_f g_tw_custom_initial_mapping
Definition: ross-global.c:20
tw_lp *(* map_local_f)(tw_lpid)
Definition: ross-types.h:74
LP State Structure.
Definition: ross-types.h:304
tw_lp_map g_tw_mapping
Definition: ross-global.c:21