Skip to content

Commit

Permalink
Merge branch 'master' into interdimensional_compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
rowleya committed Nov 21, 2023
2 parents 8c3f6ac + b1a0601 commit ed1c65c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
6 changes: 3 additions & 3 deletions spinn_front_end_common/interface/abstract_spinnaker_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ def run_until_complete(self, n_steps: Optional[int] = None):
self._run(n_steps, sync_time=0.0)
FecTimer.end_category(TimerCategory.RUN_OTHER)

def run(self, run_time: Optional[int], sync_time: float = 0):
def run(self, run_time: Optional[float], sync_time: float = 0):
"""
Run a simulation for a fixed amount of time.
Expand Down Expand Up @@ -449,7 +449,7 @@ def _calc_run_time(self, run_time: Optional[float]) -> Union[
f"{self._data_writer.get_hardware_time_step_us()} us")
return n_machine_time_steps, total_run_time

def _run(self, run_time: Optional[int], sync_time: float):
def _run(self, run_time: Optional[float], sync_time: float):
self._data_writer.start_run()

try:
Expand All @@ -473,7 +473,7 @@ def __is_main_thread() -> bool:
"""
return threading.get_ident() == threading.main_thread().ident

def __run(self, run_time: Optional[int], sync_time: float):
def __run(self, run_time: Optional[float], sync_time: float):
"""
The main internal run function.
Expand Down
4 changes: 2 additions & 2 deletions spinn_front_end_common/interface/config_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import os
import shutil
import traceback
from typing import Optional, Type, Union
from typing import Optional, Type
from spinn_utilities.log import FormatAdapter
from spinn_utilities.config_holder import (
config_options, load_config, get_config_bool, get_config_int,
Expand Down Expand Up @@ -122,7 +122,7 @@ def _error_on_previous(self, option) -> None:
"See https://spinnakermanchester.github.io/common_pages/"
"Algorithms.html.")

def _adjust_config(self, runtime: Union[int, bool, None]):
def _adjust_config(self, runtime: Optional[float]):
"""
Adjust and checks the configuration based on runtime
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,11 @@ def _launch_checked_job_old(n_boards: int, spalloc_kwargs: dict) -> Tuple[
job.destroy(str(ex))
raise
connections = job.connections
if len(connections) < n_boards:
logger.warning(
"boards: {}",
str(connections).replace("{", "[").replace("}", "]"))
raise ValueError("Not enough connections detected")
if logger.isEnabledFor(logging.DEBUG):
logger.debug("boards: {}",
str(connections).replace("{", "[").replace(
Expand Down

0 comments on commit ed1c65c

Please sign in to comment.