-
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
Remove set sender node id from deliver events pr #2280
Remove set sender node id from deliver events pr #2280
Conversation
…e measurements (experimental, breaking tests)
…provide alternative needed for binary neurons
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.
Looks pretty good to me, I have just a small suggestion.
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.
looks great, thanks for implementing this! 🚀
i have just one small comment, regarding the use of =
for SpikeData
, but maybe i was blind.
another thing i'd like to mention: as far as i understand, in binary neurons the gid is just used distinguish different presynaptic partners in the receiver node. wouldn't it be possible to instead use the spike data content to do that without looking up the gid? this would reduce (unpredictable?) memory access, but likely require more computation as the indices would need to be somehow combined into a unique identifier for each presynaptic neuron.
@@ -63,6 +63,8 @@ class SpikeData | |||
SpikeData( const SpikeData& rhs ); | |||
SpikeData( const thread tid, const synindex syn_id, const index lcid, const unsigned int lag ); | |||
|
|||
SpikeData& operator=( const SpikeData& rhs ); |
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.
sorry, i couldn't see where this was needed?
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 was to silence a compiler warning through GitHub Actions. If I remember correctly, the problem was that since C++11 if a custom copy constructor or destructor is defined, a custom operator= also needs to be provided or it should be explicitly defined as default.
Thank you @suku248 very much for this PR. I ran some benchmarks of this PR and the corresponding master on JURECA DC using a static version of the hpc benchmark. This PR is faster than master on all tested scales (1 to 64 nodes, 4 MPI processes per node, 32 threads, 250.000 neurons per Node). The performance difference is around 20%. |
Co-authored-by: Håkon Bakke Mørk <hakon.mork@nmbu.no>
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!
Retrieving the node id from
SourceTable
is computationally costly, and most targets don't need the node id (with the exception ofbinary_neuron
s). To supportbinary_neuron
s, an alternative solution is suggested here: The location (tid
,syn_id
,lcid
) of the sender node id inSourceTable
is stored inEvent
instead of the node id retrieved fromSourceTable
, andEvent
now provides a function to perform the look-up of the node id inSourceTable
.For local receivers (i.e., recording devices), delivery anyway takes a different, more direct path:
nest-simulator/nestkernel/event_delivery_manager_impl.h
Line 87 in 8ea4121
The node id is retrieved from the local sender and stored in
Event
, and it can subsequently be retrieved throughEvent::get_sender_node_id()
.