Error with parallel network models
Posted: Thu Apr 22, 2010 5:01 am
Hello,
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:
If I use pnm.pinit() instead of stdinit() I get this, which is not an printed to stderr and stops the run:
I am following the descriptions given in the reference for the ParallelNetManager.
After initialization of the pnm, gids are distributed among the processes via
where gid = 1:ncell (no gid=0 is set).
Creation of multicompartment cells and registering the cell:
The then called cell.connect2target() function looks like:
(here are some parts from the Mit cell template)
Is there something wrong with the connect2target function?
I tried also this, which is basically the same more explicit:
Or do the cell templates require anything else than a connect2target function and a synlist?
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 :
I am using the latest source of Neuron 7.1 with MPI correctly installed (i.e. the parallel test files provided in /nrn/src/parallel$ mpirun -np 2 $(which nrniv) -mpi test*.hoc run fine, without giving a hint that it could be an mpi/Neuron issue).
I hope someone can help.
Thanks in advance!
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!