I isolated the problem in pyNN.  If I did a setup (as I usually do to start a simulation) it loses access to the models made by nestml.  I asked the PyNN folks for support, and they said the problem was that (import pynn.nest as sim) sim.setup calls nest.Reset, which loses the access.  The solution is to use nest.Install(“modulename”).

-Chris

 

From: Babu, Pooja <p.babu@fz-juelich.de>
Sent: 19 June 2024 12:29
To: NEST User Mailing List <users@nest-simulator.org>
Subject: [NEST Users] Re: nestml syntax problem

 

Hello Chris,

 

If you want to generate the neuron models which has the same name in NEST, you can use the “suffix” option in the “generate_nest_target” function. This adds the suffix to the model name during code generation.

 

For example:

generate_nest_target(input_path=“test_model.nestml",

                     target_path="target",

                     logging_level="INFO",

                     suffix=“_nestml”)

nest.Install(“nestmlmodule”)

n = nest.Create(“test_model_nestml”)

 

We do not currently provide pyNN support for NESTML models. If you manage to run NESTML models in pyNN, do let us know.

 

Regards,

Pooja



On 19. Jun 2024, at 10:58, Chris Huyck <C.Huyck@mdx.ac.uk> wrote:

 

I seem to be having problems with pyNN accessing the new model.  I should note that the first problem is that all of the 7.0.2 nesml models are already in the standard nest.  So, it’s not clear, which version one is using.  So, I switched to the ignore_and_fire model, but changed the name to ignore_and_spike.  A simple change of file name and model name was sufficient.  I got that running in pyNest.  (It’s a really simple model to work with.)

 

I can also get it running in pyNN, but I can’t use the Setup.  If I do, it changes something and I no longer have access to ignore_and_spike model.  I’m using pyNN 0.12.3.

-Chris

 

From: Chris Huyck
Sent: 13 June 2024 16:34
To: NEST User Mailing List <users@nest-simulator.org>
Subject: RE: [NEST Users] Re: nestml syntax problem

 

This was a pretty straight forward solution.  I used the hill_tononi.nestml file below, and nestml ran and compiled.  The nest.Install works, but I can’t actually run the model.  I’ll try to sort that out.

 

So, thanks!

-Chris

 

From: Babu, Pooja <p.babu@fz-juelich.de>
Sent: 13 June 2024 11:15
To: NEST User Mailing List <users@nest-simulator.org>
Subject: [NEST Users] Re: nestml syntax problem

 

Hi Chris,

 

The keywords “model”, “OnCondition” and “OnReceieve” are all the new changes to the NESTML language which is not yet released. 

 

As I mentioned earlier, it looks like you have the NESTML 7.0.2 installed, but the model files you are using are the new ones with the language updates. The “hill_tonini” model corresponding to your version should be: https://github.com/nest/nestml/blob/v7.0.2/models/neurons/hill_tononi.nestml

 

We will fix the documentation to point to the "release version" to avoid further confusion.

 

Regards,

Pooja

 

On 13. Jun 2024, at 11:55, Chris Huyck <C.Huyck@mdx.ac.uk> wrote:

 

Hello Pooja,

Firstly, thanks for the quick response. 

I’ve taken the hill_tononi_neuron model from  Models library — NESTML documentation 1.0.0 documentation, and it gives me the an error mismatched input 'model' expecting {newline, 'neuron', 'synapse}.  I change model to neuron in the .nestml file, and I get an extraneous input ‘onCondition’ error.  If I try with izhekivich_task.nestml fromraw.githubusercontent.com/nest/nestml/master/doc/tutorials/izhikevich/izhikevich_task.nestml I get the ‘model’ error;  if I change model to neuron I get an extraneous input ‘onRecieve’ error.  Are there any working models in nestml 7.0.2 that work?

-Chris

 

 

From: Babu, Pooja <p.babu@fz-juelich.de>
Sent: 13 June 2024 10:40
To: NEST User Mailing List <users@nest-simulator.org>
Subject: [NEST Users] Re: nestml syntax problem

 

You don't often get email from p.babu@fz-juelich.de. Learn why this is important

Hello Chris, 

 

The latest release of NESTML (v7.0.2) uses the “neuron” or “synapse” at the beginning of the model definition. We have unified this in our latest changes to the language where they are replaced by “model”, however, this is not yet released.

 

It looks like you have conflicting versions of NESTML installed. I would suggest you uninstall all the old NESTML instances and install it again via pip.

 

The pip-installed version should have models that begin with either “neuron” or “synapse”. The corresponding grammar can be found here: https://github.com/nest/nestml/tree/v7.0.2/pynestml/grammars

 

Apologies for the confusion. We are in the process of doing a pre-release of the new language changes soon. 

 

Hope this helps!

 

Best regards,

Pooja




On 13. Jun 2024, at 11:11, thanh-binh.to@online.de wrote:

 

Personal I‘d like to recommend you to use the newest version of Nestml and to adapt your old neuron model to the new syntax.

For doing it you have to compare a nestml model of any neuron in the current nestml version to the old one.

Normally you have to put a word “end” at the end of each segment in model

Hope that help

BR Binh

Gesendet mit der mobilen Mail App

Am 13.06.24 um 10:59 schrieb Chris Huyck

Von: "Chris Huyck" <C.Huyck@mdx.ac.uk>
Datum: 13. Juni 2024
An: "NEST User Mailing List" <users@nest-simulator.org>
Cc: 
Betreff: [NEST Users] nestml syntax problem

 

 

I was using an old version of nest (3.5) and nestml.  Someone sent me a nestml model, and that worked.  I wanted to make my own model, but the tutorials had a different format.  In particular, it seems like the first line of code in the tutorials start with model, and the old version started with neuron of synapse.

 

 

 

 

So, I thought it was time to upgrade, so installed nest 3.7, and pip-ed nestml.  (I also installed PyNN as that's the way I typically work.) When I imported generate_target (through python 3.12), I got the typical PyGSL warning; I think that's because I'm using python 3.12 not 3.11, and I don't think it matters in this case.

 

 

 

 

Then I ran the generate_target and I got an error mismatched input 'model' expecting {newline, 'neuron', 'synapse}

 

 

 

 

I expect there's something like a yacc table that specifies the syntax, and somehow I've got the old syntax.

 

 

I've tried it with several version of nestml 7.0.2, 7.0.0, 6.0.0 and 5.0.0. I think 5.0.0 had the old syntax.   I've tried several models from the library, and the Izhikevich tutorial.

 

 

 

 

Any thoughts about how to fix it?  

 

 

-Chris

 

 

 

 

_______________________________________________
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

 

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