Skip to content

Commit

Permalink
sstsimulator#574 Pushed WIP
Browse files Browse the repository at this point in the history
Not cleaned but the latest version
  • Loading branch information
meriadegp committed Apr 23, 2021
1 parent 334fc1a commit 076c9a8
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 7 deletions.
12 changes: 7 additions & 5 deletions python/snappr.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"app1.name" : "mpi_ping_all",
"app1.launch_cmd" : "aprun -n 4 -N 1",
"id" : i,
"app1.message_size" : "20KB",
})
nodes[i] = node

Expand All @@ -55,7 +56,8 @@
bandwidth=nic_bandwidth,
latency=nic_latency,
credits="8KB",
))
negligible_size=0,
))

inj_port = nic.setSubComponent("outport", "macro.snappr_outport")
inj_port.addParams(dict(
Expand All @@ -76,8 +78,7 @@
sideX = 0.5
sideY = 0.5
sideZ = 0.5
sst.setStatisticLoadLevel(7)
sst.setStatisticOutput("sst.vtkstatisticoutputexodus")

for i in range(num_switches):
connections = system.switchConnections(i)
switch = switches[i]
Expand Down Expand Up @@ -153,9 +154,9 @@
for i in range(num_nodes):
ep = nodes[i]
for p in range(nproc):
print("Injection %d on switch %d" % (p,nproc))
sw = logp_switches[p]
inj_sw = system.nodeToLogPSwitch(i)

#use inj_sw to set a no-cut

link_name = "logPinjection%d->%d" % (i, p)
Expand All @@ -172,5 +173,6 @@
port_name = "output%d" % (i)
sw.addLink(link, port_name, small_latency)


sst.setStatisticLoadLevel(7)
sst.setStatisticOutput("sst.vtkstatisticoutputexodus")
sst.macro.debug("mpi")
3 changes: 3 additions & 0 deletions sstmac/hardware/snappr/snappr_outport.cc
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ SnapprOutPort::SnapprOutPort(uint32_t id, SST::Params& params,
queue_depth_ftq = dynamic_cast<FTQCalendar*>(
parent->registerMultiStatistic<int,uint64_t,uint64_t>(params, "queue_depth", subId));
#else
std::cout << "registerMultiStatistic"<< getName() << " "<< isAnonymous() << " "<< isUser() << std::endl;
intensity = registerMultiStatistic<uint64_t, double>(params, "traffic_intensity", subId);
#endif
ftq_idle_state = FTQTag::allocateCategoryId("idle:" + portName);
Expand Down Expand Up @@ -227,6 +228,7 @@ SnapprOutPort::send(SnapprPacket* pkt, Timestamp now)
void
SnapprOutPort::scheduleArbitration()
{

#if SSTMAC_SANITY_CHECK
if (arbitration_scheduled){
spkt_abort_printf("arbitration already scheduled on port %s:%d", portName_.c_str(), number_);
Expand Down Expand Up @@ -302,6 +304,7 @@ SnapprOutPort::arbitrate()
arbitration_scheduled = false;
if (ready()){
if (intensity){
std::cout << "SnapprOutPort:: arbitrate intensity" << std::endl;
intensity->addData(parent_->now().usec(), queueLength());
}
logQueueDepth();
Expand Down
2 changes: 1 addition & 1 deletion sstmac/hardware/snappr/snappr_switch.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class SnapprSwitch :
{"xmit_active", "activity statistic", "cycles", 1}, // Name, Desc, Units, Enable Level
{"xmit_idle", "idle statistic", "cycles", 1}, // Name, Desc, Units, Enable Level
{"bytes_sent", "data sent on port", "bytes", 1},
{"traffic_intensity", "Count the traffic on a port", "unit of traffic", 1}
{"traffic_intensity", "Count the traffic on a port", "unit of traffic", 1},
)

SnapprSwitch(uint32_t id, SST::Params& params);
Expand Down
16 changes: 15 additions & 1 deletion sstmac/hardware/topology/topology.cc
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,23 @@ Topology::staticTopology(SST::Params& params)
{
if (!staticTopology_){
SST::Params top_params = params.find_scoped_params("topology");
if(top_params.size() == 0) {
top_params.insert("name", "dragonfly");
top_params.insert("geometry", "[4,3]");
top_params.insert("h", "6");
top_params.insert("inter_group", "circulant");
top_params.insert("concentration", "4");
}
params.insert(top_params);
std::string name = top_params.find<std::string>("name");
std::cout << "Topology::staticTopology" << top_params.size() << std::endl;

if (name.empty()){
spkt_abort_printf("no topology.name parameter in namespace");
// spkt_abort_printf("no topology.name parameter in namespace");
}
for(auto key : top_params.getKeys()) {
std::cout << "key: " << key << std::endl;

}
staticTopology_ = sprockit::create<Topology>("macro", name, top_params);
}
Expand Down

0 comments on commit 076c9a8

Please sign in to comment.