spinn_front_end_common.interface.interface_functions package

Module contents

The code in this module is intended primarily for being invoked via the PACMAN Executor.

class spinn_front_end_common.interface.interface_functions.ApplicationFinisher[source]

Bases: object

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

__call__(app_id, txrx, executable_types)[source]
Parameters:
Raises:

ExecutableFailedToStopException

class spinn_front_end_common.interface.interface_functions.ApplicationRunner[source]

Bases: object

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

__call__(buffer_manager, notification_interface, executable_types, app_id, txrx, runtime, no_sync_changes, time_threshold, machine, run_until_complete=False)[source]
Parameters:
Returns:

Number of synchronisation changes

Return type:

int

Raises:

ConfigurationException

class spinn_front_end_common.interface.interface_functions.BufferExtractor[source]

Bases: object

Extracts data in between runs.

__call__(machine_graph, placements, buffer_manager)[source]
Parameters:
class spinn_front_end_common.interface.interface_functions.BufferManagerCreator[source]

Bases: object

Creates a buffer manager.

__call__(placements, tags, txrx, report_folder, extra_monitor_cores=None, extra_monitor_to_chip_mapping=None, packet_gather_cores_to_ethernet_connection_map=None, machine=None, fixed_routes=None, java_caller=None)[source]
Parameters:
Return type:

BufferManager

class spinn_front_end_common.interface.interface_functions.ChipIOBufClearer[source]

Bases: object

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

__call__(transceiver, executable_types)[source]
Parameters:
class spinn_front_end_common.interface.interface_functions.ChipIOBufExtractor[source]

Bases: object

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

__call__(transceiver, executable_targets, executable_finder, app_provenance_file_path=None, system_provenance_file_path=None)[source]
Parameters:
Returns:

error_entries, warn_entries

Return type:

tuple(list(str),list(str))

class spinn_front_end_common.interface.interface_functions.ChipProvenanceUpdater[source]

Bases: object

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

__call__(txrx, app_id, all_core_subsets)[source]
Parameters:
class spinn_front_end_common.interface.interface_functions.ChipRuntimeUpdater[source]

Bases: object

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

__call__(txrx, app_id, executable_types, run_until_timesteps, current_timesteps, n_sync_steps)[source]
Parameters:
class spinn_front_end_common.interface.interface_functions.CreateNotificationProtocol[source]

Bases: object

Builds the notification protocol for GUI and external device interaction.

__call__(socket_addresses, database_file_path)[source]
Parameters:
class spinn_front_end_common.interface.interface_functions.ComputeEnergyUsed[source]

Bases: object

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

JOULES_PER_SPIKE = 8e-10

stated in papers (SpiNNaker: A 1-W 18 core system-on-Chip for Massively-Parallel Neural Network Simulation)

MILLIWATTS_FOR_BOXED_48_CHIP_FRAME_IDLE_COST = 0.0045833333

measured from the real power meter and timing between the photos for a day powered off

MILLIWATTS_FOR_FRAME_IDLE_COST = 0.117

measured from the real power meter and timing between the photos for a days powered off

MILLIWATTS_PER_CHIP_ACTIVE_OVERHEAD = 0.0006399999999999999

stated in papers (SpiNNaker: A 1-W 18 core system-on-Chip for Massively-Parallel Neural Network Simulation)

MILLIWATTS_PER_FPGA = 0.000584635

given from Indar’s measurements

MILLIWATTS_PER_FRAME_ACTIVE_COST = 0.154163558

measured from the loading of the column and extrapolated

MILLIWATTS_PER_IDLE_CHIP = 0.00036

stated in papers (SpiNNaker: A 1-W 18 core system-on-Chip for Massively-Parallel Neural Network Simulation)

MILLIWATTS_PER_UNBOXED_48_CHIP_FRAME_IDLE_COST = 0.01666667
N_MONITORS_ACTIVE_DURING_COMMS = 2
__call__(placements, machine, version, router_provenance, runtime, buffer_manager, mapping_time, load_time, execute_time, dsg_time, extraction_time, spalloc_server=None, remote_spinnaker_url=None, machine_allocation_controller=None)[source]
Parameters:
Return type:

PowerUsed

class spinn_front_end_common.interface.interface_functions.DatabaseInterface[source]

Bases: object

Writes a database of the graph(s) and other information.

__call__(machine_graph, tags, runtime, machine, data_n_timesteps, placements, routing_infos, router_tables, report_folder, application_graph=None)[source]
Parameters:
Returns:

Database interface, where the database is located

Return type:

tuple(DatabaseInterface, str)

database_file_path
Return type:str or None
class spinn_front_end_common.interface.interface_functions.SystemMulticastRoutingGenerator[source]

Bases: object

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

__call__(machine, extra_monitor_cores, placements)[source]
Parameters:
Returns:

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

Return type:

tuple(MulticastRoutingTables, dict(tuple(int,int),int), dict(tuple(int,int),int))

class spinn_front_end_common.interface.interface_functions.DSGRegionReloader[source]

Bases: object

Regenerates and reloads the data specifications.

__call__(transceiver, placements, hostname, report_directory)[source]
Parameters:
  • transceiver (Transceiver) – SpiNNMan transceiver for communication
  • placements (Placements) – the list of placements of the machine graph to cores
  • hostname (str) – the machine name
  • report_directory (str) – the location where reports are stored
class spinn_front_end_common.interface.interface_functions.EdgeToNKeysMapper[source]

Bases: object

Works out the number of keys needed for each edge.

ERROR_MSG = 'A machine graph is required for this mapper. Please choose and try again'
PROG_BAR_NAME = 'Getting number of keys required by each edge using application graph'
__call__(machine_graph)[source]
Parameters:machine_graph (MachineGraph) –
Return type:DictBasedMachinePartitionNKeysMap
Raises:ConfigurationException – If no graph is available
class spinn_front_end_common.interface.interface_functions.EnergyProvenanceReporter[source]

Bases: object

Converts the power usage information into provenance data.

__call__(power_used, placements)[source]
Parameters:
  • power_used (PowerUsed) – The computed basic power consumption information
  • placements (Placements) – Used for describing what a core was actually doing
Return type:

list(ProvenanceDataItem)

class spinn_front_end_common.interface.interface_functions.FinaliseTimingData[source]

Bases: object

Produces the timing information for the run.

__call__()[source]
Returns:mapping_time, dsg_time, load_time, execute_time, extraction_time
Return type:tuple(float, float, float, float, float)
class spinn_front_end_common.interface.interface_functions.FindApplicationChipsUsed[source]

Bases: object

Builds a set of stats on how many chips were used for application cores.

__call__(placements)[source]

Finds how many application chips there were and the cost on each chip

Parameters:placements (Placements) – placements
Returns:a tuple with 4 elements.
  1. how many chips were used
  2. the max application cores on any given chip
  3. the lowest number of application cores on any given chip
  4. the average number of application cores on any given chip
Return type:tuple(int,int,int,float)
class spinn_front_end_common.interface.interface_functions.GraphBinaryGatherer[source]

Bases: object

Extracts binaries to be executed.

__call__(placements, graph, executable_finder)[source]
Parameters:
Return type:

ExecutableTargets

class spinn_front_end_common.interface.interface_functions.GraphDataSpecificationWriter[source]

Bases: object

Executes the data specification generation step.

__call__(placements, hostname, report_default_directory, machine, data_n_timesteps, placement_order=None)[source]
Parameters:
  • placements (Placements) – placements of machine graph to cores
  • hostname (str) – SpiNNaker machine name
  • report_default_directory (str) – the location where reports are stored
  • machine (Machine) – the python representation of the SpiNNaker machine
  • data_n_timesteps (int) – The number of timesteps for which data space will been reserved
  • placement_order (list(Placement)) – the optional order in which placements should be examined
Returns:

DSG targets (map of placement tuple and filename)

Return type:

tuple(DataSpecificationTargets, dict(tuple(int,int,int), int))

Raises:

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

class spinn_front_end_common.interface.interface_functions.GraphMeasurer[source]

Bases: object

Works out how many chips a machine graph needs.

__call__(machine_graph, machine, plan_n_timesteps)[source]
Parameters:
  • machine_graph (MachineGraph) – The machine_graph to measure.
  • machine (Machine) – The machine with respect to which to partition the application graph.
  • plan_n_timesteps (int) – Number of timesteps to plan for.
Returns:

The size of the graph in number of chips.

Return type:

int

class spinn_front_end_common.interface.interface_functions.GraphProvenanceGatherer[source]

Bases: object

Gets provenance information from the graphs.

__call__(machine_graph, application_graph=None)[source]
Parameters:
Return type:

list(ProvenanceDataItem)

class spinn_front_end_common.interface.interface_functions.HBPAllocator[source]

Bases: object

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

__call__(hbp_server_url, total_run_time, n_chips=None, n_boards=None)[source]
Parameters:
  • hbp_server_url (str) – The URL of the HBP server from which to get the machine
  • total_run_time (int) – The total run time to request
  • n_chips (int) – The number of chips required. Only used if n_boards is None
  • n_boards (int) – The number of boards required
Returns:

machine name, machine version, BMP details (if any), reset on startup flag, auto-detect BMP, SCAMP connection details, boot port, allocation controller

Return type:

tuple(str, int, object, bool, bool, object, object, MachineAllocationController)

Raises:

PacmanConfigurationException – If neither n_chips or n_boards provided

class spinn_front_end_common.interface.interface_functions.HostBasedBitFieldRouterCompressor[source]

Bases: object

Host-based fancy router compressor using the bitfield filters of the cores. Compresses bitfields and router table entries together as much as feasible.

MERGED_SETTER = 2147483648
N_ATOMS_MASK = 1073741823
__call__(router_tables, machine, placements, transceiver, default_report_folder, machine_graph, routing_infos)[source]

Entry point when using the PACMANAlgorithmExecutor

Parameters:
Returns:

compressed routing table entries

Return type:

MulticastRoutingTables

static generate_key_to_atom_map(machine_graph, routing_infos)[source]

THIS IS NEEDED due to the link from key to edge being lost.

Parameters:
Returns:

key to atom map based of key to n atoms

Return type:

dict(int,int)

generate_report_path(default_report_folder)[source]
Parameters:default_report_folder (str) –
Return type:str
get_bit_field_sdram_base_addresses(chip_x, chip_y, machine, placements, transceiver)[source]
Parameters:
start_compression_selection_process(router_table, report_folder_path, transceiver, machine_graph, placements, machine, target_length, compressed_pacman_router_tables, key_atom_map)[source]

Entrance method for doing on host compression. Can be used as a public method for other compressors.

Parameters:
  • router_table (UnCompressedMulticastRoutingTable) – the routing table in question to compress
  • report_folder_path (str or None) – the report folder base address
  • transceiver (Transceiver) – spinnMan instance
  • machine_graph (MachineGraph) – machine graph
  • placements (Placements) – placements
  • machine (Machine) – SpiNNMan instance
  • target_length (int) – length of router compressor to get to
  • compressed_pacman_router_tables (MulticastRoutingTables) – a data holder for compressed tables
  • key_atom_map (dict(int,int)) – key to atoms map should be allowed to handle per time step
class spinn_front_end_common.interface.interface_functions.HBPMaxMachineGenerator[source]

Bases: object

Generates a virtual machine of the width and height of the maximum machine a given HBP server can generate.

__call__(hbp_server_url, total_run_time, max_machine_core_reduction=0)[source]
Parameters:
  • hbp_server_url (str) – The URL of the HBP server from which to get the machine
  • total_run_time (int) – The total run time to request
  • max_machine_core_reduction (int) – the number of cores less than DEFAULT_MAX_CORES_PER_CHIP that each chip should have
Return type:

Machine

class spinn_front_end_common.interface.interface_functions.HostExecuteDataSpecification[source]

Bases: object

Executes the host based data specification.

execute_application_data_specs(transceiver, machine, app_id, dsg_targets, executable_targets, region_sizes, placements=None, extra_monitor_cores=None, extra_monitor_cores_to_ethernet_connection_map=None, report_folder=None, java_caller=None, processor_to_app_data_base_address=None)[source]

Execute the data specs for all non-system targets.

Parameters:
Returns:

map of placement and DSG data

Return type:

dict(tuple(int,int,int),DataWritten) or DsWriteInfo

execute_system_data_specs(transceiver, machine, app_id, dsg_targets, region_sizes, executable_targets, report_folder=None, java_caller=None, processor_to_app_data_base_address=None)[source]

Execute the data specs for all system targets.

Parameters:
Returns:

map of placement and DSG data, and loaded data flag.

Return type:

dict(tuple(int,int,int),DataWritten) or DsWriteInfo

first = True
class spinn_front_end_common.interface.interface_functions.InsertChipPowerMonitorsToGraphs[source]

Bases: object

Adds chip power monitors into a given graph.

__call__(machine, machine_graph, sampling_frequency, application_graph=None)[source]

Adds chip power monitor vertices on Ethernet connected chips as required.

Parameters:
  • machine (Machine) – the SpiNNaker machine as discovered
  • machine_graph (MachineGraph) – the machine graph
  • sampling_frequency (int) –
  • application_graph (ApplicationGraph) – the application graph
class spinn_front_end_common.interface.interface_functions.InsertEdgesToExtraMonitorFunctionality[source]

Bases: object

Inserts edges between vertices who use MC speed up and its local MC data gatherer.

EDGE_LABEL = 'edge between {} and {}'
__call__(machine_graph, placements, machine, vertex_to_ethernet_connected_chip_mapping, application_graph=None)[source]
Parameters:
class spinn_front_end_common.interface.interface_functions.InsertEdgesToLivePacketGatherers[source]

Bases: object

Add edges from the recorded vertices to the local Live PacketGatherers.

__call__(live_packet_gatherer_parameters, placements, live_packet_gatherers_to_vertex_mapping, machine, machine_graph, application_graph=None, n_keys_map=None)[source]
Parameters:
class spinn_front_end_common.interface.interface_functions.InsertExtraMonitorVerticesToGraphs[source]

Bases: object

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

__call__(machine, machine_graph, default_report_directory, application_graph=None)[source]
Parameters:
  • machine (Machine) – spinnMachine instance
  • machine_graph (MachineGraph) – machine graph
  • default_report_directory (str) – the directory where reports go
  • n_cores_to_allocate (int) – number of cores to allocate for reception
  • application_graph (ApplicationGraph) – app graph
Returns:

vertex to Ethernet connection map, list of extra_monitor_vertices, vertex_to_chip_map

Return type:

tuple( dict(tuple(int,int),DataSpeedUpPacketGatherMachineVertex), list(ExtraMonitorSupportMachineVertex), dict(tuple(int,int),ExtraMonitorSupportMachineVertex))

class spinn_front_end_common.interface.interface_functions.InsertLivePacketGatherersToGraphs[source]

Bases: object

Adds LPGs as required into a given graph.

__call__(live_packet_gatherer_parameters, machine, machine_graph, application_graph=None)[source]

Add LPG vertices on Ethernet connected chips as required.

Parameters:
Returns:

mapping between LPG parameters and LPG vertex

Return type:

dict(LivePacketGatherParameters, dict(tuple(int,int),LivePacketGatherMachineVertex))

spinn_front_end_common.interface.interface_functions.interface_xml()[source]
class spinn_front_end_common.interface.interface_functions.LoadExecutableImages[source]

Bases: object

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

static filter_targets(targets, filt)[source]
Parameters:
Return type:

tuple(list(str), ExecutableTargets)

load_app_images(executable_targets, app_id, transceiver)[source]
Parameters:
load_sys_images(executable_targets, app_id, transceiver)[source]
Parameters:
class spinn_front_end_common.interface.interface_functions.LoadFixedRoutes[source]

Bases: object

Load a set of fixed routes onto a SpiNNaker machine.

__call__(fixed_routes, transceiver, app_id)[source]
Parameters:
class spinn_front_end_common.interface.interface_functions.LocalTDMABuilder[source]

Bases: object

Builds a localised TDMA which allows a number of machine vertices of the same application vertex to fire at the same time. Ensures that other application vertices are not firing at the same time. Verifies if the total time required fits into the time scale factor and machine time step. Below are text diagrams to show how this works in principle.

Figure 1: bits needed to figure out time between spikes. Cores 0-4 have 2 atoms, core 5 has 1 atom:

#        0     1       2      3       4      5
# T2-[   X                    X
#    |         X                      X
#    |                 X                     X
#    [  X                     X
#       |------| T
#              X                      X
#                      X <- T3

T = time_between_cores
T2 = time_between_phases
T3 = end of TDMA (equiv of ((n_phases + 1) * T2))
cutoff = 2. n_phases = 3 max_atoms = 2

Constants etc just to get into head:

  • clock cycles = 200 Mhz = 200 = sv->cpu_clk
  • 1ms = 200000 for timer 1. = clock cycles
  • 200 per microsecond
  • machine time step = microseconds already.
  • __time_between_cores = microseconds.

Figure 2: initial offset (used to try to interleave packets from other app verts into the TDMA without extending the overall time, and trying to stop multiple packets in flight at same time).

Figure 3: bits needed to figure out time between spikes. Cores 0-4 have 2 atoms, core 5 has 1 atom:

#        0  .5   1   .5    2   .5   3    .5   4   .5   5  .5
# T2-[   X   Y                      X     Y
#    |           X   Y                        X    Y
#    |                     X    Y                      X   Y
#    [  X    Y                      X     Y
#       |-------| T
#               X    Y                        X    Y
#               |----| T4
#                   T3 ->  X    Y

T4 is the spreader between populations.
X is pop0 firing,
Y is pop1 firing
FRACTION_OF_TIME_FOR_SPIKE_SENDING = 0.8
FRACTION_OF_TIME_STEP_BEFORE_SPIKE_SENDING = 0.1
__call__(machine_graph, n_keys_map, application_graph=None)[source]

main entrance

Parameters:
config_values(clocks_per_cycle)[source]

Read the config for the right parameters and combinations.

Parameters:clocks_per_cycle (int) – The number of clock cycles per time step
Returns:(app_machine_quantity, clocks_between_cores, clocks_for_sending, clocks_waiting, initial_clocks)
Return type:tuple(int, int, int, int. int)
class spinn_front_end_common.interface.interface_functions.LocateExecutableStartType[source]

Bases: object

Discovers where applications of particular types need to be launched.

__call__(graph, placements)[source]
Parameters:
Return type:

dict(ExecutableType,CoreSubsets or None)

class spinn_front_end_common.interface.interface_functions.MachineBitFieldRouterCompressor[source]

Bases: object

On-machine bitfield-aware routing table compression.

BIT_FIELD_ADDRESSES_SDRAM_TAG = 2

sdram tag for the addresses the router compressor expects to find the bitfield addresses for the chip.

N_REGIONS_ELEMENT = 1

how many header elements are in the region addresses (1, n addresses)

ROUTING_TABLE_SDRAM_TAG = 1

sdram tag the router compressor expects to find there routing tables in

SUCCESS = 0

the successful identifier

TIMES_CYCLED_ROUTING_TABLES = 3
__call__(routing_tables, transceiver, machine, app_id, provenance_file_path, machine_graph, placements, executable_finder, default_report_folder, routing_infos, executable_targets, compress_as_much_as_possible=False, provenance_data_objects=None)[source]

entrance for routing table compression with bit field

Parameters:
  • routing_tables (MulticastRoutingTables) – routing tables
  • transceiver (Transceiver) – spinnman instance
  • machine (Machine) – spinnMachine instance
  • app_id (int) – app id of the application
  • provenance_file_path (str) – file path for prov data
  • machine_graph (MachineGraph) – machine graph
  • placements (Placements) – placements on machine
  • executable_finder (ExecutableFinder) – where are binaries are located
  • write_compressor_iobuf (bool) – flag saying if read IOBUF
  • produce_report (bool) –
  • default_report_folder (str) –
  • routing_infos (RoutingInfo) –
  • executable_targets (ExecutableTargets) – the set of targets and executables
  • compress_as_much_as_possible (bool) – whether to compress as much as possible
  • provenance_data_objects (list(ProvenanceDataItem)) –
Returns:

where the compressors ran, and the provenance they generated

Return type:

tuple(ExecutableTargets, list(ProvenanceDataItem))

compressor_aplx
Returns:The name of the compressor aplx file to use
compressor_type
Returns:The name of the compressor (excluding bitfields) being used
class spinn_front_end_common.interface.interface_functions.MachineGenerator[source]

Bases: object

Makes a transceiver and a machine object.

POWER_CYCLE_FAILURE_WARNING = 'The end user requested the power-cycling of the board. But the tools did not have the required BMP connection to facilitate a power-cycling, and therefore will not do so. please set the bmp_names accordingly in the [Machine] section of the relevant configuration (cfg) file. Or use a machine assess process which provides the BMP data (such as a spalloc system) or finally set reset_machine_on_startup = False in the [Machine] section of the relevant configuration (cfg) file to avoid this warning in future.'
POWER_CYCLE_WARNING = 'When power-cycling a board, it is recommended that you wait for 30 seconds before attempting a reboot. Therefore, the tools will now wait for 30 seconds. If you wish to avoid this wait, please set reset_machine_on_startup = False in the [Machine] section of the relevant configuration (cfg) file.'
__call__(hostname, bmp_details, board_version, auto_detect_bmp, scamp_connection_data, boot_port_num, reset_machine_on_start_up, default_report_directory=None)[source]
Parameters:
  • hostname (str) – the hostname or IP address of the SpiNNaker machine
  • bmp_details (str) – the details of the BMP connections
  • downed_chips (set(tuple(int,int))) – the chips that are down which SARK thinks are alive
  • downed_cores (set(tuple(int,int,int))) – the cores that are down which SARK thinks are alive
  • downed_links (set(tuple(int,int,int))) – the links that are down which SARK thinks are alive
  • board_version (int) – the version of the boards being used within the machine (1, 2, 3, 4 or 5)
  • auto_detect_bmp (bool) – Whether the BMP should be automatically determined
  • scamp_connection_data (list(SocketAddressWithChip)) – the list of SC&MP connection data or None
  • boot_port_num (int) – the port number used for the boot connection
  • reset_machine_on_start_up (bool) –
  • default_report_directory (str) – Directory to write any reports too. If None the current directory will be used.
Returns:

Transceiver, and description of machine it is connected to

Return type:

tuple(Machine, Transceiver)

class spinn_front_end_common.interface.interface_functions.PlacementsProvenanceGatherer[source]

Bases: object

Gets provenance information from vertices on the machine.

__call__(transceiver, placements)[source]
Parameters:
  • transceiver (Transceiver) – the SpiNNMan interface object
  • placements (Placements) – The placements of the vertices
Return type:

list(ProvenanceDataItem)

class spinn_front_end_common.interface.interface_functions.PreAllocateForBitFieldRouterCompressor[source]

Bases: object

Preallocates resources required for bitfield router compression.

__call__(machine, pre_allocated_resources)[source]
Parameters:
Returns:

preallocated resources

Return type:

PreAllocatedResourceContainer

class spinn_front_end_common.interface.interface_functions.PreAllocateResourcesForChipPowerMonitor[source]

Bases: object

Adds chip power monitor resources as required for a machine.

__call__(machine, sampling_frequency, pre_allocated_resources)[source]
Parameters:
  • machine (Machine) – the SpiNNaker machine as discovered
  • sampling_frequency (int) – the frequency of sampling
  • pre_allocated_resources (PreAllocatedResourceContainer) – other preallocated resources
Returns:

preallocated resources

Return type:

PreAllocatedResourceContainer

class spinn_front_end_common.interface.interface_functions.PreAllocateResourcesForExtraMonitorSupport[source]

Bases: object

Allocates resources for the extra monitors.

__call__(machine, pre_allocated_resources, n_cores_to_allocate=1)[source]
Parameters:
  • machine (Machine) – SpiNNaker machine object
  • pre_allocated_resources (PreAllocatedResourceContainer) – resources already preallocated
  • n_cores_to_allocate (int) – how many gatherers to use per chip
Return type:

PreAllocatedResourceContainer

class spinn_front_end_common.interface.interface_functions.PreAllocateResourcesForLivePacketGatherers[source]

Bases: object

Adds Live Packet Gatherer resources as required for a machine.

__call__(live_packet_gatherer_parameters, machine, pre_allocated_resources)[source]
Parameters:
Returns:

preallocated resources

Return type:

PreAllocatedResourceContainer

class spinn_front_end_common.interface.interface_functions.ProcessPartitionConstraints[source]

Bases: object

Adds constraints to partitions if the vertices at either end of the partition request it.

__call__(machine_graph)[source]
Parameters:machine_graph (MachineGraph) –
class spinn_front_end_common.interface.interface_functions.ProfileDataGatherer[source]

Bases: object

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

__call__(transceiver, placements, provenance_file_path)[source]
Parameters:
  • transceiver (Transceiver) – the SpiNNMan interface object
  • placements (Placements) – The placements of the vertices
  • provenance_file_path (str) – The location to store the profile data
class spinn_front_end_common.interface.interface_functions.ProvenanceJSONWriter[source]

Bases: object

Write provenance data into JSON

__call__(provenance_data_items, provenance_data_path)[source]
Parameters:
class spinn_front_end_common.interface.interface_functions.ProvenanceSQLWriter[source]

Bases: object

Writes provenance in SQL format.

__call__(provenance_data_items, provenance_data_path)[source]

Writes provenance in SQL format

Parameters:
class spinn_front_end_common.interface.interface_functions.ProvenanceXMLWriter[source]

Bases: object

Writes provenance in XML format.

__call__(provenance_data_items, provenance_data_path)[source]
Parameters:
  • provenance_data_items (list(ProvenanceDataItem)) – data items for provenance
  • provenance_data_path (str) – the file path to store provenance in
class spinn_front_end_common.interface.interface_functions.ReadRoutingTablesFromMachine[source]

Bases: object

Reads compressed routing tables from a SpiNNaker machine.

__call__(transceiver, routing_tables, app_id)[source]
Parameters:
Return type:

MulticastRoutingTables

class spinn_front_end_common.interface.interface_functions.RouterProvenanceGatherer[source]

Bases: object

Gathers diagnostics from the routers.

__call__(transceiver, machine, router_tables, provenance_data_objects=None, extra_monitor_vertices=None, placements=None)[source]
Parameters:
class spinn_front_end_common.interface.interface_functions.RoutingSetup[source]

Bases: object

Initialises the routers. Note that this does not load any routes into them.

__call__(router_tables, app_id, transceiver, machine)[source]
Parameters:
class spinn_front_end_common.interface.interface_functions.RoutingTableLoader[source]

Bases: object

Loads routes into initialised routers.

__call__(router_tables, app_id, transceiver, machine)[source]
Parameters:
class spinn_front_end_common.interface.interface_functions.SDRAMOutgoingPartitionAllocator[source]

Bases: object

__call__(machine_graph, transceiver, placements, app_id)[source]

Call self as a function.

class spinn_front_end_common.interface.interface_functions.SpallocAllocator[source]

Bases: object

Request a machine from a SPALLOC server that will fit the given number of chips.

__call__(spalloc_server, n_chips=None, n_boards=None)[source]
Parameters:
  • spalloc_server (str) – The server from which the machine should be requested
  • n_chips (int or None) – The number of chips required. IGNORED if n_boards is not None
  • n_boards (int or None) – The number of boards required
Return type:

tuple(str, int, None, bool, bool, None, None, MachineAllocationController)

class spinn_front_end_common.interface.interface_functions.SpallocMaxMachineGenerator[source]

Bases: object

Generates a maximum virtual machine a given allocation server can generate.

__call__(spalloc_server, spalloc_port=22244, spalloc_machine=None, max_machine_core_reduction=0)[source]
Parameters:
  • spalloc_server (str) –
  • spalloc_port (int) –
  • spalloc_machine (str) –
  • max_machine_core_reduction (int) – the number of cores less than DEFAULT_MAX_CORES_PER_CHIP that each chip should have
Returns:

A virtual machine

Return type:

Machine

class spinn_front_end_common.interface.interface_functions.TagsLoader[source]

Bases: object

Loads tags onto the machine.

__call__(transceiver, tags)[source]
Parameters:
  • transceiver (Transceiver) – the transceiver object
  • tags (Tags) – the tags object which contains IP and reverse IP tags; could be None if these are being given in separate lists
static load_iptags(iptags, transceiver, progress_bar)[source]

Loads all the IP tags individually.

Parameters:
static load_reverse_iptags(reverse_ip_tags, transceiver, progress_bar)[source]

Loads all the reverse IP tags individually.

Parameters:
class spinn_front_end_common.interface.interface_functions.VirtualMachineGenerator[source]

Bases: object

Generates a virtual machine with given dimensions and configuration.

__call__(version=None, json_path=None)[source]
Parameters:version (int) – The version of board to create
Returns:The virtual machine.
Return type:Machine
Raises:Exception – If given bad arguments