Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better error #1470

Merged
merged 4 commits into from
Jul 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions spynnaker/pyNN/models/neuron/abstract_population_vertex.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@
BYTES_PER_WORD, SYSTEM_BYTES_REQUIREMENT)

from spynnaker.pyNN.data import SpynnakerDataView
from spynnaker.pyNN.exceptions import SpynnakerException
from spynnaker.pyNN.exceptions import (
SynapticConfigurationException, SpynnakerException)

from spynnaker.pyNN.models.abstract_models import (
AbstractAcceptsIncomingSynapses, AbstractMaxSpikes, HasSynapses,
Expand Down Expand Up @@ -1320,9 +1321,19 @@ def __add_matrix_size(self, address: int, projection: Projection,
if max_row_info.undelayed_max_n_synapses > 0:
size = n_sub_atoms * max_row_info.undelayed_max_bytes
for _ in range(n_sub_edges):
address = \
MasterPopTableAsBinarySearch.get_next_allowed_address(
address)
try:
address = \
MasterPopTableAsBinarySearch.get_next_allowed_address(
address)
except SynapticConfigurationException as ex:
values = self.__incoming_projections.values()
n_projections = (sum(len(x) for x in values))
if n_projections > 100:
raise SpynnakerException(
f"{self} has {n_projections} incoming Projections "
f"which is more than Spynnaker can handle.")\
from ex
raise
address += size
if max_row_info.delayed_max_n_synapses > 0:
size = (n_sub_atoms * max_row_info.delayed_max_bytes *
Expand Down