BlueBrain / nmodl

Code Generation Framework For NEURON MODeling Language
https://bluebrain.github.io/nmodl/
Apache License 2.0
48 stars 15 forks source link

Check `pi` as a STATE variable. #1264

Open 1uc opened 1 month ago

1uc commented 1 month ago

NMODL seems to allow the following:

NEURON {
    SUFFIX state_pi
}

STATE {
    omicron
    pi
}

BREAKPOINT {
    SOLVE state METHOD sparse
}

KINETIC state {
    ~ omicron <-> pi (1, 1)
}

However, we also find code that sets up double * pi = &coreneuron::pi. It might make sense to find the test that asserts the correct behaviour.

1uc commented 1 month ago

Fails as follows (sometimes):

x86_64/corenrn/mod2c/variable_names.cpp:155:20: error: redeclaration of ‘double* coreneuron::variable_names_Instance::pi’
  155 |         double* pi{};
      |                    ^

Likely a better error message would be good.