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 |
pramodk
left a comment
There was a problem hiding this comment.
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 |
|
|
✔️ 0b45c4d -> Azure artifacts URL |
nrnhines
left a comment
There was a problem hiding this comment.
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
nocmodlgenerated code to use the mechanism cache when accessingdiamandareaas described in #2913.For performance testing I use:
The name
two_radiiis to be able to grep fordiam, we added the ioncato compare with how it's solved for ions. The logic is to useinvto 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 toReleaseI needed to refine the measurement slightly (it now scales linearly withtstop). The time after fix is5.6sand before25s.