Commit f18e903f authored by Misbah Mubarak's avatar Misbah Mubarak

Minor updates to dragonfly model

parent c6bc9f8a
......@@ -922,7 +922,7 @@ void packet_generate_rc(terminal_state * s, tw_bf * bf, terminal_message * msg,
num_chunks++;
if(!num_chunks)
num_chunks++;
num_chunks = 1;
int i;
for(i = 0; i < num_chunks; i++) {
......@@ -959,6 +959,10 @@ void packet_generate(terminal_state * s, tw_bf * bf, terminal_message * msg,
int i, total_event_size;
int num_chunks = msg->packet_size / p->chunk_size;
if (msg->packet_size % s->params->chunk_size) num_chunks++;
if(!num_chunks)
num_chunks = 1;
msg->packet_ID = lp->gid + g_tw_nlp * s->packet_counter;
msg->travel_start_time = tw_now(lp);
msg->my_N_hop = 0;
......@@ -1103,6 +1107,9 @@ void packet_send(terminal_state * s, tw_bf * bf, terminal_message * msg,
if(cur_entry->msg.packet_size % s->params->chunk_size)
num_chunks++;
if(!num_chunks)
num_chunks = 1;
if(cur_entry->msg.chunk_id == num_chunks - 1 &&
(cur_entry->msg.local_event_size_bytes > 0)) {
bf->c2 = 1;
......@@ -1187,6 +1194,8 @@ void packet_arrive(terminal_state * s, tw_bf * bf, terminal_message * msg,
int num_chunks = msg->packet_size / s->params->chunk_size;
if (msg->packet_size % s->params->chunk_size)
num_chunks++;
if(!num_chunks)
num_chunks = 1;
completed_packets++;
......@@ -1639,7 +1648,7 @@ void dragonfly_router_final(router_state * s,
tw_lp * lp)
{
free(s->global_channel);
char *stats_file = getenv("TRACER_LINK_FILE");
/*char *stats_file = getenv("TRACER_LINK_FILE");
if(stats_file != NULL) {
FILE *fout = fopen(stats_file, "a");
const dragonfly_param *p = s->params;
......@@ -1653,7 +1662,7 @@ void dragonfly_router_final(router_state * s,
fprintf(fout, "\n");
result = flock(fileno(fout), LOCK_UN);
fclose(fout);
}
}*/
int i, j;
for(i = 0; i < s->params->radix; i++) {
for(j = 0; j < 3; j++) {
......
......@@ -983,6 +983,7 @@ static void packet_send( nodes_state * s,
if(s->buffer[ tmp_dir + ( tmp_dim * 2 ) ][ 0 ] < s->params->buffer_size)
{
bf->c2 = 1;
msg->saved_src_dir = tmp_dir;
msg->saved_src_dim = tmp_dim;
......@@ -1070,12 +1071,12 @@ static void packet_arrive( nodes_state * s,
nodes_message *m;
mn_stats* stat;
credit_send( s, bf, lp, msg);
msg->my_N_hop++;
ts = 0.1 + tw_rand_exponential(lp->rng, MEAN_INTERVAL/200);
if(msg->packet_ID == TRACE)
printf("\n packet arrived at lp %d final dest %d ", (int)lp->gid, (int)msg->dest_lp);
credit_send( s, bf, lp, msg);
if( lp->gid == msg->dest_lp )
{
uint64_t num_chunks = msg->packet_size/s->params->chunk_size;
......
......@@ -24,5 +24,5 @@ PARAMS
global_bandwidth="4.7";
cn_bandwidth="5.25";
message_size="320";
routing="minimal";
routing="adaptive";
}
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