sst-elements icon indicating copy to clipboard operation
sst-elements copied to clipboard

merlin singlerouter allows connectivity to non-existent ports

Open jleidel opened this issue 2 years ago • 1 comments

SST-ELEMENTS-12.1.0 Release

merlin.singlerouter allows users to connect ports that are beyond the scope of configured number of ports in the hr_router. The desired result would be a runtime error rather than a segmentation fault when the endpoints attempt to send data through the erroneous ports

Example:

router = sst.Component("router", "merlin.hr_router")
router.setSubComponent("topology", "merlin.singlerouter")
router.addParams(net_params)
router.addParams({
  "xbar_bw" : "10GB/s",
  "flit_size" : "32B",
  "num_ports" : "2",
  "id" : 0
})

link0 = sst.Link("link0")
link0.connect( (iface0, "rtr_port", "1ms"), (router, "port9", "1ms") )

link1 = sst.Link("link1")
link1.connect( (iface1, "rtr_port", "1ms"), (router, "port10", "1ms") )

jleidel avatar Dec 20 '22 18:12 jleidel

I'll have to give some thought to this one. This isn't actually easy to check right now and will likely take some core changes. In the example, since the ports are valid port names (defined as port%d in the ELI), the port checker doesn't flag them. The only way to find this in the router component would be to loop through and check every port name up to a certain number, which isn't really workable. We can't even check to make sure that all the ports up to num_ports are connected because you're allowed to have unconnected ports.

feldergast avatar Dec 21 '22 16:12 feldergast