parallelized NEURON does not start with pnm.run()
Posted: Thu Sep 07, 2017 6:39 am
I am very new to parallel NEURON. Currently I try to setup a configuration where 2 cells are simply run in parallel *no NetCons between them". This should later change.
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):
The "here is node x" message appears for all nodes but node 0. The recordings that are saved during save_rec.hoc are all-zero, so I guess it did non run. What am I doing wrong? Tried around with pc.barrier() and pc.runworker() but I do not want to submit jobs I simply want that all hosts run and, in case of synapes between them, are considered.
Thanks for any help
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