Parallel neuron help!
Posted: Wed May 25, 2016 11:24 am
Hi,
I'm running some code parallel context on a cluster and meeting a problem.
"run_1.hoc" works well without any bugs while "run_2.hoc" dosen't.
Could you give me some tips about it?
The pseudocode is this
==================
run_1.hoc:
==================
run_2.hoc:
I'm running some code parallel context on a cluster and meeting a problem.
"run_1.hoc" works well without any bugs while "run_2.hoc" dosen't.
Could you give me some tips about it?
The pseudocode is this
==================
run_1.hoc:
Code: Select all
create soma
... // codes that define a soma
create synapse
... // codes that define a synapse
objref pc
pc = parallelcontext()
proc task1() {
pc.source_var(&soma.v(0.5),1);
pc.setup_transfer()
pc.set_maxstep(5)
pc.stdinit()
pc.psolve()
}
proc task2() {
pc.source_var(&synapse.g,1);
pc.setup_transfer()
pc.set_maxstep(5)
pc.stdinit()
pc.psolve()
}
pc.runworker()
pc.submit("task1()")
pc.submit("task2()")
while(pc.working) {
print "cpu=",pc.id()," done!"
}
pc.done()
run_2.hoc:
Code: Select all
objref pc
pc = parallelcontext()
proc task1() {
create soma
... // the same codes that define a soma
// occurs some syntax errors.
pc.source_var(&soma.v(0.5),1);
pc.setup_transfer()
pc.set_maxstep(5)
pc.stdinit()
pc.psolve()
}
proc task2() {
create synapse
... // the same codes that define a synapse
// occurs some syntax errors.
pc.source_var(&synapse.g,1);
pc.setup_transfer()
pc.set_maxstep(5)
pc.stdinit()
pc.psolve()
}
pc.runworker()
pc.submit("task1()")
pc.submit("task2()")
while(pc.working) {
print "cpu=",pc.id()," done!"
}
pc.done()