ROSS
phold.main.c File Reference
#include "phold.h"

Go to the source code of this file.

Data Structures

struct  phold_state_checkpoint

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)
void save_state (struct phold_state_checkpoint *into, struct phold_state const *from)
void clean_state (struct phold_state_checkpoint *into)
void print_state (FILE *out, char const *prefix, struct phold_state *state)
void print_state_saved (FILE *out, char const *prefix, struct phold_state_checkpoint *state)
void print_event (FILE *out, char const *prefix, struct phold_state *state, struct phold_message *message)
bool check_state (struct phold_state *before, struct phold_state *after)
int main (int argc, char **argv)

Variables

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

Function Documentation

◆ check_state()

bool check_state ( struct phold_state * before,
struct phold_state * after )

Definition at line 195 of file phold.main.c.

References phold_state::dummy_state.

Referenced by main().

◆ clean_state()

void clean_state ( struct phold_state_checkpoint * into)

Definition at line 177 of file phold.main.c.

Referenced by main().

◆ event_trace()

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

Definition at line 125 of file phold.main.c.

◆ main()

◆ phold_commit()

void phold_commit ( phold_state * s,
tw_bf * bf,
phold_message * m,
tw_lp * lp )

Definition at line 97 of file phold.main.c.

◆ phold_event_handler()

◆ phold_event_handler_rc()

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

Definition at line 86 of file phold.main.c.

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

◆ phold_finish()

void phold_finish ( phold_state * s,
tw_lp * lp )

Definition at line 106 of file phold.main.c.

◆ phold_init()

◆ phold_map()

tw_peid phold_map ( tw_lpid gid)

Definition at line 5 of file phold.main.c.

References g_tw_nlp.

◆ phold_pre_run()

◆ phold_stats_collect()

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

Definition at line 134 of file phold.main.c.

◆ print_event()

void print_event ( FILE * out,
char const * prefix,
struct phold_state * state,
struct phold_message * message )

Definition at line 190 of file phold.main.c.

References phold_message::dummy_data.

◆ print_state()

void print_state ( FILE * out,
char const * prefix,
struct phold_state * state )

Definition at line 182 of file phold.main.c.

References phold_state::dummy_state.

Referenced by main().

◆ print_state_saved()

void print_state_saved ( FILE * out,
char const * prefix,
struct phold_state_checkpoint * state )

Definition at line 186 of file phold.main.c.

References phold_state_checkpoint::saved_dummy_data.

Referenced by main().

◆ save_state()

void save_state ( struct phold_state_checkpoint * into,
struct phold_state const * from )

Definition at line 173 of file phold.main.c.

References phold_state::dummy_state, and phold_state_checkpoint::saved_dummy_data.

Referenced by main().

Variable Documentation

◆ app_opt

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"),
}
#define TWOPT_UINT(n, v, h)
Definition tw-opts.h:33
#define TWOPT_GROUP(h)
Definition tw-opts.h:30
#define TWOPT_CHAR(n, v, h)
Definition tw-opts.h:36
#define TWOPT_DOUBLE(n, v, h)
Definition tw-opts.h:35
static tw_stime percent_remote
Definition phold.h:30
static int optimistic_memory
Definition phold.h:34
static tw_stime mult
Definition phold.h:29
static unsigned int stagger
Definition phold.h:27
static char run_id[1024]
Definition phold.h:39
static unsigned int nlp_per_pe
Definition phold.h:32
static int g_phold_start_events
Definition phold.h:33
tw_stime lookahead
Definition phold.h:26
static tw_stime mean
Definition phold.h:37

Definition at line 153 of file phold.main.c.

◆ model_types

st_model_types model_types[]
Initial value:
= {
0,
sizeof(int),
NULL,
NULL,
0},
{0}
}
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.main.c:125
void phold_stats_collect(phold_state *s, tw_lp *lp, char *buffer)
Definition phold.main.c:134

Definition at line 142 of file phold.main.c.

Referenced by main(), and st_model_settype().

◆ mylps

tw_lptype mylps[]
Initial value:
= {
(pre_run_f) NULL,
sizeof(phold_state)},
{0},
}
void(* final_f)(void *sv, tw_lp *me)
Definition ross-types.h:90
void(* init_f)(void *sv, tw_lp *me)
Definition ross-types.h:82
void(* event_f)(void *sv, tw_bf *cv, void *msg, tw_lp *me)
Definition ross-types.h:87
void(* revent_f)(void *sv, tw_bf *cv, void *msg, tw_lp *me)
Definition ross-types.h:88
tw_peid(* map_f)(tw_lpid)
Definition ross-types.h:83
void(* commit_f)(void *sv, tw_bf *cv, void *msg, tw_lp *me)
Definition ross-types.h:89
void(* pre_run_f)(void *sv, tw_lp *me)
Definition ross-types.h:86
void phold_finish(phold_state *s, tw_lp *lp)
void phold_commit(phold_state *s, tw_bf *bf, phold_message *m, tw_lp *lp)
void phold_init(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)
tw_peid phold_map(tw_lpid gid)

Definition at line 112 of file phold.main.c.