ctn-archive / nengo_spinnaker_2014

SpiNNaker backend for Nengo -- now obsolete. See instead https://github.com/project-rig/nengo_spinnaker
MIT License
0 stars 1 forks source link

Pause Simulator #52

Open mundya opened 10 years ago

mundya commented 10 years ago

Allow the simulator to run for a period of time, have the user do something else, and then run again.

Issue with this is clearing the board when done. At the moment we do this at the end of the run method call, but this won't be possible if run is supposed to end in a pause. We could intercept the garbage collector call on the Simulator, but this is flaky at best. I guess we could just clean the board when we start the simulation and when people reset the Simulator?

Thoughts?

I think this is a feature to work on after Telluride.

mundya commented 10 years ago

@mossblaser - thoughts?

The biggest issue is definitely what we do with necessarily fixed and finite probe regions of memory, and function of time regions of memory. Though both of these cases only exist because IO is slow...

mossblaser commented 10 years ago

I would argue that pausable simulations will also be unbounded runtime simulations. From what I can see, nengo's simulator doesn't have a proper mechanism for dealing with infinitely running simulations nor "proper" pausing (see below) so presumably this is something for which an API is to be defined.

At present, pausing (and indeed simulation speed control) is implemented by wrapping nodes in something which check to see if simulation time is running ahead of GUI time, if it is the node code busy[ish]loops until the GUI catches up (or un-pauses). Clearly this isn't a viable mechanism for SpiNNaker, nor presumably for the future generally.

mundya commented 10 years ago

Ok, we may have been talking at cross purposes, I was thinking of the models that go something like:

sim.run(5.)

# Do some stuff

sim.run(3.)

# Do some other stuff

I'm guessing the GUI just has a pause button? (I haven't actually tried it...)

mossblaser commented 10 years ago

The GUI has a pause button though its implementation is based on the same "block a node when you get ahead" mechanism. The sort of interrupt-based pausing is a different problem again, of course!

Jonathan

On 13 June 2014 20:55, Andrew Mundy notifications@github.com wrote:

Ok, we may have been talking at cross purposes, I was thinking of the models that go something like:

sim.run(5.)

Do some stuff

sim.run(3.)

Do some other stuff

I'm guessing the GUI just has a pause button? (I haven't actually tried it...)

— Reply to this email directly or view it on GitHub https://github.com/ctn-waterloo/nengo_spinnaker/issues/52#issuecomment-46053218 .