Error with parallel network models

General issues of interest both for network and
individual cell parallelization.

Moderator: hines

Post Reply
bkaplan
Posts: 10
Joined: Thu Apr 22, 2010 4:34 am

Error with parallel network models

Post by bkaplan »

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:

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()
If I use pnm.pinit() instead of stdinit() I get this, which is not an printed to stderr and stops the run:

Code: Select all

can't execute BBS::context on a worker
I am following the descriptions given in the reference for the ParallelNetManager.
After initialization of the pnm, gids are distributed among the processes via

Code: Select all

            pnm.set_gid2node(gid, pnm.pc.id)
where gid = 1:ncell (no gid=0 is set).

Creation of multicompartment cells and registering the cell:

Code: Select all

                cell = new Mit()
                pnm.register_cell(gid, cell)
The then called cell.connect2target() function looks like:
(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
Is there something wrong with the connect2target function?
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
}
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 :

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 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!
ted
Site Admin
Posts: 6300
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Error with parallel network models

Post by ted »

Do you have a serial implementation of your model that works?
Post Reply