diff --git a/src/network-workloads/conf/dragonfly-custom/modelnet-test-dragonfly-custom.conf b/src/network-workloads/conf/dragonfly-custom/modelnet-test-dragonfly-custom.conf index d6caf112547f8a3993b2dc29e35d311b0a5aea76..be792312160f3ef9f4eb05c18eef1b5388c06a57 100644 --- a/src/network-workloads/conf/dragonfly-custom/modelnet-test-dragonfly-custom.conf +++ b/src/network-workloads/conf/dragonfly-custom/modelnet-test-dragonfly-custom.conf @@ -49,9 +49,9 @@ PARAMS # number of global channels per router num_global_channels="10"; # 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 - 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="prog-adaptive"; } diff --git a/src/network-workloads/conf/dragonfly-custom/modelnet-test-dragonfly-edison.conf b/src/network-workloads/conf/dragonfly-custom/modelnet-test-dragonfly-edison.conf index 8ae57fd2b7f7047db5095ca71beb24028523b2fd..a72aa1f24d00e2dfb920b858e9a783203ae1c120 100644 --- a/src/network-workloads/conf/dragonfly-custom/modelnet-test-dragonfly-edison.conf +++ b/src/network-workloads/conf/dragonfly-custom/modelnet-test-dragonfly-edison.conf @@ -48,9 +48,9 @@ PARAMS # number of global channels per router num_global_channels="10"; # 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 - 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="minimal"; } diff --git a/src/network-workloads/conf/dragonfly-custom/modelnet-test-dragonfly-theta.conf b/src/network-workloads/conf/dragonfly-custom/modelnet-test-dragonfly-theta.conf index 50dc3320fbc58b395a23b9c8fce4051430e2202f..a93f6a04006bdf46749ab15a943595cf08e30f9a 100644 --- a/src/network-workloads/conf/dragonfly-custom/modelnet-test-dragonfly-theta.conf +++ b/src/network-workloads/conf/dragonfly-custom/modelnet-test-dragonfly-theta.conf @@ -48,9 +48,9 @@ PARAMS # number of global channels per router num_global_channels="10"; # 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 - 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="adaptive"; } diff --git a/src/networks/model-net/dragonfly-custom.C b/src/networks/model-net/dragonfly-custom.C index 88a9405f836d3bcde387794fec8ca8fdcc0d912b..dc4040a0bd3a0560872a14e38e0196dcade6a590 100644 --- a/src/networks/model-net/dragonfly-custom.C +++ b/src/networks/model-net/dragonfly-custom.C @@ -22,7 +22,7 @@ #define DUMP_CONNECTIONS 0 #define CREDIT_SIZE 8 -#define DFLY_HASH_TABLE_SIZE 262144 +#define DFLY_HASH_TABLE_SIZE 5000 // debugging parameters #define TRACK -1 @@ -834,11 +834,8 @@ terminal_custom_init( terminal_state * s, 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 = (terminal_custom_message_list**)malloc(s->num_vcs*sizeof(terminal_custom_message_list*)); s->terminal_msgs_tail = @@ -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? // 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; key.message_id = msg->message_id; key.sender_id = msg->sender_lp; @@ -2026,8 +2026,10 @@ dragonfly_custom_terminal_final( terminal_state * s, //if(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); free(s->vc_occupancy); free(s->terminal_msgs); diff --git a/src/networks/model-net/dragonfly.c b/src/networks/model-net/dragonfly.c index 1e062470486cf36da15c15b6a0d20d0fdbbf555b..0f2e76c4ca47f29e4b5a4a3a366a3eb99e614e47 100644 --- a/src/networks/model-net/dragonfly.c +++ b/src/networks/model-net/dragonfly.c @@ -33,7 +33,7 @@ #define COLLECTIVE_COMPUTATION_DELAY 5700 #define DRAGONFLY_FAN_OUT_DELAY 20.0 #define WINDOW_LENGTH 0 -#define DFLY_HASH_TABLE_SIZE 262144 +#define DFLY_HASH_TABLE_SIZE 5000 // debugging parameters #define TRACK -1 @@ -757,11 +757,8 @@ terminal_init( terminal_state * s, 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 = (terminal_message_list**)malloc(1*sizeof(terminal_message_list*)); s->terminal_msgs_tail = @@ -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? // 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; key.message_id = msg->message_id; key.sender_id = msg->sender_lp; @@ -2363,8 +2363,10 @@ dragonfly_terminal_final( terminal_state * s, //if(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); free(s->vc_occupancy); free(s->terminal_msgs); diff --git a/src/networks/model-net/fattree.c b/src/networks/model-net/fattree.c index 3d14402a3d174ab0a90efd44aec4bda6fbaa2d65..de5f6f4043fedfd259ada5ed7de10cf119cd92b8 100644 --- a/src/networks/model-net/fattree.c +++ b/src/networks/model-net/fattree.c @@ -17,7 +17,7 @@ #define MEAN_PROCESS 1.0 #define TERMINAL_GUID_PREFIX ((uint64_t)(64) << 32) -#define FTREE_HASH_TABLE_SIZE 262144 +#define FTREE_HASH_TABLE_SIZE 5000 // debugging parameters #define TRACK_PKT -1 @@ -965,9 +965,9 @@ void ft_terminal_init( ft_terminal_state * s, tw_lp * lp ) s->in_send_loop = 0; s->issueIdle = 0; - s->rank_tbl = qhash_init(fattree_rank_hash_compare, fattree_hash_func, FTREE_HASH_TABLE_SIZE); - if(!s->rank_tbl) - tw_error(TW_LOC, "\n Hash table not initialized! "); + s->rank_tbl = NULL; + //if(!s->rank_tbl) + // tw_error(TW_LOC, "\n Hash table not initialized! "); s->params->num_terminals = codes_mapping_get_lp_count(lp_group_name, 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 void ft_packet_arrive(ft_terminal_state * s, tw_bf * bf, fattree_message * msg, 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 struct ftree_hash_key key; key.message_id = msg->message_id; diff --git a/src/networks/model-net/slimfly.c b/src/networks/model-net/slimfly.c index 289d4aa0178acbf69fe9fbfb09899b73d04090df..54896a12d49e63c21318581720717d041167af29 100644 --- a/src/networks/model-net/slimfly.c +++ b/src/networks/model-net/slimfly.c @@ -25,7 +25,7 @@ #define MEAN_PROCESS 1.0 /* collective specific parameters */ -#define DFLY_HASH_TABLE_SIZE 65536 +#define DFLY_HASH_TABLE_SIZE 5000 // debugging parameters #define TRACK 4 @@ -840,10 +840,9 @@ void slim_terminal_init( terminal_state * s, s->vc_occupancy[i]=0; } - s->rank_tbl = qhash_init(slimfly_rank_hash_compare, slimfly_hash_func, DFLY_HASH_TABLE_SIZE); - - if(!s->rank_tbl) - tw_error(TW_LOC, "\n Hash table not initialized! "); + s->rank_tbl = NULL; +// if(!s->rank_tbl) +// tw_error(TW_LOC, "\n Hash table not initialized! "); s->terminal_msgs = (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 * // NIC aggregation - should this be a separate function? // 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); if(msg->packet_ID == TRACK) @@ -1996,7 +1998,9 @@ void slimfly_terminal_final( terminal_state * s, if(s->terminal_msgs[0] != NULL) // 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); free(s->vc_occupancy); free(s->terminal_msgs); diff --git a/tests/Makefile.subdir b/tests/Makefile.subdir index 73ed1360b942a70905056d35ebbe153f6988f42f..2cca8b2916a97301c43de8662656157f30e8b1fb 100644 --- a/tests/Makefile.subdir +++ b/tests/Makefile.subdir @@ -12,6 +12,7 @@ check_PROGRAMS += tests/lp-io-test \ src/network-workloads/model-net-synthetic \ src/network-workloads/model-net-synthetic-fattree \ src/network-workloads/model-net-synthetic-slimfly \ + src/network-workloads/model-net-synthetic-custom-dfly \ tests/concurrent-msg-recv tests/modelnet-simplep2p-test \ tests/modelnet-test-collective \ tests/modelnet-prio-sched-test \ @@ -31,6 +32,7 @@ TESTS += tests/lp-io-test.sh \ tests/modelnet-test-dragonfly.sh \ tests/modelnet-test-slimfly.sh \ tests/modelnet-test-dragonfly-synthetic.sh \ + tests/modelnet-test-dragonfly-custom-synthetic.sh \ tests/modelnet-test-fattree-synthetic.sh \ tests/modelnet-test-slimfly-synthetic.sh \ tests/modelnet-p2p-bw-loggp.sh \