Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure that ResetKernel resets off_grid_spiking_ #716

merged 3 commits into from May 9, 2017


Copy link

suku248 commented May 5, 2017

The default of the kernel parameter off_grid_spiking_ is false. The parameter can be altered by the user and it is automatically set to true if a precise neuron model is created.

So far, ResetKernel did not result in a reset of off_grid_spiking_ to false, which I find counterintuitive.

@suku248 suku248 force-pushed the suku248:reset_offgrid_spiking branch from 90d6501 to 2aa05be May 5, 2017
@@ -69,6 +69,8 @@ EventDeliveryManager::~EventDeliveryManager()
off_grid_spiking_ =
false; // ensures that ResetKernel resets off_grid_spiking_

This comment has been minimized.


heplesser May 8, 2017 Contributor

I think it would be nicer to place the comment before the statement, so that the statement itself fits on a single line.

This comment has been minimized.


suku248 May 8, 2017 Author Contributor


Copy link

heplesser commented May 8, 2017

@suku248 Thanks for detecting this! But somehow this makes test_spike_generator.sli fail. That may be due to a weakness in the test.

I also noticed that initialization and reset of EventDeliveryManager appears to be implemented inconsistently. From a quick check, it appears that

  • secondary_event_buffer_ is not initialized in the constructor
  • secondary_event_buffer_, spike_register_, offgrid_spike_register_, displacements_ and comm_marker_ are neither reset in finalize() or initialize()
  • All of those except comm_marker_ are cleared by cofigure_spike_buffers(), but that is called directly only from reset_network(), prepare_simulation() and set_status().

Could you check that all is well and add a comment why we do not need to reset those members explicitly (or fix the code if we do ...)?

Copy link
Contributor Author

suku248 commented May 8, 2017

The problem with the test was that two of the sub-tests required precise_times of the spike_detector to be true such that offsets could be retrieved from the spike_detector after the simulation. However, the two sub-tests did neither explicitly set precise_times to true nor globally enable off_grid_spiking. The test worked before as another (earlier) sub-test enables off_grid_spiking and ResetKernel at the beginning of the two sub-tests did not reset off_grid_spiking to false.

I agree that initialization and reset of the EventDeliveryManager need some code review but not as part of this PR. I have opened issue #717.

Copy link

heplesser commented May 9, 2017

@suku248 Thanks for fixing the test and for opening #717!

Copy link

jakobj commented May 9, 2017

Looks good! 👍 from me

jakobj approved these changes May 9, 2017
@heplesser heplesser merged commit 7d3c92f into nest:master May 9, 2017
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
@suku248 suku248 deleted the suku248:reset_offgrid_spiking branch May 10, 2017
apdavison added a commit to apdavison/PyNN that referenced this pull request Nov 26, 2018
pgleeson added a commit to pgleeson/PyNN that referenced this pull request Mar 19, 2019
* master:
  Add more information about random numbers (cf NeuralEnsemble#621)
  Update installation docs to reflect support for NEST 2.16.0
  FromListConnector now accepts empty lists, as it is supposed to.
  ...aaand forgot to add this too.
  Release 0.9.3
  Documentation update
  Forgot to add this to Git when doing the last release
  Fixed outdated documentation
  Don't use `close_fds=True`
  More robust test (changed connection ordering in NEST 2.16.0 should not break test)
  Workaround for what seems to be a regression in NEST 2.16.0
  Partially fixed a bug revealed by the stricter range checking of Neo 0.7.
  It appears that in NEST 2.16.0, "threads" must be set before "spike_precision"
  Trying to fix problem caused by nest/nest-simulator#716
  Updating NEST extension models to work with NEST 2.16
  Testing with NEST 2.16
  Added quorum requirement.
  Added document on project governance
  Added example of using IntFire1 model
  Added support for NEURON "ARTIFICIAL_CELL"-type neuron models.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.