-
Notifications
You must be signed in to change notification settings - Fork 391
Description
Following #2990, the model registration and the semantics of ResetKernel() have changed. After incorporating these changes to NESTML models, the tests fail when there are multiple calls to the ResetKernel(). For example,
nest.ResetKernel()
nest.Install("nestmlmodule")
nrn = nest.Create(“neuron1”)
...
nest.Simulate(100.)
...
nest.ResetKernel() # removes the neuron1 and neuron2 from the list of registered models
# nest.Install("nestmlmodule”) # Error: Module 'nestmlmodule' is loaded already.
nrn = nest.Create(“neuron2”) # Neuron cannot be created - Unknown neuron modelIn the above example nestmlmodule is an external module consisting of models neuron1 and neuron2. According to the new semantics of ResetKernel(), a call to the function deregisters the models loaded from an external module. Due to this, the second call to ResetKernel() de-registers neuron1 and neuron2 which were previously installed from the nest.Install() call. Hence, the neuron2 cannot be created and the script fails.
A second call to nest.Install() after the second ResetKernel() also fails as the same module cannot be loaded again. This is a known error as the external modules are still wrapped as SLI modules and can't be unloaded/reloaded.
As a result of these issues, the NESTML master breaks with the latest NEST master. Therefore, for the new model registration to work with NESTML, the module unloading/reloading needs to be in place.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status