I am new to parallel processing in NEURON but it has become necessary to implement due to the increasing complexity of my model and the size of parameter searches that I am running. I am running repeated simulations of a morphologically detailed multi-compartment model with 1903 Exp2Syn synapses spread across all of the compartments of my model. I first started exploring the parallel processing options offered in the GUI to reduce simulation times. Here are some of my findings from that:
Model complexity before adding synapses: 1897
Model complexity after adding synapses: 7606
Multisplit over 8 processors = splits cell into 43 pieces (in this case) that are distributed over multiple processors
10s simulation duration with synapses, without multisplit = ~53 s
10s simulation duration with synapses, with multisplit = ~15 s
10s simulation duration without synapses, without multisplit = ~16 s
10s simulation duration without synapses, with multisplit = 7.1 s
With these reduced simulation times I decided to implement the following code, based on the code found in the session file when you save a session that includes the parallel processing GUI. For simplicity, I omitted the parameter search function code - essentially, the run() function is just called on many iterations of a parameter search.
SynParamSearch.hoc:
Code: Select all
load_file("DetailedModel.hoc")
func f() {
// Some Parameter Search Function
}
// Set up parallel context
objectvar pct
load_file("parcom.hoc", "ParallelComputeTool")
pct = ParallelComputeTool[0]
object_push(pct)
change_nthread(8, 1)
multisplit(1)
busywait(1)
Code: Select all
load_file("SynParamSearch.hoc")
f()
Code: Select all
NEURON -- Release 7.4 (1341:2ccabed20677) 2015-05-31
Duke, Yale, and the BlueBrain Project -- Copyright 1984-2015
See http://www.neuron.yale.edu/neuron/credits
Additional mechanisms from files
mod_nsgportal/IKa.mod mod_nsgportal/ingauss.mod mod_nsgportal/Ksoma.mod mod_nsgportal/Nap.mod mod_nsgportal/Nasoma.mod mod_nsgportal/vecevent.mod
Assertion failed: file multisplit.cpp, line 2633
0 /projects/ps-nsg/home/nsguser/applications/neuron7.4/installdir/x86_64/bin/nrniv: ie < ne
0 in SynParamSearch.hoc near line 342
0 multisplit(1)
^
0 ParallelContext[0].multisplit()
0 ParallelComputeTool[0].use_thread()
0 ParallelComputeTool[0].multisplit(1)
0 xopen("SynParamSe...")
and others
0 /projects/ps-nsg/home/nsguser/applications/neuron7.4/installdir/x86_64/bin/nrniv: Segmentation violation
0 in SynParamSearch.hoc near line 3
0 f()
^
0 fadvance()
0 advance()
0 step()
0 continuerun(10000)
and others
Thanks for your time,
Alex GM