Commit 6b825141 authored by Misbah Mubarak's avatar Misbah Mubarak

Removing excessive qhash memory allocation from network models

parent 9f8cb764
...@@ -49,9 +49,9 @@ PARAMS ...@@ -49,9 +49,9 @@ PARAMS
# number of global channels per router # number of global channels per router
num_global_channels="10"; num_global_channels="10";
# network config file for intra-group connections # network config file for intra-group connections
intra-group-connections="/Users/mmubarak/Documents/software_development/dragonfly-cray/codes-conflict/scripts/gen-cray-topo/intra-custom"; intra-group-connections="../src/network-workloads/conf/dragonfly-custom/intra-custom";
# network config file for inter-group connections # network config file for inter-group connections
inter-group-connections="/Users/mmubarak/Documents/software_development/dragonfly-cray/codes-conflict/scripts/gen-cray-topo/inter-custom"; inter-group-connections="../src/network-workloads/conf/dragonfly-custom/inter-custom";
# routing protocol to be used # routing protocol to be used
routing="prog-adaptive"; routing="prog-adaptive";
} }
...@@ -48,9 +48,9 @@ PARAMS ...@@ -48,9 +48,9 @@ PARAMS
# number of global channels per router # number of global channels per router
num_global_channels="10"; num_global_channels="10";
# network config file for intra-group connections # network config file for intra-group connections
intra-group-connections="/Users/mmubarak/Documents/software_development/dragonfly-cray/codes-conflict/scripts/gen-cray-topo/intra-edison"; intra-group-connections="../src/network-workloads/conf/dragonfly-custom/intra-edison";
# network config file for inter-group connections # network config file for inter-group connections
inter-group-connections="/Users/mmubarak/Documents/software_development/dragonfly-cray/codes-conflict/scripts/gen-cray-topo/inter-edison"; inter-group-connections="../src/network-workloads/conf/dragonfly-custom/inter-edison";
# routing protocol to be used # routing protocol to be used
routing="minimal"; routing="minimal";
} }
...@@ -48,9 +48,9 @@ PARAMS ...@@ -48,9 +48,9 @@ PARAMS
# number of global channels per router # number of global channels per router
num_global_channels="10"; num_global_channels="10";
# network config file for intra-group connections # network config file for intra-group connections
intra-group-connections="/Users/mmubarak/Documents/software_development/test_versions/codes/scripts/gen-cray-topo/intra-theta"; intra-group-connections="../src/network-workloads/conf/dragonfly-custom/intra-theta";
# network config file for inter-group connections # network config file for inter-group connections
inter-group-connections="/Users/mmubarak/Documents/software_development/test_versions/codes/scripts/gen-cray-topo/inter-theta"; inter-group-connections="../src/network-workloads/conf/dragonfly-custom/inter-theta";
# routing protocol to be used # routing protocol to be used
routing="adaptive"; routing="adaptive";
} }
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#define DUMP_CONNECTIONS 0 #define DUMP_CONNECTIONS 0
#define CREDIT_SIZE 8 #define CREDIT_SIZE 8
#define DFLY_HASH_TABLE_SIZE 262144 #define DFLY_HASH_TABLE_SIZE 5000
// debugging parameters // debugging parameters
#define TRACK -1 #define TRACK -1
...@@ -834,11 +834,8 @@ terminal_custom_init( terminal_state * s, ...@@ -834,11 +834,8 @@ terminal_custom_init( terminal_state * s,
s->vc_occupancy[i]=0; s->vc_occupancy[i]=0;
} }
s->rank_tbl = qhash_init(dragonfly_rank_hash_compare, dragonfly_hash_func, DFLY_HASH_TABLE_SIZE);
if(!s->rank_tbl)
tw_error(TW_LOC, "\n Hash table not initialized! ");
s->rank_tbl = NULL;
s->terminal_msgs = s->terminal_msgs =
(terminal_custom_message_list**)malloc(s->num_vcs*sizeof(terminal_custom_message_list*)); (terminal_custom_message_list**)malloc(s->num_vcs*sizeof(terminal_custom_message_list*));
s->terminal_msgs_tail = s->terminal_msgs_tail =
...@@ -1479,6 +1476,9 @@ static void packet_arrive(terminal_state * s, tw_bf * bf, terminal_custom_messag ...@@ -1479,6 +1476,9 @@ static void packet_arrive(terminal_state * s, tw_bf * bf, terminal_custom_messag
// NIC aggregation - should this be a separate function? // NIC aggregation - should this be a separate function?
// Trigger an event on receiving server // Trigger an event on receiving server
if(!s->rank_tbl)
s->rank_tbl = qhash_init(dragonfly_rank_hash_compare, dragonfly_hash_func, DFLY_HASH_TABLE_SIZE);
struct dfly_hash_key key; struct dfly_hash_key key;
key.message_id = msg->message_id; key.message_id = msg->message_id;
key.sender_id = msg->sender_lp; key.sender_id = msg->sender_lp;
...@@ -2026,8 +2026,10 @@ dragonfly_custom_terminal_final( terminal_state * s, ...@@ -2026,8 +2026,10 @@ dragonfly_custom_terminal_final( terminal_state * s,
//if(s->packet_gen != s->packet_fin) //if(s->packet_gen != s->packet_fin)
// printf("\n generated %d finished %d ", s->packet_gen, s->packet_fin); // printf("\n generated %d finished %d ", s->packet_gen, s->packet_fin);
if(s->rank_tbl)
qhash_finalize(s->rank_tbl);
qhash_finalize(s->rank_tbl);
rc_stack_destroy(s->st); rc_stack_destroy(s->st);
free(s->vc_occupancy); free(s->vc_occupancy);
free(s->terminal_msgs); free(s->terminal_msgs);
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
#define COLLECTIVE_COMPUTATION_DELAY 5700 #define COLLECTIVE_COMPUTATION_DELAY 5700
#define DRAGONFLY_FAN_OUT_DELAY 20.0 #define DRAGONFLY_FAN_OUT_DELAY 20.0
#define WINDOW_LENGTH 0 #define WINDOW_LENGTH 0
#define DFLY_HASH_TABLE_SIZE 262144 #define DFLY_HASH_TABLE_SIZE 5000
// debugging parameters // debugging parameters
#define TRACK -1 #define TRACK -1
...@@ -757,11 +757,8 @@ terminal_init( terminal_state * s, ...@@ -757,11 +757,8 @@ terminal_init( terminal_state * s,
s->vc_occupancy[i]=0; s->vc_occupancy[i]=0;
} }
s->rank_tbl = qhash_init(dragonfly_rank_hash_compare, dragonfly_hash_func, DFLY_HASH_TABLE_SIZE);
if(!s->rank_tbl)
tw_error(TW_LOC, "\n Hash table not initialized! ");
s->rank_tbl = NULL;
s->terminal_msgs = s->terminal_msgs =
(terminal_message_list**)malloc(1*sizeof(terminal_message_list*)); (terminal_message_list**)malloc(1*sizeof(terminal_message_list*));
s->terminal_msgs_tail = s->terminal_msgs_tail =
...@@ -1491,6 +1488,9 @@ static void packet_arrive(terminal_state * s, tw_bf * bf, terminal_message * msg ...@@ -1491,6 +1488,9 @@ static void packet_arrive(terminal_state * s, tw_bf * bf, terminal_message * msg
// NIC aggregation - should this be a separate function? // NIC aggregation - should this be a separate function?
// Trigger an event on receiving server // Trigger an event on receiving server
if(!s->rank_tbl)
s->rank_tbl = qhash_init(dragonfly_rank_hash_compare, dragonfly_hash_func, DFLY_HASH_TABLE_SIZE);
struct dfly_hash_key key; struct dfly_hash_key key;
key.message_id = msg->message_id; key.message_id = msg->message_id;
key.sender_id = msg->sender_lp; key.sender_id = msg->sender_lp;
...@@ -2363,8 +2363,10 @@ dragonfly_terminal_final( terminal_state * s, ...@@ -2363,8 +2363,10 @@ dragonfly_terminal_final( terminal_state * s,
//if(s->packet_gen != s->packet_fin) //if(s->packet_gen != s->packet_fin)
// printf("\n generated %d finished %d ", s->packet_gen, s->packet_fin); // printf("\n generated %d finished %d ", s->packet_gen, s->packet_fin);
if(s->rank_tbl)
qhash_finalize(s->rank_tbl);
qhash_finalize(s->rank_tbl);
rc_stack_destroy(s->st); rc_stack_destroy(s->st);
free(s->vc_occupancy); free(s->vc_occupancy);
free(s->terminal_msgs); free(s->terminal_msgs);
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
#define MEAN_PROCESS 1.0 #define MEAN_PROCESS 1.0
#define TERMINAL_GUID_PREFIX ((uint64_t)(64) << 32) #define TERMINAL_GUID_PREFIX ((uint64_t)(64) << 32)
#define FTREE_HASH_TABLE_SIZE 262144 #define FTREE_HASH_TABLE_SIZE 5000
// debugging parameters // debugging parameters
#define TRACK_PKT -1 #define TRACK_PKT -1
...@@ -965,9 +965,9 @@ void ft_terminal_init( ft_terminal_state * s, tw_lp * lp ) ...@@ -965,9 +965,9 @@ void ft_terminal_init( ft_terminal_state * s, tw_lp * lp )
s->in_send_loop = 0; s->in_send_loop = 0;
s->issueIdle = 0; s->issueIdle = 0;
s->rank_tbl = qhash_init(fattree_rank_hash_compare, fattree_hash_func, FTREE_HASH_TABLE_SIZE); s->rank_tbl = NULL;
if(!s->rank_tbl) //if(!s->rank_tbl)
tw_error(TW_LOC, "\n Hash table not initialized! "); // tw_error(TW_LOC, "\n Hash table not initialized! ");
s->params->num_terminals = codes_mapping_get_lp_count(lp_group_name, 0, s->params->num_terminals = codes_mapping_get_lp_count(lp_group_name, 0,
LP_CONFIG_NM, s->anno, 0); LP_CONFIG_NM, s->anno, 0);
...@@ -2381,6 +2381,8 @@ void ft_packet_arrive_rc(ft_terminal_state * s, tw_bf * bf, fattree_message * ms ...@@ -2381,6 +2381,8 @@ void ft_packet_arrive_rc(ft_terminal_state * s, tw_bf * bf, fattree_message * ms
void ft_packet_arrive(ft_terminal_state * s, tw_bf * bf, fattree_message * msg, void ft_packet_arrive(ft_terminal_state * s, tw_bf * bf, fattree_message * msg,
tw_lp * lp) { tw_lp * lp) {
if(!s->rank_tbl)
s->rank_tbl = qhash_init(fattree_rank_hash_compare, fattree_hash_func, FTREE_HASH_TABLE_SIZE);
//Establish msg hash keys //Establish msg hash keys
struct ftree_hash_key key; struct ftree_hash_key key;
key.message_id = msg->message_id; key.message_id = msg->message_id;
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#define MEAN_PROCESS 1.0 #define MEAN_PROCESS 1.0
/* collective specific parameters */ /* collective specific parameters */
#define DFLY_HASH_TABLE_SIZE 65536 #define DFLY_HASH_TABLE_SIZE 5000
// debugging parameters // debugging parameters
#define TRACK 4 #define TRACK 4
...@@ -840,10 +840,9 @@ void slim_terminal_init( terminal_state * s, ...@@ -840,10 +840,9 @@ void slim_terminal_init( terminal_state * s,
s->vc_occupancy[i]=0; s->vc_occupancy[i]=0;
} }
s->rank_tbl = qhash_init(slimfly_rank_hash_compare, slimfly_hash_func, DFLY_HASH_TABLE_SIZE); s->rank_tbl = NULL;
// if(!s->rank_tbl)
if(!s->rank_tbl) // tw_error(TW_LOC, "\n Hash table not initialized! ");
tw_error(TW_LOC, "\n Hash table not initialized! ");
s->terminal_msgs = s->terminal_msgs =
(slim_terminal_message_list**)malloc(1*sizeof(slim_terminal_message_list*)); (slim_terminal_message_list**)malloc(1*sizeof(slim_terminal_message_list*));
...@@ -1664,6 +1663,9 @@ void slim_packet_arrive(terminal_state * s, tw_bf * bf, slim_terminal_message * ...@@ -1664,6 +1663,9 @@ void slim_packet_arrive(terminal_state * s, tw_bf * bf, slim_terminal_message *
// NIC aggregation - should this be a separate function? // NIC aggregation - should this be a separate function?
// Trigger an event on receiving server // Trigger an event on receiving server
if(!s->rank_tbl)
s->rank_tbl = qhash_init(slimfly_rank_hash_compare, slimfly_hash_func, DFLY_HASH_TABLE_SIZE);
tw_stime ts = g_tw_lookahead + s->params->credit_delay + tw_rand_unif(lp->rng); tw_stime ts = g_tw_lookahead + s->params->credit_delay + tw_rand_unif(lp->rng);
if(msg->packet_ID == TRACK) if(msg->packet_ID == TRACK)
...@@ -1996,7 +1998,9 @@ void slimfly_terminal_final( terminal_state * s, ...@@ -1996,7 +1998,9 @@ void slimfly_terminal_final( terminal_state * s,
if(s->terminal_msgs[0] != NULL) if(s->terminal_msgs[0] != NULL)
// printf("[%lu] leftover terminal messages \n", lp->gid); // printf("[%lu] leftover terminal messages \n", lp->gid);
qhash_finalize(s->rank_tbl); if(s->rank_tbl)
qhash_finalize(s->rank_tbl);
rc_stack_destroy(s->st); rc_stack_destroy(s->st);
free(s->vc_occupancy); free(s->vc_occupancy);
free(s->terminal_msgs); free(s->terminal_msgs);
......
...@@ -12,6 +12,7 @@ check_PROGRAMS += tests/lp-io-test \ ...@@ -12,6 +12,7 @@ check_PROGRAMS += tests/lp-io-test \
src/network-workloads/model-net-synthetic \ src/network-workloads/model-net-synthetic \
src/network-workloads/model-net-synthetic-fattree \ src/network-workloads/model-net-synthetic-fattree \
src/network-workloads/model-net-synthetic-slimfly \ src/network-workloads/model-net-synthetic-slimfly \
src/network-workloads/model-net-synthetic-custom-dfly \
tests/concurrent-msg-recv tests/modelnet-simplep2p-test \ tests/concurrent-msg-recv tests/modelnet-simplep2p-test \
tests/modelnet-test-collective \ tests/modelnet-test-collective \
tests/modelnet-prio-sched-test \ tests/modelnet-prio-sched-test \
...@@ -31,6 +32,7 @@ TESTS += tests/lp-io-test.sh \ ...@@ -31,6 +32,7 @@ TESTS += tests/lp-io-test.sh \
tests/modelnet-test-dragonfly.sh \ tests/modelnet-test-dragonfly.sh \
tests/modelnet-test-slimfly.sh \ tests/modelnet-test-slimfly.sh \
tests/modelnet-test-dragonfly-synthetic.sh \ tests/modelnet-test-dragonfly-synthetic.sh \
tests/modelnet-test-dragonfly-custom-synthetic.sh \
tests/modelnet-test-fattree-synthetic.sh \ tests/modelnet-test-fattree-synthetic.sh \
tests/modelnet-test-slimfly-synthetic.sh \ tests/modelnet-test-slimfly-synthetic.sh \
tests/modelnet-p2p-bw-loggp.sh \ tests/modelnet-p2p-bw-loggp.sh \
......
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