Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Max Machine #960

Merged
merged 2 commits into from
Jul 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 2 additions & 43 deletions spinn_front_end_common/interface/abstract_spinnaker_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,7 @@
execute_application_data_specs, execute_system_data_specs,
graph_binary_gatherer, graph_data_specification_writer,
graph_provenance_gatherer,
host_based_bit_field_router_compressor,
hbp_allocator, hbp_max_machine_generator,
host_based_bit_field_router_compressor, hbp_allocator,
insert_chip_power_monitors_to_graphs,
insert_extra_monitor_vertices_to_graphs, split_lpg_vertices,
load_app_images, load_fixed_routes, load_sys_images,
Expand All @@ -90,7 +89,6 @@
read_routing_tables_from_machine, router_provenance_gatherer,
routing_setup, routing_table_loader,
sdram_outgoing_partition_allocator, spalloc_allocator,
spalloc_max_machine_generator,
system_multicast_routing_generator,
tags_loader, virtual_machine_generator)
from spinn_front_end_common.interface.interface_functions.\
Expand Down Expand Up @@ -177,11 +175,7 @@ class AbstractSpinnakerBase(ConfigHandler):

# Flag to say is compressed routing tables are on machine
# TODO remove this when the data change only algorithms are done
"_multicast_routes_loaded",

# Flag to say if current machine is a temporary max machine
# the temp /max machine is held in the "machine" slot
"_max_machine"
"_multicast_routes_loaded"
]

def __init__(
Expand Down Expand Up @@ -244,7 +238,6 @@ def _hard_reset(self):
self._data_writer.get_transceiver().stop_application(
self._data_writer.get_app_id())
self._data_writer.hard_reset()
self._max_machine = False
self._multicast_routes_loaded = False
self.__close_allocation_controller()

Expand Down Expand Up @@ -513,9 +506,6 @@ def __run(self, run_time, sync_time):
else:
self._data_writer.set_plan_n_timesteps(n_machine_time_steps)

self._get_known_machine(total_run_time)
if not self._data_writer.has_machine():
self._execute_get_max_machine(total_run_time)
self._do_mapping(total_run_time)

# Check if anything has per-timestep SDRAM usage
Expand Down Expand Up @@ -723,9 +713,6 @@ def _execute_allocator(self, category, total_run_time):
"""
if self._data_writer.has_machine():
return None
if (not self._data_writer.has_n_boards_required() and
not self._data_writer.has_n_chips_needed()):
return
if get_config_str("Machine", "spalloc_server") is not None:
with FecTimer(category, "SpallocAllocator"):
return spalloc_allocator()
Expand Down Expand Up @@ -778,31 +765,6 @@ def _execute_machine_generator(self, category, allocator_data):
self._data_writer.set_transceiver(transceiver)
self._data_writer.set_machine(machine)

def _execute_get_max_machine(self, total_run_time):
"""
Runs, times and logs the a MaxMachineGenerator if required

Will set the "machine" value if not already set

Sets the _max_machine to True if the "machine" value is a temporary
max machine.

:param total_run_time: The total run time to request
:type total_run_time: int or None
"""
self._max_machine = True
if get_config_str("Machine", "spalloc_server"):
with FecTimer(GET_MACHINE, "Spalloc max machine generator"):
self._data_writer.set_machine(spalloc_max_machine_generator())

elif get_config_str("Machine", "remote_spinnaker_url"):
with FecTimer(GET_MACHINE, "HBPMaxMachineGenerator"):
self._data_writer.set_machine(hbp_max_machine_generator(
total_run_time))

else:
raise NotImplementedError("No machine generataion possible")

def _get_known_machine(self, total_run_time=0.0):
""" The python machine description object.

Expand Down Expand Up @@ -1387,9 +1349,6 @@ def _do_mapping(self, total_run_time):
self._execute_delay_support_adder()

self._execute_splitter_partitioner()
if self._max_machine:
self._max_machine = False
self._data_writer.clear_machine()
allocator_data = self._execute_allocator(MAPPING, total_run_time)
self._execute_machine_generator(MAPPING, allocator_data)
self._json_machine()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
graph_data_specification_writer)
from .graph_provenance_gatherer import graph_provenance_gatherer
from .hbp_allocator import hbp_allocator
from .hbp_max_machine_generator import hbp_max_machine_generator
from .host_bit_field_router_compressor import (
host_based_bit_field_router_compressor)
from .host_execute_data_specification import (
Expand All @@ -55,7 +54,6 @@
from .routing_setup import routing_setup
from .routing_table_loader import routing_table_loader
from .spalloc_allocator import spalloc_allocator
from .spalloc_max_machine_generator import spalloc_max_machine_generator
from .tags_loader import tags_loader
from .virtual_machine_generator import virtual_machine_generator
from .read_routing_tables_from_machine import read_routing_tables_from_machine
Expand All @@ -76,7 +74,6 @@
"graph_binary_gatherer", "graph_data_specification_writer",
"graph_provenance_gatherer",
"hbp_allocator", "host_based_bit_field_router_compressor",
"hbp_max_machine_generator",
"insert_chip_power_monitors_to_graphs",
"insert_extra_monitor_vertices_to_graphs",
"split_lpg_vertices",
Expand All @@ -87,7 +84,7 @@
"read_routing_tables_from_machine", "router_provenance_gatherer",
"routing_setup",
"routing_table_loader", "sdram_outgoing_partition_allocator",
"spalloc_allocator", "spalloc_max_machine_generator",
"spalloc_allocator",
"system_multicast_routing_generator", "tags_loader",
"virtual_machine_generator",
]

This file was deleted.

This file was deleted.

This file was deleted.