INCF / csa

The Python implementation of the Connection-Set Algebra
GNU General Public License v3.0
13 stars 17 forks source link

gplotsel2d memory error? #9

Open andrewgait opened 6 years ago

andrewgait commented 6 years ago

Hello, I'm trying to use this connection set algebra in our work with neuromorphic computing using PyNN on SpiNNaker. I've installed CSA using pip install and then followed the README.md file; everything seems to work fine until I get to the gplotsel2d(...) command, at which point I get a MemoryError:

Traceback (most recent call last):
  File "/localhome/mbbssag3/spinnaker/git/MySpiNNakerProblems/user_problems/test_csa_commands.py", line 97, in <module>
    gplotsel2d(g,c,434)
  File "/usr/local/lib/python2.7/dist-packages/csa/plot.py", line 55, in gplotsel2d
    N = len (cset)
  File "/usr/local/lib/python2.7/dist-packages/csa/connset.py", line 233, in __len__
    for c in self:
  File "/usr/local/lib/python2.7/dist-packages/csa/connset.py", line 726, in simpleIterator
    state):
  File "/usr/local/lib/python2.7/dist-packages/csa/_misc.py", line 87, in iterator
    for j in range (low1, high1):
MemoryError

Do you have any idea what might be causing this to happen?

andrewgait commented 6 years ago

I've done a bit more investigating of this error myself: it seems to be a problem with not specifying a source and a target in gplotsel2d(...); if in the README.md file, I use e.g. gplotsel2d(g, c, 434, range(400,500)) then I get a plot that looks reasonable. So it perhaps seems as though elementary.N isn't producing the expected connection set at this point... ?

mdjurfeldt commented 6 years ago

Hi Andrew,

Interesting---the error I get is:

AssertionError: infinite ISetBoundedMask:s currently not supported

Thank you for the bug report. What has happened here is that an optimization in one place has exposed a limitation of the implementation in another place.

I will fix this and update you. However, I can do that first in a few days.

Best regards, Mikael