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

ConnBuilder loop_over_targets() does not work as intended #3106

Open
heplesser opened this issue Feb 17, 2024 · 2 comments
Open

ConnBuilder loop_over_targets() does not work as intended #3106

heplesser opened this issue Feb 17, 2024 · 2 comments
Labels
I: No breaking change Previously written code will work as before, no one should note anything changing (aside the fix) S: High Should be handled next stale Automatic marker for inactivity, please have another look here T: Bug Wrong statements in the code or documentation
Projects

Comments

@heplesser
Copy link
Contributor

heplesser commented Feb 17, 2024

Following Ippen et al (2017, Sec 3.2), ConnBuilders should loop over local nodes instead of over targets when the number of local nodes is smaller than the target population. Unfortunately, ever since 20b8f33, the loop_over_targets() method looks like this (see here in context)

bool
nest::ConnBuilder::loop_over_targets_() const
{
  return targets_->size() < kernel().node_manager.size() or not targets_->is_range()
    or parameters_requiring_skipping_.size() > 0;
}

Here, kernel().node_manager.size() returns the size of the entire network, so the condition will always be true unless targets contains the entire network. This is not what is intended.

I have not checked fully, but I believe we should compare targets.size() to the number of nodes on the pertaining thread.

@heplesser heplesser added T: Bug Wrong statements in the code or documentation S: High Should be handled next I: No breaking change Previously written code will work as before, no one should note anything changing (aside the fix) labels Feb 17, 2024
@heplesser heplesser added this to To do (open issues) in Kernel via automation Feb 17, 2024
@terhorstd terhorstd added this to the NEST 3.7 milestone Mar 4, 2024
@heplesser
Copy link
Contributor Author

heplesser commented Mar 6, 2024

@note #3132 will not address this issue, that has to wait for a later PR. For an Ansatz to a solution see 33fa658.

@heplesser heplesser removed this from the NEST 3.7 milestone Mar 18, 2024
Copy link

Issue automatically marked stale!

@github-actions github-actions bot added the stale Automatic marker for inactivity, please have another look here label May 17, 2024
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: High Should be handled next stale Automatic marker for inactivity, please have another look here T: Bug Wrong statements in the code or documentation
Projects
Kernel
  
To do (open issues)
Development

No branches or pull requests

2 participants