From a136d267273c6ebe44a11267a4e644a65496e88c Mon Sep 17 00:00:00 2001 From: Andrew Rowley Date: Thu, 10 Oct 2024 11:13:34 +0100 Subject: [PATCH] Update these calls too --- .../conways_basic_cell.py | 4 ++-- .../partitioned_example_b_no_vis_buffer/conways_basic_cell.py | 4 ++-- gfe_examples/sync_test/sync_test_vertex.py | 3 +-- gfe_examples/template/template_vertex.py | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/gfe_examples/Conways/partitioned_example_a_no_vis_no_buffer/conways_basic_cell.py b/gfe_examples/Conways/partitioned_example_a_no_vis_no_buffer/conways_basic_cell.py index 53f5c23e..4ef3db40 100644 --- a/gfe_examples/Conways/partitioned_example_a_no_vis_no_buffer/conways_basic_cell.py +++ b/gfe_examples/Conways/partitioned_example_a_no_vis_no_buffer/conways_basic_cell.py @@ -104,8 +104,8 @@ def generate_machine_data_specification( label="results") # write key needed to transmit with - key = FecDataView.get_routing_infos().get_first_key_from_pre_vertex( - self, self.PARTITION_ID) + r_infos = FecDataView.get_routing_infos() + key = r_infos.get_single_first_key_from_pre_vertex(self) spec.switch_write_focus(DataRegions.TRANSMISSIONS) spec.write_value(int(key is not None)) diff --git a/gfe_examples/Conways/partitioned_example_b_no_vis_buffer/conways_basic_cell.py b/gfe_examples/Conways/partitioned_example_b_no_vis_buffer/conways_basic_cell.py index c9cb1a07..dbed42b2 100644 --- a/gfe_examples/Conways/partitioned_example_b_no_vis_buffer/conways_basic_cell.py +++ b/gfe_examples/Conways/partitioned_example_b_no_vis_buffer/conways_basic_cell.py @@ -113,8 +113,8 @@ def generate_machine_data_specification( FecDataView.get_max_run_time_steps()]) # write key needed to transmit with - key = FecDataView.get_routing_infos().get_first_key_from_pre_vertex( - self, self.PARTITION_ID) + r_infos = FecDataView.get_routing_infos() + key = r_infos.get_single_first_key_from_pre_vertex(self) spec.switch_write_focus(DataRegions.TRANSMISSIONS) spec.write_value(int(key is not None)) diff --git a/gfe_examples/sync_test/sync_test_vertex.py b/gfe_examples/sync_test/sync_test_vertex.py index e7d41603..ae00d950 100644 --- a/gfe_examples/sync_test/sync_test_vertex.py +++ b/gfe_examples/sync_test/sync_test_vertex.py @@ -82,9 +82,8 @@ def generate_data_specification( spec.write_value(0) else: routing_info = FecDataView.get_routing_infos() - key = routing_info.get_first_key_from_pre_vertex( + key = routing_info.get_safe_first_key_from_pre_vertex( self, SEND_PARTITION) - assert key is not None spec.write_value(key) # End-of-Spec: diff --git a/gfe_examples/template/template_vertex.py b/gfe_examples/template/template_vertex.py index c23070c1..e665ab71 100644 --- a/gfe_examples/template/template_vertex.py +++ b/gfe_examples/template/template_vertex.py @@ -111,7 +111,7 @@ def _reserve_app_memory_regions(self, spec): def _write_app_memory_regions(self, spec, iptags): # Get the key, assuming all outgoing edges use the same key routing_info = FecDataView.get_routing_infos() - key = routing_info.get_first_key_from_pre_vertex(self, PARTITION_ID) + key = routing_info.get_single_first_key_from_pre_vertex(self) # Write the transmission region spec.switch_write_focus(DataRegions.TRANSMISSION)