ROSS
Functions | Variables
phold.c File Reference
#include "phold.h"

Go to the source code of this file.

Functions

tw_peid phold_map (tw_lpid gid)
 
void phold_init (phold_state *s, tw_lp *lp)
 
void phold_pre_run (phold_state *s, tw_lp *lp)
 
void phold_event_handler (phold_state *s, tw_bf *bf, phold_message *m, tw_lp *lp)
 
void phold_event_handler_rc (phold_state *s, tw_bf *bf, phold_message *m, tw_lp *lp)
 
void phold_commit (phold_state *s, tw_bf *bf, phold_message *m, tw_lp *lp)
 
void phold_finish (phold_state *s, tw_lp *lp)
 
void event_trace (phold_message *m, tw_lp *lp, char *buffer, int *collect_flag)
 
void phold_stats_collect (phold_state *s, tw_lp *lp, char *buffer)
 
int main (int argc, char **argv)
 

Variables

tw_lptype mylps []
 
st_model_types model_types []
 
const tw_optdef app_opt []
 

Function Documentation

void event_trace ( phold_message m,
tw_lp lp,
char *  buffer,
int *  collect_flag 
)

Definition at line 125 of file phold.c.

int main ( int  argc,
char **  argv 
)
void phold_commit ( phold_state s,
tw_bf bf,
phold_message m,
tw_lp lp 
)

Definition at line 97 of file phold.c.

void phold_event_handler ( phold_state s,
tw_bf bf,
phold_message m,
tw_lp lp 
)
void phold_event_handler_rc ( phold_state s,
tw_bf bf,
phold_message m,
tw_lp lp 
)

Definition at line 86 of file phold.c.

References tw_bf::c1, tw_lp::rng, and tw_rand_reverse_unif.

void phold_finish ( phold_state s,
tw_lp lp 
)

Definition at line 106 of file phold.c.

void phold_init ( phold_state s,
tw_lp lp 
)

Definition at line 11 of file phold.c.

References g_phold_start_events, g_tw_ts_end, tw_lp::gid, lookahead, mean, tw_lp::rng, stagger, tw_event_new(), tw_event_send(), and tw_rand_exponential().

Here is the call graph for this function:

tw_peid phold_map ( tw_lpid  gid)

Definition at line 5 of file phold.c.

References g_tw_nlp.

void phold_pre_run ( phold_state s,
tw_lp lp 
)

Definition at line 39 of file phold.c.

References g_tw_nlp, tw_lp::gid, lookahead, mean, percent_remote, tw_lp::rng, ttl_lps, tw_error(), tw_event_new(), tw_event_send(), TW_LOC, tw_nnodes(), tw_rand_exponential(), tw_rand_integer(), and tw_rand_unif.

Here is the call graph for this function:

void phold_stats_collect ( phold_state s,
tw_lp lp,
char *  buffer 
)

Definition at line 134 of file phold.c.

Variable Documentation

const tw_optdef app_opt[]
Initial value:
=
{
TWOPT_GROUP("PHOLD Model"),
TWOPT_DOUBLE("remote", percent_remote, "desired remote event rate"),
TWOPT_UINT("nlp", nlp_per_pe, "number of LPs per processor"),
TWOPT_DOUBLE("mean", mean, "exponential distribution mean for timestamps"),
TWOPT_DOUBLE("mult", mult, "multiplier for event memory allocation"),
TWOPT_DOUBLE("lookahead", lookahead, "lookahead for events"),
TWOPT_UINT("start-events", g_phold_start_events, "number of initial messages per LP"),
TWOPT_UINT("stagger", stagger, "Set to 1 to stagger event uniformly across 0 to end time."),
TWOPT_UINT("memory", optimistic_memory, "additional memory buffers"),
TWOPT_CHAR("run", run_id, "user supplied run name"),
}
static unsigned int nlp_per_pe
Definition: phold.h:32
static int g_phold_start_events
Definition: phold.h:33
#define TWOPT_CHAR(n, v, h)
Definition: tw-opts.h:33
static tw_stime mean
Definition: phold.h:37
#define TWOPT_DOUBLE(n, v, h)
Definition: tw-opts.h:32
static tw_stime mult
Definition: phold.h:29
tw_stime lookahead
Definition: phold.h:26
static unsigned int stagger
Definition: phold.h:27
#define TWOPT_UINT(n, v, h)
Definition: tw-opts.h:30
static int optimistic_memory
Definition: phold.h:34
#define TWOPT_GROUP(h)
Definition: tw-opts.h:27
static tw_stime percent_remote
Definition: phold.h:30
static char run_id[1024]
Definition: phold.h:39

Definition at line 153 of file phold.c.

st_model_types model_types[]
Initial value:
= {
0,
sizeof(int),
NULL,
NULL,
0},
{0}
}
void phold_stats_collect(phold_state *s, tw_lp *lp, char *buffer)
Definition: phold.c:134
void(* ev_trace_f)(void *msg, tw_lp *lp, char *buffer, int *collect_flag)
void(* model_stat_f)(void *sv, tw_lp *lp, char *buffer)
void event_trace(phold_message *m, tw_lp *lp, char *buffer, int *collect_flag)
Definition: phold.c:125

Definition at line 142 of file phold.c.

Referenced by st_model_settype().

tw_lptype mylps[]
Initial value:
= {
(pre_run_f) NULL,
sizeof(phold_state)},
{0},
}
void phold_event_handler_rc(phold_state *s, tw_bf *bf, phold_message *m, tw_lp *lp)
Definition: phold.c:86
void phold_commit(phold_state *s, tw_bf *bf, phold_message *m, tw_lp *lp)
Definition: phold.c:97
tw_peid phold_map(tw_lpid gid)
Definition: phold.c:5
void phold_event_handler(phold_state *s, tw_bf *bf, phold_message *m, tw_lp *lp)
Definition: phold.c:59
void(* event_f)(void *sv, tw_bf *cv, void *msg, tw_lp *me)
Definition: ross-types.h:77
tw_peid(* map_f)(tw_lpid)
Definition: ross-types.h:73
void phold_init(phold_state *s, tw_lp *lp)
Definition: phold.c:11
void(* init_f)(void *sv, tw_lp *me)
Definition: ross-types.h:72
void(* revent_f)(void *sv, tw_bf *cv, void *msg, tw_lp *me)
Definition: ross-types.h:78
void(* pre_run_f)(void *sv, tw_lp *me)
Definition: ross-types.h:76
void(* final_f)(void *sv, tw_lp *me)
Definition: ross-types.h:80
void(* commit_f)(void *sv, tw_bf *cv, void *msg, tw_lp *me)
Definition: ross-types.h:79
void phold_finish(phold_state *s, tw_lp *lp)
Definition: phold.c:106

Definition at line 112 of file phold.c.