nest-simulator icon indicating copy to clipboard operation
nest-simulator copied to clipboard

Potjans_2014 example hangs in Jupyter notebook during simulation

Open jhnnsnk opened this issue 4 months ago • 3 comments

Describe the bug Simulation of NEST example Potjans_2014 hangs in Jupyter notebook

To Reproduce Execute run_microcircuit.ipynb in the EBRAINS lab with the default kernel EBRAINS-24.04 (using NEST 3.7). The simulation stops at [ 24% ] Model time: 117.8 ms. There is no error message, it just hangs, but if the kernel is interrupted manually, this last time step is printed to screen. I could also reproduce it with different EBRAINS kernels (other NEST versions) and locally with NEST 3.8 on my laptop. However, running just python run_microcircuit.py from the command line works as expected; the simulation finishes in a few seconds. It is not a problem with the .ipynb version of the script; it also hangs if I just copy the content of run_microcircuit.py into a Jupyter notebook cell.

Update: The simulation runs through in the Jupyter notebook if times are not printed, nest.SetKernelStatus({"print_time": False}). Other examples, for instance, One neuron, finish as expected in the notebook if nest.SetKernelStatus({"print_time": True}).

Credit: This bug was first reported by @Sir-Bip-Bop who also discovered the relationship with "print_time".

jhnnsnk avatar Oct 04 '24 13:10 jhnnsnk