sstsimulator / sst-elements

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

Generating misformatting DOT files for Merlin/Firefly/Ember Network Simulations #2310

Open deanchester opened 7 months ago

deanchester commented 7 months ago

When generating a DOT output with default DOT verbosity it shows boxes with numbers and not the relevant link controls on the NIC components, see: testTopo-default

With the verbosity set to 6 it shows all the components correctly wired up:

testTopo-6

The simulation is wired up correctly it just outputs the dot incorrectly, the port control and link control object inside of Merlin are subcomponents and these are only exported by the dot output with a higher verbosity. It is due to this line in the output code which disables the sub components for low verbosity.

To generate the above diagrams:

$ sst --output-dot=testTopo.dot testTopo.py
$ dot -Tpng testTopo.dot -o testTopo.png

$ sst --output-dot=testTopo-6.dot --dot-verbosity=6 testTopo.py
$ dot -Tpng testTopo-6.dot -o testTopo-6.png

A minimal working example for the Ember/Hermes/Firefly/Merlin stack:

import sst
from sst.merlin.base import *
from sst.merlin.topology import *
from sst.ember import *
from sst.merlin.interface import *

platdef = PlatformDefinition.compose("fattree",[("firefly-defaults","ALL")])
platdef.addParamSet("router",{
    "link_bw" : "200Gb/s",
    "flit_size" : "16B",
    "xbar_bw" : "250Gb/s",
    "input_latency" : "50ns",
    "output_latency" : "50ns",
    "input_buf_size" : "16kB",
    "output_buf_size" : "16kB",
})

platdef.addParamSet("network_interface",{
    "link_bw" : "200Gb/s",
    "input_buf_size" : "16kB",
    "output_buf_size" : "16kB"
})
platdef.addClassType("network_interface","sst.merlin.interface.ReorderLinkControl")

platdef.addParamSet("topology",{
    "shape":"2,2:4",
    "link_latency" : "99ns",
    "host_link_latency": "99ns",
})
platdef.addClassType("topology","sst.merlin.topology.topoFatTree")

if __name__ == "__main__": 
    PlatformDefinition.setCurrentPlatform("fattree")
    pd = PlatformDefinition.getCurrentPlatform()

    system = System()

    # Get the total number of network endpoints
    total_nodes = system.topology.getNumNodes()

    ep = EmberMPIJob(0,4, 1, 1)
    ep.addMotif("Init")
    ep.addMotif("Fini")
    system.allocateNodes(ep,"linear")
    system.build()
feldergast commented 7 months ago

When verbosity is low, we probably need to connect any links from subcomponents to the parent component. This will give the correct structure with less internal details on subcomponents. Having missing links because we don't show the subcomponents is not the right thing to do.