Hi,
after following the guide in "https://nestml.readthedocs.io/en/latest/installation.html" related to the NESTML installation, I tried to follow the NESTML Izhikevich tutorial in "https://nestml.readthedocs.io/en/latest/tutorials/izhikevich/nestml_izhikevi...". After installing the cmake with "pip install cmake", when I execute the following part of the tutorial:
generate_nest_target(input_path="izhikevich_solution.nestml", target_path="/tmp/nestml-component", logging_level="ERROR", codegen_opts={"nest_path": NEST_SIMULATOR_INSTALL_LOCATION})
I obtain the following error:
line 3:2 extraneous input 'state' expecting {<EOF>, NEWLINE, 'neuron', 'synapse'} line 4:4 extraneous input 'v' expecting {<EOF>, NEWLINE, 'neuron', 'synapse'} line 8:2 extraneous input 'equations' expecting {<EOF>, NEWLINE, 'neuron', 'synapse'} line 9:4 extraneous input 'v' expecting {<EOF>, NEWLINE, 'neuron', 'synapse'} line 10:4 extraneous input 'u' expecting {<EOF>, NEWLINE, 'neuron', 'synapse'} line 11:2 extraneous input 'end' expecting {<EOF>, NEWLINE, 'neuron', 'synapse'} line 13:2 extraneous input 'parameters' expecting {<EOF>, NEWLINE, 'neuron', 'synapse'} line 14:4 extraneous input 'a' expecting {<EOF>, NEWLINE, 'neuron', 'synapse'} line 20:2 extraneous input 'input' expecting {<EOF>, NEWLINE, 'neuron', 'synapse'} line 21:4 extraneous input 'spikes' expecting {<EOF>, NEWLINE, 'neuron', 'synapse'} line 22:4 extraneous input 'I_e' expecting {<EOF>, NEWLINE, 'neuron', 'synapse'} line 23:2 extraneous input 'end' expecting {<EOF>, NEWLINE, 'neuron', 'synapse'} line 25:2 extraneous input 'output' expecting {<EOF>, NEWLINE, 'neuron', 'synapse'} line 27:2 extraneous input 'update' expecting {<EOF>, NEWLINE, 'neuron', 'synapse'} line 28:4 extraneous input 'integrate_odes' expecting {<EOF>, NEWLINE, 'neuron', 'synapse'} line 31:4 extraneous input 'v' expecting {<EOF>, NEWLINE, 'neuron', 'synapse'} line 34:4 extraneous input 'if' expecting {<EOF>, NEWLINE, 'neuron', 'synapse'} line 35:6 extraneous input 'v' expecting {<EOF>, NEWLINE, 'neuron', 'synapse'} line 36:6 extraneous input 'u' expecting {<EOF>, NEWLINE, 'neuron', 'synapse'} line 37:6 extraneous input 'emit_spike' expecting {<EOF>, NEWLINE, 'neuron', 'synapse'} line 38:4 extraneous input 'end' expecting {<EOF>, NEWLINE, 'neuron', 'synapse'} line 40:2 extraneous input 'end' expecting {<EOF>, NEWLINE, 'neuron', 'synapse'} line 42:0 extraneous input 'end' expecting {<EOF>, NEWLINE, 'neuron', 'synapse'} [5,GLOBAL, ERROR]: Error occurred during parsing: abort --------------------------------------------------------------------------- CalledProcessError Traceback (most recent call last) /opt/data/nestml/pynestml/codegeneration/nest_builder.py in build(self) 149 try: --> 150 subprocess.check_call(make_all_cmd, stderr=subprocess.STDOUT, shell=shell, 151 cwd=str(os.path.join(target_path)))
/usr/lib/python3.8/subprocess.py in check_call(*popenargs, **kwargs) 363 cmd = popenargs[0] --> 364 raise CalledProcessError(retcode, cmd) 365 return 0
CalledProcessError: Command '['make', 'all']' returned non-zero exit status 2.
During handling of the above exception, another exception occurred:
GeneratedCodeBuildException Traceback (most recent call last) <ipython-input-5-5d459438a659> in <module> ----> 1 generate_nest_target(input_path="izhikevich_solution.nestml", 2 target_path="/tmp/nestml-component", 3 logging_level="ERROR", 4 codegen_opts={"nest_path": NEST_SIMULATOR_INSTALL_LOCATION})
/opt/data/nestml/pynestml/frontend/pynestml_frontend.py in generate_nest_target(input_path, target_path, install_path, logging_level, module_name, store_log, suffix, dev, codegen_opts) 181 A dictionary containing additional options for the target code generator. 182 """ --> 183 generate_target(input_path, target_platform="NEST", target_path=target_path, logging_level=logging_level, 184 module_name=module_name, store_log=store_log, suffix=suffix, install_path=install_path, 185 dev=dev, codegen_opts=codegen_opts)
/opt/data/nestml/pynestml/frontend/pynestml_frontend.py in generate_target(input_path, target_platform, target_path, install_path, logging_level, module_name, store_log, suffix, dev, codegen_opts) 150 FrontendConfiguration.set_codegen_opts(codegen_opts) 151 --> 152 if not process() == 0: 153 raise Exception("Error(s) occurred while processing the model") 154
/opt/data/nestml/pynestml/frontend/pynestml_frontend.py in process() 278 options=FrontendConfiguration.get_codegen_opts()) 279 if _builder is not None: --> 280 _builder.build() 281 282 if FrontendConfiguration.store_log:
/opt/data/nestml/pynestml/codegeneration/nest_builder.py in build(self) 151 cwd=str(os.path.join(target_path))) 152 except subprocess.CalledProcessError as e: --> 153 raise GeneratedCodeBuildException('Error occurred during 'make all'! More detailed error messages can be found in stdout.') 154 155 # finally execute make install
GeneratedCodeBuildException: Error occurred during 'make all'! More detailed error messages can be found in stdout.
I can't solve it. Can anyone help me?
Hi,
Could you please check that you're running the latest version? Note that you have to supply the ``--pre`` flag when installing using pip.
import pynestml pynestml.__version__
'5.0.0-rc1-post-dev'
Cheers, Charl
On Mon, Feb 28, 2022, at 10:55, Salvo T wrote:
Hi,
after following the guide in "https://nestml.readthedocs.io/en/latest/installation.html" related to the NESTML installation, I tried to follow the NESTML Izhikevich tutorial in "https://nestml.readthedocs.io/en/latest/tutorials/izhikevich/nestml_izhikevi...". After installing the cmake with "pip install cmake", when I execute the following part of the tutorial:
generate_nest_target(input_path="izhikevich_solution.nestml", target_path="/tmp/nestml-component", logging_level="ERROR", codegen_opts={"nest_path": NEST_SIMULATOR_INSTALL_LOCATION})
I obtain the following error:
line 3:2 extraneous input 'state' expecting {<EOF>, NEWLINE, 'neuron', 'synapse'} line 4:4 extraneous input 'v' expecting {<EOF>, NEWLINE, 'neuron', 'synapse'} line 8:2 extraneous input 'equations' expecting {<EOF>, NEWLINE, 'neuron', 'synapse'} line 9:4 extraneous input 'v' expecting {<EOF>, NEWLINE, 'neuron', 'synapse'} line 10:4 extraneous input 'u' expecting {<EOF>, NEWLINE, 'neuron', 'synapse'} line 11:2 extraneous input 'end' expecting {<EOF>, NEWLINE, 'neuron', 'synapse'} line 13:2 extraneous input 'parameters' expecting {<EOF>, NEWLINE, 'neuron', 'synapse'} line 14:4 extraneous input 'a' expecting {<EOF>, NEWLINE, 'neuron', 'synapse'} line 20:2 extraneous input 'input' expecting {<EOF>, NEWLINE, 'neuron', 'synapse'} line 21:4 extraneous input 'spikes' expecting {<EOF>, NEWLINE, 'neuron', 'synapse'} line 22:4 extraneous input 'I_e' expecting {<EOF>, NEWLINE, 'neuron', 'synapse'} line 23:2 extraneous input 'end' expecting {<EOF>, NEWLINE, 'neuron', 'synapse'} line 25:2 extraneous input 'output' expecting {<EOF>, NEWLINE, 'neuron', 'synapse'} line 27:2 extraneous input 'update' expecting {<EOF>, NEWLINE, 'neuron', 'synapse'} line 28:4 extraneous input 'integrate_odes' expecting {<EOF>, NEWLINE, 'neuron', 'synapse'} line 31:4 extraneous input 'v' expecting {<EOF>, NEWLINE, 'neuron', 'synapse'} line 34:4 extraneous input 'if' expecting {<EOF>, NEWLINE, 'neuron', 'synapse'} line 35:6 extraneous input 'v' expecting {<EOF>, NEWLINE, 'neuron', 'synapse'} line 36:6 extraneous input 'u' expecting {<EOF>, NEWLINE, 'neuron', 'synapse'} line 37:6 extraneous input 'emit_spike' expecting {<EOF>, NEWLINE, 'neuron', 'synapse'} line 38:4 extraneous input 'end' expecting {<EOF>, NEWLINE, 'neuron', 'synapse'} line 40:2 extraneous input 'end' expecting {<EOF>, NEWLINE, 'neuron', 'synapse'} line 42:0 extraneous input 'end' expecting {<EOF>, NEWLINE, 'neuron', 'synapse'} [5,GLOBAL, ERROR]: Error occurred during parsing: abort
CalledProcessError Traceback (most recent call last) /opt/data/nestml/pynestml/codegeneration/nest_builder.py in build(self) 149 try: --> 150 subprocess.check_call(make_all_cmd, stderr=subprocess.STDOUT, shell=shell, 151 cwd=str(os.path.join(target_path)))
/usr/lib/python3.8/subprocess.py in check_call(*popenargs, **kwargs) 363 cmd = popenargs[0] --> 364 raise CalledProcessError(retcode, cmd) 365 return 0
CalledProcessError: Command '['make', 'all']' returned non-zero exit status 2.
During handling of the above exception, another exception occurred:
GeneratedCodeBuildException Traceback (most recent call last) <ipython-input-5-5d459438a659> in <module> ----> 1 generate_nest_target(input_path="izhikevich_solution.nestml", 2 target_path="/tmp/nestml-component", 3 logging_level="ERROR", 4 codegen_opts={"nest_path": NEST_SIMULATOR_INSTALL_LOCATION})
/opt/data/nestml/pynestml/frontend/pynestml_frontend.py in generate_nest_target(input_path, target_path, install_path, logging_level, module_name, store_log, suffix, dev, codegen_opts) 181 A dictionary containing additional options for the target code generator. 182 """ --> 183 generate_target(input_path, target_platform="NEST", target_path=target_path, logging_level=logging_level, 184 module_name=module_name, store_log=store_log, suffix=suffix, install_path=install_path, 185 dev=dev, codegen_opts=codegen_opts)
/opt/data/nestml/pynestml/frontend/pynestml_frontend.py in generate_target(input_path, target_platform, target_path, install_path, logging_level, module_name, store_log, suffix, dev, codegen_opts) 150 FrontendConfiguration.set_codegen_opts(codegen_opts) 151 --> 152 if not process() == 0: 153 raise Exception("Error(s) occurred while processing the model") 154
/opt/data/nestml/pynestml/frontend/pynestml_frontend.py in process() 278 options=FrontendConfiguration.get_codegen_opts()) 279 if _builder is not None: --> 280 _builder.build() 281 282 if FrontendConfiguration.store_log:
/opt/data/nestml/pynestml/codegeneration/nest_builder.py in build(self) 151 cwd=str(os.path.join(target_path))) 152 except subprocess.CalledProcessError as e: --> 153 raise GeneratedCodeBuildException('Error occurred during 'make all'! More detailed error messages can be found in stdout.') 154 155 # finally execute make install
GeneratedCodeBuildException: Error occurred during 'make all'! More detailed error messages can be found in stdout.
I can't solve it. Can anyone help me? _______________________________________________ NEST Users mailing list -- users@nest-simulator.org To unsubscribe send an email to users-leave@nest-simulator.org
Hmm, that looks fine (you grabbed the latest development version from git). And I trust you ran the "pynestml.__version__" in the same notebook as the Izhikevich tutorial? Did you start the notebook server from a "neutral" directory (like /tmp, or home, or another place that does not itself contain a directory named "pynestml")?
On Mon, Feb 28, 2022, at 11:07, Salvo T wrote:
Hi,
If I run: import pynestml pynestml.__version__
I obtain: '5.0.0-rc1-post-dev' _______________________________________________ NEST Users mailing list -- users@nest-simulator.org To unsubscribe send an email to users-leave@nest-simulator.org
I answer to your questions:
1) And I trust you ran the "pynestml.__version__" in the same notebook as the Izhikevich tutorial? Yes, I did.
2) Did you start the notebook server from a "neutral" directory (like /tmp, or home, or another place that does not itself contain a directory named "pynestml")? My 'Iz.ipynb' file, where the Iz. tutorial code is written, is located inside the 'nestml' folder that was created after the NESTML installing process. If I copy and paste 'Iz.ipynb' in another folder I obtain:
ImportError Traceback (most recent call last) <ipython-input-1-15d9cc694aa4> in <module> 5 import os 6 ----> 7 from pynestml.frontend.pynestml_frontend import generate_nest_target 8 9 NEST_SIMULATOR_INSTALL_LOCATION = nest.ll_api.sli_func("statusdict/prefix ::")
ImportError: cannot import name 'generate_nest_target' from 'pynestml.frontend.pynestml_frontend' (/root/.local/lib/python3.8/site-packages/pynestml/frontend/pynestml_frontend.py)