File tree Expand file tree Collapse file tree 1 file changed +15
-4
lines changed
spinn_front_end_common/interface/interface_functions Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change 1919from typing import Optional
2020from spinn_utilities .log import FormatAdapter
2121from spinnman .messages .scp .enums import Signal
22- from spinnman .model .enums import ExecutableType
22+ from spinnman .model .enums import ExecutableType , CPUState
23+ from spinnman .exceptions import SpinnmanException
2324from spinn_front_end_common .data import FecDataView
2425from spinn_front_end_common .utilities .exceptions import (
2526 ConfigurationException )
@@ -123,9 +124,19 @@ def run_app(
123124 ExecutableType .USES_SIMULATION_INTERFACE )
124125 n_cores = len (core_subsets )
125126
126- SendPauseProcess (
127- FecDataView .get_scamp_connection_selector ()).send_pause (
128- core_subsets , n_cores )
127+ try :
128+ SendPauseProcess (
129+ FecDataView .get_scamp_connection_selector ()).send_pause (
130+ core_subsets , n_cores )
131+ except SpinnmanException as e :
132+ # Check if cores have failed now
133+ rte_cores = self .__txrx .get_core_state_count (
134+ self .__app_id , CPUState .RUN_TIME_EXCEPTION )
135+
136+ # If there are no cores in the RTE state, then re-raise the
137+ # original exception, otherwise the wait_for_end will handle it
138+ if rte_cores == 0 :
139+ raise e
129140 self ._wait_for_end ()
130141
131142 process = GetCurrentTimeProcess (
You can’t perform that action at this time.
0 commit comments