FEATURE: fixed dt#2053
Merged
boeschf merged 166 commits intoarbor-sim:masterfrom Apr 5, 2023
Merged
Conversation
thorstenhater
requested changes
Mar 7, 2023
Contributor
thorstenhater
left a comment
There was a problem hiding this comment.
A few nits have been picked.
thorstenhater
previously approved these changes
Mar 13, 2023
Contributor
thorstenhater
left a comment
There was a problem hiding this comment.
Thanks, it's a nice change, simpler and faster.
thorstenhater
previously approved these changes
Mar 24, 2023
thorstenhater
previously approved these changes
Mar 28, 2023
Contributor
thorstenhater
left a comment
There was a problem hiding this comment.
Now merge. We'll do the convergence after.
thorstenhater
approved these changes
Apr 5, 2023
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.
Motivation
So far, multi-compartment cable cells use a variable time step: the user-specified maximum time step$dt$ may be shortened based on incoming events, such as spikes, generators, and (exact) sampling, so that the event delivery is performed exactly at the requested times.
Proposal: All events with time$t_s$ are now delivered at simulation time $t_i = t_0 + i ~dt$ if
$t_s \in \left[ t_i , t_i + dt\right).$
Removing exact delivery increases the speed of the simulation due to elimination of small steps, makes the numerics independent of presence of sampling, and also leads to a number of code simplifications. In particular, we have no more need for
Main Changes
The new event delivery logic is mainly implemented in
mc_cell_group::advanceandfvm_lowered_cell_impl<Backend>::integrate.Incidental Changes
arb_mechanism_ppacknow exposes a scalar time and scalar time step:tanddtmechanism_id, inner vector has one element per time step interval.event_streamfor eachshared_state::mech_storage, while earlier, we had only onemulti_event_streampershared_state.event_streamis now nearly identical to multi-core implementation (marking etc. is done on CPU) except for optional stable sorting according tomechanism_index, which is done in parallel using athread_group.shared_stategains some responsibility to handle events:register_events,mark_events,deliver_eventsTODO
multi_event stream<sampling_event>Performance Measurements
Performance with respect to master branch measured on Piz Daint's GPU partition for the
busyringbenchmark with the following parameters:Each benchmark run was repeated 20 times with a different node allocation. Error bar show 95% confidence interval.