Dear Charl and Anno,
Thank you for your replies.
I hadn't heard about neurons that don't reset and will have to look into it more. Thank you :)
I can't seem to run the SFA neuron tutorial linked in Charl's reply. It fails in the first call to NESTCodeGeneratorUtils.generate_code_for(...) with an error found below. I have tried it on two Ubuntu systems using NestML versions 8.0.0-rc1 and 8.0.0-rc2 with the iaf_psc_alpha_neuron.nestml model from the NestML master branch. It is probably just some technical problem on my end and I'm sure I will be able to resolve it soon. Nonetheless, if anyone spots something obvious in the error message below, please let me know.
Thanks for your help and have a great day!
Kind regards,
Jona
The error message:
---------------------------------------------------------------------------
CalledProcessError Traceback (most recent call last)
File ~/miniconda3/envs/neuro/lib/python3.10/site-packages/pynestml/codegeneration/nest_builder.py:174, in NESTBuilder.build(self)
173 current_stage = "build"
--> 174 subprocess.check_call(make_all_cmd, stderr=stderr, stdout=stdout, shell=shell,
175 cwd=str(os.path.join(target_path)))
176 current_stage = "install"
File ~/miniconda3/envs/neuro/lib/python3.10/subprocess.py:369, in check_call(*popenargs, **kwargs)
368 cmd = popenargs[0]
--> 369 raise CalledProcessError(retcode, cmd)
370 return 0
CalledProcessError: Command '['make', '-j8', 'all']' returned non-zero exit status 2.
During handling of the above exception, another exception occurred:
GeneratedCodeBuildException Traceback (most recent call last)
Cell In[2], line 3
1 # generate and build code
2 module_name_no_sfa, neuron_model_name_no_sfa = \
----> 3 NESTCodeGeneratorUtils.generate_code_for("iaf_psc_alpha_neuron.nestml")
File ~/miniconda3/envs/neuro/lib/python3.10/site-packages/pynestml/codegeneration/nest_code_generator_utils.py:136, in NESTCodeGeneratorUtils.generate_code_for(cls, nestml_neuron_model, nestml_synapse_model, module_name, target_path, post_ports, mod_ports, codegen_opts, logging_level)
133 uniq_id = str(uuid.uuid4().hex)
134 module_name = "nestml_" + uniq_id + "_module"
--> 136 generate_nest_target(input_path=input_fns,
137 install_path=install_path,
138 logging_level=logging_level,
139 module_name=module_name,
140 target_path=target_path,
141 suffix="_nestml",
142 codegen_opts=_codegen_opts)
144 if nestml_synapse_model:
145 return module_name, mangled_neuron_name, mangled_synapse_name
File ~/miniconda3/envs/neuro/lib/python3.10/site-packages/pynestml/frontend/pynestml_frontend.py:270, in generate_nest_target(input_path, target_path, install_path, logging_level, module_name, store_log, suffix, dev, codegen_opts)
243 def generate_nest_target(input_path: Union[str, Sequence[str]], target_path: Optional[str] = None,
244 install_path: Optional[str] = None, logging_level="ERROR",
245 module_name=None, store_log: bool = False, suffix: str = "",
246 dev: bool = False, codegen_opts: Optional[Mapping[str, Any]] = None):
247 r"""Generate and build code for NEST Simulator.
248
249 Parameters
(...)
268 A dictionary containing additional options for the target code generator.
269 """
--> 270 generate_target(input_path, target_platform="NEST", target_path=target_path, logging_level=logging_level,
271 module_name=module_name, store_log=store_log, suffix=suffix, install_path=install_path,
272 dev=dev, codegen_opts=codegen_opts)
File ~/miniconda3/envs/neuro/lib/python3.10/site-packages/pynestml/frontend/pynestml_frontend.py:193, in generate_target(input_path, target_platform, target_path, install_path, logging_level, module_name, store_log, suffix, dev, codegen_opts)
165 r"""Generate and build code for the given target platform.
166
167 Parameters
(...)
188 A dictionary containing additional options for the target code generator.
189 """
191 configure_front_end(input_path, target_platform, target_path, install_path, logging_level,
192 module_name, store_log, suffix, dev, codegen_opts)
--> 193 if not process() == 0:
194 raise Exception("Error(s) occurred while processing the model")
File ~/miniconda3/envs/neuro/lib/python3.10/site-packages/pynestml/frontend/pynestml_frontend.py:482, in process()
480 # perform build
481 if _builder is not None:
--> 482 _builder.build()
484 if FrontendConfiguration.store_log:
485 store_log_to_file()
File ~/miniconda3/envs/neuro/lib/python3.10/site-packages/pynestml/codegeneration/nest_builder.py:181, in NESTBuilder.build(self)
177 subprocess.check_call(make_install_cmd, stderr=stderr, stdout=stdout, shell=shell,
178 cwd=str(os.path.join(target_path)))
180 except subprocess.CalledProcessError as e:
--> 181 raise GeneratedCodeBuildException(stages_exception[current_stage])
183 finally:
184 if self._options["redirect"]: