-
Notifications
You must be signed in to change notification settings - Fork 357
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
Fixing bad coding pattern in loops in connection creation #2597
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is indeed much nicer. @heplesser: can you please also review?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's another one in lines 737-750. Please also change that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good. Could your add const
for local variables in the loops that lack it but could be const, e.g., random_id
or source_id
.
@JanVogelsang: friendly ping! |
…t-simulator into refactoring-loop-design
Cancelled after 360min, how could that happen? |
I have no clue how this could take so long. I have restarted the jobs (again, after they timed out again after my first restart attempt). Let's see what happens. |
The problem causing the timeout is here: nest-simulator/nestkernel/connection_creator_impl.h Lines 765 to 771 in f17346d
Before the |
Thanks Hans Ekkehard, I'm mad at me to not notice this myself earlier. I fixed it, let's see if the testsuite runs through now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JanVogelsang Thanks! Just a small suggestion for a better comment so we won't wonder a year from now why we decrease the counter half-way through the loop.
Co-authored-by: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
We cast to
int
in a loop so that we can do--i
to counteract the loops++i
if a connection is not created. Instead,target_number_connections
should just be counted down in a while loop here.