I'm using a Python 3 module with NEURON on NeuroDebian (v8, 64 bit). After a little coercion, I managed to compile from the 7.4 release tar files but get a segmentation fault when I import the neuron module and use certain functions, such as "neuron.h.allsec()".
The simplest way to reproduce the error is with:
Code: Select all
import neuron
neuron.test()
Code: Select all
testBytesize (neuron.tests.test_vector.VectorTestCase)
Test that Vector.__array_interface__ returns the proper bytesize (of a double) ... ok
testEndian (neuron.tests.test_vector.VectorTestCase)
Test that Vector.__array_interface__ returns the proper byteorder (endian) ... ok
testNumpyInteraction (neuron.tests.test_vector.VectorTestCase)
Testing numpy.array <=> hoc.Vector interaction ...
Looking at /var/logs/syslog I find the following message:
Code: Select all
Oct 14 10:58:59 neurodebian kernel: [ 1301.733007] python3[24472]: segfault at 10 ip 00007f919cf71454 sp 00007ffddf269df0 error 4 in libnrnoc.so.0.0.0[7f919cf3d000+51000]
I was using update-alternatives to set the system default version of python to python3.4 and then calling configure with the argument "--with-nrnpython=dynamic". I changed this to "--with-nrnpython=python3" and recompiled which seems to have solved the problem. Are there any disadvantages to specifying a python binary rather than using the "dynamic" flag?
[/edit]
Any help would be appreciated!
Many thanks,
Ben