I have a problem setting up a network in a parallel environment.
The problem is that I different errors for different ways of execution, so I don't know what's wrong.
when I use stdinit() before the pnm.psolve(t_sim) call I get the following:
Code: Select all
/nrn/i686/bin/nrniv: table not specified in hoc_func_table
1 in start_file.hoc near line 50
1 stdinit()
^
1 finitialize(-65)
1 init()
1 stdinit()
Code: Select all
can't execute BBS::context on a worker
After initialization of the pnm, gids are distributed among the processes via
Code: Select all
pnm.set_gid2node(gid, pnm.pc.id)
Creation of multicompartment cells and registering the cell:
Code: Select all
cell = new Mit()
pnm.register_cell(gid, cell)
(here are some parts from the Mit cell template)
Code: Select all
begintemplate Mit
public soma, dend, synlist ...
create soma, dend, ...
objref synlist
proc init() { ...
synlist = new List()
soma { insert ... }
dend { insert ...
ampa = new ExpSyn(0.5)
synlist.append(ampa)
}
s2d { ... }
soma connect s2d(0),1
s2d connect dend(0),1
...
}
proc connect2target() {
dend $o2 = new NetCon(&v(0.5), $o1)
$o2.threshold = thresh
}
endtemplate Mit
I tried also this, which is basically the same more explicit:
Code: Select all
obfunc connect2target() { localobj nc
dend nc = new NetCon(&v(0.5), $o1)
nc.threshold = thresh
$o2 = nc
return nc
}
Later I connect cells via their gids by using pnm.nc_append(src_gid, tgt_gid, synapse_id, weight, delay).
So here is the total workflow :
Code: Select all
objref pnm
pnm = new ParallelNetManager(n_cells)
load_file("setup_network.hoc") // contains definition of distribute_gids, create, connect, ... procedures
distribute_gids()
/*pnm.round_robin() // does not help to fix the problem*/
create_cells()
connect_orn_mit()
pnm.set_maxstep(dt)
pnm.want_all_spikes()
/*stdinit() // as alternative*/
pnm.pinit()
/*pnm.pcontinue()*/
pnm.psolve(t_sim) // RUN
pnm.pc.runworker
pnm.pc.done
I hope someone can help.
Thanks in advance!