spinn_front_end_common.interface package¶
Subpackages¶
- spinn_front_end_common.interface.buffer_management package
- spinn_front_end_common.interface.ds package
- spinn_front_end_common.interface.interface_functions package
- spinn_front_end_common.interface.profiling package
- spinn_front_end_common.interface.provenance package
- spinn_front_end_common.interface.simulation package
- spinn_front_end_common.interface.splitter_selectors package
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
(data_writer_cls=None)[source]¶ Bases:
spinn_front_end_common.interface.config_handler.ConfigHandler
Main interface into the tools logic flow.
Parameters: - n_chips_required (int) – Overrides the number of chips to allocate from spalloc_client
- n_boards_required (int) – Overrides the number of boards to allocate from spalloc_client
- data_writer_cls (FecDataWriter) – The Global data writer class
-
get_number_of_available_cores_on_machine
¶ The number of available cores on the machine after taking into account preallocated resources.
Returns: number of available cores Return type: int
spinn_front_end_common.interface.config_handler module¶
-
class
spinn_front_end_common.interface.config_handler.
ConfigHandler
(data_writer_cls=None)[source]¶ Bases:
object
Superclass of AbstractSpinnakerBase that handles function only dependent of the configuration and the order its methods are called.
Parameters: data_writer (FecDataWriter) – The Global data writer object
spinn_front_end_common.interface.config_setup module¶
-
spinn_front_end_common.interface.config_setup.
add_spinnaker_cfg
()[source]¶ Add the local configuration and all dependent configuration files.
-
spinn_front_end_common.interface.config_setup.
unittest_setup
()[source]¶ Does all the steps that may be required before a unit test.
Resets the configurations so only the local default configurations are included.
Unsets any previous simulators and temporary directories.
Note
This file should only be called from spinn_front_end_common/tests
spinn_front_end_common.interface.java_caller module¶
-
class
spinn_front_end_common.interface.java_caller.
JavaCaller
[source]¶ Bases:
object
Support class that holds all the stuff for running stuff in Java. This includes the work of preparing data for transmitting to Java and back.
This separates the choices of how to call the Java batch vs streaming, jar locations, parameters, etc. from the rest of the Python code.
Creates a Java caller and checks the user/configuration parameters.
Raises: ConfigurationException – if simple parameter checking fails. -
execute_app_data_specification
(use_monitors)[source]¶ Writes all the data specifications for application cores, uploading the result to the machine.
Note
May assume that system cores are already loaded and running if use_monitors is set to True.
Parameters: use_monitors (bool) – Raises: PacmanExternalAlgorithmFailedToCompleteException – On failure of the Java code.
-
execute_data_specification
()[source]¶ Writes all the data specifications, uploading the result to the machine.
Raises: PacmanExternalAlgorithmFailedToCompleteException – On failure of the Java code.
-
execute_system_data_specification
()[source]¶ Writes all the data specifications for system cores, uploading the result to the machine.
Raises: PacmanExternalAlgorithmFailedToCompleteException – On failure of the Java code.
-
get_all_data
()[source]¶ Gets all the data from the previously set placements and put these in the previously set database.
Raises: PacmanExternalAlgorithmFailedToCompleteException – On failure of the Java code.
-
set_advanced_monitors
()[source]¶ Create information describing what’s going on with the monitor cores.
-
set_placements
(used_placements)[source]¶ Passes in the placements leaving this class to decide pass it to Java.
Currently the extra information extracted is recording region base address but this could change if recording region saved in the database.
Currently this method uses JSON but that may well change to using the database.
Parameters: used_placements (Placements) – Placements that are recording. May not be all placements
-