Skip to content

Commit

Permalink
Fixed butterfly
Browse files Browse the repository at this point in the history
  • Loading branch information
shashanknag authored Sep 18, 2021
1 parent 02a4b15 commit 07190c9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,7 @@ def print_func(final_nodes, final_switches):
for link in range(0,len(final_nodes[node_id])):
print("L({}):{}".format(link,final_nodes[node_id][link]),file=file3) #Print each link as per the final_nodes file


for switch_id in final_switches:
print("NodeID: {}".format(switch_id), file=file3)
print("Links : {}".format(len(final_switches[switch_id])), file=file3)
Expand Down Expand Up @@ -683,7 +684,7 @@ def print_func(final_nodes, final_switches):
head_nodes.append(head_node)

elif network_type == "B":
tile, head_node, switches = butterfly_gen(f_nodes,n,m) # Butterfly generator
tile, head_node, switches = butterfly_gen(f_nodes,n) # Butterfly generator
final_nodes.extend(tile)
final_switches.update(switches)
head_nodes.append(head_node)
Expand Down Expand Up @@ -728,6 +729,6 @@ def print_func(final_nodes, final_switches):
print("Invalid network type")
exit()


# Call the function to print the node descriptions into the output file
print_func(final_nodes, final_switches)

0 comments on commit 07190c9

Please sign in to comment.