Parallelization of a single cell

General issues of interest both for network and
individual cell parallelization.

Moderator: hines

Post Reply
nikkip
Posts: 28
Joined: Mon Jun 24, 2013 6:09 pm

Parallelization of a single cell

Post by nikkip » Mon Sep 04, 2017 10:22 pm

Hi Ted and Mike,

I was wondering if it's possible to parallelize an unbranched single cell (with many compartments).

If yes, I assume it involves using multisplit: https://www.neuron.yale.edu/neuron/stat ... multisplit.

Is there a simple example showing usage of this function?

Thanks so much,

Nikki

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

Re: Parallelization of a single cell

Post by ted » Tue Sep 05, 2017 11:33 am

Yes it is possible, and yes it would involve multisplit; see
Hines, M.L., Markram, H. and Schuermann, F.
Fully implicit parallel simulation of single neurons.
Journal of Computational Neuroscience 25:439-448, 2008.
which is available from a link at http://www.neuron.yale.edu/neuron/nrnpubs; you'll find its source code in ModelDB.

The real question is whether it would be worth the effort--programmer time is far more expensive than computer time. Have you tried multithreaded execution? That's doable with almost no effort if the NMODL-specified mechanisms are threadsafe. And, with very few exceptions, only minor revisions are required to make most non-threadsafe NMODL-specified mechanisms threadsafe--see this post in the NEURON Forum
viewtopic.php?f=22&t=1476
starting from the header Parallel Computing tool

nikkip
Posts: 28
Joined: Mon Jun 24, 2013 6:09 pm

Re: Parallelization of a single cell

Post by nikkip » Tue Sep 05, 2017 6:52 pm

Thanks for the quick reply!!

Good question. I have not tried multithreaded, although I don't grasp the pros/cons/implications of multithreading vs using multisplit.

To provide some more context about my task: We currently use a bash script to post a large number of independent NEURON jobs on a computer cluster. Each job is simulating a single cell with many sections (potentially many segments per section), but no branching. We're using the extracellular mechanism.

It will be worth our time given our project plans if we can parallelize each of those cells/jobs.

Is there a simple way in which multithreading can be used to parallelize each cell on a computer cluster? Or should I start playing around with getting multisplit integrated into our model and MPI working with NEURON on the cluster (although that may already be in place)?

Thanks again,

Nikki

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

Re: Parallelization of a single cell

Post by ted » Wed Sep 06, 2017 1:24 pm

Unfortunately extracellular is incompatible with multithreaded execution. You're stuck with doing what you're already doing, or installing MPI so you can
1. do essentially what you're already doing, but accomplishing it via NEURON's bulletin-board style approach for embarassingly parallel problems
or
2. resort to parallel simulation of individual cell models via multisplit
or
3. a combination of 1 and 2.

Of these 3 alternatives, 1 is the easiest because it requires the least modification of your code.

nikkip
Posts: 28
Joined: Mon Jun 24, 2013 6:09 pm

Re: Parallelization of a single cell

Post by nikkip » Wed Sep 06, 2017 1:57 pm

Thanks Ted. I'm already doing #1, so looking to add on #2. I'll work from Hines 2008 & associated ModelDB entry.

Thanks,

Nikki

nikkip
Posts: 28
Joined: Mon Jun 24, 2013 6:09 pm

Re: Parallelization of a single cell

Post by nikkip » Thu Sep 07, 2017 8:44 pm

Hi again,

In looking more carefully at the multisplit documentation, it says that it cannot be used with the extracellular mechanism. Is that correct? In which case there's no way to split a single cell across multiple processors if using extracellular?

https://www.neuron.yale.edu/neuron/stat ... multisplit

Thanks,

Nikki

hines
Site Admin
Posts: 1526
Joined: Wed May 18, 2005 3:32 pm

Re: Parallelization of a single cell

Post by hines » Fri Sep 08, 2017 11:37 am

It is not possible to combine multisplit and extracellular. Multisplit is limited to tree topology matrices. In principle the implementation could
be generalized to handle extracellular but it would require a complete rewriting with no guarantee of significant performance gains.
I presume your model substantively requires extracellular and not just for the side effect of i_membrane computation (to help compute a local field potential).
In the latter case one can replace extracellular with cvode.use_fast_imem(1) in which case one can use parallel cvode and multisplit.

nikkip
Posts: 28
Joined: Mon Jun 24, 2013 6:09 pm

Re: Parallelization of a single cell

Post by nikkip » Mon Sep 11, 2017 9:02 am

Hi Mike,

I do need to use the extracellular method. Thanks for clarifying.

Nikki

Post Reply