From a30785961fd8df24b994e62eda7d9846710127f6 Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Fri, 19 Jul 2024 10:33:55 +0100 Subject: [PATCH 1/5] adjust files to check for --- .../test_debug_mode/check_debug.py | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/spynnaker_integration_tests/test_debug_mode/check_debug.py b/spynnaker_integration_tests/test_debug_mode/check_debug.py index 6c9ac48798..676e80abe5 100644 --- a/spynnaker_integration_tests/test_debug_mode/check_debug.py +++ b/spynnaker_integration_tests/test_debug_mode/check_debug.py @@ -14,6 +14,9 @@ import os from spinn_utilities.config_holder import get_config_bool + +from spinn_front_end_common.interface.interface_functions.\ + load_data_specification import load_using_advanced_monitors import spinn_front_end_common.utilities.report_functions.reports as \ reports_names from spinn_front_end_common.utilities.report_functions.network_specification \ @@ -27,6 +30,8 @@ # import EnergyReport from spinn_front_end_common.utilities.report_functions.board_chip_report \ import AREA_CODE_REPORT_NAME +from spinn_front_end_common.utilities.report_functions.\ + fixed_route_from_machine_report import REPORT_NAME as fixed_route_report from spinn_front_end_common.utility_models import \ DataSpeedUpPacketGatherMachineVertex from spinnaker_testbase import BaseTestCase @@ -78,15 +83,10 @@ def debug(self): _GRAPH_NAME, _GRAPH_NAME + "." + _GRAPH_FORMAT, + fixed_route_report, ] sim.setup(1.0) - if (get_config_bool("Machine", "enable_advanced_monitor_support") - and not get_config_bool("Java", "use_java")): - # write_data_speed_up_report - reports.append( - DataSpeedUpPacketGatherMachineVertex.OUT_REPORT_NAME) - reports.append(DataSpeedUpPacketGatherMachineVertex.IN_REPORT_NAME) pop = sim.Population(100, sim.IF_curr_exp, {}, label="pop") pop.record("v") inp = sim.Population(1, sim.SpikeSourceArray( @@ -97,6 +97,13 @@ def debug(self): pop.get_data("v") run0 = SpynnakerDataView.get_run_dir_path() found = os.listdir(run0) + if (get_config_bool("Machine", "enable_advanced_monitor_support") + and not get_config_bool("Java", "use_java")): + # write_data_speed_up_report + reports.append( + DataSpeedUpPacketGatherMachineVertex.OUT_REPORT_NAME) + if load_using_advanced_monitors(): + reports.append(DataSpeedUpPacketGatherMachineVertex.IN_REPORT_NAME) for report in reports: self.assertIn(report, found) self.assertIn("data.sqlite3", found) From 408166011a6a764c4a4ccdcf8659fc81bbb383d7 Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Fri, 19 Jul 2024 10:42:23 +0100 Subject: [PATCH 2/5] flake8 --- spynnaker_integration_tests/test_debug_mode/check_debug.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/spynnaker_integration_tests/test_debug_mode/check_debug.py b/spynnaker_integration_tests/test_debug_mode/check_debug.py index 676e80abe5..8a03afd308 100644 --- a/spynnaker_integration_tests/test_debug_mode/check_debug.py +++ b/spynnaker_integration_tests/test_debug_mode/check_debug.py @@ -15,8 +15,8 @@ import os from spinn_utilities.config_holder import get_config_bool -from spinn_front_end_common.interface.interface_functions.\ - load_data_specification import load_using_advanced_monitors +from spinn_front_end_common.interface.interface_functions \ + import load_using_advanced_monitors import spinn_front_end_common.utilities.report_functions.reports as \ reports_names from spinn_front_end_common.utilities.report_functions.network_specification \ @@ -103,7 +103,8 @@ def debug(self): reports.append( DataSpeedUpPacketGatherMachineVertex.OUT_REPORT_NAME) if load_using_advanced_monitors(): - reports.append(DataSpeedUpPacketGatherMachineVertex.IN_REPORT_NAME) + reports.append( + DataSpeedUpPacketGatherMachineVertex.IN_REPORT_NAME) for report in reports: self.assertIn(report, found) self.assertIn("data.sqlite3", found) From de9c23423e102bdb7faeebc466619b1be9280b84 Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Fri, 19 Jul 2024 11:03:00 +0100 Subject: [PATCH 3/5] change report looked for --- .../test_python_debug/check_debug.py | 60 ++++++++++++++++--- 1 file changed, 51 insertions(+), 9 deletions(-) diff --git a/proxy_integration_tests/test_python_debug/check_debug.py b/proxy_integration_tests/test_python_debug/check_debug.py index 91e6cc7eb2..8a03afd308 100644 --- a/proxy_integration_tests/test_python_debug/check_debug.py +++ b/proxy_integration_tests/test_python_debug/check_debug.py @@ -14,6 +14,9 @@ import os from spinn_utilities.config_holder import get_config_bool + +from spinn_front_end_common.interface.interface_functions \ + import load_using_advanced_monitors import spinn_front_end_common.utilities.report_functions.reports as \ reports_names from spinn_front_end_common.utilities.report_functions.network_specification \ @@ -27,13 +30,15 @@ # import EnergyReport from spinn_front_end_common.utilities.report_functions.board_chip_report \ import AREA_CODE_REPORT_NAME +from spinn_front_end_common.utilities.report_functions.\ + fixed_route_from_machine_report import REPORT_NAME as fixed_route_report from spinn_front_end_common.utility_models import \ DataSpeedUpPacketGatherMachineVertex from spinnaker_testbase import BaseTestCase from spynnaker.pyNN.data import SpynnakerDataView from spynnaker.pyNN.extra_algorithms.\ spynnaker_neuron_network_specification_report import ( - _GRAPH_NAME) + _GRAPH_NAME, _GRAPH_FORMAT) import pyNN.spiNNaker as sim @@ -75,18 +80,13 @@ def debug(self): CLOCK_DRIFT_REPORT, # write_board_chip_report AREA_CODE_REPORT_NAME, - # spynnaker_neuron_graph_network_specification_report _GRAPH_NAME, - # _GRAPH_NAME + "." + _GRAPH_FORMAT, + _GRAPH_NAME + "." + + _GRAPH_FORMAT, + fixed_route_report, ] sim.setup(1.0) - if (get_config_bool("Machine", "enable_advanced_monitor_support") - and not get_config_bool("Java", "use_java")): - # write_data_speed_up_report - reports.append( - DataSpeedUpPacketGatherMachineVertex.OUT_REPORT_NAME) - reports.append(DataSpeedUpPacketGatherMachineVertex.IN_REPORT_NAME) pop = sim.Population(100, sim.IF_curr_exp, {}, label="pop") pop.record("v") inp = sim.Population(1, sim.SpikeSourceArray( @@ -97,9 +97,51 @@ def debug(self): pop.get_data("v") run0 = SpynnakerDataView.get_run_dir_path() found = os.listdir(run0) + if (get_config_bool("Machine", "enable_advanced_monitor_support") + and not get_config_bool("Java", "use_java")): + # write_data_speed_up_report + reports.append( + DataSpeedUpPacketGatherMachineVertex.OUT_REPORT_NAME) + if load_using_advanced_monitors(): + reports.append( + DataSpeedUpPacketGatherMachineVertex.IN_REPORT_NAME) for report in reports: self.assertIn(report, found) self.assertIn("data.sqlite3", found) self.assertIn("ds.sqlite3", found) + sim.run(10) # second run + pop.get_data("v") + self.assertEqual(run0, SpynnakerDataView.get_run_dir_path()) + # No point in checking files they are already there + + sim.reset() # Soft + # check get works directly after a reset + pop.get_data("v") + sim.run(10) + found = os.listdir(SpynnakerDataView.get_run_dir_path()) + self.assertIn("data1.sqlite3", found) + self.assertNotIn("ds1.sqlite3", found) + + sim.reset() # soft with dsg + SpynnakerDataView.set_requires_data_generation() + sim.run(10) + pop.get_data("v") + self.assertEqual(run0, SpynnakerDataView.get_run_dir_path()) + found = os.listdir(run0) + self.assertIn("data2.sqlite3", found) + self.assertIn("ds2.sqlite3", found) + # No point in checking files they are already there + + sim.reset() # hard + SpynnakerDataView.set_requires_mapping() + sim.run(10) + pop.get_data("v") + self.assertNotEqual(run0, SpynnakerDataView.get_run_dir_path()) + found = os.listdir(SpynnakerDataView.get_run_dir_path()) + for report in reports: + self.assertIn(report, found) + self.assertIn("data3.sqlite3", found) + self.assertIn("ds3.sqlite3", found) + sim.end() From 08e135e1498645ccb91a5814276c71bba88c4031 Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Fri, 19 Jul 2024 11:19:51 +0100 Subject: [PATCH 4/5] don't expect network_graph.gv.png --- proxy_integration_tests/test_python_debug/check_debug.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/proxy_integration_tests/test_python_debug/check_debug.py b/proxy_integration_tests/test_python_debug/check_debug.py index 8a03afd308..7977cbbf9f 100644 --- a/proxy_integration_tests/test_python_debug/check_debug.py +++ b/proxy_integration_tests/test_python_debug/check_debug.py @@ -38,7 +38,7 @@ from spynnaker.pyNN.data import SpynnakerDataView from spynnaker.pyNN.extra_algorithms.\ spynnaker_neuron_network_specification_report import ( - _GRAPH_NAME, _GRAPH_FORMAT) + _GRAPH_NAME) import pyNN.spiNNaker as sim @@ -81,8 +81,8 @@ def debug(self): # write_board_chip_report AREA_CODE_REPORT_NAME, _GRAPH_NAME, - _GRAPH_NAME + "." + - _GRAPH_FORMAT, + # graphviz exe may not be installed so there will be no image file + # _GRAPH_NAME + "." + _GRAPH_FORMAT, fixed_route_report, ] From 37e8f7b3084ee3af881a2998d96f0456259d2666 Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Fri, 19 Jul 2024 12:48:01 +0100 Subject: [PATCH 5/5] increase timeout --- .github/workflows/c_actions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/c_actions.yml b/.github/workflows/c_actions.yml index 2b1b26d203..46226cd97e 100644 --- a/.github/workflows/c_actions.yml +++ b/.github/workflows/c_actions.yml @@ -93,7 +93,7 @@ jobs: test: needs: build runs-on: ${{ matrix.runner }} - timeout-minutes: 20 + timeout-minutes: 60 strategy: matrix: runner: [ubuntu-latest, windows-latest, macos-latest]