Hello Gustavo,

The “end” keyword was removed recently in NESTML and is not part of a release version yet. I suppose the docker container will have the last released version of NESTML (v5.2.0) which still has the “end” keyword in the models. 

The Izhikevich neuron model with “end” keyword can be found here: https://github.com/nest/nestml/blob/v5.2.0/models/neurons/izhikevich.nestml

Please try this model and let us know if you face any issues.

Thanks,
Pooja

On 12. Apr 2023, at 22:25, gustavo.patow@udg.edu wrote:

Dear all,
 While I try to solve my doubts on the other thread, I decided to try nestml on my own. For this, I installed docker and did:
wget https://raw.githubusercontent.com/steffengraber/nest-docker/master/docker-compose.yml
and then:
docker-compose up nest-jupyterlab
as explained here: https://nest-simulator.readthedocs.io/en/latest/installation/docker.html#docker

 Then, I created a silly Python file that simply does:

import matplotlib.pyplot as plt
import nest
import numpy as np
import os
from pynestml.frontend.pynestml_frontend import generate_nest_target
NEST_SIMULATOR_INSTALL_LOCATION = nest.ll_api.sli_func("statusdict/prefix ::")
generate_nest_target(input_path="izhikevich.nestml",
                    target_path="/tmp/nestml-component",
                    logging_level="ERROR",
                    codegen_opts={"nest_path": NEST_SIMULATOR_INSTALL_LOCATION})

where izhikevich.nestml is nothing else than a brute-force copy and paste of
https://github.com/nest/nestml/blob/master/models/neurons/izhikevich.nestml

 It should be trivial, but then I get:

             -- N E S T --
 Copyright (C) 2004 The NEST Initiative

Version: 3.4
Built: Mar 31 2023 12:33:35

This program is provided AS IS and comes with
NO WARRANTY. See the file LICENSE for details.

Problems or suggestions?
  Visit https://www.nest-simulator.org

Type 'nest.help()' to find out more about NEST.

WARNING:root:PyGSL is not available. The stiffness test will be skipped.
WARNING:root:Error when importing: No module named 'pygsl'
line 44:4 extraneous input 'equations' expecting {NEWLINE, 'end', 'inline', 'recordable', NAME}
line 48:4 extraneous input 'parameters' expecting {NEWLINE, 'end', 'inline', 'recordable', 'kernel', NAME}
line 59:4 missing 'end' at 'input'
line 63:4 extraneous input 'output' expecting {NEWLINE, 'end', NAME}
line 77:24 mismatched input '<EOF>' expecting {'end', 'elif', 'else'}
[6,GLOBAL, ERROR]: Error occurred during parsing: abort
Traceback (most recent call last):
 File "/opt/data/Izhikevich.py", line 10, in <module>
   generate_nest_target(input_path="izhikevich.nestml",
 File "/usr/local/lib/python3.10/dist-packages/pynestml/frontend/pynestml_frontend.py", line 229, in generate_nest_target
   generate_target(input_path, target_platform="NEST", target_path=target_path, logging_level=logging_level,
 File "/usr/local/lib/python3.10/dist-packages/pynestml/frontend/pynestml_frontend.py", line 199, in generate_target
   raise Exception("Error(s) occurred while processing the model")
Exception: Error(s) occurred while processing the model

 which I do not understand. The syntaxis of nestml seems clear, no "end", right? Then, what am I doing wrong?
 Thanks!
gus.-
PS: I still have my doubts, as explained in the other thread, but I thought this is a different issue... sorry if I did wrong!!!
_______________________________________________
NEST Users mailing list -- users@nest-simulator.org
To unsubscribe send an email to users-leave@nest-simulator.org