162 TWOPT_UINT(
"stagger",
stagger,
"Set to 1 to stagger event uniformly across 0 to end time."),
183 fprintf(out,
"%sstruct phold_state {\n dummy_state = %ld\n}\n", prefix, state->
dummy_state);
187 fprintf(out,
"%sstruct phold_state_checkpoint {\n saved_dummy_data = %ld\n}\n", prefix, state->
saved_dummy_data);
192 fprintf(out,
"%sstruct phold_message {\n dummy_data = %ld\n}\n", prefix, message->
dummy_data);
206 MPI_Init(&argc, &argv);
209 MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
211 MPI_Comm_split(MPI_COMM_WORLD, mpi_rank%2, mpi_rank, &split_comm);
270 printf(
"========================================\n");
271 printf(
"PHOLD Model Configuration..............\n");
272 printf(
" Lookahead..............%lf\n",
lookahead);
274 printf(
" stagger................%u\n",
stagger);
275 printf(
" Mean...................%lf\n",
mean);
276 printf(
" Mult...................%lf\n",
mult);
279 printf(
"========================================\n\n");
void(* clean_checkpoint_state_f)(void *state)
void(* print_checkpoint_state_f)(FILE *, char const *prefix, void *state)
bool(* check_states_f)(void *current_state, void const *before_state)
void crv_add_custom_state_checkpoint(crv_checkpointer *)
void(* print_lpstate_f)(FILE *, char const *prefix, void *state)
void(* save_checkpoint_state_f)(void *into, void const *from)
void(* print_event_f)(FILE *, char const *prefix, void *lp_state, void *event_msg)
void st_model_settype(tw_lpid i, st_model_types *model_types)
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 tw_comm_set(MPI_Comm comm)
Setup the MPI_COMM_ROSS communicator to use instead of MPI_COMM_WORLD.
unsigned int g_tw_events_per_pe
void tw_lp_settype(tw_lpid lp, tw_lptype *type)
void tw_error(const char *file, int line, const char *fmt,...)
void tw_init(int *argc, char ***argv)
void tw_event_send(tw_event *event)
void tw_define_lps(tw_lpid nlp, size_t msg_sz)
static tw_event * tw_event_new(tw_lpid dest_gid, tw_stime offset_ts, tw_lp *sender)
long tw_rand_integer(tw_rng_stream *g, long low, long high)
#define tw_rand_reverse_unif(G)
double tw_rand_exponential(tw_rng_stream *g, double Lambda)
void(* final_f)(void *sv, tw_lp *me)
void(* init_f)(void *sv, tw_lp *me)
void(* event_f)(void *sv, tw_bf *cv, void *msg, tw_lp *me)
void(* revent_f)(void *sv, tw_bf *cv, void *msg, tw_lp *me)
tw_peid(* map_f)(tw_lpid)
void(* commit_f)(void *sv, tw_bf *cv, void *msg, tw_lp *me)
void(* pre_run_f)(void *sv, tw_lp *me)
#define TWOPT_UINT(n, v, h)
#define TWOPT_CHAR(n, v, h)
void tw_opt_add(const tw_optdef *options)
#define TWOPT_DOUBLE(n, v, h)
static void print_event(crv_checkpointer const *chkptr, tw_lp *clp, tw_event *cev)
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)
const tw_optdef app_opt[]
static tw_stime percent_remote
static int optimistic_memory
static unsigned int stagger
static unsigned int nlp_per_pe
static unsigned int offset_lpid
static int g_phold_start_events
static unsigned int ttl_lps
void phold_pre_run(phold_state *s, tw_lp *lp)
bool check_state(struct phold_state *before, struct phold_state *after)
void phold_finish(phold_state *s, tw_lp *lp)
int main(int argc, char **argv)
void clean_state(struct phold_state_checkpoint *into)
void save_state(struct phold_state_checkpoint *into, struct phold_state const *from)
void phold_commit(phold_state *s, tw_bf *bf, phold_message *m, tw_lp *lp)
void print_state_saved(FILE *out, char const *prefix, struct phold_state_checkpoint *state)
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 event_trace(phold_message *m, tw_lp *lp, char *buffer, int *collect_flag)
void phold_event_handler_rc(phold_state *s, tw_bf *bf, phold_message *m, tw_lp *lp)
void print_event(FILE *out, char const *prefix, struct phold_state *state, struct phold_message *message)
void print_state(FILE *out, char const *prefix, struct phold_state *state)
st_model_types model_types[]
void phold_stats_collect(phold_state *s, tw_lp *lp, char *buffer)
tw_peid phold_map(tw_lpid gid)
long int saved_dummy_data
Reverse Computation Bitfield.
tw_rng_stream * rng
RNG stream array for this LP.
Function Pointers for ROSS Event Handlers.