Closed jlubo closed 1 year ago
As I promised @thorstenhater, here is a small example for demonstration: index_error_example.zip
In a small network of 4 neurons, probes are set to all possible neurons and synapses. Four different cases are run:
The scripts set_arbor_env
and set_arbor_env_dev
will have to be adapted for the machine that is used.
Example output:
Building catalogue 'custom' from mechanisms in /home/jlubo/Desktop/TO REMOVE/pckg/mechanisms
* NMODL
* lif
* deltasyn
Catalogue has been built and copied to /home/jlubo/Desktop/TO REMOVE/pckg/custom-catalogue.so
------------------------------
Connectivity matrix: connections_smallnet2.txt
------------------------------
Number of set handles:
For neuronal state: 4
For synaptic state: 5
------------------------------
Latest state of neuron 0: v = -65.00000000000057
Latest state of neuron 1: v = -64.99999999999963
Latest state of synapse 0->1: w = 0.0069055176145515
Latest state of neuron 2: v = -64.99999999999963
Latest state of synapse 3->2: w = -0.014038446862327636
Latest state of synapse 0->2: w = 0.016747026333107796
Latest state of neuron 3: v = -64.99999999999963
Latest state of synapse 2->3: w = -0.014038446862327636
Latest state of synapse 0->3: w = 0.016747026333107796
------------------------------
Spikes (8 in total):
[['1000.0102' '0']
['1020.0110913065639' '0']
['1025.563307369483' '1']
['1025.563307369483' '2']
['1025.563307369483' '3']
['1040.0110824825108' '0']
['1044.58519146524' '2']
['1044.58519146524' '3']]
========================================================
Building catalogue 'custom' from mechanisms in /home/jlubo/Desktop/TO REMOVE/pckg/mechanisms
* NMODL
* lif
* deltasyn
Catalogue has been built and copied to /home/jlubo/Desktop/TO REMOVE/pckg/custom-catalogue.so
------------------------------
Connectivity matrix: connections_full.txt
------------------------------
Number of set handles:
For neuronal state: 4
For synaptic state: 12
------------------------------
Latest state of neuron 0: v = -12.281137472625689
Latest state of synapse 3->0: w = 9.302127811063135
Latest state of synapse 2->0: w = 9.302127811063135
Latest state of synapse 1->0: w = 9.302127811063135
Latest state of neuron 1: v = -69.99999997212416
Latest state of synapse 3->1: w = -29.64411386009621
Latest state of synapse 2->1: w = -29.64411386009621
Latest state of synapse 0->1: w = 5.470037132439371
Latest state of neuron 2: v = -69.99999997212416
Latest state of synapse 3->2: w = -29.64411386009621
Latest state of synapse 1->2: w = -29.64411386009621
Latest state of synapse 0->2: w = 5.470037132439371
Latest state of neuron 3: v = -69.99999997212416
Latest state of synapse 2->3: w = -29.64411386009621
Latest state of synapse 1->3: w = -29.64411386009621
Latest state of synapse 0->3: w = 5.470037132439371
------------------------------
Spikes (23584 in total):
[['1000.0102' '0']
['1020.0110913065639' '0']
['1025.563307369483' '1']
...
['14999.747927186769' '1']
['14999.747927186769' '2']
['14999.747927186769' '3']]
========================================================
Building catalogue 'custom' from mechanisms in /home/jlubo/Desktop/TO REMOVE/pckg/mechanisms
* NMODL
* lif
* deltasyn
Catalogue has been built and copied to /home/jlubo/Desktop/TO REMOVE/pckg/custom-catalogue.so
------------------------------
Connectivity matrix: connections_smallnet2.txt
Traceback (most recent call last):
File "./arborNetworkExample.py", line 196, in <module>
sim = arbor.simulation(recipe, context, domains)
IndexError: _Map_base::at
========================================================
Building catalogue 'custom' from mechanisms in /home/jlubo/Desktop/TO REMOVE/pckg/mechanisms
* NMODL
* lif
* deltasyn
Catalogue has been built and copied to /home/jlubo/Desktop/TO REMOVE/pckg/custom-catalogue.so
------------------------------
Connectivity matrix: connections_full.txt
------------------------------
Number of set handles:
For neuronal state: 4
For synaptic state: 12
------------------------------
Latest state of neuron 0: v = -69.9999998192683
Latest state of synapse 3->0: w = 42.8457432251099
Latest state of synapse 2->0: w = 42.8457432251099
Latest state of synapse 1->0: w = 42.8457432251099
Latest state of neuron 1: v = -69.99999997155972
Latest state of synapse 3->1: w = -29.934306666847682
Latest state of synapse 2->1: w = -29.934306666847682
Latest state of synapse 0->1: w = 15.673550517214608
Latest state of neuron 2: v = -69.99999997155972
Latest state of synapse 3->2: w = -29.934306666847682
Latest state of synapse 1->2: w = -29.934306666847682
Latest state of synapse 0->2: w = 15.673550517214608
Latest state of neuron 3: v = -69.99999997155972
Latest state of synapse 2->3: w = -29.934306666847682
Latest state of synapse 1->3: w = -29.934306666847682
Latest state of synapse 0->3: w = 15.673550517214608
------------------------------
Spikes (24439 in total):
[['1000.0102' '0']
['1020.0110913065639' '0']
['1025.5514370035123' '1']
...
['14999.953669491799' '1']
['14999.953669491799' '2']
['14999.953669491799' '3']]
With master versions newer than dd75b03bf944f3816dc16a4353ec35ee317007e9, an error occurs when non-existent sites are probed (I use to set probes to existent and non-existent sites and then set handles only for the existent sites, and on CPU I've found this to still work fine until master version d1139b700db0ed640e216f76564278f14fd83dca).
Probing non-existent sites should be possible and no exception should be thrown (offline communication with @thorstenhater), if only, one might want to throw a warning (also see related issue #2066).
Here is the output from gdb: