A ring network with multithreading
Posted: Wed Jul 07, 2010 10:24 am
Hi.
I want to know how is possible to apply the approach multithreads to the ring network (first example - chapter 3) shown in the tutorial "Traslating NEURON network models to parallel hardware" (Hines and Carnevale): in this case we have a set of neurons, each of which is assigned to a specific host (obviously, hosts may have multiple neurons, if the number of hosts is less than the number of neurons).
In the serial version i have a procedure run() that, with a loop for, calls the procedures connectcells(), spikerecord() and spikeout():
My actually parallel version is very similar, for the procedure run(), to code shown above:
Now, I want to launch this simulations in parallel, and I thought that the best approach is with multithreading, but I have no idea how to proceed.
Could you help me?
PS: sorry for my english.
I want to know how is possible to apply the approach multithreads to the ring network (first example - chapter 3) shown in the tutorial "Traslating NEURON network models to parallel hardware" (Hines and Carnevale): in this case we have a set of neurons, each of which is assigned to a specific host (obviously, hosts may have multiple neurons, if the number of hosts is less than the number of neurons).
In the serial version i have a procedure run() that, with a loop for, calls the procedures connectcells(), spikerecord() and spikeout():
Code: Select all
proc run() {
for i=0, i < n_simul {
connectcells()
spikerecord()
stdinit()
continuerun(tstop)
spikeout()
}
}
Code: Select all
proc prun() {
for i=0, i < n_simul {
connectcells()
spikerecord()
{pc.set_maxstep(10)}
stdinit()
{pc.psolve(tstop)}
spikeout()
}
}
Could you help me?
PS: sorry for my english.