spinn_front_end_common.interface package

Subpackages

Submodules

spinn_front_end_common.interface.abstract_spinnaker_base module

spinn_front_end_common.interface.config_handler module

class spinn_front_end_common.interface.config_handler.ConfigHandler(configfile, default_config_paths, validation_cfg)[source]

Bases: object

Subclass of AbstractSpinnaker base that handles function only dependent of the config and the order its methods are called

child_folder(parent, child_name)[source]
set_up_output_application_data_specifics(n_calls_to_run)[source]
Parameters:n_calls_to_run

the counter of how many times run has been called. :type n_calls_to_run: int :return: the run folder for this simulation to hold app data

write_finished_file()[source]

spinn_front_end_common.interface.java_caller module

class spinn_front_end_common.interface.java_caller.JavaCaller(json_folder, java_call, java_spinnaker_path=None, java_properties=None)[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/config parameters.

Parameters:
  • json_folder (str) – The location where the machine JSON is written.
  • java_call (str) – Call to start java. Including the path if required.
  • java_spinnaker_path – the path where the java code can be found. This must point to a local copy of https://github.com/SpiNNakerManchester/JavaSpiNNaker. It must also have been built! If None the assumption is that it is the same parent directory as https://github.com/SpiNNakerManchester/SpiNNFrontEndCommon.
  • java_properties (str) – Optional properties that will be passed to Java. Must start with -D For example -Dlogging.level=DEBUG

:raise ConfigurationException if simple parameter checking fails.

execute_app_data_specification(use_monitors)[source]
execute_data_specification()[source]

Writes all the data specs, uploading the result to the machine.

execute_system_data_specification()[source]

Writes all the data specs, uploading the result to the machine.

get_all_data()[source]

Gets all the data from the previously set placements and put these in the previously set database.

set_advanced_monitors(placements, tags, monitor_cores, packet_gathers)[source]
Parameters:
Return type:

None

set_machine(machine)[source]

Passes the machine in leaving this class to decide pass it to Java.

Parameters:machine (spinn_machine.machine.Machine) – A machine Object
set_placements(placements, transceiver)[source]

Passes in the placements leaving this class to decide pass it to Java.

This method may obtain extra information about he placements which is why it also needs the transceiver.

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:
  • placements – The Placements Object
  • transceiver – The Transceiver
set_report_folder(report_folder)[source]

Passes the database file in.

Parameters:report_folder (str) – Path to directory with SQLite databases and into which java will write

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
STOP_REQUESTED = 5

Module contents