- Index
- » Programming
- » Modelica Language
- » How to speedup timeBackend
How to speedup timeBackend
How to speedup timeBackend
Hello.
I made a model to solve the stress distribution that represented by a two dimensional array.
timeBackend of the model that has 40*70 array took about 20-30 minutes.
It'a too late for me...
I found following some tickets.
https://trac.openmodelica.org/OpenModelica/ticket/3695
https://trac.openmodelica.org/OpenModelica/ticket/2647
I applied --removeSimpleEquations=new which is writen in the #3695 but it was same timeBackend.
And I would to try to compile simplify2 but I didn't know how to compile it.
Do someone know how to speedup the timeBackend?
Version : OM 1.11.0(OM 1.12Dev is same timeBackend)
OS : Windows7
CPU : Core i7-4810MQ 2.8GHz
memory : 32Gbyte
Following are mistake.
Version : OM 1.9.6(OM 1.12Dev is same timeBackend)
OS : Windows7
CPU : Core i5-6300U 2.4GHz
memory : 12Gbyte
- Ueda
- 15 Posts
Re: How to speedup timeBackend
Hello,
you can further debug the timings with "-d=execstat", this enabled debug flag execstat, that dumps the time spend in each module.
Based on that analysis it's probably possible to change the configuration, so that the compiler performs better.
so long.
Willi
- wbraun
- 75 Posts
Re: How to speedup timeBackend
Thanks you
I tried to -d=execstat for the model.
And then following is result of high percentage commands.
Command | time[sec] | percentage[%] |
matching and sorting (n=18156) | 271.4 | 13.1 |
analyzeInitialSystem (initialization) | 252.9 | 12.2 |
prepare postOptimizeDAE: | 271.4 | 13.1 |
postOpt tearingSystem (initialization) | 318.7 | 15.4 |
postOpt removeSimpleEquations (simulation) | 271.0 | 13.1 |
postOpt tearingSystem (simulation) | 317.1 | 15.3 |
ostOpt detectJacobianSparsePattern (simulation) | 269.0 | 13.0 |
total | 1971.5 | 95.3 |
*The model doesn't have pre() and is nonliear equation.
I want to study to reduce these time.
But, If someone know how to speedup these performance
could you tell me it, please?
- Ueda
- 15 Posts
Re: How to speedup timeBackend
If it's large nonlinear equations, performance should be expected to be slow in the backend. It means many equations are related to each other, which means any sort of dependency analysis or change in an equation will affect many other equations. What can sometimes improve performance is if common subexpression elimination can move parts of the nonlinear system outside of the algebraic loop. You can try it with some of: --preOptModules+=introduceDerAlias --postOptModules+=wrapFunctionCalls.
Otherwise, sending the model to us via a ticket (or openmodelica@ida.liu.se, or directly to a developer encrypted if it's sensitive information) and we could perform a more detailed profiling of the model and see if any support function can be improved to get better performance for some detail in the model.
- sjoelund.se
- 1700 Posts
Re: How to speedup timeBackend
Thanks sjoelund.se
I tried options for the model in OMShell.
Code:
setCommandLineOptions("--preOptModules+=introduceDerAlias")
setCommandLineOptions("--postOptModules+=wrapFunctionCalls")
And following is Result.
Command | time[sec] | percentage[%] |
matching and sorting (n=18156) | 270.3 | 13.7 |
analyzeInitialSystem (initialization) | 164.1 | 8.3 |
prepare postOptimizeDAE: | 271.4 | 13.8 |
postOpt tearingSystem (initialization) | 317.7 | 16.1 |
postOpt removeSimpleEquations (simulation) | 270.5 | 13.7 |
postOpt tearingSystem (simulation) | 315.1 | 16.0 |
ostOpt detectJacobianSparsePattern (simulation) | 268.8 | 13.6 |
total | 1877.9 | 95.2 |
I got about 100sec reduction about analyzeInitialSystem, but it's not enough.
I would like to send a mail for openmodelica@ida.liu.se.
Also, if you know how to try Simplify2 could you tell me it please.
Thanks for your help.
- Ueda
- 15 Posts
- Index
- » Programming
- » Modelica Language
- » How to speedup timeBackend