Commit 3ca902db authored by Xin Wang's avatar Xin Wang

add parameter for payload size

parent 3194db49
......@@ -28,7 +28,6 @@
#define lprintf(_fmt, ...) \
do {if (CS_LP_DBG) printf(_fmt, __VA_ARGS__);} while (0)
#define MAX_STATS 65536
#define PAYLOAD_SZ 1024
static int msg_size_hash_compare(
void *key, struct qhash_head *link);
......@@ -52,6 +51,7 @@ static uint64_t EAGER_THRESHOLD = 8192;
static int alloc_spec = 0;
static tw_stime self_overhead = 10.0;
static tw_stime mean_interval = 100000;
static int payload_sz = 1024;
/* Doing LP IO*/
static char lp_io_dir[256] = {'\0'};
......@@ -594,9 +594,9 @@ static void gen_synthetic_tr_rc(nw_state * s, tw_bf * bf, nw_message * m, tw_lp
return;
model_net_event_rc2(lp, &m->event_rc);
s->gen_data -= PAYLOAD_SZ;
s->gen_data -= payload_sz;
num_syn_bytes_sent -= PAYLOAD_SZ;
num_syn_bytes_sent -= payload_sz;
tw_rand_reverse_unif(lp->rng);
tw_rand_reverse_unif(lp->rng);
......@@ -695,16 +695,16 @@ static void gen_synthetic_tr(nw_state * s, tw_bf * bf, nw_message * m, tw_lp * l
remote_m.fwd.sim_start_time = tw_now(lp);
remote_m.fwd.dest_rank = dest_svr[i];
remote_m.msg_type = CLI_BCKGND_ARRIVE;
remote_m.fwd.num_bytes = PAYLOAD_SZ;
remote_m.fwd.num_bytes = payload_sz;
remote_m.fwd.app_id = s->app_id;
remote_m.fwd.src_rank = s->local_rank;
m->event_rc = model_net_event(net_id, "synthetic-tr", global_dest_id, PAYLOAD_SZ, 0.0,
m->event_rc = model_net_event(net_id, "synthetic-tr", global_dest_id, payload_sz, 0.0,
sizeof(nw_message), (const void*)&remote_m,
0, NULL, lp);
s->gen_data += PAYLOAD_SZ;
num_syn_bytes_sent += PAYLOAD_SZ;
s->gen_data += payload_sz;
num_syn_bytes_sent += payload_sz;
}
/* New event after MEAN_INTERVAL */
......@@ -2379,6 +2379,7 @@ const tw_optdef app_opt [] =
TWOPT_UINT("enable_mpi_debug", enable_debug, "enable debugging of MPI sim layer (works with sync=1 only)"),
TWOPT_UINT("sampling_interval", sampling_interval, "sampling interval for MPI operations"),
TWOPT_UINT("enable_sampling", enable_sampling, "enable sampling (only works in sequential mode)"),
TWOPT_UINT("payload_sz", payload_sz, "payload size for generating background traffic"),
TWOPT_STIME("mean_interval", mean_interval, "mean interval for generating background traffic"),
TWOPT_STIME("sampling_end_time", sampling_end_time, "sampling_end_time"),
TWOPT_CHAR("lp-io-dir", lp_io_dir, "Where to place io output (unspecified -> no output"),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment