This repository was archived by the owner on Mar 20, 2023. It is now read-only.
Repository navigation
Bug fix for the GPU execution of BBP model: issue with mechanism data offset - #590
Merged
Merged
Conversation
… offset
* Analysis of the bug:
- Blue Brain model (channel-benchmark) was showing diferent spikes
after few timesteps. Spikes were shifted and initially appeared
to be floating point discrepencies.
- Closely looking into NET_RECEIVE method revealed that the mechanism
data accessed in net_receieve function was wrong. Somehow accessing
variables like NMDA_ratio was showing wrong values. The nrn_state()
had correct values.
- The net_receieve function was accessing ml->data inside OpenACC loop.
Accessing ml->data was providing different pointer inside OpenACC loop.
* Fix for the bug:
- some mechanisms can have dparam semantics for diam data and it is
added into nt->data (after matrix elements).
- When calculating offert for mechanism data, this extra semantics
data was not considered. Adjusting the offset fixes the issue.
- Additionally, we do not need to rely on offset but we can use
acc_deviceptr to find corresponding device pointer directly.
This is more reliable than manually calculating offset.
pramodk
force-pushed
the
pramodk/channel-benchmark-gpu-fix
branch
from
July 17, 2021 06:09
bbb6f60 to
55b4708
Compare
Collaborator
|
Logfiles from GitLab pipeline #11087 (:no_entry:) have been uploaded here! Status and direct links:
|
iomaganaris
approved these changes
Jul 19, 2021
iomaganaris
left a comment
Contributor
There was a problem hiding this comment.
LGTM
Nasty bug and good catch!
+1 to Olli's comment
pramodk
added a commit
to neuronsimulator/nrn
that referenced
this pull request
Nov 2, 2022
… offset (BlueBrain/CoreNeuron#590) * Analysis of the bug: - Blue Brain model (channel-benchmark) was showing diferent spikes after few timesteps. Spikes were shifted and initially appeared to be floating point discrepencies. - Closely looking into NET_RECEIVE method revealed that the mechanism data accessed in net_receieve function was wrong. Somehow accessing variables like NMDA_ratio was showing wrong values. The nrn_state() had correct values. - The net_receieve function was accessing ml->data inside OpenACC loop. Accessing ml->data was providing different pointer inside OpenACC loop. * Fix for the bug: - some mechanisms can have dparam semantics for diam data and it is added into nt->data (after matrix elements). - When calculating offert for mechanism data, this extra semantics data was not considered. Adjusting the offset fixes the issue. - Additionally, we do not need to rely on offset but we can use acc_deviceptr to find corresponding device pointer directly. This is more reliable than manually calculating offset. * Rely on acc_deviceptr (reliable) than manually calculating offsets (fragile) CoreNEURON Repo SHA: BlueBrain/CoreNeuron@838b9bf
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See initial fix in a7a95c9 and then simplification in 0ac3ab9.
How to Run?
Run channel benchmark on CPU vs GPU and compare spikes
Test System
BB5 + GPU
Use certain branches for the SimulationStack CI
CI_BRANCHES:NEURON_BRANCH=master,