However when I run my code, with mpiexec, the neuron instances are in endless loop without something happening.
Here is the code (cells and pps etc are only initialized at the hosts where they should be initialized, using "if (pc.gid_exists(0))" etc):
Code: Select all
// ***** Initialize Variables *****
objref f
objref pnm,pc,nil,cvode,strf,tvec,cell,cellList,pp,ppList,con,conList,nilcon,nilconList,rec,recList,rect,rectList,playt,playtList,play,playList,APCrec,APCrecList,APC,APCList,APCcon,APCconList,thissec,thisseg,thisval,maxRa,maxcm
cellList = new List() // comprises all instances of cell templates, also artificial cells
ppList = new List() // comprises all Point Processes of any cell
conList = new List() // comprises all NetCon objects
recList = new List() //comprises all recording vectors
rectList = new List() //comprises all time vectors of recordings
// ***** Load standard libraries *****
io = load_file("stdgui.hoc")
io = xopen("lib_genroutines/genroutines.hoc")
// ***** Initialize parallel manager *****
load_file("netparmpi.hoc")
pnm = new ParallelNetManager(2)
pc = pnm.pc
pc.set_gid2node(0, 0)
pc.set_gid2node(1, 1)
// ***** Load cell morphologies and create artificial cells *****
io = xopen("init_cells.hoc")
// ***** Load mechanisms and adjust nseg *****
io = xopen("init_mech.hoc")
// ***** Place Point Processes *****
io = xopen("init_pp.hoc")
// ***** Define recording sites *****
io = xopen("init_rec.hoc")
// ***** Last settings *****
tstart = 0
tstop = 100+ 0.001 //advances one more step due to roundoff errors for high tstops
dt = 0.001000
steps_per_ms = 1000
// ***** Run NEURON *****
pnm.set_maxstep(10)
if (pc.id()==0){
pnm.prun()
}
print "here is node ", pc.id()
io = xopen("save_rec.hoc")
Thanks for any help