Repository navigation
Fix get_data() hanging on NEST when an MPI process has no cells of a population - #867
Merged
apdavison merged 1 commit intoNov 19, 2026
Merged
Conversation
…population On a process with no local cells, id_to_index() failed on the empty array of spike source IDs, so the other processes waited forever in gather(). Checked with the script from NeuralEnsemble#767 on 2, 3 and 4 processes. Fixes NeuralEnsemble#767
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With NEST,
get_data()hangs when a population has fewer cells than there are MPI processes. On a process with no cells of the population,Population.id_to_index()is called with an empty array of spike source IDs and fails, so the other processes wait forever ingather().Here, we make
id_to_index()return an empty array in that case. The script from #767 now runs on 2, 3 and 4 processes. NEURON is not affected, since its recorder returns spike times as a dict, which takes a different code path. Arbor's recorder takes the same path as NEST's, so it was probably affected too, but this has not been tested with MPI.The new unit test fakes MPI process 2 of 3 with the mock backend, and fails without the fix with the error seen in #767.
The cause identified in #767 (only some MPI processes reading NEST's current time) no longer applies on master.
Fixes #767