That does work. Good suggestion. It turns out that it is only necessary to ensure that an objref called pc exists, before loading multisplit.hoc. So in init.hoc I changed
{load_file("multisplit.hoc")}
to
objref pc
{load_file("multisplit.hoc")}
After making that change, I did the following (based on the contents of perfrun.sh and further suggestions from Michael Hines) in order to run a multisplit simulation of attenuation of a backpropagating spike using the Poirazi model:
1. Compiled the mechanisms
nrnivmodl modeldb/CA1_multi/mechanism
This produced an i686 subdirectory in the same directory as where multisplit.hoc, pltsplit.hoc etc. were located.
2. Ran
i686/special -nogui -c model=1 -c split=2 init.hoc
which created a file called mcomplex.dat. This file lists the names of the compiled mechanisms and their "complexity measures", which are used for load balancing in the next step. (Note: in this step, NEURON exits with an
execerror("stop", "")
message. This is deliberate, not a bug.)
3. Ran a multisplit simulation
mpiexec -np 4 nrniv -mpi -NSTACK 2000 -c model=1 init.hoc
NEURON printed numerous lines, the last of which were
Code: Select all
c = 10852 maxfactor = 0.3 cm = 813.9
total complexity is 10921.4
1 cells
24 pieces
maximum complexity is 2739.6 for host 2
load imbalance is 0.3%
maximum of 6 pieces on host 0
at least one cell is broken into 24 pieces (bilist[0], gid 0)
at least one cell has 13 sids (bilist[0], gid 0)
. . .
setuptime = 0.35
runtime = 3.78
1 time 3.3291 0.450758 0.00203443 2725
3 time 3.41018 0.36975 0.00211477 2714
2 time 3.38026 0.399674 0.00203133 2721
0 time 3.7389 0.0414011 0.00833654 2715
The simulation also generated some files named trajec_*.dat that contained recordings of membrane potential at the middle of the soma and a couple of dendrites.
So to do multisplit simulation with a cell of your own choice, there are many steps.
1. The model files must be placed in a subdirectory of modeldb, and it may be necessary to make some changes to the hoc code so that the model loads but does not execute (see comments in modelfix.sh). Some mod files may also need to be revised (see modelfix.sh). Then the mod files must be compiled so that they are available when NEURON executes the init.hoc file in the multisplit directory.
2. Next, make your own copy of init.hoc and edit it so that the statements pertain to your own model. I'd just comment out the stuff that pertains to proc poirazi(), proc lazar(), and proc miyasho(), and make and execute my own proc mymodel(), which would look something like this:
Code: Select all
proc mymodel() {
load_file("my_path/init.hoc")
// tstop = whatever, if necessary
multisplit()
add_trajec("soma")
add_trajec("somesection", 4) // or whatever section name and "index number"
. . . etc. . . .
// cvode_active(0) if necessary
}
mymodel()
3. Next, generate the mcomplex.dat file.
4. Finally, run the multisplit simulation.