Why are cell templates so much slower?

Anything that doesn't fit elsewhere.
Post Reply
MBeining
Posts: 35
Joined: Thu Apr 03, 2014 8:18 am

Why are cell templates so much slower?

Post by MBeining » Thu Apr 03, 2014 10:26 am

Hi there,
me and colleagues before me, found that if one creates a cell without using a template, any simulation runs much faster (~4 times) than when you declare the very same cell in a template, even if you only use passive mechanisms and only one PointProcess.

Why is that? I searched around alot in the Internet and NEURON books but found no answer.
And is there any solution to overcome this (except not using template, since we need to have more than one cell at once) ?

Additional information:
We use realistic morphologies, so we use pt3add() about 500 times per cell.

Thank you for any suggestion!

ted
Site Admin
Posts: 5567
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Why are cell templates so much slower?

Post by ted » Thu Apr 03, 2014 1:55 pm

Beats me. I just tried to replicate your observation and got the opposite result.
Specifics
Model specification--passive model cell with 79 sections, 221 segments
Instrumentation--IClamp attached to soma to apply 10 nA current x 1 ms pulse starting at 1 ms, and a plot of soma.v(0.5) vs. t
Simulation parameters--dt = 0.025, points/ms = 40, and tstop = 2000 ms
Timings for simulations executed serially on a 4 year old Dell XPS 435MT with a core i7-920 2.66 GHz processor

Code: Select all

                       run times (s)
top level model       (2.19*3 + 2.18*2)/5 = 2.19
cell class instance   (1.04*3 + 1.06 + 1.08)/5 = 1.05
We use realistic morphologies, so we use pt3add() about 500 times per cell.
Why so few? The geometry of the model I used is specified with 2116 pt3dadd statements (actually the number of pt3dadd statements has nothing to do with run times).

I'd like to find out what accounts for your results. The null hypothesis when two "otherwise identical models" produce different results of any kind is that they aren't actually identical, but that remains to be seen. -Could you zip up your code (hoc and ses files) and email them to
ted dot carnevale at yale dot edu
?

MBeining
Posts: 35
Joined: Thu Apr 03, 2014 8:18 am

Re: Why are cell templates so much slower?

Post by MBeining » Fri Apr 11, 2014 7:56 am

Thank you very much for your answer.
Actually we also have bigger morphologies, with >2000 nodes, too, but now we use morphologies of developing neurons, so rather small.
I tried to create some package to sent to you, however when I finished and tested it, the effect of slowing down with cell templates disappeared. Finagle's law again :-D
If I can reproduce the problem, I will send you some code. Thank you anyway.

Post Reply