From c2debd5440c112c963c01b9f8398d9f0fdb790aa Mon Sep 17 00:00:00 2001 From: Andrew Rowley Date: Tue, 5 Nov 2024 09:17:29 +0000 Subject: [PATCH] Fix to ignore chip power monitor core --- .../interface_functions/compute_energy_used.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/spinn_front_end_common/interface/interface_functions/compute_energy_used.py b/spinn_front_end_common/interface/interface_functions/compute_energy_used.py index 0d50a7a5a..afd20a291 100644 --- a/spinn_front_end_common/interface/interface_functions/compute_energy_used.py +++ b/spinn_front_end_common/interface/interface_functions/compute_energy_used.py @@ -18,6 +18,7 @@ from spinn_machine import Machine from spinn_machine.version.abstract_version import ( AbstractVersion, ChipActiveTime, RouterPackets) +from spinnman.model.enums.executable_type import ExecutableType from spinn_front_end_common.data import FecDataView from spinn_front_end_common.interface.provenance import ( GlobalProvenance, ProvenanceReader, TimerCategory, TimerWork) @@ -25,8 +26,8 @@ from spinn_front_end_common.interface.interface_functions\ .load_data_specification import load_using_advanced_monitors from spinn_front_end_common.utility_models\ - .chip_power_monitor_machine_vertex import PROVENANCE_TIME_KEY -from spinnman.model.enums.executable_type import ExecutableType + .chip_power_monitor_machine_vertex import ( + PROVENANCE_TIME_KEY, ChipPowerMonitorMachineVertex) #: milliseconds per second _MS_PER_SECOND: Final = 1000.0 @@ -101,9 +102,12 @@ def compute_energy_used( if active_only: chips_used = set() + n_cores = 0 for pl in FecDataView.iterate_placemements(): - if pl.vertex.get_binary_start_type() != ExecutableType.SYSTEM: + if (pl.vertex.get_binary_start_type() != ExecutableType.SYSTEM and + not isinstance(pl.vertex, ChipPowerMonitorMachineVertex)): chips_used.add((pl.x, pl.y)) + n_cores += 1 n_chips = len(chips_used) n_frames = 0 n_boards = 0