Ticket #158 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

Connect problem in NEST module (NEST version 1.9-8128)

Reported by: bruederle Owned by: apdavison
Priority: major Milestone: 0.7.0
Component: nest Version: trunk
Keywords: Cc:

Description (last modified by apdavison) (diff)

When using PyNN version 0.6 with NEST version 1.9-8128 (like indicated in PyNN installation guide), the attached script fails. It creates two groups of neurons using the low-level API. The second "connect" call generates the following error message:

           -- N E S T 2 beta --
          Neural Simulation Tool
  Copyright 1995-2009 The NEST Initiative
   Version 1.9-8128 Feb 17 2010 10:54:57

This program is provided to you AS IS and comes with NO WARRANTY. 
See the file LICENSE for details.


Problems or suggestions?
  Website     : http://www.nest-initiative.org
  Mailing list: nest_user@nest-initiative.org

Type 'nest.sysinfo()' to see details on the system configuration.
Type 'nest.authors()' for information about the makers of NEST.
/usr/lib/python2.5/site-packages/pyNN/random.py:25: UserWarning: GSL random number generators not available
  warnings.warn("GSL random number generators not available")
old: 0.1, new: 0.1
old: 0.1, new: 0.1
old: 0.1, new: 0.1
old: 0.1, new: 0.1
old: 0.1, new: 0.1
old: 0.1, new: 0.1
Traceback (most recent call last):
  File "failing.py", line 33, in <module>
    pynn.connect(source=cells_inh, target=cells_inh, weight=w_inh, synapse_type='inhibitory')
  File "/usr/lib/python2.5/site-packages/pyNN/common.py", line 682, in connect
    connection_manager = simulator.ConnectionManager(synapse_type)
  File "/usr/lib/python2.5/site-packages/pyNN/nest/simulator.py", line 262, in __init__
    nest.CopyModel('static_synapse', self.synapse_model)
  File "/usr/local/lib/python2.5/site-packages/nest/hl_api.py", line 291, in CopyModel
    sr("/%s /%s CopyModel" % (existing, new))
  File "/usr/local/lib/python2.5/site-packages/nest/__init__.py", line 40, in catching_sr
    raise hl_api.NESTError(errorname + ' in ' + commandname + ": " + message)
nest.hl_api.NESTError: NewModelNameExists in CopyModel_l_l_D: /static_synapse_144193292 is the name of an existing model and cannot be re-used.
Finalizing NEST...

With a more recent version of NEST, another problem occurs (will be reported as separate issue).

Attachments

failing.py Download (0.9 KB) - added by bruederle 2 years ago.

Change History

Changed 2 years ago by bruederle

Changed 2 years ago by apdavison

  • status changed from new to closed
  • version set to trunk
  • resolution set to fixed
  • description modified (diff)

This error appears because the return value of the connect() function is not assigned to anything, and so Python appears to reuse the same ConnectionManager object (it has the same id, anyway) for the second connect() call.

I have added a global connection_managers list in the pyNN.nest.simulator module, so that all ConnectionManager objects are stored (see r718).

Note: See TracTickets for help on using tickets.