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
Higher simulation time in NEURON 9 compared to NEURON 8.2.4 #2787
Comments
Thanks for the notice. I'm seeing pretty much the same thing. It will need to be looked into in greater detail and resolved before the v9 release. On my machine ( also 16 cores) but tstop=1000
|
If I did it right, a bisect seems to point to 6c529a4:
Where the good ones are < 50s, and the ones above that I marked bad. |
Given that (#2027) was a mega-commit altering 208 files, I wonder if it's possible to bisect on the (presumably deleted) branch that created it? |
Edited after fixing the Caliper region for state-update in version 8.2 Thanks! That is a great hint. Meanwhile I tried Caliper to see where the performance is very different. Here is what seems to me to be the relevant selection
I interpret for example
suggest for example that state integration is dominated by cdp5StCmod.
I conclude that the largest part of the master performance problem is with the KINETIC block of cdp5StCmod and I'll continue by focusing my attention there. |
I hadn't realized that yet when I wrote my above comment. That being the introduction of SoA and data handles, it may be the case that many of the intermediate commits will not result in a working system. |
Now might be a good time to mention that I'm using a slightly modified version of git@github.com:ModelDBRepository/266806
and the temporary changes (there is currently an array bug in NMODL)
|
@ramcdougal > Given that (#2027) was a mega-commit altering 208 files, I wonder if it's possible to bisect on the (presumably deleted) branch that created it? I gave it a quick shot, but many of the commits don't even build; one of the only ones I got to build was 1bb5bf1, and it was slow, so that at least partly brackets which of the many commits it was. However, out of the 19 other commits I randomly tried, none of them built without error. @nrnhines > Those mods are: |
A couple other short notes:
Looks to be that many more instructions are executed - not cache missing or branch missing.
Since it's a statistical profiler, we'll miss things, but it seems that |
@mgeplf I like that tool (perf?) you are using but I'm not familiar with it. (I was going to use gprof to delve more into the mod file functions but was wondering if that itself would change the profile considerably). Please send a link for me to get started. Your fragments above that say I see that |
@nrnhines > @mgeplf I like that tool (perf?) It's this one: https://en.wikipedia.org/wiki/Perf_(Linux) It's like a console version of vtune (or whatever it's called now), but is no where near as slick. Whenever I turn to it, I use this to remember some useful examples: Unfortunately, it seems the dwarf debug isn't propagated fully into
That may be a loose heuristic, but the nature of sampling profiling means that it won't be accurate. I'd probably try
That seems suspicious, too. |
Here is an interesting observation. The time between 8.2 and master narrows considerably (running perf)
merely by introducing an ASSIGNED variable d, settting This change was suggested by a comparison of the 8.2 and master perf results
with the master per result using diam
Note the top use of
|
Just for my reference.
Avoid the error
with
I find the sample counts helpful, so am using
It would be helpful to collect useful idioms in https://nrn.readthedocs.io/en/latest/install/debug.html#profiling-and-performance-benchmarking |
I forked git@github.com:ModelDBRepository/266806 and my changes are in git@github.com:nrnhines/266806 in branch hines/v9 |
Another performance data point... I installed intel oneapi in hopes of using vtune (I have not yet figured out how to focus on the data handle performance) but here are the results for
|
Context
Testing NEURON 9 on a recent CPU shows longer simulation time compared to NEURON 8.2.4
Overview of the issue
Brand new installation of Ubuntu 23.10 on a 16 core Zen 4 AMD processor.
With the same model, same code, same number of cores, etc.., NEURON 9 does a simulation in 90s whereas NEURON 8.2.4 does it in 37s.
Expected result/behavior
Similar or better performance changing from NEURON 8 to NEURON 9.
NEURON setup
Version: VERSION 9.0a-176-g17be061e0 master (17be061) 2024-03-13 and NEURON 8.2.4
Installation method: Cmake from source in both cases with:
-DCMAKE_BUILD_TYPE=RelWithDebInfo
-DNRN_ENABLE_INTERVIEWS=ON
-DNRN_ENABLE_MPI=ON
-DNRN_ENABLE_PYTHON=ON
-DNRN_ENABLE_RX3D:BOOL=ON
-DCORENRN_ENABLE_NMODL=OFF
-DNRN_ENABLE_CORENEURON=OFF
OS + Version: Ubuntu 23.10 latest upgrades
Compiler + Version: gcc version 13.2.0 (Ubuntu 13.2.0-4ubuntu3)
Minimal working example - MWE
https://modeldb.science/266806?tab=1
Use the first model "Morphology_1".
Change protocol 01_SS.py with "p.change_nthread(12,1)" and h.tstop = 5000.
nrnivmodl mod_files
time nrniv -python protocols/01_SS.py
The text was updated successfully, but these errors were encountered: