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
Improvement of iterative solution framework #273
Conversation
bef9b09
to
328c6d8
Compare
I suggest @tammoippen and @jschuecker as reviewers. |
'weight': j_exc, | ||
'delay': delay}) | ||
|
||
nest.Connect(neurons,sd,'all_to_all') |
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.
Since all_to_all
is default you could leave it out.
@janhahne, is there a reason, why the pynest examples are not in pynest/examples? I made only two minor comments in line. 👍 otherwise. |
@jschuecker Thank you for the review! I addressed your two comments in the new commit. There is no particular reason why the examples are in examples/nest instead of in pynest/examples. Should they be moved there? |
else | ||
{ | ||
kernel().connection_builder_manager.get_delay_checker().assert_valid_delay_ms( | ||
kernel().simulation_manager.get_wfr_comm_interval() ); |
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.
If I understand correctly, the wfr_comm_interval
is set only during SimulationManager::set_status
and cannot change otherwise. If yes, then we need to check for a valid value only once (not for every 'delay-less' connection) when it is changed in the SimulationManager or when when min/max_delay
is change in the ConnectionBuilderManager
. Also relevant for the subsequent changes in this file.
Edit: I just saw, that we only need to check, when there is actually such a connection created. But still we only need to check it once (as this is similar to a default delay of all 'delay-less' connections). I propose to surround the check in the add_connection
with an if ( default_delay_needs_check_ )
and set it afterwards.
@tammoippen Thank you for taking a look and your comments! I improved the calls to So I see your point, that once one 'delay-less' connection is created it is no longer necessary to call |
f9c5815
to
e576e77
Compare
e576e77
to
bbcfc09
Compare
@tammoippen Please see commit 0505f81. I think I found a solution. I would appreciate a quick merge of this pull request in order to move forward with the rate model implementation. |
kernel().simulation_manager.get_wfr_comm_interval() ); | ||
default_delay_needs_check_ = false; | ||
} | ||
|
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 solution looks very good. Maybe it should be placed at the start of the function (line 354ff), because if something is bad with the delay, the connection is not stored in the connection infrastructure.
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.
Good catch, thanks!
When my last note is addressed, I am all for merging. |
Great, thanks! Since @jschuecker also gave his 👍, this should be ready for merging now :) |
This PR improves the iterative solution framework used for connections without delay (so far only gap junctions, but there is more to come).
wfr_*
in order to indicate that they belong to the iterative waveform relaxation (wfr) scheme.wfr_comm_interval
. All connections without delay contribute withwfr_comm_interval
to themin_delay
andmax_delay
. The communication of the waveform relaxation method uses the regular communication points in intervals of the minimal network delay. Therefore it is desirable to be able to influence themin_delay
for simulations with connections without delayuse_wfr
to disable usage of iterative waveform relaxation method and use communication in every step instead ( single step method ). This is achieved by settingwfr_comm_interval = resolution
and will be useful for rate models without delay where wfr is not always necessary and to reproduce data of the single step method from our gap-junction paper.test_wfr_settings.sli
that checks thatwfr_comm_interval
anduse_wfr
work properly and can only be set in a reasonable order. Adaptedtest_gap_junction.sli
due to functionality ofwfr_comm_interval
.Most certainly there will be a small conflict with PR #269 in
node_manager.cpp
. I will adapt this PR once #269 is merged.