From fdac5b35679b866fa579560ae97073cbf6a718fe Mon Sep 17 00:00:00 2001 From: mubarak Date: Fri, 8 Apr 2016 15:39:01 -0400 Subject: [PATCH] Initial work for adding slimfly model in model-net-test program, mapping details required --- tests/conf/modelnet-test-slimfly.conf | 34 +++++++++++++++++++++++++++ tests/modelnet-test.c | 17 ++++++++++++-- 2 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 tests/conf/modelnet-test-slimfly.conf diff --git a/tests/conf/modelnet-test-slimfly.conf b/tests/conf/modelnet-test-slimfly.conf new file mode 100644 index 0000000..3596d07 --- /dev/null +++ b/tests/conf/modelnet-test-slimfly.conf @@ -0,0 +1,34 @@ +LPGROUPS +{ + MODELNET_GRP + { + repetitions="50"; + server="3"; + modelnet_slimfly="3"; + slimfly_router="1"; + } +} +PARAMS +{ + packet_size="512"; + modelnet_order=( "slimfly"); + # scheduler options + modelnet_scheduler="fcfs"; + chunk_size="256"; + # modelnet_scheduler="round-robin"; + num_routers="5"; + num_terminals="3"; + global_channels="5"; + local_channels="2"; + generator_set_X=("1","4"); + generator_set_X_prime=("2","3"); + local_vc_size="25600"; + global_vc_size="25600"; + cn_vc_size="25600"; + local_bandwidth="9.0"; + global_bandwidth="9.0"; + cn_bandwidth="9.0"; + link_delay = "0"; + message_size="368"; + routing="minimal"; +} diff --git a/tests/modelnet-test.c b/tests/modelnet-test.c index 8f7a6c3..7a06c09 100644 --- a/tests/modelnet-test.c +++ b/tests/modelnet-test.c @@ -42,6 +42,8 @@ static int lps_per_rep = 0; typedef struct svr_msg svr_msg; typedef struct svr_state svr_state; +char router_name[MAX_NAME_LENGTH]; + /* types of events that will constitute triton requests */ enum svr_event { @@ -174,10 +176,21 @@ int main( num_servers = codes_mapping_get_lp_count("MODELNET_GRP", 0, "server", NULL, 1); + if(net_id == DRAGONFLY) + { + strcpy(router_name, "modelnet_dragonfly_router"); + } + + if(net_id == SLIMFLY) + { + strcpy(router_name, "modelnet_slimfly_router"); + } + + if(net_id == SLIMFLY || net_id == DRAGONFLY) { num_routers = codes_mapping_get_lp_count("MODELNET_GRP", 0, - "modelnet_dragonfly_router", NULL, 1); + router_name, NULL, 1); offset = 1; } @@ -335,7 +348,7 @@ static void handle_kickoff_event( num_servers_per_rep = codes_mapping_get_lp_count("MODELNET_GRP", 1, "server", NULL, 1); num_routers_per_rep = codes_mapping_get_lp_count("MODELNET_GRP", 1, - "modelnet_dragonfly_router", NULL, 1); + router_name, NULL, 1); lps_per_rep = num_servers_per_rep * 2 + num_routers_per_rep; -- 2.26.2