Multithreaded simulation Q & A

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

Moderator: hines

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

Multithreaded simulation Q & A

Post by ted »

By now, most NEURON users are aware that simulations can be sped up by running NEURON on workstation clusters and parallel supercomputers. But did you know that the next official release of NEURON (version 7) will offer multithreaded execution, so you can run parallel simulations on standalone multicore Macs or PCs?

An alpha release of version 7 is already available at http://www.neuron.yale.edu. To learn how to take advantage of this yourself, come to the NEURON course on Friday, Nov. 14, in Washington, DC. For the course description and online registration form, see http://www.neuron.yale.edu/dc2008.html. You should act soon, because the registration deadline is Friday, October 17, just four weeks from today (Friday, September 18).

In the meantime, here are some questions and answers to help give you a sense of the benefits of, and prerequisites for using, multithreaded simulations.

Multithreaded simulation Q & A

Q: "How much speedup can I get?"
A: Multicore execution may speed up simulations of networks or individual cells by as much as N times, where N is the number of "cores" (processors) in your laptop or desktop computer.

Q: "Well, what about the GUI? Do I have to give up the GUI?
A: The GUI can't be used with models on clusters or supercomputers, but it CAN be used during multithreaded simulations on standalone Macs or PCs. This is a big advantage for model development and exploratory simulations, because it greatly simplifies adjustment of model parameters, simulation control, and display and analysis of simulation results.

Q: "Do I have to revise my hoc or Python code in order to use multithreaded execution?"
A: In most cases the answer is no. If you use random variables during a run, each cell must have its own, separate random stream, but that's less work than preparing a model for parallel execution on a cluster or supercomputer.

Q: "Will I have to change any mod files?"
A: If your model uses mechanisms written in NMODL, some of your mod files may need to be revised to make them "thread safe." Many mod files are already thread safe, and many others will need only minor changes to make them thread safe. Some mod files may require more extensive revision, and there are a few that can never be made thread safe. We'll explain all this at the NEURON course in Washington, DC, on Friday, Nov. 14.

Q: "What effect will this have on the earth's climate?"
A: This is a totally green thing to do. If you don't already have a multicore Mac or PC, chances are you'll have one soon. Apple hasn't sold single core Macs for a couple of years, and single core PCs are a vanishing breed. It would be a tremendous waste of energy to leave all those extra cores with nothing to do. By harnessing the full computational power of your laptop or desktop computer, you'll save time, energy, and maybe even a polar bear or two. And you'll be able to finish your simulations and publish before the rising seas inundate Washington, DC (what would that do to research funding?), and new strict energy consumption laws force us all to go back to slide rules--or before the onset of the next ice age, just in case all those climate models are all wet. Either way, you can't lose.

REFERENCES

Note: preprints of the following are available from http://www.neuron.yale.edu/neuron/bib/nrnpubs.html

Brette, R., Rudolph, M., Carnevale, T., Hines, M., Beeman, D., Bower, J.M., Diesmann, M., Goodman, P.H., Harris, F.C.J., Zirpe, M., Natschläger, T., Pecevski, D., Ermentrout, B., Djurfeldt, M., Lansner, A., Rochel, O., Vieville, T., Muller, E., Davison, A., El Boustani, S., and Destexhe, A. Simulation of networks of spiking neurons: a review of tools and strategies. J. Comput. Neurosci. 23:349-398, 2007.

Hines, M.L. and Carnevale, N.T. Translating network models to parallel hardware in NEURON. J. Neurosci. Methods 169:425-455, 2008.

Hines, M.L., Eichner, H. and Schuermann, F. Neuron splitting in compute-bound parallel network simulations enables runtime scaling with twice as many processors. Journal of Computational Neuroscience DOI 10.1007/s10827-007-0073-3. (2008a)

Hines, M.L., Markram, H. and Schuermann, F. Fully implicit parallel simulation of single neurons. Journal of Computational Neuroscience DOI 10.1007/s10827-008-0087-5. (2008b)

Migliore, M, Cannia, C., Lytton, W.W., Markram, H. and Hines, M.L. Parallel network simulations with NEURON. Journal of Computational Neuroscience 21:119-129, 2006.
Post Reply