SpiNNakerManchester / sPyNNaker8

The PyNN 0.8 interface to sPyNNaker.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Remove the failed state classes and set sim.setup to cleanup

Christian-B opened this issue · comments

Related to :#373

Rational.
The FailedState and more generally globals_variables controlling the simuilator was a good choice when we had to support pynn0.7 and pynn 0.8 as well as when many of our users where 4 chip board users.

The main design choice was to not allow a second simulator.setup call in the same python run if another setup call made been made without a success end call.

This ensured we did not get users accidental calling it twice and being unsure if previous populations, projections and data still exists.

It also prevented left over state in both the simulator and the injection_decorator playing an unpredictable effect.

TODO:

  • Decide which calls should not be block in an invalid state
  • Add safety checks in
  • Add a recover if you can part to sim setup.

This work should also prevent the addition of new populations / projections between start and end.

Do you mean while the simulation is physically running i.e. between calling the run method (or run_forever) and it returning?

The prevention of adding would apply from
the when run is called until it returns
or
from when run forever is called until the simulator is sure all cores have stopped

This includes while the preparation stages like placer, router ext are running as well as while any data collection done between runs (without reset) is done.

So more than just while the cores are in the "running" state.

A second setup should already act as a end(0 followed buy a setup.

Added some logging for that in SpiNNakerManchester/SpiNNFrontEndCommon#568

Added a way that should hopefully work even if end fails in #382

So I think with those changes this is no longer a good idea.