Skip to content

Commit

Permalink
Update these calls too
Browse files Browse the repository at this point in the history
  • Loading branch information
rowleya committed Oct 10, 2024
1 parent 6a19175 commit a136d26
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
3 changes: 1 addition & 2 deletions gfe_examples/sync_test/sync_test_vertex.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion gfe_examples/template/template_vertex.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a136d26

Please sign in to comment.