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 * g_tw_nRNG_core_per_lp -- Number of ROSS core RNG per LP for use by ROSS engine exclusively
17 */
18
23
25tw_lpid g_tw_total_lps = 0; //Total LPs in the simulation
28tw_lp **g_tw_lp = NULL;
29tw_kp **g_tw_kp = NULL;
31unsigned int g_tw_nRNG_per_lp = 1;
32unsigned int g_tw_nRNG_core_per_lp = 1;
36unsigned int g_tw_sim_started = 0;
38size_t g_tw_delta_sz = 0;
39uint32_t g_tw_buddy_alloc = 0; /**< Allocation for buddy system */
41uint32_t g_tw_avl_node_count = 18;
42
43/** Tunable LZ4 param. Higher = faster with less compression.
44 17 is a good value for speed with 1 being the default value. */
45unsigned int g_tw_lz4_knob = 17;
46
48
49 /*
50 * Minimum lookahead for a model -- model defined when
51 * using the Simple Synchronization Protocol (conservative)
52 */
53double g_tw_lookahead=0.005;
54
55 /*
56 * Minimum detected timestamp offset used by the simulation at
57 * runtime, can be used to help tune conservative protocol runs.
58 */
60
61 /**
62 * Number of messages to process at once out of the PQ before
63 * returning back to handling things like GVT, message recption,
64 * etc. AKA the "batch" parameter to ROSS.
65 */
66unsigned int g_tw_mblock = 16;
67unsigned int g_tw_gvt_interval = 16;
68unsigned long long g_tw_max_opt_lookahead = ULLONG_MAX;
69unsigned long long g_tw_gvt_realtime_interval; // calculated at runtime
70unsigned long long g_tw_gvt_interval_start_cycles = 0;
71
72double g_tw_ts_end = 100000.0;
73
74/*
75 * g_tw_pe -- Public PE pointer
76 * g_tw_events_per_pe -- Number of events to place in for each PE.
77 * MUST be > 1 because of abort buffer.
78 */
79tw_pe *g_tw_pe = NULL;
80unsigned int g_tw_events_per_pe = 2048;
81/** Number of extra events allocated per PE. Command-line customizable. */
82unsigned int g_tw_events_per_pe_extra = 0;
83
84unsigned int g_tw_gvt_threshold = 1000;
85unsigned int g_tw_gvt_done = 0;
86
87 /*
88 * Network variables:
89 * g_tw_masternode -- pointer to GVT net node, for GVT comp
90 */
91unsigned int g_tw_net_device_size = 0;
94
95FILE *g_tw_csv = NULL;
96
97
98/*
99 *
100 */
101
102unsigned long long g_tw_clock_rate=1000000000.0; // Default to 1 GHz
103
104// LP Type Mapping
107
108#ifdef USE_RAND_TIEBREAKER
109/* Largest tie-breaker signature.
110 *
111 * This isn't technically the largest possible tie-breaker signature, but it is
112 * very close.
113 * The actual largest signature would have a tie_lineage_length equal to
114 * MAX_TIE_CHAIN.
115 * Having a tie_lineage_length of 1 makes copying it very fast (we only copy a
116 * total of four numbers), instead of copying an entire array. */
118 .recv_ts = TW_STIME_MAX,
119 .priority = DBL_MAX,
120 .tie_lineage_length = 1,
121 .event_tiebreaker = { DBL_MAX },
122};
123#endif
struct buddy_list_bucket buddy_list_bucket_t
int32_t * tw_seed
Definition rand-clcg4.h:7
unsigned long tw_peid
Definition ross-base.h:36
#define TW_STIME_MAX
Definition ross-base.h:45
uint64_t tw_lpid
Definition ross-base.h:49
tw_typemap_f g_tw_lp_typemap
double g_tw_min_detected_offset
Definition ross-global.c:59
unsigned int g_tw_gvt_threshold
Definition ross-global.c:84
buddy_list_bucket_t * g_tw_buddy_master
Definition ross-global.c:40
tw_seed g_tw_rng_seed
Definition ross-global.c:34
unsigned int g_tw_events_per_pe_extra
Definition ross-global.c:82
tw_lpid map_onetype(tw_lpid gid)
Definition tw-setup.c:594
tw_pe * g_tw_pe
Definition ross-global.c:79
tw_lptype * g_tw_lp_types
tw_lp ** g_tw_lp
Definition ross-global.c:28
unsigned int g_tw_lz4_knob
Definition ross-global.c:45
unsigned long long g_tw_clock_rate
tw_kpid g_tw_nkp
Definition ross-global.c:27
unsigned int g_tw_events_per_pe
Definition ross-global.c:80
unsigned long long g_tw_gvt_interval_start_cycles
Definition ross-global.c:70
tw_kp ** g_tw_kp
Definition ross-global.c:29
unsigned int g_tw_net_device_size
Definition ross-global.c:91
map_custom_f g_tw_custom_initial_mapping
Definition ross-global.c:21
tw_peid g_tw_mynode
Definition ross-global.c:92
uint32_t g_tw_buddy_alloc
Definition ross-global.c:39
FILE * g_tw_csv
Definition ross-global.c:95
map_local_f g_tw_custom_lp_global_to_local_map
Definition ross-global.c:20
size_t g_tw_event_msg_sz
Definition ross-global.c:47
unsigned int g_tw_nRNG_per_lp
Definition ross-global.c:31
size_t g_tw_msg_sz
Definition ross-global.c:37
unsigned int g_tw_nRNG_core_per_lp
Definition ross-global.c:32
tw_lpid g_tw_rng_default
Definition ross-global.c:33
tw_seed g_tw_core_rng_seed
Definition ross-global.c:35
tw_lp_map g_tw_mapping
Definition ross-global.c:22
unsigned int g_tw_gvt_done
Definition ross-global.c:85
tw_lpid g_tw_nlp
Definition ross-global.c:24
tw_lpid g_tw_total_lps
Definition ross-global.c:25
tw_peid g_tw_masternode
Definition ross-global.c:93
uint32_t g_tw_avl_node_count
Definition ross-global.c:41
size_t g_tw_delta_sz
Definition ross-global.c:38
unsigned int g_tw_gvt_interval
Definition ross-global.c:67
unsigned int g_tw_mblock
Definition ross-global.c:66
unsigned int g_tw_sim_started
Definition ross-global.c:36
unsigned long long g_tw_gvt_realtime_interval
Definition ross-global.c:69
tw_synch g_tw_synchronization_protocol
Definition ross-global.c:19
double g_tw_lookahead
Definition ross-global.c:53
tw_lpid g_tw_lp_offset
Definition ross-global.c:26
unsigned long long g_tw_max_opt_lookahead
Definition ross-global.c:68
double g_tw_ts_end
Definition ross-global.c:72
int g_tw_fossil_attempts
Definition ross-global.c:30
tw_peid tw_kpid
Definition ross-types.h:55
tw_event_sig const g_tw_max_sig
tw_lpid(* tw_typemap_f)(tw_lpid gid)
Definition ross-types.h:109
void(* map_custom_f)(void)
Definition ross-types.h:85
tw_lp_map
Definition ross-types.h:47
@ LINEAR
Definition ross-types.h:48
@ NO_SYNCH
Definition ross-types.h:36
tw_lp *(* map_local_f)(tw_lpid)
Definition ross-types.h:84
enum tw_synch_e tw_synch
Definition ross-types.h:45
LP State Structure.
Definition ross-types.h:336
Function Pointers for ROSS Event Handlers.
Definition ross-types.h:97
Holds the entire PE state.
Definition ross-types.h:416