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

[Bug] adding InhomogeneousParameter to all segment group does not generate correct NEURON export #121

Open
sanjayankur31 opened this issue Nov 6, 2024 · 1 comment
Labels

Comments

@sanjayankur31
Copy link
Member

Describe the bug
When using InhomogeneousParameter in an all segment group, the generated NEURON does not run.

To Reproduce
Add an InhomogeneousParameter to an all segment group.

Expected behavior
The NEURON export should work correctly

Observed behavior

System information:

  • OS: [e.g. iOS] Linux/Fedora 40
  • Python version (python --version) Python 3.11.10
  • Version of tools in use (pynml --help) pyNeuroML v1.3.13 (libNeuroML v0.6.6, jNeuroML v0.13.3)

Additional context
An example simulation (with a pyramidal cell from ACNet where I was testing adding a non-uniform conductance density) is attached.
LEMS_ac_neuron.xml.neux.zip

@sanjayankur31
Copy link
Member Author

Extracting that to run the simulation will give the error:

pynml LEMS_ac_neuron.xml -neuron -nogui -run
INFO:numexpr.utils:NumExpr defaulting to 16 threads.
pyNeuroML >>> 13:19:24 - INFO - Executing: (java -Xmx400M  -Djava.awt.headless=true -jar  "/home/asinha/Documents/02_Code/00_mine/NeuroML/software/pyNeuroML/pyneuroml/utils/./../lib/jNeuroML-0.13.3-jar-with-dependencies.jar"  LEMS_ac_neuron.xml -neuron -nogui -run) in directory: .
pyNeuroML >>> 13:19:26 - CRITICAL - *** Problem running command:
       Command 'java -Xmx400M  -Djava.awt.headless=true -jar  "/home/asinha/Documents/02_Code/00_mine/NeuroML/software/pyNeuroML/pyneuroml/utils/./../lib/jNeuroML-0.13.3-jar-with-dependencies.jar"  LEMS_ac_neuron.xml -neuron -nogui -run' returned non-zero exit status 1.
pyNeuroML >>> 13:19:26 - CRITICAL -  jNeuroML >>   jNeuroML v0.13.3
 jNeuroML >>  (INFO) Reading from: /home/asinha/Documents/02_Code/00_mine/models/NetPyNEShowcase/NeuroML2/nonUniformNernst/ACNet/LEMS_ac_neuron.xml
 jNeuroML >>  (WARNING) Unused attribute in Component(id=null type=bqmodel_isDescribedBy): XMLAttribute(xmlns:bqmodel, http://biomodels.net/model-qualifiers/)  at: org.lemsml.jlems.core.type.Component.resolve(Component.java:540)
 jNeuroML >>  (WARNING) Unused attribute in Component(id=null type=bqbiol_isVersionOf): XMLAttribute(xmlns:bqbiol, http://biomodels.net/biology-qualifiers/)  at:
 jNeuroML >>  (WARNING) Unused attribute in Component(id=null type=bqmodel_isDescribedBy): XMLAttribute(xmlns:bqmodel, http://biomodels.net/model-qualifiers/)  at:
 jNeuroML >>  (WARNING) Unused attribute in Component(id=null type=bqbiol_isVersionOf): XMLAttribute(xmlns:bqbiol, http://biomodels.net/biology-qualifiers/)  at:
 jNeuroML >>  (WARNING) Unused attribute in Component(id=null type=bqmodel_isDescribedBy): XMLAttribute(xmlns:bqmodel, http://biomodels.net/model-qualifiers/)  at:
 jNeuroML >>  (WARNING) Unused attribute in Component(id=null type=bqbiol_isVersionOf): XMLAttribute(xmlns:bqbiol, http://biomodels.net/biology-qualifiers/)  at:
 jNeuroML >>  (WARNING) Unused attribute in Component(id=null type=bqmodel_isDescribedBy): XMLAttribute(xmlns:bqmodel, http://biomodels.net/model-qualifiers/)  at:
 jNeuroML >>  (WARNING) Unused attribute in Component(id=null type=bqbiol_isVersionOf): XMLAttribute(xmlns:bqbiol, http://biomodels.net/biology-qualifiers/)  at:
 jNeuroML >>  (WARNING) Unused attribute in Component(id=null type=bqmodel_isDescribedBy): XMLAttribute(xmlns:bqmodel, http://biomodels.net/model-qualifiers/)  at:
 jNeuroML >>  (INFO) Creating NeuronWriter to output files to /home/asinha/Documents/02_Code/00_mine/models/NetPyNEShowcase/NeuroML2/nonUniformNernst/ACNet
 jNeuroML >>  (INFO) Adding simulation Component(id=ac_neuron type=Simulation) of network/component: ac_net (Type: network)
 jNeuroML >>  (INFO) Adding population: ac_pop
 jNeuroML >>  Adding segment: soma
 jNeuroML >>  Adding segment: apical0
 jNeuroML >>  Adding segment: apical2
 jNeuroML >>  Adding segment: apical3
 jNeuroML >>  Adding segment: apical4
 jNeuroML >>  Adding segment: apical1
 jNeuroML >>  Adding segment: basal0
 jNeuroML >>  Adding segment: basal1
 jNeuroML >>  Adding segment: basal2
 jNeuroML >>  (INFO) -- Writing to hoc: /home/asinha/Documents/02_Code/00_mine/models/NetPyNEShowcase/NeuroML2/nonUniformNernst/ACNet/pyr_4_sym.hoc
 jNeuroML >>  (INFO) -- Writing to mod: /home/asinha/Documents/02_Code/00_mine/models/NetPyNEShowcase/NeuroML2/nonUniformNernst/ACNet/LeakConductance_pyr.mod
 jNeuroML >>  (INFO) File /home/asinha/Documents/02_Code/00_mine/models/NetPyNEShowcase/NeuroML2/nonUniformNernst/ACNet/LeakConductance_pyr.mod exists and is identical
 jNeuroML >>  (INFO) -- Writing to mod: /home/asinha/Documents/02_Code/00_mine/models/NetPyNEShowcase/NeuroML2/nonUniformNernst/ACNet/Ih.mod
 jNeuroML >>  (INFO) File /home/asinha/Documents/02_Code/00_mine/models/NetPyNEShowcase/NeuroML2/nonUniformNernst/ACNet/Ih.mod exists and is identical
 jNeuroML >>  (INFO) -- Writing to mod: /home/asinha/Documents/02_Code/00_mine/models/NetPyNEShowcase/NeuroML2/nonUniformNernst/ACNet/Ca_conc.mod
 jNeuroML >>  (INFO) File /home/asinha/Documents/02_Code/00_mine/models/NetPyNEShowcase/NeuroML2/nonUniformNernst/ACNet/Ca_conc.mod exists and is identical
 jNeuroML >>  (INFO) Adding projections/connections...
 jNeuroML >>  (INFO) -- Writing to mod: /home/asinha/Documents/02_Code/00_mine/models/NetPyNEShowcase/NeuroML2/nonUniformNernst/ACNet/pg0.mod
 jNeuroML >>  (INFO) File /home/asinha/Documents/02_Code/00_mine/models/NetPyNEShowcase/NeuroML2/nonUniformNernst/ACNet/pg0.mod exists and is identical
 jNeuroML >>  (INFO) Trying to compile all the mods in: /home/asinha/Documents/02_Code/00_mine/models/NetPyNEShowcase/NeuroML2/nonUniformNernst/ACNet
 jNeuroML >>  (INFO) Going to compile the mod files in: /home/asinha/Documents/02_Code/00_mine/models/NetPyNEShowcase/NeuroML2/nonUniformNernst/ACNet, forcing recompile: false
 jNeuroML >>  (INFO) Parent dir: /home/asinha/Documents/02_Code/00_mine/models/NetPyNEShowcase/NeuroML2/nonUniformNernst/ACNet
 jNeuroML >>  (INFO) Assuming *nix environment...
 jNeuroML >>  (INFO) Name of file to be created: /home/asinha/Documents/02_Code/00_mine/models/NetPyNEShowcase/NeuroML2/nonUniformNernst/ACNet/x86_64/libnrnmech.la
 jNeuroML >>  (INFO) Name of file to be created: /home/asinha/Documents/02_Code/00_mine/models/NetPyNEShowcase/NeuroML2/nonUniformNernst/ACNet/x86_64/libnrnmech.so
 jNeuroML >>  (INFO) Name of file to be created: /home/asinha/Documents/02_Code/00_mine/models/NetPyNEShowcase/NeuroML2/nonUniformNernst/ACNet/x86_64/.libs/libnrnmech.so
 jNeuroML >>  (INFO) commandToExecute: /home/asinha/.local/share/virtualenvs/neuroml-311-dev/bin/nrnivmodl
 jNeuroML >>  (INFO) Found previously compiled file: /home/asinha/Documents/02_Code/00_mine/models/NetPyNEShowcase/NeuroML2/nonUniformNernst/ACNet/x86_64/libnrnmech.so
 jNeuroML >>  (INFO) Going to check if mods in /home/asinha/Documents/02_Code/00_mine/models/NetPyNEShowcase/NeuroML2/nonUniformNernst/ACNet are newer than /home/asinha/Documents/02_Code/00_mine/models/NetPyNEShowcase/NeuroML2/nonUniformNernst/ACNet/x86_64/libnrnmech.so
 jNeuroML >>  (INFO) Going to check if mods in /home/asinha/Documents/02_Code/00_mine/models/NetPyNEShowcase/NeuroML2/nonUniformNernst/ACNet are newer than /home/asinha/Documents/02_Code/00_mine/models/NetPyNEShowcase/NeuroML2/nonUniformNernst/ACNet/x86_64/.libs/libnrnmech.so
 jNeuroML >>  (INFO) Not being asked to recompile, and no mod files exist in /home/asinha/Documents/02_Code/00_mine/models/NetPyNEShowcase/NeuroML2/nonUniformNernst/ACNet which are newer than /home/asinha/Documents/02_Code/00_mine/models/NetPyNEShowcase/NeuroML2/nonUniformNernst/ACNet/x86_64/.libs/libnrnmech.so
 jNeuroML >>  (INFO) Success in compiling mods: true
 jNeuroML >>  (INFO) Have successfully executed NEURON command: [/home/asinha/.local/share/virtualenvs/neuroml-311-dev/bin/nrniv, -python, /home/asinha/Documents/02_Code/00_mine/models/NetPyNEShowcase/NeuroML2/nonUniformNernst/ACNet/LEMS_ac_neuron_nrn.py, python, /home/asinha/Documents/02_Code/00_mine/models/NetPyNEShowcase/NeuroML2/nonUniformNernst/ACNet/LEMS_ac_neuron_nrn.py]
 jNeuroML >>  (INFO) NRN Error  >>> /home/asinha/.local/share/virtualenvs/neuroml-311-dev/bin/nrniv:10: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
 jNeuroML >>  (INFO) NRN Error  >>>   from pkg_resources import working_set
 jNeuroML >>  (INFO) NRN Error  >>> NEURON -- VERSION 8.2.6 HEAD (078a34a9d) 2024-07-24
 jNeuroML >>  (INFO) NRN Error  >>> Duke, Yale, and the BlueBrain Project -- Copyright 1984-2022
 jNeuroML >>  (INFO) NRN Error  >>> See http://neuron.yale.edu/neuron/credits
 jNeuroML >>  (INFO) NRN Error  >>>
 jNeuroML >>  (INFO) NRN Error  >>> Additional mechanisms from files
 jNeuroML >>  (INFO) NRN Error  >>>  "Ca_conc.mod" "Ca_pyr.mod" "Ih.mod" "Kahp_pyr.mod" "Kdr_pyr.mod" "LeakConductance_pyr.mod" "Na_pyr.mod" "pg0.mod"
 jNeuroML >>  (INFO) NRN Output >>>     1
 jNeuroML >>  (INFO) NRN Error  >>> /home/asinha/.local/share/virtualenvs/neuroml-311-dev/bin/nrniv: syntax error
 jNeuroML >>  (INFO) NRN Error  >>>  in pyr_4_sym.hoc near line 383
 jNeuroML >>  (INFO) NRN Error  >>>      PathLengthOverAllSegs.update()
 jNeuroML >>  (INFO) NRN Error  >>>                           ^
 jNeuroML >>  (INFO) NRN Error  >>>         xopen("pyr_4_sym.hoc")
 jNeuroML >>  (INFO) NRN Error  >>>       execute1("{xopen("py...")
 jNeuroML >>  (INFO) NRN Error  >>>     load_file("pyr_4_sym.hoc")
 jNeuroML >>  (INFO) Exit value for running NEURON: 139
 jNeuroML >>  org.neuroml.model.util.NeuroMLException: Error, exit value from running this command: [[/home/asinha/.local/share/virtualenvs/neuroml-311-dev/bin/nrniv, -python, /home/asinha/Documents/02_Code/00_mine/models/NetPyNEShowcase/NeuroML2/nonUniformNernst/ACNet/LEMS_ac_neuron_nrn.py, python, /home/asinha/Documents/02_Code/00_mine/models/NetPyNEShowcase/NeuroML2/nonUniformNernst/ACNet/LEMS_ac_neuron_nrn.py]] in NEURON: 139
 jNeuroML >>    Environment variables:
...

The issue seems to be that the hoc file does not include a declaration of the variable (here PathLengthOverAllSegs).

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

No branches or pull requests

1 participant