Commit 83bc8e21 authored by Misbah Mubarak's avatar Misbah Mubarak

Adding threshold for dumpi traces, fixing background traffic reverse handler

parent b25e8d10
......@@ -13,13 +13,13 @@ LPGROUPS
PARAMS
{
# packet size in the network
packet_size="1024";
packet_size="2048";
modelnet_order=( "dragonfly_custom","dragonfly_custom_router" );
# scheduler options
modelnet_scheduler="fcfs";
# chunk size in the network (when chunk size = packet size, packets will not be
# divided into chunks)
chunk_size="1024";
chunk_size="2048";
# modelnet_scheduler="round-robin";
# number of routers within each group
# this is dictated by the dragonfly configuration files
......
......@@ -423,7 +423,11 @@ static void notify_background_traffic_rc(
(void)ns;
(void)bf;
(void)m;
tw_rand_reverse_unif(lp->rng);
int num_jobs = codes_jobmap_get_num_jobs(jobmap_ctx);
for(int i = 0; i < num_jobs - 1; i++)
tw_rand_reverse_unif(lp->rng);
}
static void notify_background_traffic(
......@@ -2591,7 +2595,8 @@ int modelnet_mpi_replay(MPI_Comm comm, int* argc, char*** argv )
int ret = lp_io_flush(io_handle, MPI_COMM_CODES);
assert(ret == 0 || !"lp_io_flush failure");
}
printf("\n Synthetic traffic stats: data received per proc %lf bytes \n", g_total_syn_data/num_syn_clients);
if(is_synthetic)
printf("\n Synthetic traffic stats: data received per proc %lf bytes \n", g_total_syn_data/num_syn_clients);
model_net_report_stats(net_id);
......
......@@ -46,6 +46,7 @@ extern struct codes_jobmap_ctx *jobmap_ctx;
static struct qhash_table *rank_tbl = NULL;
static int rank_tbl_pop = 0;
static unsigned int max_threshold = INT_MAX;
/* context of the MPI workload */
typedef struct rank_mpi_context
{
......@@ -54,6 +55,7 @@ typedef struct rank_mpi_context
// whether we've seen an init op (needed for timing correctness)
int is_init;
int num_reqs;
unsigned int num_ops;
int64_t my_rank;
double last_op_time;
double init_time;
......@@ -785,6 +787,7 @@ int dumpi_trace_nw_workload_load(const char* params, int app_id, int rank)
my_ctx->is_init = 0;
my_ctx->num_reqs = 0;
my_ctx->dumpi_mpi_array = dumpi_init_op_data();
my_ctx->num_ops = 0;
if(rank < 10)
sprintf(file_name, "%s000%d.bin", dumpi_params->file_name, rank);
......@@ -931,8 +934,20 @@ int dumpi_trace_nw_workload_load(const char* params, int app_id, int rank)
while(active && !finalize_reached)
{
num_calls++;
my_ctx->num_ops++;
#ifdef ENABLE_CORTEX
active = cortex_undumpi_read_single_call(profile, callarr, transarr, (void*)my_ctx, &finalize_reached);
if(my_ctx->num_ops < max_threshold)
active = cortex_undumpi_read_single_call(profile, callarr, transarr, (void*)my_ctx, &finalize_reached);
else
{
struct codes_workload_op op;
op.op_type = CODES_WK_END;
op.start_time = my_ctx->last_op_time;
op.end_time = my_ctx->last_op_time + 1;
dumpi_insert_next_op(my_ctx->dumpi_mpi_array, &op);
break;
}
#else
active = undumpi_read_single_call(profile, callarr, (void*)my_ctx, &finalize_reached);
#endif
......
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