[nengo-user] trying to get spaun running on latest nengo.

Terry Stewart terry.stewart at gmail.com
Fri Feb 21 21:47:12 EST 2014


Hi Alan,

Yikes, I think I'd avoid trying to get Spaun to run in the latest
version of Nengo.  Basically, we learned a lot about what the
underlying infrastructure should look like while developing Spaun, and
then we made a whole bunch of changes to Nengo based on what we
learned.  I think it'd be quite the uphill struggle to modify the
original Spaun code to work with the underlying modifications to
Nengo.  That said, the biggest change is the reinforcement learning
part, which is where that error message is coming from
("python/spa/bg.py"), so it might be possible to just remove that from
the model....

I would note that one of the big changes is the ongoing development of
the "spa" module, which is specifically designed for building
Spaun-like models.  So that might be a place to start looking.

Terry

On Fri, Feb 21, 2014 at 12:12 AM, Alan Grimes <ALONZOTG at verizon.net> wrote:
> Because the version of Nengo that ships with SPAUN doesn't seem to
> support GPU, I symlinked it over into the latest Nengo, after fixing a
> trivial java property naming issue in the nengo-407... scripting code, I
> hit this issue... I'm a python noob so I'm not sure how serious this is:
>
> #####
>
> ERROR [Running...:ca.nengo.ui.script.ScriptConsole]: Runtime error in
> interpreter
> Traceback (most recent call last):
>   File "run_spaun_lin.py", line 6, in <module>
>     run(OS = "LIN", root_path = "spaun/", multi_thread = True)
>   File "spaun/run_spaun.py", line 218, in run
>     spaun_main.run(None, OS, root_path, test_type, test_option,
> num_test_run, num_subjects, \
>   File "spaun/spaun_main.py", line 1340, in run
>     spaun = SpaUN()
>   File "python/spa/core.py", line 30, in __init__
>     self.connect()
>   File "python/spa/core.py", line 90, in connect
>     m.connect()
>   File "python/spa/bg.py", line 38, in connect
>     self.add_index_input(source,self.rules.get_learns(name),learn=True)
>   File "python/spa/bg.py", line 113, in add_index_input
>     t1 = self.net.get('StrD1').addIndexTermination(origin.getName(),
> D1_matrix, pstc, index = indexes)
> TypeError: addIndexTermination(): takes no keyword arguments
>
>         at org.python.core.Py.TypeError(Py.java:221)
>         at
> org.python.core.PyReflectedFunction.throwError(PyReflectedFunction.java:209)
>         at
> org.python.core.PyReflectedFunction.throwError(PyReflectedFunction.java:317)
>         at
> org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:167)
>         at org.python.core.PyObject.__call__(PyObject.java:345)
>         at
> org.python.core.PyMethod.instancemethod___call__(PyMethod.java:220)
>         at org.python.core.PyMethod.__call__(PyMethod.java:211)
>         at spa.bg$py.add_index_input$7(python/spa/bg.py:124)
>         at spa.bg$py.call_function(python/spa/bg.py)
>         at org.python.core.PyTableCode.call(PyTableCode.java:165)
>         at org.python.core.PyBaseCode.call(PyBaseCode.java:301)
>         at org.python.core.PyBaseCode.call(PyBaseCode.java:194)
>         at org.python.core.PyFunction.__call__(PyFunction.java:387)
>         at
> org.python.core.PyMethod.instancemethod___call__(PyMethod.java:220)
>         at org.python.core.PyMethod.__call__(PyMethod.java:211)
>         at spa.bg$py.connect$4(python/spa/bg.py:36)
>         at spa.bg$py.call_function(python/spa/bg.py)
>         at org.python.core.PyTableCode.call(PyTableCode.java:165)
>         at org.python.core.PyBaseCode.call(PyBaseCode.java:134)
>         at org.python.core.PyFunction.__call__(PyFunction.java:317)
>         at org.python.core.PyMethod.__call__(PyMethod.java:109)
>         at spa.core$py.connect$12(python/spa/core.py:89)
>         at spa.core$py.call_function(python/spa/core.py)
>         at org.python.core.PyTableCode.call(PyTableCode.java:165)
>         at org.python.core.PyBaseCode.call(PyBaseCode.java:301)
>         at org.python.core.PyBaseCode.call(PyBaseCode.java:127)
>         at org.python.core.PyFunction.__call__(PyFunction.java:317)
>         at org.python.core.PyMethod.__call__(PyMethod.java:109)
>         at spa.core$py.__init__$2(python/spa/core.py:31)
>         at spa.core$py.call_function(python/spa/core.py)
>         at org.python.core.PyTableCode.call(PyTableCode.java:165)
>         at org.python.core.PyBaseCode.call(PyBaseCode.java:301)
>         at org.python.core.PyBaseCode.call(PyBaseCode.java:194)
>         at org.python.core.PyFunction.__call__(PyFunction.java:387)
>         at org.python.core.PyFunction.__call__(PyFunction.java:381)
>         at org.python.core.PyInstance.__init__(PyInstance.java:120)
>         at org.python.core.PyClass.__call__(PyClass.java:194)
>         at org.python.core.PyObject.__call__(PyObject.java:371)
>         at org.python.core.PyObject.__call__(PyObject.java:375)
>         at spaun_main$py.run$36(spaun/spaun_main.py:1496)
>         at spaun_main$py.call_function(spaun/spaun_main.py)
>         at org.python.core.PyTableCode.call(PyTableCode.java:165)
>         at org.python.core.PyBaseCode.call(PyBaseCode.java:301)
>         at org.python.core.PyFunction.function___call__(PyFunction.java:376)
>         at org.python.core.PyFunction.__call__(PyFunction.java:371)
>         at org.python.core.PyFunction.__call__(PyFunction.java:361)
>         at run_spaun$py.run$2(spaun/run_spaun.py:218)
>         at run_spaun$py.call_function(spaun/run_spaun.py)
>         at org.python.core.PyTableCode.call(PyTableCode.java:165)
>         at org.python.core.PyBaseCode.call(PyBaseCode.java:301)
>         at org.python.core.PyFunction.function___call__(PyFunction.java:376)
>         at org.python.core.PyFunction.__call__(PyFunction.java:371)
>         at org.python.pycode._pyx2.f$0(run_spaun_lin.py:8)
>         at org.python.pycode._pyx2.call_function(run_spaun_lin.py)
>         at org.python.core.PyTableCode.call(PyTableCode.java:165)
>         at org.python.core.PyCode.call(PyCode.java:18)
>         at org.python.core.Py.runCode(Py.java:1261)
>         at org.python.core.__builtin__.execfile_flags(__builtin__.java:522)
>         at
> org.python.util.PythonInterpreter.execfile(PythonInterpreter.java:225)
>         at ca.nengo.ui.script.ScriptConsole$2.action(ScriptConsole.java:414)
>         at
> ca.nengo.ui.lib.actions.StandardAction.doActionInternal(StandardAction.java:131)
>         at
> ca.nengo.ui.lib.objects.activities.TrackedAction.doActionInternal(TrackedAction.java:53)
>         at
> ca.nengo.ui.lib.actions.StandardAction$2.run(StandardAction.java:169)
> WARN  [MainThread:ca.nengo.config.ClassRegistry]: Can't register
> implementation ca.nengo.math.impl.LinearCurveFitter$InterpolatedFunction
> java.lang.ClassNotFoundException:
> ca.nengo.math.impl.LinearCurveFitter$InterpolatedFunction
>         at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
>         at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
>         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:190)
>         at ca.nengo.config.ClassRegistry.register(ClassRegistry.java:184)
>         at ca.nengo.config.ClassRegistry.<init>(ClassRegistry.java:95)
>         at ca.nengo.config.ClassRegistry.getInstance(ClassRegistry.java:72)
>         at
> ca.nengo.ui.configurable.descriptors.PFunction.createConfigurableFunctions(PFunction.java:103)
>         at
> ca.nengo.ui.configurable.descriptors.PFunction.createInputPanel(PFunction.java:114)
>         at
> ca.nengo.ui.configurable.descriptors.PFunction.createInputPanel(PFunction.java:48)
>         at
> ca.nengo.ui.configurable.Property.getInputPanel(Property.java:116)
>         at
> ca.nengo.ui.configurable.managers.ConfigDialog.addDescriptors(ConfigDialog.java:360)
>         at
> ca.nengo.ui.configurable.managers.ConfigDialog.initialize(ConfigDialog.java:243)
>         at
> ca.nengo.ui.configurable.managers.ConfigDialog.<init>(ConfigDialog.java:101)
>         at
> ca.nengo.ui.configurable.managers.UserConfigurer.createConfigDialog(UserConfigurer.java:93)
>         at
> ca.nengo.ui.configurable.managers.UserConfigurer.configureAndWait(UserConfigurer.java:121)
>         at
> ca.nengo.ui.configurable.panels.FunctionArrayPanel.editFunctionArray(FunctionArrayPanel.java:107)
>         at
> ca.nengo.ui.configurable.panels.FunctionArrayPanel$EditFunctions.actionPerformed(FunctionArrayPanel.java:240)
>         at
> javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
>         at
> javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
>         at
> javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
>         at
> javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
>         at
> javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
>         at java.awt.Component.processMouseEvent(Component.java:6505)
>         at javax.swing.JComponent.processMouseEvent(JComponent.java:3320)
>         at java.awt.Component.processEvent(Component.java:6270)
>         at java.awt.Container.processEvent(Container.java:2229)
>         at java.awt.Component.dispatchEventImpl(Component.java:4861)
>         at java.awt.Container.dispatchEventImpl(Container.java:2287)
>         at java.awt.Component.dispatchEvent(Component.java:4687)
>         at
> java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
>         at
> java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
>         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
>         at java.awt.Container.dispatchEventImpl(Container.java:2273)
>         at java.awt.Window.dispatchEventImpl(Window.java:2719)
>         at java.awt.Component.dispatchEvent(Component.java:4687)
>         at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735)
>         at java.awt.EventQueue.access$200(EventQueue.java:103)
>         at java.awt.EventQueue$3.run(EventQueue.java:694)
>         at java.awt.EventQueue$3.run(EventQueue.java:692)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at
> java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
>         at
> java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
>         at java.awt.EventQueue$4.run(EventQueue.java:708)
>         at java.awt.EventQueue$4.run(EventQueue.java:706)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at
> java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
>         at java.awt.EventQueue.dispatchEvent(EventQueue.java:705)
>         at
> java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
>         at
> java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
>         at
> java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:154)
>         at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:182)
>         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
>         at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
>         at java.awt.EventQueue.access$200(EventQueue.java:103)
>         at java.awt.EventQueue$3.run(EventQueue.java:694)
>         at java.awt.EventQueue$3.run(EventQueue.java:692)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at
> java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
>         at java.awt.EventQueue.dispatchEvent(EventQueue.java:703)
>         at
> java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
>         at
> java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
>         at
> java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
>         at
> java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
>         at
> java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
>         at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
>
> #####
>
> I also took a stab at compiling NengoUtilsGPU:
>
> #####
> atg at tortoise ~/source/nengo-40790a4/NengoUtilsGPU $ make
> gcc -shared -Wl,-soname,libNengoUtilsGPU.so -o libNengoUtilsGPU.so.1.0
> customCudaUtils.o weightedCostApproximatorGPU.o NengoUtilsGPU_JNI.o
> -L/usr/local/cuda/lib64 -L/usr/local/cula/lib64 -lcula_core
> -lcula_lapack -lcublas -lcudart -lm -lc
> /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.2/../../../../x86_64-pc-linux-gnu/bin/ld:
> cannot find -lcula_core
> /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.2/../../../../x86_64-pc-linux-gnu/bin/ld:
> cannot find -lcula_lapack
> collect2: error: ld returned 1 exit status
> Makefile:30: recipe for target 'libNengoUtilsGPU.so' failed
> make: *** [libNengoUtilsGPU.so] Error 1
> atg at tortoise ~/source/nengo-40790a4/NengoUtilsGPU $
> #####
>
> Hmm, maybe I need the version of cula I can't afford.... =\
>
> I also saw this in the status console:
>
> Warning - VisualHeirachy: Number of items mismatch between mu and
> output_vecs
>
> --
> IQ is a measure of how stupid you feel.
>
> Powers are not rights.
>
> _______________________________________________
> nengo-user mailing list
> nengo-user at ctnsrv.uwaterloo.ca
> http://ctnsrv.uwaterloo.ca/mailman/listinfo/nengo-user



More information about the nengo-user mailing list