Hi Jona,

Sorry about the error. It might be related to the conda environment; the issue seems to be that there is an error during compilation, but the error message is not shown in these logs. Could you check in your terminal (that you used to launch the Jupyter notebook server) for the error messages from gcc?

Cheers,
Charl


On Wed, Sep 11, 2024, at 22:06, Jona Scholz wrote:
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"]:

On Tue, Sep 10, 2024 at 9:33 AM Anno Kurth <a.kurth@fz-juelich.de> wrote:
Hi Jona,

you might also be interested in the leaky integrate-and-fire model with
adaptive threshold
[https://nest-simulator.readthedocs.io/en/latest/models/mat2_psc_exp.html].
Here, the voltage is not reset after a threshold crossing, though.

Best

Anno

On 10.09.24 09:15, Charl Linssen wrote:
> Hi Jona,
>
> Thanks for writing in! Could the NESTML model(s) used in the tutorial at https://nestml.readthedocs.io/en/latest/tutorials/spike_frequency_adaptation/nestml_spike_frequency_adaptation_tutorial.html be what you're looking for? In general, it's easy to take a NESTML model (see https://nestml.readthedocs.io/en/latest/models_library/index.html) and add a threshold adaptation mechanism to it. Please let us know how you fare! (Please make sure you're using the latest NESTML, v8.0.0-rc1 or the GitHub master version.)
>
> With kind regards,
> Charl
>
> On Tue, Sep 10, 2024, at 08:09, jona.m.scholz@gmail.com wrote:
>> Hello everyone,
>>
>> just a quick question in case anybody knows: is there a LIF model that
>> has an adaptive spike threshold in NEST?
>>
>> I know there's the GLIF model which can have a threshold, but it seems
>> to bring other deviations from the conventional LIF model that I want
>> to avoid. There's also the adaptive exponential integrate and fire
>> model, but again I don't want the exponential part.
>>
>> It's not a problem if no such model exists in NEST, I am only asking so
>> I don't reimplement an existing model.
>>
>> Any feedback would be appreciated.
>>
>> Kind regards,
>> Jona
>> _______________________________________________
>> NEST Users mailing list -- users@nest-simulator.org
>> To unsubscribe send an email to users-leave@nest-simulator.org
> _______________________________________________
> NEST Users mailing list -- users@nest-simulator.org
> To unsubscribe send an email to users-leave@nest-simulator.org

--
Anno Kurth
Institute for Advanced Simulation (IAS-6)
Computational and Systems Neuroscience
Jülich Research Centre
Jülich, Germany

Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDir Stefan Müller
Geschäftsführung: Prof. Dr. Astrid Lambrecht (Vorsitzende),
Karsten Beneke (stellv. Vorsitzender), Dr. Ir. Pieter Jansens

_______________________________________________
NEST Users mailing list -- users@nest-simulator.org
To unsubscribe send an email to users-leave@nest-simulator.org
_______________________________________________
NEST Users mailing list -- users@nest-simulator.org
To unsubscribe send an email to users-leave@nest-simulator.org