Auryn simulator

Simulator for spiking neural networks with synaptic plasticity

User Tools

Site Tools


examples:sim_coba_benchmark

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
examples:sim_coba_benchmark [2014/01/13 11:15] – Adds more explanation to important bits. zenkeexamples:sim_coba_benchmark [2016/07/05 23:40] (current) – typos zenke
Line 8: Line 8:
 To run the program the network first needs priming with external Poisson noise before it can self-sustain its activity. To do that invoke the program with the following command line arguments To run the program the network first needs priming with external Poisson noise before it can self-sustain its activity. To do that invoke the program with the following command line arguments
 <code shell> <code shell>
-./sim_coba_benchmark --dir /tmp --prime --simtime 0.050 
 ./sim_coba_benchmark --dir /tmp --simtime 5 ./sim_coba_benchmark --dir /tmp --simtime 5
 </code> </code>
 The ''prime'' keyword in the first command causes the network to run with external Poisson input and save its network state at the end of the run to a set of files created under ''/tmp''. Note that you can give any other directory name where you want the files to be created. The second call to the progrem without the ''--prime'' argument causes the program to read the current network state from these saved files and runs the network for the specified period in ''simtime''. All spiking output and the memory trace ([[mem]] file) of a single neuron are written to the directory specified with ''--dir'' and are prefixed with ''coba.*''. The ''prime'' keyword in the first command causes the network to run with external Poisson input and save its network state at the end of the run to a set of files created under ''/tmp''. Note that you can give any other directory name where you want the files to be created. The second call to the progrem without the ''--prime'' argument causes the program to read the current network state from these saved files and runs the network for the specified period in ''simtime''. All spiking output and the memory trace ([[mem]] file) of a single neuron are written to the directory specified with ''--dir'' and are prefixed with ''coba.*''.
 +
 +If you are interested in running the code in parallel please see the [[manual:parallel execution]] howto.
  
 ==== Output example ==== ==== Output example ====
Line 27: Line 28:
  
 {{ :examples:coba_ras.png?300 |}} {{ :examples:coba_ras.png?300 |}}
-This figure shows the rasterplot of the spiking activity of the excitatory population written to ''/tmp/coba.0.e.ras''.+This figure shows the raster plot of the spiking activity of the excitatory population written to ''/tmp/coba.0.e.ras''.
  
  
Line 42: Line 43:
 neurons_i->random_mem(-70e-3,10e-3); neurons_i->random_mem(-70e-3,10e-3);
 </code> </code>
-This part instatiates two groups of neurons of type [[TIFGroup]] which corresponds to the conductance based model with exponentially decaying PSCs and an absolute refractoriness of 5ms. The ''random_mem'' methods randomize the initial membrane potentials with a Gaussian (mean=-70mV and standard deviation 10e-3mV).+This part instantiates two groups of neurons of type [[TIFGroup]] which corresponds to the conductance based model with exponentially decaying PSCs and an absolute refractoriness of 5ms. The ''random_mem'' methods randomize the initial membrane potentials with a Gaussian (mean=-70mV and standard deviation 10mV).
  
  
Line 62: Line 63:
  
  
-To implement the priming mechanism we find the following conditional branch: 
-<code c++> 
-if ( prime ) {  
-    msg = "Setting up external input ..."; 
-    logger->msg(msg,PROGRESS,true); 
-     
-    PoissonGroup * poisson= new PoissonGroup(200,10); 
-    poisson->seed(132341);  
-    // this will give the same seed on each rank, 
-    // but since the group should be locked to a single 
-    // rank we do not care. 
-     
-    SparseConnection * con_ext_e = new SparseConnection(poisson,neurons_e,1,sparseness/2,GLUT); 
-    SparseConnection * con_ext_i = new SparseConnection(poisson,neurons_i,1,sparseness/2,GLUT); 
-} else { 
-    oss.str(""); 
-    oss << dir << "/save"; 
-    sys->load_network_state(oss.str()); 
-} 
-</code> 
-If the ''prime'' directive is set (via the command line) this code will create a [[PoissonGroup]] and connect it to the excitatory and inhibitory populations. If ''prime==false'' this will try to load the network state from the hopefully existing save files stored under ''/tmp/save*'' in our example. 
  
-The folling code snipped is responsible for running the simulation for ''simtime'' seconds. The second parameter ''true'' indicates that we wan the simulation to be interrupted if the [[RateChecker]] detects too high firing rates, which usually suggests that something is going wrong.+ 
 +The following code snipped is responsible for running the simulation for ''simtime'' seconds. The second parameter ''true'' indicates that we wan the simulation to be interrupted if the [[RateChecker]] detects too high firing rates, which usually suggests that something is going wrong.
 <code c++> <code c++>
 if (!sys->run(simtime,true))  if (!sys->run(simtime,true)) 
Line 96: Line 77:
 </code> </code>
 The second part of the above code saves the network state if ''prime==true'' and is therefore used to create the initial conditions of the self-sustained activity. The second part of the above code saves the network state if ''prime==true'' and is therefore used to create the initial conditions of the self-sustained activity.
 +
 +
examples/sim_coba_benchmark.1389611712.txt.gz · Last modified: 2014/01/13 11:15 by zenke