-
Notifications
You must be signed in to change notification settings - Fork 118
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
Optimize code generated for diam
and area
.
#2914
Conversation
✔️ 2d75d7e -> Azure artifacts URL |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2914 +/- ##
=======================================
Coverage 67.22% 67.22%
=======================================
Files 569 569
Lines 104691 104702 +11
=======================================
+ Hits 70378 70388 +10
- Misses 34313 34314 +1 ☔ View full report in Codecov by Sentry. |
This comment has been minimized.
This comment has been minimized.
Here are the numbers: I am using https://github.com/nrnhines/266806/ and with single thread . I am using
And this time is similar to the one if we cache |
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.
LGTM from the performance comparison aspects.
While implementing the same solution in NMODL, I noticed, that calling function from Python leads to a SEGFAULT. I'm debugging, but more changes are needed for this PR. This has now been fixed, essentially the |
✔️ 7cb0aff -> Azure artifacts URL |
This comment has been minimized.
This comment has been minimized.
@pramodk It now contains a fix for the SEGFAULT, I think it's principled, but it could use re-review. Sorry, CI seems to have gotten stuck, I'll rerun. |
7cb0aff
to
1e41a48
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✔️ a350cee -> Azure artifacts URL |
@nrnhines : I have tested this and confirmed |
Quality Gate passedIssues Measures |
✔️ 0b45c4d -> Azure artifacts URL |
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.
Great job. I've verified that this clearly fixes the performance issue with diam.
I tested with the sodium longitudinal diffusion example. Results
Init&Run time version
1.9 8.2.4
5.2. master
2.9 thisPR
2.9 thisPR with diam replaced by diamr range variable in KINETIC
The model files come from nrn/share/examples/nrniv/nmodl and the relevant files are
nacur.mod
ionleak.mod
nadifl.mod
nadifl2.hoc
nadifl2.ses
launch with
nrnivmodl
nrngui nadifl2.hoc
press the Init&Run button and note the RealTime at the bottom of the RunControl
I have neurodamus people about Gitlab failures. As this CI was green and failures are completely unrelated, I think we should skip/ignore gitlab CI here. |
See #2787. |
Optimizes
nocmodl
generated code to use the mechanism cache when accessingdiam
andarea
as described in #2913.For performance testing I use:
The name
two_radii
is to be able to grep fordiam
, we added the ionca
to compare with how it's solved for ions. The logic is to useinv
to create a very expensive multiplication with1.0
.The python file to measure the performance is:
Edit: I realized I was measuring with
Debug
. After switching toRelease
I needed to refine the measurement slightly (it now scales linearly withtstop
). The time after fix is5.6s
and before25s
.