spinn_front_end_common.interface.interface_functions package

Submodules

spinn_front_end_common.interface.interface_functions.host_no_bitfield_router_compression module

class spinn_front_end_common.interface.interface_functions.host_no_bitfield_router_compression.Compression(binary_path: str, progress_text: str, result_register: UserRegister)[source]

Bases: object

Compression algorithm implementation that uses a on-chip router compressor in order to parallelise.

Parameters:
  • binary_path – What binary to run

  • progress_text – Text to use in progress bar

  • result_register – number of the user register to check for the result code

compress() None[source]

Apply the on-machine compression algorithm.

Raises:

SpinnFrontEndException – If compression fails

spinn_front_end_common.interface.interface_functions.host_no_bitfield_router_compression.ordered_covering_compression() None[source]

Load routing tables and compress then using the unordered Algorithm.

To the best of our knowledge this is the same algorithm as mundy_on_chip_router_compression(), except this one is still buildable and can be maintained.

Raises:

SpinnFrontEndException – If compression fails

spinn_front_end_common.interface.interface_functions.host_no_bitfield_router_compression.pair_compression() None[source]

Load routing tables and compress then using the Pair Algorithm.

See pacman/operations/router_compressors/pair_compressor.py which is the exact same algorithm implemented in Python.

Raises:

SpinnFrontEndException – If compression fails

Module contents

spinn_front_end_common.interface.interface_functions.add_command_senders(system_placements: Placements) List[CommandSender]

Add command senders

Parameters:

system_placements – Placements to add CommandSender placements to.

Returns:

The command senders that were added

spinn_front_end_common.interface.interface_functions.application_finisher() None

Handles finishing the running of an application, collecting the status of the cores that the application was running on.

Raises:

ExecutableFailedToStopException

spinn_front_end_common.interface.interface_functions.application_runner(runtime: float | None, time_threshold: float | None, run_until_complete: bool, state_condition: Condition) int | None

Ensures all cores are initialised correctly, ran, and completed successfully.

Parameters:
  • runtime

  • time_threshold

  • run_until_complete

  • state_condition

Returns:

The current latest time-step if runtime is None and run_until_complete is False, else None

Raises:

ConfigurationException

spinn_front_end_common.interface.interface_functions.chip_io_buf_clearer() None

Clears the logging output buffer of an application running on a SpiNNaker machine.

spinn_front_end_common.interface.interface_functions.chip_io_buf_extractor() Tuple[Sequence[str], Sequence[str]]

Extract the logging output buffers from the machine, and separates lines based on their prefix.

Returns:

error_entries, warn_entries

spinn_front_end_common.interface.interface_functions.chip_provenance_updater(all_core_subsets: CoreSubsets) None

Forces all cores to generate provenance data, and then exit.

Parameters:

all_core_subsets

spinn_front_end_common.interface.interface_functions.chip_runtime_updater(n_sync_steps: int) None

Updates the runtime of an application running on a SpiNNaker machine.

Parameters:

n_sync_steps

spinn_front_end_common.interface.interface_functions.compute_energy_used(checkpoint: int | None = None, n_reset: int | None = None) PowerUsed

This algorithm does the actual work of computing energy used by a simulation (or other application) running on SpiNNaker.

Parameters:
  • checkpoint – the time at which to compute execution energy up to

  • n_reset – The reset number if global data is not wanted.

Returns:

Summary object of power used

spinn_front_end_common.interface.interface_functions.create_notification_protocol() NotificationProtocol

Builds the notification protocol for GUI and external device interaction.

Returns:

The newly created protocol.

spinn_front_end_common.interface.interface_functions.database_interface() str | None

Creates and loads a DataWriter database

Returns:

where the database is located, if one is made

spinn_front_end_common.interface.interface_functions.energy_provenance_reporter(power_used: PowerUsed) None

Converts the power usage information into provenance data.

Parameters:

power_used – The computed basic power consumption information

spinn_front_end_common.interface.interface_functions.graph_binary_gatherer() ExecutableTargets

Extracts binaries to be executed.

Returns:

The Executable targets loaded with the binaries

spinn_front_end_common.interface.interface_functions.graph_data_specification_writer() str
Returns:

Path to DSG targets database

Raises:

ConfigurationException – If the DSG asks to use more SDRAM than is available.

spinn_front_end_common.interface.interface_functions.hbp_allocator(total_run_time: float | None) Tuple[str, str | None, MachineAllocationController]

Request a machine from the HBP remote access server that will fit a number of chips.

Parameters:

total_run_time – The total run time to request

Returns:

IP address, BMP details (if any), allocation controller

Raises:

PacmanConfigurationException – If neither n_chips or n_boards provided

spinn_front_end_common.interface.interface_functions.insert_chip_power_monitors(placements: Placements) None

Adds chip power monitors into a given graph.

Parameters:

placements

spinn_front_end_common.interface.interface_functions.insert_extra_monitor_vertices(placements: Placements) Tuple[Dict[Chip, DataSpeedUpPacketGatherMachineVertex], Dict[Chip, ExtraMonitorSupportMachineVertex]]

Inserts the extra monitor vertices into the graph that correspond to the extra monitor cores required.

Parameters:

placements

Returns:

mapping from Ethernet-enabled chip locations to their gatherer, mapping from all chip locations to their extra monitor

spinn_front_end_common.interface.interface_functions.load_app_images() None

Go through the executable targets and load each binary to everywhere and then send a start request to the cores that actually use it.

spinn_front_end_common.interface.interface_functions.load_application_data_specs() None

Load the data specs for all non-system targets.

spinn_front_end_common.interface.interface_functions.load_fixed_routes() None

Load the set of fixed routes onto a SpiNNaker machine.

spinn_front_end_common.interface.interface_functions.load_sys_images() None

Go through the executable targets and load each binary to everywhere and then send a start request to the cores that actually use it.

spinn_front_end_common.interface.interface_functions.load_system_data_specs() None

Load the data specs for all system targets.

spinn_front_end_common.interface.interface_functions.load_using_advanced_monitors() bool

Check varies config settings and the size to decided to use monitors.

As it takes time to setup and take down the system of advanced monitors, tests show it does not make sense unless there large context

Returns:

True if advanced monitors should be used for data specs

spinn_front_end_common.interface.interface_functions.locate_executable_start_type() Dict[ExecutableType, CoreSubsets]

Discovers where applications of particular types need to be launched.

Returns:

Mapping of type to the cores which have that type

spinn_front_end_common.interface.interface_functions.placements_provenance_gatherer(n_placements: int, placements: Iterable[Placement]) None

Gets provenance information from the specified placements.

Parameters:
  • n_placements – Number of placements to gather

  • placements – The placements of the vertices to gather data form. May not be all placements so don’t use View

spinn_front_end_common.interface.interface_functions.profile_data_gatherer() None

Gets all the profiling data recorded by vertices and writes it to files.

spinn_front_end_common.interface.interface_functions.read_routing_tables_from_machine() MulticastRoutingTables

Reads compressed routing tables from a SpiNNaker machine.

Returns:

Routing tables after any compression on the machine

spinn_front_end_common.interface.interface_functions.reload_dsg_regions() None

Reloads DSG regions where needed.

spinn_front_end_common.interface.interface_functions.router_provenance_gatherer(provenance_prefix: str = '') None

Gathers diagnostics from the routers.

Parameters:

provenance_prefix – The prefix to add to the provenance names

spinn_front_end_common.interface.interface_functions.routing_table_loader(router_tables: MulticastRoutingTables) None

Loads routes into initialised routers.

Parameters:

router_tables

spinn_front_end_common.interface.interface_functions.sdram_outgoing_partition_allocator() None

Goes through all vertices to see if sdram has to be allocated.

spinn_front_end_common.interface.interface_functions.spalloc_allocate_job_old() Tuple[str, Dict[Tuple[int, int], str], MachineAllocationController]

Request a machine from an old-style spalloc server that will fit the requested number of boards.

Returns:

host, board address map, allocation controller

spinn_front_end_common.interface.interface_functions.split_lpg_vertices(system_placements: Placements) None

Split any LPG vertices found.

Parameters:

system_placements – existing placements to be added to

spinn_front_end_common.interface.interface_functions.system_multicast_routing_generator() Tuple[MulticastRoutingTables, Dict[Tuple[int, int], int], Dict[Tuple[int, int], int]]

Generates routing table entries used by the data-in processes with the extra monitor cores.

Returns:

routing tables, destination-to-key map, board-location-to-timeout-key map

spinn_front_end_common.interface.interface_functions.tags_loader() None

Loads tags onto the machine.