Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OLM example: NEURON: subscript out of range a_pop0 #99

Open
sanjayankur31 opened this issue Oct 14, 2021 · 0 comments
Open

OLM example: NEURON: subscript out of range a_pop0 #99

sanjayankur31 opened this issue Oct 14, 2021 · 0 comments
Assignees
Labels
T: bug Type: bug

Comments

@sanjayankur31
Copy link
Member

Describe the bug
I was tinkering with the OLM example and noticed that Neuron throws an error (but continues and does record the data etc.) related to the instance in the populationList:

$ python LEMS_olm_example_sim_nrn.py 

    Starting simulation in NEURON of 600ms generated from NeuroML2 model...

Population pop0 contains 1 instance(s) of component: olm of type: cell
        1 
NEURON: subscript out of range a_pop0
 near line 1
 { a_pop0[1].position(0.0, 0.0, 0.0) }
                                      ^
Setting up the network to simulate took 0.004180 seconds
Running a simulation of 600.0ms (dt = 0.01ms; seed=123)
Finished NEURON simulation in 0.169157 seconds (0.002819 mins)...
Saving results at t=599.9999999995268...
Saved data to: time.dat
Saved data to: olm_example_sim.dat
Finished saving results in 0.263786 seconds
Done

The XML snipped is here:

https://github.com/NeuroML/Documentation/blob/master/source/Userdocs/NML2_examples/olm_example_net.nml#L8

The size of the population is given as 1 and the first instance there has an id of 1:

https://github.com/NeuroML/Documentation/blob/master/source/Userdocs/NML2_examples/olm_example_net.nml#L10

The corresponding line in the _nrn.py file is:

       h("{ a_pop0[1].position(0.0, 0.0, 0.0) }")

So, it looks like the NeuronWriter takes the id of the instance as the index instead of counting through them from 0?

What is correct here? Should id always start from 0, and be contiguous, or should the NeuronWriter not use the id but have its own counter to allow any values for id to be used?

Page on which issue is
The OLM example code

This is probably a NeuronWriter bug, but opening it here for initial discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T: bug Type: bug
Projects
Status: 📋 Backlog
Development

No branches or pull requests

2 participants