Page 1 of 1

Single cell in parallel

Posted: Mon Jan 10, 2022 9:33 am
by bll5z6
I have a single cell model with 2500 or so compartments that I would like to speed up. It is implemented using BMTK's bionet, which runs NEURON on the back end. I was reading some older posts and understand it's possible to parallelize a single cell, but that development time is substantial. Is that still the case? Is there a way to speed up a complex single cell model with less development overhead?

Re: Single cell in parallel

Posted: Mon Jan 10, 2022 10:52 am
by ted
2500 compartments isn't particularly large.

Easiest parallel simulation is via multithreaded execution, which usually doesn't require any change to your model specification code. Some NMODL mechanisms may need slight revision to make them threadsafe; there are a few mechanisms that are inherently not threadsafe. Because of multithreaded execution's overhead, speedup will be less than the number of cores devoted to the task; the practical limit beyond which there is no gain is about 15, but most models max out at around 4 or 5.

To learn more, see this exercise from the 2018 NEURON Summer Course https://neuron.yale.edu/neuron/docs/mul ... lelization. That particular exercise does not discuss error tolerance scale factors, which can be important if one or more of your model's state variables are very small compared to others (e.g. intracellular calcium concentration).

If you plan to run many simulations, e.g. for optimization or to explore parameter space, consider using NEURON's bulletin-board style parallelization, which is very efficient as long as all processors have enough work to keep busy (i.e. number of runs is larger than the number of processors).