spinn_front_end_common.interface package

Subpackages

Submodules

spinn_front_end_common.interface.abstract_spinnaker_base module

main interface for the spinnaker tools

class spinn_front_end_common.interface.abstract_spinnaker_base.AbstractSpinnakerBase(configfile, executable_finder, graph_label=None, database_socket_addresses=None, extra_algorithm_xml_paths=None, n_chips_required=None, default_config_paths=None, validation_cfg=None, front_end_versions=None)[source]

Bases: spinn_front_end_common.utilities.simulator_interface.SimulatorInterface

Main interface into the tools logic flow

add_application_edge(edge_to_add, partition_identifier)[source]
Parameters:
  • edge_to_add
  • partition_identifier – the partition identifier for the outgoing edge partition
Return type:

None

add_application_vertex(vertex_to_add)[source]
Parameters:vertex_to_add – the vertex to add to the graph
Return type:None
Raises:ConfigurationException when both graphs contain vertices
add_extraction_timing(timing)[source]
add_live_packet_gatherer_parameters(live_packet_gatherer_params, vertex_to_record_from)[source]

adds params for a new LPG if needed, or adds to the tracker for same params.

Parameters:
  • live_packet_gatherer_params – params to look for a LPG
  • vertex_to_record_from – the vertex that needs to send to a given LPG
Return type:

None

add_machine_edge(edge, partition_id)[source]
Parameters:
  • edge – the edge to add to the graph
  • partition_id – the partition identifier for the outgoing edge partition
Return type:

None

add_machine_vertex(vertex)[source]
Parameters:vertex – the vertex to add to the graph
Return type:None
Raises:ConfigurationException when both graphs contain vertices
add_socket_address(socket_address)[source]
Parameters:socket_address
Return type:None
application_graph
buffer_manager

The buffer manager being used for loading/extracting buffers

config

helper method for the front end implementations until we remove config

dsg_algorithm

The dsg algorithm used by the tools

exception_handler(exctype, value, traceback_obj)[source]

handler of exceptions

Parameters:
  • exctype – the type of execution received
  • value – the value of the exception
  • traceback_obj – the trace back stuff
extend_extra_load_algorithms(extra_load_algorithms)[source]
extend_extra_mapping_algorithms(extra_mapping_algorithms)[source]
extend_extra_post_run_algorithms(extra_post_run_algorithms)[source]
generate_file_machine()[source]
get_current_time()[source]
get_number_of_available_cores_on_machine

returns the number of available cores on the machine after taking into account pre allocated resources

Returns:number of available cores
Return type:int
graph_mapper
has_ran
has_reset_last
increment_none_labelled_edge_count()[source]

Increment the number of new edges which have not been labelled.

increment_none_labelled_vertex_count()[source]

Increment the number of new vertices which have not been labelled.

machine

The python machine object

Return type:spinn_machine.Machine
machine_graph
machine_time_step
no_machine_time_steps
none_labelled_edge_count

The number of times edges have not been labelled.

none_labelled_vertex_count

The number of times vertices have not been labelled.

placements
prepend_extra_pre_run_algorithms(extra_pre_run_algorithms)[source]
reset()[source]

Code that puts the simulation back at time zero

routing_infos
run(run_time)[source]

Run a simulation for a fixed amount of time

Parameters:run_time – the run duration in milliseconds.
run_until_complete()[source]

Run a simulation until it completes

set_n_chips_required(n_chips_required)[source]
set_up_machine_specifics(hostname)[source]

Adds machine specifics for the different modes of execution

Parameters:hostname – machine name
Return type:None
set_up_timings(machine_time_step=None, time_scale_factor=None)[source]

Set up timings of the machine

Parameters:
  • machine_time_step – An explicitly specified time step for the machine. If None, the value is read from the config
  • time_scale_factor – An explicitly specified time scale factor for the simulation. If None, the value is read from the config
signal_handler(signal, frame)[source]

handles closing down of script via keyboard interrupt

Parameters:
  • signal – the signal received
  • frame – frame executed in
Returns:

None

stop(turn_off_machine=None, clear_routing_tables=None, clear_tags=None)[source]
Parameters:
  • turn_off_machine (bool) – decides if the machine should be powered down after running the execution. Note that this powers down all boards connected to the BMP connections given to the transceiver
  • clear_routing_tables (bool) – informs the tool chain if it should turn off the clearing of the routing tables
  • clear_tags (boolean) – informs the tool chain if it should clear the tags off the machine at stop
Return type:

None

timescale_factor
transceiver
update_extra_mapping_inputs(extra_mapping_inputs)[source]
use_virtual_board

True if this run is using a virtual machine

verify_not_running()[source]

spinn_front_end_common.interface.simulator_state module

class spinn_front_end_common.interface.simulator_state.Simulator_State(value, doc='')[source]

Bases: enum.Enum

Different States the SimulATOR COULD BE IN

FINISHED = 3
INIT = 0
IN_RUN = 1
RUN_FOREVER = 2
SHUTDOWN = 4

Module contents