From f1414ebf4bcdcfb227466b28bea0e2dd59102f06 Mon Sep 17 00:00:00 2001 From: jjwilke Date: Sat, 18 Jul 2020 18:09:04 -0700 Subject: [PATCH] fix port scaling issue for fat tree --- sstmac/hardware/topology/fat_tree.cc | 32 +++++----------- sstmac/hardware/topology/fat_tree.h | 2 - ...core_apps_ping_all_fattree_tapered.ref-out | 38 +++++++++---------- ...test_core_apps_ping_all_tree_table.ref-out | 34 ++++++++--------- 4 files changed, 46 insertions(+), 60 deletions(-) diff --git a/sstmac/hardware/topology/fat_tree.cc b/sstmac/hardware/topology/fat_tree.cc index ff3a60662..01594913e 100644 --- a/sstmac/hardware/topology/fat_tree.cc +++ b/sstmac/hardware/topology/fat_tree.cc @@ -340,28 +340,6 @@ FatTree::connectedOutports(SwitchId src, std::vector& conns) const } } -double -FatTree::portScaleFactor(uint32_t addr, int /*port*/) const -{ - int my_level = level(addr); - - int n_leaf_port = up_ports_per_leaf_switch_ + concentration(); - int n_agg_port = up_ports_per_agg_switch_ + down_ports_per_agg_switch_; - int n_core_port = down_ports_per_core_switch_; - int min_port = std::min(n_leaf_port,n_agg_port); - min_port = std::min(min_port,n_core_port); - - double multiplier = 1.0; - if (my_level == 0 && n_leaf_port > min_port) - multiplier *= double(n_leaf_port) / double(min_port); - else if (my_level == 1 && n_agg_port > min_port) - multiplier *= double(n_agg_port) / double(min_port); - else if (my_level == 2 && n_core_port > min_port) - multiplier *= double(n_core_port) / double(min_port); - - return multiplier; -} - void FatTree::checkInput() const { @@ -430,6 +408,16 @@ FatTree::checkInput() const "agg_switches_per_subtree * down_ports_per_agg_switch must equal leaf_switches_per_subtree * up_ports_per_leaf_switch (%d != %d)", ndown,nup); } + +#if !SSTMAC_INTEGRATED_SST_CORE + int agg_ports = down_ports_per_agg_switch_ + up_ports_per_agg_switch_; + int core_ports = down_ports_per_core_switch_; + int leaf_ports = concentration() + up_ports_per_leaf_switch_; + + if (agg_ports != core_ports || leaf_ports != agg_ports || leaf_ports != core_ports){ + std::cerr << "WARNING: Fat tree configured with non-uniform switches (different no. ports per switch). SST/macro may not accurately model nonuniform switch crossbars without sst-core support" << std::endl; + } +#endif } void diff --git a/sstmac/hardware/topology/fat_tree.h b/sstmac/hardware/topology/fat_tree.h index 50bceef3c..cd700c5c9 100644 --- a/sstmac/hardware/topology/fat_tree.h +++ b/sstmac/hardware/topology/fat_tree.h @@ -198,8 +198,6 @@ class FatTree : void connectedOutports(SwitchId src, std::vector& conns) const override; - double portScaleFactor(uint32_t addr, int port) const override; - int minimalDistance(SwitchId src, SwitchId dst) const { if (src == dst){ return 0; diff --git a/tests/reference/test_core_apps_ping_all_fattree_tapered.ref-out b/tests/reference/test_core_apps_ping_all_fattree_tapered.ref-out index 89596a1d2..fcd679178 100644 --- a/tests/reference/test_core_apps_ping_all_fattree_tapered.ref-out +++ b/tests/reference/test_core_apps_ping_all_fattree_tapered.ref-out @@ -4,45 +4,45 @@ Rank 25 = 5000.0888ms Rank 20 = 5000.0943ms Rank 18 = 5000.0952ms Rank 21 = 5000.0962ms -Rank 1 = 5000.0977ms +Rank 1 = 5000.0976ms Rank 19 = 5000.0982ms Rank 4 = 5000.0997ms -Rank 0 = 5000.1016ms -Rank 5 = 5000.1023ms -Rank 3 = 5000.1077ms +Rank 0 = 5000.1006ms +Rank 5 = 5000.1033ms +Rank 3 = 5000.1078ms Rank 12 = 5000.1111ms Rank 15 = 5000.1121ms -Rank 7 = 5000.1122ms -Rank 8 = 5000.1162ms +Rank 7 = 5000.1125ms +Rank 8 = 5000.1152ms Rank 24 = 5000.1162ms Rank 9 = 5000.1187ms Rank 41 = 5000.1218ms Rank 10 = 5000.1231ms -Rank 6 = 5000.1231ms +Rank 6 = 5000.1234ms Rank 29 = 5000.1254ms Rank 22 = 5000.1253ms Rank 11 = 5000.1268ms -Rank 27 = 5000.1286ms +Rank 27 = 5000.1288ms Rank 23 = 5000.1304ms Rank 40 = 5000.1317ms -Rank 28 = 5000.1326ms -Rank 31 = 5000.1334ms +Rank 28 = 5000.1321ms +Rank 31 = 5000.1337ms Rank 46 = 5000.1357ms Rank 45 = 5000.1365ms -Rank 26 = 5000.1381ms +Rank 26 = 5000.1384ms Rank 14 = 5000.1406ms Rank 30 = 5000.1412ms Rank 43 = 5000.1430ms Rank 44 = 5000.1469ms Rank 42 = 5000.1483ms -Rank 32 = 5000.1525ms -Rank 17 = 5000.1549ms +Rank 32 = 5000.1526ms +Rank 17 = 5000.1550ms Rank 47 = 5000.1584ms -Rank 2 = 5000.1624ms -Rank 33 = 5000.1639ms -Rank 34 = 5000.1683ms +Rank 2 = 5000.1627ms +Rank 33 = 5000.1640ms +Rank 34 = 5000.1679ms Rank 48 = 5000.1699ms -Rank 35 = 5000.1786ms +Rank 35 = 5000.1781ms Rank 68 = 5000.1817ms Rank 66 = 5000.1867ms Rank 72 = 5000.1869ms @@ -54,7 +54,7 @@ Rank 73 = 5000.2064ms Rank 37 = 5000.2126ms Rank 64 = 5000.2137ms Rank 76 = 5000.2156ms -Rank 74 = 5000.2159ms +Rank 74 = 5000.2160ms Rank 65 = 5000.2164ms Rank 69 = 5000.2166ms Rank 53 = 5000.2166ms @@ -78,4 +78,4 @@ Rank 62 = 5000.2932ms Rank 58 = 5000.3006ms Rank 63 = 5000.3168ms Rank 59 = 5000.3236ms -Estimated total runtime of 5.00033221 seconds +Estimated total runtime of 5.00033155 seconds diff --git a/tests/reference/test_core_apps_ping_all_tree_table.ref-out b/tests/reference/test_core_apps_ping_all_tree_table.ref-out index ca4fa8e64..aa95364ef 100644 --- a/tests/reference/test_core_apps_ping_all_tree_table.ref-out +++ b/tests/reference/test_core_apps_ping_all_tree_table.ref-out @@ -1,17 +1,17 @@ -Rank 1 = 5000.0073ms -Rank 2 = 5000.0087ms -Rank 0 = 5000.0094ms -Rank 3 = 5000.0099ms -Rank 4 = 5000.0138ms -Rank 8 = 5000.0220ms -Rank 6 = 5000.0227ms -Rank 7 = 5000.0281ms -Rank 10 = 5000.0282ms -Rank 5 = 5000.0319ms -Rank 11 = 5000.0347ms -Rank 9 = 5000.0456ms -Rank 12 = 5000.0468ms -Rank 13 = 5000.0544ms -Rank 14 = 5000.0609ms -Rank 15 = 5000.0689ms -Estimated total runtime of 5.00007431 seconds +Rank 1 = 5000.0069ms +Rank 2 = 5000.0078ms +Rank 0 = 5000.0090ms +Rank 3 = 5000.0090ms +Rank 4 = 5000.0161ms +Rank 8 = 5000.0228ms +Rank 10 = 5000.0321ms +Rank 6 = 5000.0324ms +Rank 7 = 5000.0368ms +Rank 11 = 5000.0385ms +Rank 5 = 5000.0436ms +Rank 9 = 5000.0477ms +Rank 12 = 5000.0516ms +Rank 13 = 5000.0582ms +Rank 14 = 5000.0628ms +Rank 15 = 5000.0708ms +Estimated total runtime of 5.00007615 seconds