Skip to content

Commit

Permalink
merged in master
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian-B committed Apr 30, 2024
2 parents d967ff9 + 68d893d commit 54b4dd3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class TestInsertLPGs(unittest.TestCase):
"""
def setUp(self):
unittest_setup()
set_config("Machine", "versions", VersionStrings.MULTIPLE_BOARDS.text)
set_config("Machine", "versions", VersionStrings.BIG.text)

def test_that_3_lpgs_are_generated_on_3_board_app_graph(self):
writer = FecDataWriter.mock()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def _write_report(writer: TextIO, machine: Machine, progress_bar: ProgressBar):
"""
down_links: List[Tuple[int, int, int, str]] = []
down_chips: List[Tuple[int, int, str]] = []
down_cores: List[Tuple[int, int, int, str]] = []
down_cores: List[Tuple[int, int, str, str]] = []
for e_chip in progress_bar.over(machine.ethernet_connected_chips):
assert e_chip.ip_address is not None
existing_chips: List[str] = []
Expand All @@ -58,17 +58,16 @@ def _write_report(writer: TextIO, machine: Machine, progress_bar: ProgressBar):
chip = machine[x, y]
existing_chips.append(
f"({x}, {y}, "
f"P: {FecDataView.get_physical_core_id((x, y), 0)})")
f"{FecDataView.get_physical_string((x, y), 0)})")
n_cores = FecDataView.get_machine_version().max_cores_per_chip
down_procs = set(range(n_cores))
for p in chip.all_processor_ids:
down_procs.remove(p)
for p in down_procs:
phys_p = FecDataView.get_physical_core_id((x, y), p)
core = p
if phys_p is not None:
core = -phys_p
down_cores.append((l_x, l_y, core, e_chip.ip_address))
phys_p = FecDataView.get_physical_string((x, y), p)
if not phys_p: # ""
phys_p = str(-p)
down_cores.append((l_x, l_y, phys_p, e_chip.ip_address))
else:
down_chips.append((l_x, l_y, e_chip.ip_address))
for link in range(Router.MAX_LINKS_PER_ROUTER):
Expand All @@ -82,7 +81,7 @@ def _write_report(writer: TextIO, machine: Machine, progress_bar: ProgressBar):
down_chips_out = ":".join(
f"{x},{y},{ip}" for x, y, ip in down_chips)
down_cores_out = ":".join(
f"{x},{y},{p},{ip}" for x, y, p, ip in down_cores)
f"{x},{y},{phys_p},{ip}" for x, y, phys_p, ip in down_cores)
down_links_out = ":".join(
f"{x},{y},{l},{ip}" for x, y, l, ip in down_links)
writer.write(f"Down chips: {down_chips_out}\n")
Expand Down
2 changes: 1 addition & 1 deletion unittests/interface/ds/test_ds.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def test_repeat_x_y_ds_vertex(self):
DataSpecificationGenerator(0, 1, 2, vertex2, db)

def test_core_infos(self):
set_config("Machine", "versions", VersionStrings.MULTIPLE_BOARDS.text)
set_config("Machine", "versions", VersionStrings.BIG.text)
writer = FecDataWriter.mock()
writer.set_machine(virtual_machine_by_min_size(9, 9))
with DsSqlliteDatabase() as db:
Expand Down

0 comments on commit 54b4dd3

Please sign in to comment.