Search found 35 matches

by aaronmil
Thu Feb 19, 2015 11:34 am
Forum: NEURON + Python
Topic: Increase stacksize from python?
Replies: 2
Views: 2597

Increase stacksize from python?

I have a model with over 10000 sections, specified in Python via the neuron module. When I execute: h.topology() I am warned: NEURON: Stack too deep. Increase with -NSTACK stacksize option If I then execute: from neuron import gui and use the ModelViewer to visualize the topology, it's clear that it...
by aaronmil
Tue Feb 17, 2015 2:48 pm
Forum: Adding new mechanisms and functions to NEURON
Topic: How to make VecStim (vecevent.mod) thread safe?
Replies: 13
Views: 7365

Re: How to make VecStim (vecevent.mod) thread safe?

if mac os x then use: http://www.neuron.yale.edu/ftp/neuron/versions/alpha/nrn-7.4.alpha-1213.x86_64-apple-osx10.7.5.dmg Thanks for all your help, Michael. I installed from this image, but still get the same compile errors when attempting to make vecevent.mod thread safe. Going back to the original...
by aaronmil
Tue Feb 17, 2015 12:27 pm
Forum: Adding new mechanisms and functions to NEURON
Topic: How to make VecStim (vecevent.mod) thread safe?
Replies: 13
Views: 7365

Re: How to make VecStim (vecevent.mod) thread safe?

hines wrote:I assume you want to launch anaconda's version of python and import neuron. What machine are we talking about?
Mac. Has that image been built --with-paranrn to work with mpi?
by aaronmil
Tue Feb 17, 2015 11:29 am
Forum: Adding new mechanisms and functions to NEURON
Topic: How to make VecStim (vecevent.mod) thread safe?
Replies: 13
Views: 7365

Re: How to make VecStim (vecevent.mod) thread safe?

The THREADSAFE keyword did not cause compiler problems when I checked it today with the latest mercurial trunk version. I'm guessing the problem will disappear if you use that or one of the 7.4 alpha distribution files at http://www.neuron.yale.edu/ftp/neuron/versions/alpha/ Let me know if that is ...
by aaronmil
Mon Feb 16, 2015 1:36 pm
Forum: Adding new mechanisms and functions to NEURON
Topic: How to make VecStim (vecevent.mod) thread safe?
Replies: 13
Views: 7365

Re: How to make VecStim (vecevent.mod) thread safe?

hines wrote:is your version of the mod file the same as at
http://www.neuron.yale.edu/hg/neuron/nr ... cevent.mod
If so, what is your version of NEURON?
Yes.
NEURON -- VERSION 7.3 ansi (975:433096832316) 433096832316
by aaronmil
Mon Feb 16, 2015 12:02 pm
Forum: Adding new mechanisms and functions to NEURON
Topic: How to make VecStim (vecevent.mod) thread safe?
Replies: 13
Views: 7365

Re: How to make VecStim (vecevent.mod) thread safe?

It turns out that vecevent.mod is, in fact, threadsafe if the POINTER is only used to reference a Vector object from Hoc. So THREADSAFE should be added to the beginning of the NEURON block in vecevent.mod. This actually results in a series of errors: vecevent.c:282:23: error: parameter named '_p' i...
by aaronmil
Sun Feb 15, 2015 6:09 pm
Forum: Adding new mechanisms and functions to NEURON
Topic: How to make VecStim (vecevent.mod) thread safe?
Replies: 13
Views: 7365

Re: How to make VecStim (vecevent.mod) thread safe?

Thanks for the updated vecevent.mod So even if the VecStim object is not threadsafe, if a single cell model was split into pieces to run in multiple threads, could VecStim objects still be used as sources for NetCon objects targeting point processes in the multisplit cell, or not? Artificial cells a...
by aaronmil
Fri Feb 13, 2015 5:00 pm
Forum: Adding new mechanisms and functions to NEURON
Topic: How to make VecStim (vecevent.mod) thread safe?
Replies: 13
Views: 7365

How to make VecStim (vecevent.mod) thread safe?

I find VecStim very useful for driving spikes with a list of spike times from python. However, I'm trying to make all my .mod files thread safe and cvode-compatible. Compiling vecevent.mod results in: Translating vecevent.mod into vecevent.c Notice: VERBATIM blocks are not thread safe Any ideas? Her...
by aaronmil
Fri Jan 23, 2015 1:54 pm
Forum: NEURON + Python
Topic: Strange behavior Updating HOC Vectors inside Python+mpi deff
Replies: 3
Views: 2377

Re: Strange behavior Updating HOC Vectors inside Python+mpi

Why are your storval and vec objects created through the "last resort" hoc interpreter? Just declare them as Python objects like:

Code: Select all

storval = h.Vector()
vec = h.Vector()
Then interact with the objects purely in Python, rather than hoc.
by aaronmil
Wed Jan 21, 2015 4:00 pm
Forum: NEURON + Python
Topic: how to save a segment list in a pkl file
Replies: 2
Views: 2363

Re: how to save a segment list in a pkl file

"Pickling" a data structure performs a deep copy of all the objects comprising the data structure. This means that if you have a Python class that is a wrapper around your hoc sections, then information about section names or lengths or distances that is contained in Python class variables...
by aaronmil
Tue Jan 06, 2015 3:37 pm
Forum: NEURON + Python
Topic: Running multiple simulations in one process
Replies: 19
Views: 16189

Re: Running multiple simulations in one process

I will consider your comments. Thank you. One problem is that a basic change in this area can have bad ripple effects and generate other kinds of confusion. An important issue is not only whether a section exists at the interpreter level, but also whether it is being simulated during a run. Note th...
by aaronmil
Tue Jan 06, 2015 11:14 am
Forum: NEURON + Python
Topic: Running multiple simulations in one process
Replies: 19
Views: 16189

Re: Running multiple simulations in one process

Deletion of python sections via h.delete_section(sec=pysec) can be implemented but remember that deletion also occurs when the last python reference to the section dissappears as well. In the typical case, hoc cell templates that construct hoc sections or python cell objects that construct python s...
by aaronmil
Thu Jan 01, 2015 2:32 pm
Forum: NEURON + Python
Topic: Running multiple simulations in one process
Replies: 19
Views: 16189

Re: Running multiple simulations in one process

So this raises the delicate question of whether I should change the behavion of h.delete_section() so that it removes Python created sections from the internal list of sections that are to be simulated I vote YES, please allow Python-created sections to be deleted via h.delete_section(sec=python_na...
by aaronmil
Sun Dec 28, 2014 11:44 am
Forum: NEURON + Python
Topic: Importing neuron module into Python
Replies: 26
Views: 15701

Re: Importing neuron module into Python

I also encountered this issue after compiling neuron from source with anaconda python. I resolved it by copying libreadline.6.2.dylib from /anaconda/lib into /usr/lib
by aaronmil
Sat Dec 13, 2014 10:44 am
Forum: NEURON + Python
Topic: What sets the sys.path for nrniv -python?
Replies: 5
Views: 3908

Re: What sets the sys.path for nrniv -python?

First a few questions. Are you running NEURON under MSWin, Linux, or OS X? OS X Did you build NEURON from source code using --with-nrnpython? Yes. Come to think of it, I did not install the anaconda build of python until after I had installed NEURON. Is it now hard coded to refer to the previous py...