spinn_front_end_common.abstract_models.impl package

Module contents

class spinn_front_end_common.abstract_models.impl.MachineAllocationController(thread_name: str, hostname: str | None = None, connection_data: Dict[Tuple[int, int], str] | None = None)

Bases: object

How to manage the allocation of a machine so that it gets cleaned up neatly when the script dies.

Parameters:

thread_name (str) –

can_create_transceiver() bool[source]

Detects if a call to create_transceiver could work.

Return type:

bool

close() None[source]

Indicate that the use of the machine is complete.

create_transceiver() Transceiver[source]

Create a transceiver for talking to the allocated machine, and make sure everything is ready for use (i.e. boot and discover connections if needed).

Return type:

Transceiver

abstract extend_allocation(new_total_run_time: float)[source]

Extend the allocation of the machine from the original run time.

Parameters:

new_total_run_time (float) – The total run time that is now required starting from when the machine was first allocated

make_report(filename: str)[source]

Asks the controller to make a report of details of allocations. By default, this does nothing.

open_eieio_connection(chip_x: int, chip_y: int) EIEIOConnection | None[source]

Open an unbound EIEIO connection. This may be used to communicate with any board of the job.

Return type:

EIEIOConnection

open_eieio_listener() EIEIOConnection[source]

Open an unbound EIEIO connection. This may be used to communicate with any board of the job.

Return type:

EIEIOConnection

open_sdp_connection(chip_x: int, chip_y: int, udp_port: int = 17893) SCAMPConnection | None[source]

Open a connection to a specific Ethernet-enabled SpiNNaker chip. Caller will have to arrange for SpiNNaker to pay attention to the connection.

The coordinates will be job-relative.

Parameters:
  • chip_x (int) – Ethernet-enabled chip X coordinate

  • chip_y (int) – Ethernet-enabled chip Y coordinate

  • udp_port (int) – the UDP port on the chip to connect to; connecting to a non-SCP port will result in a connection that can’t easily be configured.

Return type:

SDPConnection

property proxying: bool

Whether this is a proxying connection. False unless overridden.

Return type:

bool

abstract where_is_machine(chip_x: int, chip_y: int) Tuple[int, int, int][source]

Locates and returns cabinet, frame, board for a given chip in a machine allocated to this job.

Parameters:
  • chip_x (int) – chip x location

  • chip_y (int) – chip y location

Returns:

(cabinet, frame, board)

Return type:

tuple(int,int,int)

class spinn_front_end_common.abstract_models.impl.MachineDataSpecableVertex

Bases: AbstractGeneratesDataSpecification

Support for a vertex that simplifies generating a data specification.

generate_data_specification(spec: DataSpecificationGenerator, placement: Placement)[source]

Generate a data specification.

Parameters:
  • spec (DataSpecificationGenerator) – The data specification to write to

  • placement (Placement) – The placement the vertex is located at

abstract generate_machine_data_specification(spec: DataSpecificationGenerator, placement: Placement, iptags: Iterable[IPTag] | None, reverse_iptags: Iterable[ReverseIPTag] | None)[source]
Parameters:
  • spec (DataSpecificationGenerator) – The data specification to write into.

  • placement (Placement) – Where this node is on the SpiNNaker machine.

  • iptags (iterable(IPTag) or None) – The (forward) IP tags for the vertex, if any

  • reverse_iptags (iterable(ReverseIPTag) or None) – The reverse IP tags for the vertex, if any