ROSS
tw-setup.c
Go to the documentation of this file.
1 #include <ross.h>
2 #include "lz4.h"
3 #include <sys/stat.h>
4 
5 /**
6  * @file tw-setup.c
7  * @brief tw_define_lps is defined here!
8  */
9 
10 #define VERIFY_MAPPING 0
11 
12 static tw_pe *setup_pes(void);
13 unsigned int nkp_per_pe = 16;
14 static tw_clock init_start = 0;
15 
16 static const tw_optdef kernel_options[] = {
17  TWOPT_GROUP("ROSS Kernel"),
18  TWOPT_UINT("synch", g_tw_synchronization_protocol, "Sychronization Protocol: SEQUENTIAL=1, CONSERVATIVE=2, OPTIMISTIC=3, OPTIMISTIC_DEBUG=4, OPTIMISTIC_REALTIME=5"),
19  TWOPT_UINT("nkp", nkp_per_pe, "number of kernel processes (KPs) per pe"),
20  TWOPT_DOUBLE("end", g_tw_ts_end, "simulation end timestamp"),
21  TWOPT_UINT("batch", g_tw_mblock, "messages per scheduler block"),
22  TWOPT_UINT("extramem", g_tw_events_per_pe_extra, "Number of extra events allocated per PE."),
23  TWOPT_UINT("buddy-size", g_tw_buddy_alloc, "delta encoding buddy system allocation (2^X)"),
24  TWOPT_UINT("lz4-knob", g_tw_lz4_knob, "LZ4 acceleration factor (higher = faster)"),
25  TWOPT_DOUBLE("cons-lookahead", g_tw_lookahead, "Set g_tw_lookahead"),
26  TWOPT_ULONGLONG("max-opt-lookahead", g_tw_max_opt_lookahead, "Optimistic simulation: maximum lookahead allowed in virtual clock time"),
27 #ifdef AVL_TREE
28  TWOPT_UINT("avl-size", g_tw_avl_node_count, "AVL Tree contains 2^avl-size nodes"),
29 #endif
30  TWOPT_END()
31 };
32 
33 void tw_init(int *argc, char ***argv) {
34  int i;
36 #if HAVE_CTIME
37  time_t raw_time;
38 #endif
39 
40  tw_opt_add(tw_net_init(argc, argv));
41 
42  // Print out the command-line so we know what we passed in
43  if (tw_ismaster()) {
44  for (i = 0; i < *argc; i++) {
45  printf("%s ", (*argv)[i]);
46  }
47  printf("\n\n");
48  }
49 
50  // Print our revision if we have it
51 #ifdef ROSS_VERSION
52  if (tw_ismaster()) {
53 #if HAVE_CTIME
54  time(&raw_time);
55  printf("%s\n", ctime(&raw_time));
56 #endif
57  printf("ROSS Version: %s\n\n", ROSS_VERSION);
58  }
59 #endif
60 
61  tw_opt_add(kernel_options);
65 #ifdef USE_DAMARIS
66  tw_opt_add(st_damaris_opts());
67 #endif
69 #ifdef USE_RIO
71 #endif
72 
73  // by now all options must be in
74  tw_opt_parse(argc, argv);
75 
76 #ifdef USE_DAMARIS
77  st_damaris_ross_init();
78  if (!g_st_ross_rank) // Damaris ranks only
79  return;
80  else
81  {
82 #endif
83 
84  if(tw_ismaster())
85  {
86  struct stat buffer;
87  int csv_check = stat("ross.csv", &buffer);
88 
89  if (NULL == (g_tw_csv = fopen("ross.csv", "a")))
90  tw_error(TW_LOC, "Unable to open: ross.csv\n");
91 
92  if (csv_check == -1)
93  {
94  fprintf(g_tw_csv, "total_pe,total_kp,total_lp,end_ts,mapping,model_events,network_events,total_events,"
95  "runtime,events_processed,events_aborted,events_rb,pe_event_ties,eff,send_loc_remote,"
96  "percent_loc,send_net_remote,percent_net,rb_total,rb_primary,rb_secondary,fc_attempts,"
97  "num_gvt,net_events,event_rate,events_past_end,event_alloc,memory_alloc,memory_wasted,"
98  "remote_sends,remote_recvs,pe_struct,kp_struct,lp_struct,lp_model_struct,lp_rngs,"
99  "total_lp_size,event_struct,event_struct_model,init_time,pq_time,avl_time,lz4_time,"
100  "buddy_time,");
101 #ifdef USE_RIO
102  fprintf(g_tw_csv, "rio_load,rio_init,");
103 #endif
104  fprintf(g_tw_csv, "event_proc_time,event_cancel_time,event_abort_time,gvt_time,fc_time,"
105  "primary_rb_time,net_read_time,net_other_time,inst_comp_time,inst_write_time,total_time");
107  fprintf(g_tw_csv, ",model_nevent_proc,model_nevent_rb,model_net_events,model_eff,"
108  "alp_nevent_proc,alp_nevent_rb,alp_net_events,alp_eff");
109  fprintf(g_tw_csv, "\n");
110  }
111  }
112 
113  //tw_opt_print();
114 
115  tw_net_start();
116  tw_gvt_start();
117 #ifdef USE_DAMARIS
118  } // end of if(g_st_ross_rank)
119 #endif
120 }
121 
122 static void early_sanity_check(void) {
123  if (!g_tw_nlp) {
124  tw_error(TW_LOC, "need at least one LP");
125  }
126  if (!nkp_per_pe) {
127  tw_printf(TW_LOC, "number of KPs (%u) must be >= 1, adjusting.", g_tw_nkp);
128  g_tw_nkp = 1;
129  }
130 }
131 
132 /*
133  * map: map LPs->KPs->PEs linearly
134  */
135 void map_linear(void) {
136 
137  unsigned int nlp_per_kp;
138  tw_lpid lpid;
139  tw_kpid kpid;
140  unsigned int j;
141 
142  // may end up wasting last KP, but guaranteed each KP has == nLPs
143  nlp_per_kp = (int)ceil((double) g_tw_nlp / (double) g_tw_nkp);
144 
145  if(!nlp_per_kp) {
146  tw_error(TW_LOC, "Not enough KPs defined: %d", g_tw_nkp);
147  }
148 
150 
151 #if VERIFY_MAPPING
152  printf("NODE %d: nlp %lld, offset %lld\n", g_tw_mynode, g_tw_nlp, g_tw_lp_offset);
153  printf("\tPE %d\n", g_tw_pe->id);
154 #endif
155 
156  for(kpid = 0, lpid = 0; kpid < nkp_per_pe; kpid++) {
157  tw_kp_onpe(kpid, g_tw_pe);
158 
159 #if VERIFY_MAPPING
160  printf("\t\tKP %d", kpid);
161 #endif
162 
163  for(j = 0; j < nlp_per_kp && lpid < g_tw_nlp; j++, lpid++) {
164  tw_lp_onpe(lpid, g_tw_pe, g_tw_lp_offset+lpid);
165  tw_lp_onkp(g_tw_lp[lpid], g_tw_kp[kpid]);
166 
167 #if VERIFY_MAPPING
168  if(0 == j % 20) {
169  printf("\n\t\t\t");
170  }
171  printf("%lld ", lpid+g_tw_lp_offset);
172 #endif
173  }
174 
175 #if VERIFY_MAPPING
176  printf("\n");
177 #endif
178  }
179 
180  if(!g_tw_lp[g_tw_nlp-1]) {
181  tw_error(TW_LOC, "Not all LPs defined! (g_tw_nlp=%d)", g_tw_nlp);
182  }
183 
184  if(g_tw_lp[g_tw_nlp-1]->gid != g_tw_lp_offset + g_tw_nlp - 1) {
185  tw_error(TW_LOC, "LPs not sequentially enumerated!");
186  }
187 }
188 
189 void map_round_robin(void) {
190  tw_pe * pe = g_tw_pe; // ASSUMPTION: only 1 pe
191 
192  tw_kpid kpid;
193  tw_lpid lpid;
194  unsigned int i;
195 
196  // ASSUMPTION: g_tw_nlp is the same on each rank
197  int lp_stride = tw_nnodes();
198  int lp_offset = g_tw_mynode;
199 
200  for(i = 0, lpid=lp_offset; i < g_tw_nlp; i++, lpid+=lp_stride) {
201  kpid = i % g_tw_nkp;
202 
203  tw_lp_onpe(i, pe, lpid);
204  tw_kp_onpe(kpid, pe);
205  tw_lp_onkp(g_tw_lp[i], g_tw_kp[kpid]);
206 
207 #if VERIFY_MAPPING
208  printf("LP %4d KP %4d PE %4d\n", lpid, kpid, pe->id);
209 #endif
210  }
211 }
212 
213 /**
214  * IMPORTANT: This function sets the value for g_tw_nlp which is a rather
215  * important global variable. It is also set in (very few) other places,
216  * but mainly just here.
217  */
218 void tw_define_lps(tw_lpid nlp, size_t msg_sz) {
219  unsigned int i;
220 
221  g_tw_nlp = nlp;
222 
223  g_tw_msg_sz = msg_sz;
224 
226 
227  /*
228  * Construct the KP array.
229  */
230  if( g_tw_nkp == 1 && g_tw_synchronization_protocol != OPTIMISTIC_DEBUG ) { // if it is the default, then check with the overide param
232  }
233  // else assume the application overloaded and has BRAINS to set its own g_tw_nkp
234 
235  g_tw_kp = (tw_kp **) tw_calloc(TW_LOC, "KPs", sizeof(*g_tw_kp), g_tw_nkp);
236 
238  //if (g_tw_mapping == CUSTOM) // analysis LPs currently only supported for custom mapping
239  specialized_lp_setup(); // for ROSS analysis LPs, important for setting g_st_analysis_nlp
240 
241  /*
242  * Construct the LP array.
243  */
244  g_tw_lp = (tw_lp **) tw_calloc(TW_LOC, "LPs", sizeof(*g_tw_lp), g_tw_nlp + g_st_analysis_nlp);
245 
246  switch(g_tw_mapping) {
247  case LINEAR:
248  map_linear();
249  break;
250 
251  case ROUND_ROBIN:
252  map_round_robin();
253  break;
254 
255  case CUSTOM:
258  } else {
259  tw_error(TW_LOC, "CUSTOM mapping flag set but not custom mapping function! \n");
260  }
261  break;
262 
263  default:
264  tw_error(TW_LOC, "Bad value for g_tw_mapping %d \n", g_tw_mapping);
265  }
266 
267  //if (g_tw_mapping == CUSTOM)
269 
270  // init LP RNG stream(s)
271  for(i = 0; i < g_tw_nlp + g_st_analysis_nlp; i++) {
272  if(g_tw_rng_default == 1) {
274  }
275  }
276 
277 }
278 
279 static void late_sanity_check(void) {
280  tw_kpid i;
281  tw_lptype null_type;
282  tw_kp *kp;
283 
284  memset(&null_type, 0, sizeof(null_type));
285 
286  /* KPs must be mapped . */
287  // should we worry if model doesn't use all defined KPs? probably not.
288  for (i = 0; i < g_tw_nkp; i++) {
289  kp = tw_getkp(i);
290  if( kp == NULL ) {
291  tw_error(TW_LOC, "Local KP %u is NULL \n", i);
292  }
293 
294  if (kp->pe == NULL) {
295  tw_error(TW_LOC, "Local KP %u has no PE assigned.", i);
296  }
297  }
298 
299  /* LPs KP and PE must agree. */
300  for (i = 0; i < g_tw_nlp + g_st_analysis_nlp; i++) {
301  tw_lp *lp = g_tw_lp[i];
302 
303  if (!lp || !lp->pe) {
304  tw_error(TW_LOC, "LP %u has no PE assigned.", i);
305  }
306 
307  if (!lp->kp) {
308  tw_error(TW_LOC, "LP not mapped to a KP!");
309  }
310 
311  if (lp->pe != lp->kp->pe) {
312  tw_error(TW_LOC, "LP %u has mismatched KP and PE.", lp->id);
313  }
314 
315  if (!memcmp(lp->type, &null_type, sizeof(null_type))) {
316  tw_error(TW_LOC, "LP %u has no type.", lp->id);
317  }
318  }
319 }
320 
321 #ifdef USE_BGPM
322 unsigned cacheList[] = {
323  PEVT_L2_HITS,
324  PEVT_L2_MISSES,
325  PEVT_L2_FETCH_LINE,
326  PEVT_L2_STORE_LINE,
327 };
328 
329 unsigned instList[] = {
330  PEVT_LSU_COMMIT_CACHEABLE_LDS,
331  PEVT_L1P_BAS_MISS,
332  PEVT_INST_XU_ALL,
333  PEVT_INST_QFPU_ALL,
334  PEVT_INST_QFPU_FPGRP1,
335  PEVT_INST_ALL,
336 };
337 #endif
338 
339 void tw_run(void) {
340  tw_pe *me;
341 
343 
344  me = setup_pes();
345 
346  // init instrumentation
347  st_inst_init();
348 #ifdef USE_DAMARIS
349  if (g_st_damaris_enabled)
350  st_damaris_inst_init();
351 #endif
352 
353 #ifdef USE_BGPM
354  Bgpm_Init(BGPM_MODE_SWDISTRIB);
355 
356  // Create event set and add events needed to calculate CPI,
357  int hEvtSet = Bgpm_CreateEventSet();
358 
359  // Change the type here to get the other performance monitor sets -- defaults to instList set
360  // Sets need to be different because there are conflicts when mixing certain events.
361  Bgpm_AddEventList(hEvtSet, instList, sizeof(instList)/sizeof(unsigned) );
362 
363  if( me->id == 0) {
364  printf("***************************************************************************************** \n");
365  printf("* NOTICE: Build configured with Blue Gene/Q specific, BGPM performance monitoring code!!* \n");
366  printf("***************************************************************************************** \n");
367  }
368 
369  Bgpm_Apply(hEvtSet);
370  Bgpm_Start(hEvtSet);
371 #endif
372 
373  tw_sched_init(me);
375 
377  case SEQUENTIAL: // case 1
379  break;
380 
381  case CONSERVATIVE: // case 2
383  break;
384 
385  case OPTIMISTIC: // case 3
387  break;
388 
389  case OPTIMISTIC_DEBUG: // case 4
391  break;
392 
393  case OPTIMISTIC_REALTIME: // case 5
395  break;
396 
397  default:
398  tw_error(TW_LOC, "No Synchronization Protocol Specified! \n");
399  }
400 
401 #ifdef USE_BGPM
402  Bgpm_Stop(hEvtSet);
403 
404  if( me->id == 0 ) { // Have only RANK 0 output stats
405  int i;
406  uint64_t cnt;
407  int numEvts = Bgpm_NumEvents(hEvtSet);
408  printf("\n \n ================================= \n");
409  printf( "Performance Counter Results:\n");
410  printf("--------------------------------- \n");
411  for (i=0; i<numEvts; i++) {
412  Bgpm_ReadEvent(hEvtSet, i, &cnt);
413  printf(" %40s = %20llu\n", Bgpm_GetEventLabel(hEvtSet, i), cnt);
414  }
415  printf("================================= \n");
416  }
417 #endif
418 }
419 
420 void tw_end(void) {
421 #ifdef USE_DAMARIS
422  if(g_st_ross_rank)
423  {
424 #endif
425  if(tw_ismaster()) {
426  fprintf(g_tw_csv, "\n");
427  fclose(g_tw_csv);
428  }
429 #ifdef USE_DAMARIS
430  } // end if(g_st_ross_rank)
431 #endif
432 
433  tw_net_stop();
434 }
435 
436 /**
437  * By the time this function gets called, g_tw_delta_sz should be as large
438  * as it will ever get.
439  */
440 static void tw_delta_alloc(tw_pe *pe) {
442 
443  pe->delta_buffer[0] = (unsigned char *)tw_calloc(TW_LOC, "Delta buffers", g_tw_delta_sz, 1);
444  pe->delta_buffer[1] = (unsigned char *)tw_calloc(TW_LOC, "Delta buffers", g_tw_delta_sz, 1);
445  pe->delta_buffer[2] = (unsigned char *)tw_calloc(TW_LOC, "Delta buffers", g_tw_delta_sz, 1);
446 }
447 
448 static tw_pe * setup_pes(void) {
449  tw_pe *pe = g_tw_pe;
450 
451  unsigned int num_events_per_pe;
452 
453  num_events_per_pe = 1 + g_tw_events_per_pe + g_tw_events_per_pe_extra;
454 
455  if (!pe) {
456  tw_error(TW_LOC, "No PE configured on this node.");
457  }
458 
459  // TODO need to make sure we don't break this stuff
460  if (g_tw_buddy_alloc) {
462  if (g_tw_buddy_master == NULL) {
463  tw_error(TW_LOC, "create_buddy_table() failed.");
464  }
465  tw_delta_alloc(pe);
466  }
467  pe->pq = tw_pq_create();
468 
469  tw_eventq_alloc(&pe->free_q, num_events_per_pe);
470  pe->abort_event = tw_eventq_shift(&pe->free_q);
471 #ifdef USE_RIO
472  int i;
473  tw_clock start = tw_clock_read();
474  for (i = 0; i < g_io_events_buffered_per_rank; i++) {
476  }
477  pe->stats.s_rio_load = (tw_clock_read() - start);
478 #endif
479 
480  if (g_tw_mynode == g_tw_masternode) {
481  printf("\nROSS Core Configuration: \n");
482  printf("\t%-50s %11u\n", "Total PEs", tw_nnodes());
483  fprintf(g_tw_csv, "%u,", tw_nnodes());
484 
485  printf("\t%-50s [Nodes (%u) x KPs (%lu)] %lu\n", "Total KPs", tw_nnodes(), g_tw_nkp, (tw_nnodes() * g_tw_nkp));
486  fprintf(g_tw_csv, "%lu,", (tw_nnodes() * g_tw_nkp));
487 
488  // TODO need to do an allreduce call to get actual total number of LPs (e.g., for CODES)
489  printf("\t%-50s %11llu\n", "Total LPs",
490  ((unsigned long long)tw_nnodes() * g_tw_nlp));
491  fprintf(g_tw_csv, "%llu,", ((unsigned long long)tw_nnodes() * g_tw_nlp));
492 
493  printf("\t%-50s %11.2lf\n", "Simulation End Time", g_tw_ts_end);
494  fprintf(g_tw_csv, "%.2lf,", g_tw_ts_end);
495 
496 
497  switch(g_tw_mapping) {
498  case LINEAR:
499  printf("\t%-50s %11s\n", "LP-to-PE Mapping", "linear");
500  fprintf(g_tw_csv, "%s,", "linear");
501  break;
502 
503  case ROUND_ROBIN:
504  printf("\t%-50s %11s\n", "LP-to-PE Mapping", "round robin");
505  fprintf(g_tw_csv, "%s,", "round robin");
506  break;
507 
508  case CUSTOM:
509  printf("\t%-50s %11s\n", "LP-to-PE Mapping", "model defined");
510  fprintf(g_tw_csv, "%s,", "model defined");
511  break;
512  }
513  printf("\n");
514 
515 #ifdef USE_DAMARIS
516  st_damaris_init_print();
517 #endif
518 
519  // moved these so ross.csv stays consistent
520  fprintf(g_tw_csv, "%d,", num_events_per_pe);
521  fprintf(g_tw_csv, "%d,", g_tw_gvt_threshold);
522  fprintf(g_tw_csv, "%d,", g_tw_events_per_pe);
523 #ifndef ROSS_DO_NOT_PRINT
524  printf("\nROSS Event Memory Allocation:\n");
525  printf("\t%-50s %11d\n", "Model events", num_events_per_pe);
526 
527  printf("\t%-50s %11d\n", "Network events", g_tw_gvt_threshold);
528 
529  printf("\t%-50s %11d\n", "Total events", g_tw_events_per_pe);
530  printf("\n");
531 #endif
532  }
533  return pe;
534 }
535 
536 // This is the default lp type mapping function
537 // valid ONLY if there is one lp type
539  (void) gid;
540  return 0;
541 }
#define ROSS_VERSION
Definition: config.h:11
tw_synch g_tw_synchronization_protocol
Definition: ross-global.c:18
#define TW_LOC
Definition: ross-extern.h:164
void tw_kp_onpe(tw_kpid id, tw_pe *pe)
Definition: tw-kp.c:4
const tw_optdef * st_inst_opts(void)
static const tw_optdef kernel_options[]
Definition: tw-setup.c:16
tw_lp ** g_tw_lp
Definition: ross-global.c:26
void tw_net_stop(void)
Stops the network library after simulation end.
Definition: network-mpi.c:154
static void early_sanity_check(void)
Definition: tw-setup.c:122
double g_tw_ts_end
Definition: ross-global.c:68
void tw_error(const char *file, int line, const char *fmt,...) NORETURN
Definition: tw-util.c:74
size_t g_tw_msg_sz
Definition: ross-global.c:33
tw_lptype * type
Type of this LP, including service callbacks.
Definition: ross-types.h:316
const tw_optdef * tw_gvt_setup(void)
Definition: mpi_allreduce.c:26
tw_lpid g_tw_lp_offset
Definition: ross-global.c:24
tw_statistics stats
per PE counters
Definition: ross-types.h:415
unsigned int g_tw_gvt_threshold
Definition: ross-global.c:80
tw_eventq g_io_free_events
Definition: io-mpi.c:25
static int tw_ismaster(void)
static void tw_eventq_alloc(tw_eventq *q, unsigned int cnt)
Definition: tw-eventq.h:186
tw_pe * pe
PE that services this KP.
Definition: ross-types.h:342
unsigned char * delta_buffer[3]
buffers used for delta encoding
Definition: ross-types.h:388
tw_pq * tw_pq_create(void)
Definition: splay.c:54
void tw_scheduler_optimistic(tw_pe *me)
Definition: tw-sched.c:634
void tw_define_lps(tw_lpid nlp, size_t msg_sz)
Definition: tw-setup.c:218
#define TWOPT_DOUBLE(n, v, h)
Definition: tw-opts.h:32
static tw_clock tw_clock_read(void)
Definition: aarch64.h:6
void tw_gvt_start(void)
Definition: mpi_allreduce.c:34
Holds the entire PE state.
Definition: ross-types.h:375
const tw_optdef * tw_net_init(int *argc, char ***argv)
Initalize the network library and parse options.
Definition: network-mpi.c:66
static tw_event * tw_eventq_shift(tw_eventq *q)
Definition: tw-eventq.h:353
tw_clock s_init
Definition: ross-types.h:135
tw_lpid g_tw_nlp
Definition: ross-global.c:23
unsigned int tw_nnodes(void)
Definition: network-mpi.c:103
size_t g_tw_delta_sz
Definition: ross-global.c:34
#define TWOPT_ULONGLONG(n, v, h)
Definition: tw-opts.h:29
void tw_lp_onpe(tw_lpid index, tw_pe *pe, tw_lpid id)
Definition: tw-lp.c:57
static tw_kp * tw_getkp(tw_kpid id)
unsigned int nkp_per_pe
Definition: tw-setup.c:13
tw_eventq free_q
Linked list of free tw_events.
Definition: ross-types.h:383
const tw_optdef * tw_clock_setup(void)
Definition: aarch64.c:20
uint64_t tw_lpid
Definition: ross.h:160
Function Pointers for ROSS Event Handlers.
Definition: ross-types.h:87
tw_kp * kp
kp – Kernel process that we belong to (must match pe).
Definition: ross-types.h:313
static tw_clock init_start
Definition: tw-setup.c:14
void specialized_lp_setup()
void tw_init(int *argc, char ***argv)
Definition: tw-setup.c:33
void map_round_robin(void)
Definition: tw-setup.c:189
tw_lpid g_st_analysis_nlp
int g_st_use_analysis_lps
unsigned int g_tw_events_per_pe_extra
Definition: ross-global.c:78
buddy_list_bucket_t * g_tw_buddy_master
Definition: ross-global.c:36
static void late_sanity_check(void)
Definition: tw-setup.c:279
tw_event * abort_event
Placeholder event for when free_q is empty.
Definition: ross-types.h:384
void tw_end(void)
Definition: tw-setup.c:420
unsigned int g_tw_mblock
Definition: ross-global.c:62
FILE * g_tw_csv
Definition: ross-global.c:91
void st_inst_init(void)
tw_lp_map g_tw_mapping
Definition: ross-global.c:21
uint32_t g_tw_avl_node_count
Definition: ross-global.c:37
tw_peid g_tw_mynode
Definition: ross-global.c:88
#define TWOPT_UINT(n, v, h)
Definition: tw-opts.h:30
tw_peid g_tw_masternode
Definition: ross-global.c:89
#define TWOPT_END()
Definition: tw-opts.h:35
tw_pq * pq
Priority queue used to sort events.
Definition: ross-types.h:381
void tw_lp_onkp(tw_lp *lp, tw_kp *kp)
Definition: tw-lp.c:73
void tw_opt_add(const tw_optdef *options)
Definition: tw-opts.c:14
const tw_optdef * st_special_lp_opts(void)
static tw_event * tw_eventq_pop(tw_eventq *q)
Definition: tw-eventq.h:289
uint32_t g_tw_buddy_alloc
Definition: ross-global.c:35
static void tw_eventq_push(tw_eventq *q, tw_event *e)
Definition: tw-eventq.h:257
void tw_scheduler_sequential(tw_pe *me)
Definition: tw-sched.c:445
map_custom_f g_tw_custom_initial_mapping
Definition: ross-global.c:20
unsigned int g_tw_nRNG_per_lp
Definition: ross-global.c:29
tw_pe * g_tw_pe
Definition: ross-global.c:75
tw_pe * pe
Definition: ross-types.h:308
void tw_scheduler_optimistic_debug(tw_pe *me)
Definition: tw-sched.c:733
tw_lpid id
local LP id
Definition: ross-types.h:305
tw_peid tw_kpid
Definition: ross-types.h:45
tw_pe * pe
Definition: avl_tree.c:11
const tw_optdef io_opts[]
Definition: io-mpi.c:12
uint64_t tw_clock
Definition: aarch64.h:4
#define TWOPT_GROUP(h)
Definition: tw-opts.h:27
void tw_scheduler_optimistic_realtime(tw_pe *me)
Definition: tw-sched.c:680
tw_lpid g_tw_rng_default
Definition: ross-global.c:30
tw_kpid g_tw_nkp
Definition: ross-global.c:25
void tw_net_start(void)
Starts the network library after option parsing.
Definition: network-mpi.c:109
void specialized_lp_init_mapping()
unsigned long long g_tw_max_opt_lookahead
Definition: ross-global.c:64
int LZ4_compressBound(int isize)
Definition: lz4.c:372
tw_peid id
Definition: ross-types.h:376
void tw_sched_init(tw_pe *me)
Definition: tw-sched.c:404
void tw_rand_init_streams(tw_lp *lp, unsigned int nstreams)
Definition: rand-clcg4.c:320
tw_lpid map_onetype(tw_lpid gid)
Definition: tw-setup.c:538
void tw_scheduler_conservative(tw_pe *me)
Definition: tw-sched.c:514
void tw_run(void)
Definition: tw-setup.c:339
unsigned int g_tw_lz4_knob
Definition: ross-global.c:41
void st_buffer_allocate()
void map_linear(void)
Definition: tw-setup.c:135
double g_tw_lookahead
Definition: ross-global.c:49
void * tw_calloc(const char *file, int line, const char *for_who, size_t e_sz, size_t n)
Definition: tw-util.c:203
void tw_opt_parse(int *argc_p, char ***argv_p)
Definition: tw-opts.c:427
static void tw_delta_alloc(tw_pe *pe)
Definition: tw-setup.c:440
buddy_list_bucket_t * create_buddy_table(unsigned int power_of_two)
Definition: buddy.c:288
unsigned int g_tw_events_per_pe
Definition: ross-global.c:76
int g_io_events_buffered_per_rank
Definition: io-mpi.c:23
void tw_printf(const char *file, int line, const char *fmt,...)
Definition: tw-util.c:61
LP State Structure.
Definition: ross-types.h:304
static tw_pe * setup_pes(void)
Definition: tw-setup.c:448
tw_kp ** g_tw_kp
Definition: ross-global.c:27