nest / nestml

A domain specific language for neuron and synapse models in spiking neural network simulation
GNU General Public License v2.0
46 stars 45 forks source link

Fix NEST initialisation #1053

Closed clinssen closed 4 months ago

clinssen commented 4 months ago

There is an issue with initialisation of the neuron class:

The constructor calls init_state_internal_() which calls pre_run_hook(), which calls recompute_internal_variables(). But the latter depends on the parameters being initialised, which is done only afterwards in init_state_internal_(). Thus, recompute_internal_variables() might try to initialise internal variables based on uninitialised parameter values. These values are anyway later recomputed when NEST Simulator calls pre_run_hook(), so this PR simply removes the extra unncessary call to pre_run_hook().