-
Notifications
You must be signed in to change notification settings - Fork 61
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
FEATURE: fixed dt #2053
FEATURE: fixed dt #2053
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.
A few nits have been picked.
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.
Thanks, it's a nice change, simpler and faster.
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.
Get this merged!
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.
Now merge. We'll do the convergence after.
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::advance
andfvm_lowered_cell_impl<Backend>::integrate
.Incidental Changes
arb_mechanism_ppack
now exposes a scalar time and scalar time step:t
anddt
mechanism_id
, inner vector has one element per time step interval.event_stream
for eachshared_state::mech_storage
, while earlier, we had only onemulti_event_stream
pershared_state
.event_stream
is 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_state
gains some responsibility to handle events:register_events
,mark_events
,deliver_events
TODO
multi_event stream<sampling_event>
Performance Measurements
Performance with respect to master branch measured on Piz Daint's GPU partition for the
busyring
benchmark with the following parameters:Each benchmark run was repeated 20 times with a different node allocation. Error bar show 95% confidence interval.