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

Count local devices for each thread #1443

Merged
merged 3 commits into from
Mar 11, 2020

Conversation

stinebuu
Copy link
Contributor

This PR fixes #1409.

When creating devices, the number of local devices are counted. With NEST 3.0, the counting happens in parallell, but not in a thread safe way, so sometimes the threads might overwrite the variable. Then we get a problem with device ids, which in return can mess up spike delivery.

With this PR we now create a vector for the counting instead, so each thread keep track of the number of devices on the thread.

@lionelkusch could you check if this fixes your issue?

@heplesser heplesser added this to the NEST 3.0 milestone Feb 26, 2020
@heplesser heplesser added ZC: Kernel DO NOT USE THIS LABEL I: No breaking change Previously written code will work as before, no one should note anything changing (aside the fix) ZP: PR Created DO NOT USE THIS LABEL S: Critical Needs to be addressed immediately T: Bug Wrong statements in the code or documentation labels Feb 26, 2020
@heplesser
Copy link
Contributor

@stinebuu Nice detective work :)!

Copy link
Contributor

@hakonsbm hakonsbm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! I have just a small suggestion.

Co-Authored-By: Håkon Bakke Mørk <[email protected]>
Copy link
Contributor

@jougs jougs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Many thanks!

@jougs jougs merged commit 2713e80 into nest:master Mar 11, 2020
@stinebuu stinebuu deleted the bld_issue1409_thread_devices branch March 12, 2020 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I: No breaking change Previously written code will work as before, no one should note anything changing (aside the fix) S: Critical Needs to be addressed immediately T: Bug Wrong statements in the code or documentation ZC: Kernel DO NOT USE THIS LABEL ZP: PR Created DO NOT USE THIS LABEL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nest 3 : Problem of reproducibility and extrem firing rate of neurons
4 participants