ROSS
Macros | Functions | Variables
tw-setup.c File Reference

tw_define_lps is defined here! More...

#include <ross.h>
#include "lz4.h"
#include <sys/stat.h>

Go to the source code of this file.

Macros

#define VERIFY_MAPPING   0
 

Functions

static tw_pesetup_pes (void)
 
void tw_init (int *argc, char ***argv)
 
static void early_sanity_check (void)
 
void map_linear (void)
 
void map_round_robin (void)
 
void tw_define_lps (tw_lpid nlp, size_t msg_sz)
 
static void late_sanity_check (void)
 
void tw_run (void)
 
void tw_end (void)
 
static void tw_delta_alloc (tw_pe *pe)
 
tw_lpid map_onetype (tw_lpid gid)
 

Variables

unsigned int nkp_per_pe = 16
 
static tw_clock init_start = 0
 
static const tw_optdef kernel_options []
 

Macro Definition Documentation

#define VERIFY_MAPPING   0

Definition at line 10 of file tw-setup.c.

Function Documentation

static void early_sanity_check ( void  )
static

Definition at line 122 of file tw-setup.c.

References g_tw_nkp, g_tw_nlp, nkp_per_pe, tw_error(), TW_LOC, and tw_printf().

Referenced by tw_define_lps().

Here is the call graph for this function:

Here is the caller graph for this function:

static void late_sanity_check ( void  )
static

Definition at line 279 of file tw-setup.c.

References g_st_analysis_nlp, g_tw_lp, g_tw_nkp, g_tw_nlp, tw_lp::id, tw_lp::kp, tw_lp::pe, tw_kp::pe, tw_error(), tw_getkp(), TW_LOC, and tw_lp::type.

Referenced by tw_run().

Here is the call graph for this function:

Here is the caller graph for this function:

void map_linear ( void  )

Definition at line 135 of file tw-setup.c.

References g_tw_kp, g_tw_lp, g_tw_lp_offset, g_tw_mynode, g_tw_nkp, g_tw_nlp, g_tw_pe, tw_pe::id, nkp_per_pe, tw_error(), tw_kp_onpe(), TW_LOC, tw_lp_onkp(), and tw_lp_onpe().

Referenced by tw_define_lps().

Here is the call graph for this function:

Here is the caller graph for this function:

tw_lpid map_onetype ( tw_lpid  gid)

Definition at line 538 of file tw-setup.c.

void map_round_robin ( void  )

Definition at line 189 of file tw-setup.c.

References g_tw_kp, g_tw_lp, g_tw_mynode, g_tw_nkp, g_tw_nlp, g_tw_pe, tw_pe::id, pe, tw_kp_onpe(), tw_lp_onkp(), tw_lp_onpe(), and tw_nnodes().

Referenced by tw_define_lps().

Here is the call graph for this function:

Here is the caller graph for this function:

static tw_pe * setup_pes ( void  )
static
void tw_define_lps ( tw_lpid  nlp,
size_t  msg_sz 
)

IMPORTANT: This function sets the value for g_tw_nlp which is a rather important global variable. It is also set in (very few) other places, but mainly just here.

Definition at line 218 of file tw-setup.c.

References CUSTOM, early_sanity_check(), g_st_analysis_nlp, g_tw_custom_initial_mapping, g_tw_kp, g_tw_lp, g_tw_mapping, g_tw_msg_sz, g_tw_nkp, g_tw_nlp, g_tw_nRNG_per_lp, g_tw_rng_default, g_tw_synchronization_protocol, LINEAR, map_linear(), map_round_robin(), nkp_per_pe, OPTIMISTIC_DEBUG, ROUND_ROBIN, specialized_lp_init_mapping(), specialized_lp_setup(), st_buffer_allocate(), tw_calloc(), tw_error(), TW_LOC, and tw_rand_init_streams().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

static void tw_delta_alloc ( tw_pe pe)
static

By the time this function gets called, g_tw_delta_sz should be as large as it will ever get.

Definition at line 440 of file tw-setup.c.

References tw_pe::delta_buffer, g_tw_delta_sz, LZ4_compressBound(), tw_calloc(), and TW_LOC.

Referenced by setup_pes().

Here is the call graph for this function:

Here is the caller graph for this function:

void tw_end ( void  )

Definition at line 420 of file tw-setup.c.

References g_tw_csv, tw_ismaster(), and tw_net_stop().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

void tw_init ( int *  argc,
char ***  argv 
)

Definition at line 33 of file tw-setup.c.

References g_st_use_analysis_lps, g_tw_csv, init_start, io_opts, ROSS_VERSION, st_inst_opts(), st_special_lp_opts(), tw_clock_read(), tw_clock_setup(), tw_error(), tw_gvt_setup(), tw_gvt_start(), tw_ismaster(), TW_LOC, tw_net_init(), tw_net_start(), tw_opt_add(), and tw_opt_parse().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

void tw_run ( void  )

Variable Documentation

tw_clock init_start = 0
static

Definition at line 14 of file tw-setup.c.

Referenced by tw_init(), and tw_run().

const tw_optdef kernel_options[]
static
Initial value:
= {
{ TWOPTTYPE_GROUP, NULL, ( "ROSS Kernel" ), NULL },
{ TWOPTTYPE_UINT, ( "synch" ), ( "Sychronization Protocol: SEQUENTIAL=1, CONSERVATIVE=2, OPTIMISTIC=3, OPTIMISTIC_DEBUG=4, OPTIMISTIC_REALTIME=5" ), &( g_tw_synchronization_protocol ) },
{ TWOPTTYPE_UINT, ( "nkp" ), ( "number of kernel processes (KPs) per pe" ), &( nkp_per_pe ) },
{ TWOPTTYPE_DOUBLE, ( "end" ), ( "simulation end timestamp" ), &( g_tw_ts_end ) },
{ TWOPTTYPE_UINT, ( "batch" ), ( "messages per scheduler block" ), &( g_tw_mblock ) },
{ TWOPTTYPE_UINT, ( "extramem" ), ( "Number of extra events allocated per PE." ), &( g_tw_events_per_pe_extra ) },
{ TWOPTTYPE_UINT, ( "buddy-size" ), ( "delta encoding buddy system allocation (2^X)" ), &( g_tw_buddy_alloc ) },
{ TWOPTTYPE_UINT, ( "lz4-knob" ), ( "LZ4 acceleration factor (higher = faster)" ), &( g_tw_lz4_knob ) },
{ TWOPTTYPE_DOUBLE, ( "cons-lookahead" ), ( "Set g_tw_lookahead" ), &( g_tw_lookahead ) },
{ TWOPTTYPE_ULONGLONG, ( "max-opt-lookahead" ), ( "Optimistic simulation: maximum lookahead allowed in virtual clock time" ), &( g_tw_max_opt_lookahead ) },
{ TWOPTTYPE_UINT, ( "avl-size" ), ( "AVL Tree contains 2^avl-size nodes" ), &( g_tw_avl_node_count ) },
{ (tw_opttype)0, NULL, NULL, NULL }
}
tw_synch g_tw_synchronization_protocol
Definition: ross-global.c:18
double g_tw_ts_end
Definition: ross-global.c:68
unsigned int nkp_per_pe
Definition: tw-setup.c:13
unsigned int g_tw_events_per_pe_extra
Definition: ross-global.c:78
unsigned int g_tw_mblock
Definition: ross-global.c:62
uint32_t g_tw_avl_node_count
Definition: ross-global.c:37
uint32_t g_tw_buddy_alloc
Definition: ross-global.c:35
unsigned long long g_tw_max_opt_lookahead
Definition: ross-global.c:64
unsigned int g_tw_lz4_knob
Definition: ross-global.c:41
double g_tw_lookahead
Definition: ross-global.c:49
tw_opttype
Definition: tw-opts.h:4

Definition at line 16 of file tw-setup.c.

unsigned int nkp_per_pe = 16

Definition at line 13 of file tw-setup.c.

Referenced by early_sanity_check(), map_linear(), and tw_define_lps().