Ticket #42 (assigned task)

Opened 9 months ago

Last modified 3 months ago

Refactoring of connection book-keeping in `nest2`

Reported by: apdavison Assigned to: apdavison (accepted)
Priority: minor Milestone: 0.5.0
Component: nest2 Version:
Keywords: Cc:

Description

A general refactoring of connection book-keeping in nest2 is needed. We are storing too much information in the Projection class that is also stored within NEST. It might be slightly slower to have to look it up when needed, but there should be a large decrease in memory required.

Currently, we store 1D arrays _sources, _targets, and _targetPorts, so 3xNxM values, assuming all-to-all connectivity between a Population of size N and one of size M. If we assume that cell ids in a Population are consecutive (this is the case, but should be more strictly checked), then it is not necessary to store anything except the first id in a Population - we simply filter the connection dicts returned by nest.GetConnections() and keep only the connections that have target ids within the post-synaptic population. This might be complicated somewhat when running a distributed simulation.

Need to create some performance benchmarks to check that the performance hit of the lookups is not too great.

Change History

02/29/08 16:21:33 changed by eppler

Did Pierre tell you about FindConnection?? This may help here...

03/20/08 10:48:25 changed by apdavison

  • status changed from new to assigned.
  • milestone changed from Release 0.4.0 to Release 0.5.0.

08/13/08 13:27:46 changed by Pierre

I've removed the _targetsPorts list, and use the FindConnections?() method. More precisely, what we are doing is that we define, for each projection, a particular synapse context (with a random number as a name, could be more explicit but need to be unique for each projection). So, in the context prj.plasticity_name, we create the connection and store only targets and sources. If latter we need to access the list of all the connections, we useFindConnections(pre,post,synaptic_context) that will allow us to get the ports of those connections in this projection context. It's working and speed up the building of the network, with removing the call to get_target_ports().