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
merged 3 commits into from May 9, 2017

Conversation

Projects
None yet
3 participants
@suku248
Contributor

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.

@heplesser

This comment has been minimized.

Show comment
Hide comment
@heplesser

heplesser May 8, 2017

Contributor

@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 ...)?

Contributor

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 ...)?

@suku248

This comment has been minimized.

Show comment
Hide comment
@suku248

suku248 May 8, 2017

Contributor

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.

Contributor

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.

@heplesser

This comment has been minimized.

Show comment
Hide comment
@heplesser

heplesser May 9, 2017

Contributor

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

Contributor

heplesser commented May 9, 2017

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

@jakobj

This comment has been minimized.

Show comment
Hide comment
@jakobj

jakobj May 9, 2017

Contributor

Looks good! 👍 from me

Contributor

jakobj commented May 9, 2017

Looks good! 👍 from me

@jakobj

jakobj approved these changes May 9, 2017

@heplesser heplesser merged commit 7d3c92f into nest:master May 9, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@suku248 suku248 deleted the suku248:reset_offgrid_spiking branch May 10, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment