diff --git a/unittests/model_tests/neuron/test_synaptic_manager.py b/unittests/model_tests/neuron/test_synaptic_manager.py index aefd540c23..de49650bc6 100644 --- a/unittests/model_tests/neuron/test_synaptic_manager.py +++ b/unittests/model_tests/neuron/test_synaptic_manager.py @@ -21,6 +21,7 @@ from spinn_utilities.overrides import overrides from spinn_utilities.config_holder import set_config +from spinn_machine.version.version_strings import VersionStrings from spinnman.transceiver.mockable_transceiver import MockableTransceiver from spinnman.transceiver import Transceiver from pacman.model.placements import Placement @@ -103,7 +104,7 @@ def say_false(self, *args, **kwargs): def test_write_data_spec(): unittest_setup() - set_config("Machine", "version", 5) + set_config("Machine", "versions", VersionStrings.ANY.text) writer = SpynnakerDataWriter.mock() # UGLY but the mock transceiver NEED generate_on_machine to be False AbstractGenerateConnectorOnMachine.generate_on_machine = say_false @@ -433,7 +434,7 @@ def test_pop_based_master_pop_table_standard( undelayed_indices_connected, delayed_indices_connected, n_pre_neurons, neurons_per_core, max_delay): unittest_setup() - set_config("Machine", "version", 5) + set_config("Machine", "versions", VersionStrings.FOUR_PLUS.text) writer = SpynnakerDataWriter.mock() # Build a from list connector with the delays we want @@ -476,7 +477,7 @@ def test_pop_based_master_pop_table_standard( # Generate the data with DsSqlliteDatabase() as db: - spec = DataSpecificationGenerator(1, 2, 3, post_mac_vertex, db) + spec = DataSpecificationGenerator(1, 0, 3, post_mac_vertex, db) regions = SynapseRegions( synapse_params=5, synapse_dynamics=6, structural_dynamics=7, @@ -494,7 +495,7 @@ def test_pop_based_master_pop_table_standard( spec, post_vertex_slice, references) # Read the population table and check entries - info = list(db.get_region_pointers_and_content(1, 2, 3)) + info = list(db.get_region_pointers_and_content(1, 0, 3)) region, _, region_data = info[1] assert region == 3 mpop_data = numpy.frombuffer(region_data, dtype="uint8").view("uint32") diff --git a/unittests/test_integration_using_virtual_board/spynnaker.cfg b/unittests/test_integration_using_virtual_board/spynnaker.cfg index 335162ae6a..25e99500e4 100644 --- a/unittests/test_integration_using_virtual_board/spynnaker.cfg +++ b/unittests/test_integration_using_virtual_board/spynnaker.cfg @@ -1,8 +1,7 @@ [Machine] machine_spec_file = None -width = 8 -height = 8 -version = 5 +version = None +versions = Any virtual_board = True machineName = None spalloc_server = None diff --git a/unittests/test_sata_connectors/spynnaker.cfg b/unittests/test_sata_connectors/spynnaker.cfg index e057b5fbba..774cf00ae8 100644 --- a/unittests/test_sata_connectors/spynnaker.cfg +++ b/unittests/test_sata_connectors/spynnaker.cfg @@ -3,6 +3,7 @@ machine_spec_file = None machineName = None version = None +versions = Multiple boards remote_spinnaker_url = None @@ -14,8 +15,6 @@ virtual_board = True down_cores = None down_chips = None down_links = 2,5,2:2,5,3:6,1,2:6,1,3:10,9,2:10,9,3 -width = 12 -height = 12 [Mode] # mode = Production or Debug diff --git a/unittests/test_sata_connectors/test_sata_2_different_boards_valid_board_address.py b/unittests/test_sata_connectors/test_sata_2_different_boards_valid_board_address.py index 7c92f55dab..95412d191f 100644 --- a/unittests/test_sata_connectors/test_sata_2_different_boards_valid_board_address.py +++ b/unittests/test_sata_connectors/test_sata_2_different_boards_valid_board_address.py @@ -22,7 +22,7 @@ def do_run(): # Setup - p.setup(timestep=1.0) + p.setup(timestep=1.0, n_boards_required=3) src_1 = p.Population( None, diff --git a/unittests/test_spinnaker_link_connectors/spynnaker.cfg b/unittests/test_spinnaker_link_connectors/spynnaker.cfg index 19f5a4c7da..d48942d7ae 100644 --- a/unittests/test_spinnaker_link_connectors/spynnaker.cfg +++ b/unittests/test_spinnaker_link_connectors/spynnaker.cfg @@ -2,12 +2,11 @@ spalloc_server = None machineName = None version = None +versions = Multiple boards virtual_board = True down_cores = None down_chips = None down_links = 0,0,4:4,8,4:8,4,4 -width = 12 -height = 12 [Mode] # mode = Production or Debug diff --git a/unittests/test_spinnaker_link_connectors/test_spinnaker_link_2_different_boards_valid_board_address.py b/unittests/test_spinnaker_link_connectors/test_spinnaker_link_2_different_boards_valid_board_address.py index 8d6a8fc0ec..18245762ac 100644 --- a/unittests/test_spinnaker_link_connectors/test_spinnaker_link_2_different_boards_valid_board_address.py +++ b/unittests/test_spinnaker_link_connectors/test_spinnaker_link_2_different_boards_valid_board_address.py @@ -22,7 +22,7 @@ def do_run(): # Setup - p.setup(timestep=1.0) + p.setup(timestep=1.0, n_boards_required=3) # FPGA Retina retina_device = p.external_devices.ExternalFPGARetinaDevice diff --git a/unittests/test_using_virtual_board/spynnaker.cfg b/unittests/test_using_virtual_board/spynnaker.cfg index 4dba76cacc..3cb76baf25 100644 --- a/unittests/test_using_virtual_board/spynnaker.cfg +++ b/unittests/test_using_virtual_board/spynnaker.cfg @@ -1,7 +1,6 @@ [Machine] -width = 8 -height = 8 -version = 5 +version = None +versions = ANY virtual_board = True machineName = None spalloc_server = None diff --git a/unittests/test_using_virtual_board/test_constraint.py b/unittests/test_using_virtual_board/test_constraint.py index 5fb64d3531..1749879397 100644 --- a/unittests/test_using_virtual_board/test_constraint.py +++ b/unittests/test_using_virtual_board/test_constraint.py @@ -28,11 +28,15 @@ def test_placement_constraint(self): """ sim.setup(timestep=1.0) + width, height = SpynnakerDataView.get_machine_version().board_shape + # pick and XY in the middle of the board + x = (width + 1) // 3 + y = (height + 1) // 3 set_config("Reports", "write_application_graph_placer_report", True) sim.set_number_of_neurons_per_core(sim.IF_curr_exp, 50) pop_1 = sim.Population(200, sim.IF_curr_exp(), label="pop_1") - pop_1.add_placement_constraint(x=1, y=1) + pop_1.add_placement_constraint(x=x, y=y) input = sim.Population(1, sim.SpikeSourceArray(spike_times=[0]), label="input") sim.Projection(input, pop_1, sim.AllToAllConnector(), @@ -44,5 +48,5 @@ def test_placement_constraint(self): sim.end() self.assertGreater(len(placements), 0) for pl in placements: - self.assertEqual(1, pl.x) - self.assertEqual(1, pl.y) + self.assertEqual(x, pl.x) + self.assertEqual(y, pl.y) diff --git a/unittests/test_using_virtual_board/test_debug_mode/spynnaker.cfg b/unittests/test_using_virtual_board/test_debug_mode/spynnaker.cfg index e9fddb84e1..4b658fa4ea 100644 --- a/unittests/test_using_virtual_board/test_debug_mode/spynnaker.cfg +++ b/unittests/test_using_virtual_board/test_debug_mode/spynnaker.cfg @@ -1,7 +1,6 @@ [Machine] -width = 8 -height = 8 -version = 5 +version = None +versions = Any virtual_board = True machineName = None spalloc_server = None diff --git a/unittests/test_using_virtual_board/test_do_not_allow_violate/spynnaker.cfg b/unittests/test_using_virtual_board/test_do_not_allow_violate/spynnaker.cfg index 9a51f0d386..7eafa70775 100644 --- a/unittests/test_using_virtual_board/test_do_not_allow_violate/spynnaker.cfg +++ b/unittests/test_using_virtual_board/test_do_not_allow_violate/spynnaker.cfg @@ -1,8 +1,7 @@ [Machine] machine_spec_file = None -width = 8 -height = 8 -version = 5 +version = None +versions = Any virtual_board = True machineName = None spalloc_server = None diff --git a/unittests/test_virtual_board_no_vertices_supported/spynnaker.cfg b/unittests/test_virtual_board_no_vertices_supported/spynnaker.cfg index 091aad3dda..2b66f0fd3d 100644 --- a/unittests/test_virtual_board_no_vertices_supported/spynnaker.cfg +++ b/unittests/test_virtual_board_no_vertices_supported/spynnaker.cfg @@ -1,8 +1,7 @@ [Machine] virtual_board = True -width = 8 -height = 8 -version = 5 +version = None +versions = Any machine_name = None remote_spinnaker_url = None spalloc_server = None