nmodl icon indicating copy to clipboard operation
nmodl copied to clipboard

Check `pi` as a STATE variable.

Open 1uc opened this issue 1 year ago • 1 comments

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 avatar May 15 '24 06:05 1uc

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.

1uc avatar May 15 '24 11:05 1uc