This repository was archived by the owner on Mar 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 41
BinQ and spike compression fixes #701
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
cef08b9
Bug fixes with regard to option --spkcompress <nspike>
nrnhines 570092d
Temporary change to allow binqueue and multisend to be turned off.
nrnhines be8efb8
After compressed spike exchange, do interthread_enqueue.
nrnhines 5619fff
nrn binq must be initialized before core2nrn queue transfer.
nrnhines 7d1c6b6
nrncore binq must be initialized before nrn2core queue transfer
nrnhines d51f75d
interthread buffer must be enqueued at beginning of psolve.
nrnhines f4c35ec
clang-format
nrnhines fb58730
fix some memory leaks
nrnhines a9f60c5
Initialization of binq consistent everywhere.
nrnhines f1604ed
Avoid Random123 globalindex warning if the index has not changed.
nrnhines 330f8aa
Merge branch 'master' into hines/spike-compress
nrnhines a2531f3
Revert nrnran123.cu
nrnhines 10cc253
Merge branch 'master' into hines/spike-compress
alexsavulescu 5af8d25
Merge branch 'master' into hines/spike-compress
alexsavulescu ddf048c
Merge remote-tracking branch 'origin/master' into hines/spike-compress
olupton 2dd175a
update nmodl submodule
pramodk 363943e
ntasks=16 for gpu tests as well
pramodk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -286,7 +286,10 @@ void nrn_spike_exchange_init() { | |
| t_exchange_ = t; | ||
| dt1_ = rev_dt; | ||
| usable_mindelay_ = floor(mindelay_ * dt1_ + 1e-9) * dt; | ||
| assert(usable_mindelay_ >= dt && (usable_mindelay_ * dt1_) < 255); | ||
| if (usable_mindelay_ * dt1_ >= 255.) { | ||
| usable_mindelay_ = 255. / dt1_; | ||
| } | ||
| assert(usable_mindelay_ >= dt && (usable_mindelay_ * dt1_) <= 255.); | ||
| } else { | ||
| #if nrn_spikebuf_size > 0 | ||
| if (spbufout) { | ||
|
|
@@ -366,6 +369,7 @@ void nrn_spike_exchange(NrnThread* nt) { | |
| ps->send(spikein[i].spiketime, net_cvode_instance, nt); | ||
| } | ||
| } | ||
| nrn_multithread_job(interthread_enqueue); | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure this change is needed. But it can't hurt. |
||
| wt1_ = nrn_wtime() - wt; | ||
| } | ||
|
|
||
|
|
@@ -482,6 +486,12 @@ void nrn_spike_exchange_compressed(NrnThread* nt) { | |
| } | ||
| } | ||
| } | ||
| // In case of multiple threads some above ps->send events put | ||
| // NetCon events into interthread buffers. Some of those may | ||
| // need to be delivered early enough that the interthread buffers | ||
| // need transfer to the thread event queues before the next dqueue_bin | ||
| // while loop in deliver_net_events. So enqueue now... | ||
| nrn_multithread_job(interthread_enqueue); | ||
| t_exchange_ = nrn_threads->_t; | ||
| wt1_ = nrn_wtime() - wt; | ||
| } | ||
|
|
@@ -606,6 +616,7 @@ void BBS_netpar_solve(double tstop) { | |
| } | ||
|
|
||
| nrn_timeout(timeout_); | ||
| nrn_multithread_job(interthread_enqueue); | ||
| ncs2nrn_integrate(tstop * (1. + 1e-11)); | ||
| nrn_spike_exchange(nrn_threads); | ||
| nrn_timeout(0); | ||
|
|
||
Submodule nmodl
updated
7 files
| +20 −0 | AUTHORS.txt | |
| +3 −4 | README.md | |
| +6 −2 | src/codegen/codegen_c_visitor.cpp | |
| +20 −0 | src/codegen/codegen_helper_visitor.cpp | |
| +1 −0 | src/codegen/codegen_helper_visitor.hpp | |
| +4 −0 | src/codegen/codegen_info.hpp | |
| +51 −6 | test/unit/codegen/codegen_c_visitor.cpp |
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.
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 is a similar statement in the following function I did not change. A specific test would have to be written to see if there could be an issue with file mode demonstrating the need for an equivalent change.
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.
The corresponding change was made in NetCvode::init_events. In retrospect, it is likely that BinQ is not supported for
--restoresince there is no mention ofshift_binin thenrn_checkpointfiles. (Analogous toshift_binin nrn/src/nrniv/bbsavestate.cpp)