Commit a5e8b1c7 authored by Misbah Mubarak's avatar Misbah Mubarak
Browse files

Updating congestion control with dragonfly model

parents 9c4e2fad f18e903f
...@@ -40,6 +40,9 @@ struct terminal_message ...@@ -40,6 +40,9 @@ struct terminal_message
/* number of hops traversed by the packet */ /* number of hops traversed by the packet */
short my_N_hop; short my_N_hop;
short my_l_hop, my_g_hop;
short saved_channel;
/* Intermediate LP ID from which this message is coming */ /* Intermediate LP ID from which this message is coming */
unsigned int intm_lp_id; unsigned int intm_lp_id;
short new_vc; short new_vc;
...@@ -77,6 +80,7 @@ struct terminal_message ...@@ -77,6 +80,7 @@ struct terminal_message
/* LP ID of the sending node, has to be a network node in the dragonfly */ /* LP ID of the sending node, has to be a network node in the dragonfly */
tw_lpid sender_node; tw_lpid sender_node;
tw_lpid next_stop;
/* for reverse computation */ /* for reverse computation */
struct pending_router_msgs * saved_elem; struct pending_router_msgs * saved_elem;
......
This diff is collapsed.
...@@ -915,7 +915,7 @@ static void packet_generate( nodes_state * s, ...@@ -915,7 +915,7 @@ static void packet_generate( nodes_state * s,
m_gen_data_src = (char*)m_gen_data_src + msg->remote_event_size_bytes; m_gen_data_src = (char*)m_gen_data_src + msg->remote_event_size_bytes;
} }
if (msg->local_event_size_bytes) if (msg->local_event_size_bytes)
memcpy(m_gen_data, m_gen_data_src, msg->local_event_size_bytes); memcpy(m_gen_data, m_gen_data_src, msg->local_event_size_bytes);
tw_event_send(e_gen); tw_event_send(e_gen);
} }
...@@ -983,6 +983,7 @@ static void packet_send( nodes_state * s, ...@@ -983,6 +983,7 @@ static void packet_send( nodes_state * s,
if(s->buffer[ tmp_dir + ( tmp_dim * 2 ) ][ 0 ] < s->params->buffer_size) if(s->buffer[ tmp_dir + ( tmp_dim * 2 ) ][ 0 ] < s->params->buffer_size)
{ {
bf->c2 = 1; bf->c2 = 1;
msg->saved_src_dir = tmp_dir; msg->saved_src_dir = tmp_dir;
msg->saved_src_dim = tmp_dim; msg->saved_src_dim = tmp_dim;
...@@ -1070,12 +1071,12 @@ static void packet_arrive( nodes_state * s, ...@@ -1070,12 +1071,12 @@ static void packet_arrive( nodes_state * s,
nodes_message *m; nodes_message *m;
mn_stats* stat; mn_stats* stat;
credit_send( s, bf, lp, msg);
msg->my_N_hop++; msg->my_N_hop++;
ts = 0.1 + tw_rand_exponential(lp->rng, MEAN_INTERVAL/200); ts = 0.1 + tw_rand_exponential(lp->rng, MEAN_INTERVAL/200);
if(msg->packet_ID == TRACE) if(msg->packet_ID == TRACE)
printf("\n packet arrived at lp %d final dest %d ", (int)lp->gid, (int)msg->dest_lp); 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 ) if( lp->gid == msg->dest_lp )
{ {
uint64_t num_chunks = msg->packet_size/s->params->chunk_size; uint64_t num_chunks = msg->packet_size/s->params->chunk_size;
......
...@@ -16,14 +16,13 @@ PARAMS ...@@ -16,14 +16,13 @@ PARAMS
modelnet_scheduler="fcfs"; modelnet_scheduler="fcfs";
chunk_size="32"; chunk_size="32";
# modelnet_scheduler="round-robin"; # modelnet_scheduler="round-robin";
num_vcs="1";
num_routers="4"; num_routers="4";
local_vc_size="2048"; local_vc_size="2048";
global_vc_size="8192"; global_vc_size="8192";
cn_vc_size="512"; cn_vc_size="1024";
local_bandwidth="5.25"; local_bandwidth="5.25";
global_bandwidth="4.7"; global_bandwidth="4.7";
cn_bandwidth="5.25"; cn_bandwidth="5.25";
message_size="312"; message_size="320";
routing="minimal"; routing="adaptive";
} }
...@@ -9,7 +9,7 @@ LPGROUPS ...@@ -9,7 +9,7 @@ LPGROUPS
} }
PARAMS PARAMS
{ {
message_size="312"; message_size="320";
modelnet_order=( "loggp" ); modelnet_order=( "loggp" );
# scheduler options # scheduler options
modelnet_scheduler="fcfs-full"; modelnet_scheduler="fcfs-full";
......
...@@ -14,7 +14,7 @@ PARAMS ...@@ -14,7 +14,7 @@ PARAMS
# scheduler options # scheduler options
modelnet_scheduler="fcfs"; modelnet_scheduler="fcfs";
# modelnet_scheduler="round-robin"; # modelnet_scheduler="round-robin";
message_size="312"; message_size="320";
n_dims="4"; n_dims="4";
dim_length="4,2,2,2"; dim_length="4,2,2,2";
link_bandwidth="2.0"; link_bandwidth="2.0";
......
...@@ -10,7 +10,7 @@ LPGROUPS ...@@ -10,7 +10,7 @@ LPGROUPS
PARAMS PARAMS
{ {
packet_size="512"; packet_size="512";
message_size="312"; message_size="320";
modelnet_order=( "simplenet" ); modelnet_order=( "simplenet" );
# scheduler options # scheduler options
modelnet_scheduler="fcfs"; modelnet_scheduler="fcfs";
......
...@@ -24,8 +24,8 @@ ...@@ -24,8 +24,8 @@
#include "codes/configuration.h" #include "codes/configuration.h"
#include "codes/lp-type-lookup.h" #include "codes/lp-type-lookup.h"
#define NUM_REQS 1 /* number of requests sent by each server */ #define NUM_REQS 2 /* number of requests sent by each server */
#define PAYLOAD_SZ 2048 /* size of simulated data payload, bytes */ #define PAYLOAD_SZ 4096 /* size of simulated data payload, bytes */
static int net_id = 0; static int net_id = 0;
static int num_routers = 0; static int num_routers = 0;
...@@ -455,7 +455,7 @@ static void handle_ack_event( ...@@ -455,7 +455,7 @@ static void handle_ack_event(
memcpy(m_remote, m_local, sizeof(svr_msg)); memcpy(m_remote, m_local, sizeof(svr_msg));
m_remote->svr_event_type = (do_pull) ? ACK : REQ; m_remote->svr_event_type = (do_pull) ? ACK : REQ;
// printf("handle_ack_event(), lp %llu.\n", (unsigned long long)lp->gid); //printf("handle_ack_event(), lp %llu.\n", (unsigned long long)lp->gid);
/* safety check that this request got to the right server */ /* safety check that this request got to the right server */
// printf("\n m->src %d lp->gid %d ", m->src, lp->gid); // printf("\n m->src %d lp->gid %d ", m->src, lp->gid);
......
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