diff --git a/link_test/Makefile b/link_test/Makefile index f3aaf381..60d2146c 100644 --- a/link_test/Makefile +++ b/link_test/Makefile @@ -12,14 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -# If SPINN_DIRS is not defined, this is an error! -ifndef SPINN_DIRS - $(error SPINN_DIRS is not set. Please define SPINN_DIRS (possibly by running "source setup" in the spinnaker package folder)) -endif +BUILDS = link_test_sender.mk link_test_receiver.mk link_test.mk +all: $(BUILDS) + for f in $(BUILDS); do ("$(MAKE)" -f $$f) || exit $$?; done -APP = link_test -SOURCES = link_test.c - -APP_OUTPUT_DIR := $(abspath $(dir $(abspath $(lastword $(MAKEFILE_LIST)))))/ - -include $(SPINN_DIRS)/make/local.mk +clean: $(BUILDS) + for f in $(BUILDS); do ("$(MAKE)" -f $$f clean) || exit $$?; done diff --git a/link_test/link_tester.py b/link_test/link_tester.py index 6947c9cb..70496bab 100644 --- a/link_test/link_tester.py +++ b/link_test/link_tester.py @@ -15,7 +15,12 @@ import sys from pacman.model.graphs.machine.machine_edge import MachineEdge import spinnaker_graph_front_end as front_end -from link_test.link_test_vertex import LinkTestVertex, PARTITION_NAME +from link_test.link_test_send_vertex import LinkTestSendVertex, PARTITION_NAME +from link_test.link_test_receive_vertex import LinkTestReceiveVertex + +WRITE_ROUTES = True +SENDS_PER_TS = 256 +DROPS_PER_TS = 0 def run(n_boards=None): @@ -27,26 +32,31 @@ def run(n_boards=None): run_time = 10000 # Put link test on all chips - chips = dict() + senders = dict() + receivers = dict() for c_x, c_y in machine.chip_coordinates: - chips[c_x, c_y] = LinkTestVertex(c_x, c_y, 256, 0, run_time) - front_end.add_machine_vertex_instance(chips[c_x, c_y]) + receivers[c_x, c_y] = LinkTestReceiveVertex( + c_x, c_y, SENDS_PER_TS, DROPS_PER_TS, run_time, WRITE_ROUTES) + front_end.add_machine_vertex_instance(receivers[c_x, c_y]) + senders[c_x, c_y] = LinkTestSendVertex( + c_x, c_y, SENDS_PER_TS, WRITE_ROUTES) # Connect links together for chip in machine.chips: for link in chip.router.links: opposite_link = (link.source_link_id + 3) % 6 - target = chips[link.destination_x, link.destination_y] - source = chips[chip.x, chip.y] + target = receivers[link.destination_x, link.destination_y] + source = senders[chip.x, chip.y] target.set_neighbour(opposite_link, source) - front_end.add_machine_edge_instance( - MachineEdge(source, target), PARTITION_NAME) + if not WRITE_ROUTES: + front_end.add_machine_edge_instance( + MachineEdge(source, target), PARTITION_NAME) front_end.run(run_time) front_end.stop() # Check the vertices for failure - for vertex in chips.values(): + for vertex in receivers.values(): vertex.check_failure() diff --git a/link_test/run_link_test.py b/link_test/run_link_test.py index c44be228..8135311e 100644 --- a/link_test/run_link_test.py +++ b/link_test/run_link_test.py @@ -84,7 +84,6 @@ def test_run(x, y): f.write("write_network_specification_report = False\n") f.write("write_provenance = False\n") f.write("read_graph_provenance_data = False\n") - f.write("read_placements_provenance_data = False\n") f.write("read_profile_data = False\n") test = LinkTest()