sstsimulator / sst-elements

SST Architectural Simulation Components and Libraries
http://www.sst-simulator.org
Other
88 stars 114 forks source link

Merlin fat tree shape #1245

Open jjwilke opened 5 years ago

jjwilke commented 5 years ago

I am trying to build a simulate fat tree using Ember, Firefly, Hermes and Merlin. The topology is 3:1 blocking, with 36 ports to nodes per switch and 12 uplinks to the root switch. There is a total of 108 nodes in this topology.

I think the shape is “36,12:3” this results in the correct number of nodes but fails to Generate 1 root switch but generates 12 root switches with 3 ports.

jjwilke commented 5 years ago

The current input deck is maybe not the most intuitive way of doing things? I would recommend making the changes below and see if it fixes things.

Originally total host computation is done as:

    int total_hosts = 1;
    for ( int i = 0; i < levels; i++ ) {
        total_hosts *= downs[i];
    }

I think this would be more intuitive by just specifying the number of hosts to the topology:

   int total_hosts = params.find<int>("total_hosts");
  routers_per_level[0] = total_hosts / downs[0];
  for (int i=1; i < levels; i++){ 
    int blocking_factor = downs[i] / ups[i-1];
    int blocking_rem = downs[i] % ups[i-1];
    if (blocking_rem){
      std::cerr << "WARNING: fat-tree level shapes are not aligned" << std::endl;
    } 
    if (downs[i] < ups[i-1]){
     std::cerr << "WARNING: fat-tree level " << i << " has more routers than level " << i-1 << std::endl;
    }
    routers_per_level[i] = routers_per_level[i-1] * ups[i-1] / downs[i];
  }

In the input file, this would make the shape specified as

total_hosts = "108"
shape = "36,12:36"

which should then compute 3 level 0 switches with 48 ports, 1 level 1 switch with 36 ports. I don't actually see how you could specify your scenario with the current input format. Try the changes and see if that works? The rest of the code should be fine from there.

jjwilke commented 5 years ago

@feldergast @mjleven I'm going to label this a bug? I might be screwing this up, but I don't think the current framework actually allows for both specifying the number of up/down ports and the total number of switches. I think this only works for a balanced tree.