examples:sim_coba_benchmark
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
examples:sim_coba_benchmark [2014/01/13 11:18] – Adds link to parallel execution zenke | examples:sim_coba_benchmark [2015/06/01 17:58] – 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> | ||
- | ./ | ||
./ | ./ | ||
</ | </ | ||
The '' | The '' | ||
- | If you are interested in running the code in parallel please see the [[parallel execution]] howto. | + | If you are interested in running the code in parallel please see the [[manual:parallel execution]] howto. |
==== Output example ==== | ==== Output example ==== | ||
Line 29: | Line 28: | ||
{{ : | {{ : | ||
- | This figure shows the rasterplot | + | This figure shows the raster plot of the spiking activity of the excitatory population written to ''/ |
Line 44: | Line 43: | ||
neurons_i-> | neurons_i-> | ||
</ | </ | ||
- | 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 '' | + | 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 '' |
Line 64: | Line 63: | ||
- | To implement the priming mechanism we find the following conditional branch: | + | |
- | <code c++> | + | |
- | if ( prime ) { | + | |
- | msg = " | + | |
- | logger-> | + | |
- | + | ||
- | PoissonGroup * poisson= new PoissonGroup(200, | + | |
- | poisson-> | + | |
- | // 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, | + | |
- | SparseConnection * con_ext_i = new SparseConnection(poisson, | + | |
- | } else { | + | |
- | oss.str("" | + | |
- | oss << dir << "/ | + | |
- | sys-> | + | |
- | } | + | |
- | </ | + | |
- | If the '' | + | |
The folling code snipped is responsible for running the simulation for '' | The folling code snipped is responsible for running the simulation for '' | ||
Line 101: | Line 80: | ||
===== The full program ===== | ===== The full program ===== | ||
+ | **Note** you might find a more recent version of this code in the '' | ||
+ | |||
<code c++> | <code c++> | ||
/* | /* | ||
Line 140: | Line 121: | ||
#include " | #include " | ||
#include " | #include " | ||
+ | #include " | ||
#include " | #include " | ||
#include " | #include " | ||
Line 160: | Line 142: | ||
string msg; | string msg; | ||
- | double w = 0.4; | + | double w = 0.4; // [g_leak] |
- | double wi = 5.1; | + | double wi = 5.1; // [g_leak] |
Line 171: | Line 153: | ||
NeuronID ni = 800; | NeuronID ni = 800; | ||
- | bool prime = false; | ||
bool fast = false; | bool fast = false; | ||
Line 183: | Line 164: | ||
(" | (" | ||
(" | (" | ||
- | (" | ||
(" | (" | ||
(" | (" | ||
Line 203: | Line 183: | ||
if (vm.count(" | if (vm.count(" | ||
simtime = vm[" | simtime = vm[" | ||
- | } | ||
- | |||
- | if (vm.count(" | ||
- | prime = true; | ||
} | } | ||
Line 258: | Line 234: | ||
// END Global stuff | // END Global stuff | ||
- | |||
- | // double primetime = 10; | ||
logger-> | logger-> | ||
Line 265: | Line 239: | ||
TIFGroup * neurons_i = new TIFGroup( ni); | TIFGroup * neurons_i = new TIFGroup( ni); | ||
- | neurons_e-> | + | neurons_e-> |
- | neurons_i-> | + | neurons_i-> |
Line 286: | Line 260: | ||
= new SparseConnection( neurons_i, | = new SparseConnection( neurons_i, | ||
- | if ( prime ) { | + | if ( !fwmat_ee.empty() ) con_ee->load_from_complete_file(fwmat_ee); |
- | msg = " | + | if ( !fwmat_ei.empty() ) con_ei->load_from_complete_file(fwmat_ei); |
- | logger-> | + | if ( !fwmat_ie.empty() ) con_ie->load_from_complete_file(fwmat_ie); |
- | + | if ( !fwmat_ii.empty() ) con_ii->load_from_complete_file(fwmat_ii); | |
- | PoissonGroup * poisson= new PoissonGroup(200, | + | |
- | poisson-> | + | |
- | // 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, | + | |
- | SparseConnection * con_ext_i = new SparseConnection(poisson, | + | |
- | + | ||
- | } else { | + | |
- | oss.str("" | + | |
- | oss << dir << "/ | + | |
- | sys-> | + | |
- | } | + | |
- | + | ||
- | if ( !fwmat_ee.empty() ) con_ee->load_from_file(fwmat_ee); | + | |
- | if ( !fwmat_ei.empty() ) con_ei->load_from_file(fwmat_ei); | + | |
- | if ( !fwmat_ie.empty() ) con_ie->load_from_file(fwmat_ie); | + | |
- | if ( !fwmat_ii.empty() ) con_ii->load_from_file(fwmat_ii); | + | |
- | + | ||
- | + | ||
- | // pruning here impairs performance -- probably due to cache poisoning | + | |
- | con_ee-> | + | |
- | con_ei-> | + | |
- | con_ie-> | + | |
- | con_ii-> | + | |
Line 325: | Line 273: | ||
filename << outputfile << " | filename << outputfile << " | ||
SpikeMonitor * smon_e = new SpikeMonitor( neurons_e, filename.str().c_str() ); | SpikeMonitor * smon_e = new SpikeMonitor( neurons_e, filename.str().c_str() ); | ||
+ | |||
+ | // filename.str("" | ||
+ | // filename.clear(); | ||
+ | // filename << outputfile << " | ||
+ | // DelayedSpikeMonitor * dsmon_e = new DelayedSpikeMonitor( neurons_e, filename.str().c_str() ); | ||
filename.str("" | filename.str("" | ||
Line 333: | Line 286: | ||
filename.str("" | filename.str("" | ||
filename << outputfile << " | filename << outputfile << " | ||
- | StateMonitor * smon_mem = new StateMonitor( neurons_e, | + | StateMonitor * smon_mem = new StateMonitor( neurons_e, |
filename.str("" | filename.str("" | ||
filename << outputfile << " | filename << outputfile << " | ||
- | StateMonitor * smon_ampa = new StateMonitor( neurons_e, | + | StateMonitor * smon_ampa = new StateMonitor( neurons_e, |
filename.str("" | filename.str("" | ||
filename << outputfile << " | filename << outputfile << " | ||
- | StateMonitor * smon_gaba = new StateMonitor( neurons_e, | + | StateMonitor * smon_gaba = new StateMonitor( neurons_e, |
} | } | ||
Line 356: | Line 309: | ||
if (!sys-> | if (!sys-> | ||
errcode = 1; | errcode = 1; | ||
- | |||
- | if ( prime ) { | ||
- | oss.str("" | ||
- | oss << dir << "/ | ||
- | sys-> | ||
- | } | ||
logger-> | logger-> |
examples/sim_coba_benchmark.txt · Last modified: 2016/07/05 23:40 by zenke