Opened 12 years ago
Last modified 7 years ago
#1899 new discussion
Discusssion on how to make the generated code smaller
Reported by: | Adrian Pop | Owned by: | somebody |
---|---|---|---|
Priority: | high | Milestone: | Future |
Component: | Backend | Version: | trunk |
Keywords: | Cc: | Willi Braun, Jens Frenkel, Lennart Ochel, Martin Sjölund, Per Östlund |
Description
This ticket sets up a discussion on how we can make the
generated code smaller so that compilation times go down.
As pointed out by VTT:
http://www.simantics.org/~luukkainen/OM_PerformanceReport.pdf
the C files for the simulation are quite large
and that requires quite some time to compile.
For example
FreeBody18.mos
generates ~10MB of C code.
and 15MB of .xml file.
One way to fix this we should move *ALL* the static data
in the Model_init.xml file to make the C file smaller.
But this might not be enough as we already moved quite
some data to the .xml file.
Could we get rid of the defines completely?
Any other ideas? Feel free to comment here.
Change History (12)
comment:1 by , 12 years ago
comment:2 by , 12 years ago
- compile by default with -O0, this is fast and in more than 90% the executable is called only once. If users wand faster simulation, they have to spend more time on compilation for gcc with -O3 (switch Optimisation via flag)
comment:3 by , 12 years ago
We already do compile -O0 by default (this is gcc default unless a -O command is given)
comment:5 by , 10 years ago
Milestone: | 1.9.1 → 1.9.2 |
---|
This ticket was not closed for 1.9.1, which has now been released. It was batch modified for milestone 1.9.2 (but maybe an empty milestone was more appropriate; feel free to change it).
comment:6 by , 10 years ago
Milestone: | 1.9.2 → 1.9.3 |
---|
Milestone changed to 1.9.3 since 1.9.2 was released.
comment:11 by , 8 years ago
Milestone: | 1.11.0 → 1.12.0 |
---|
Milestone moved to 1.12.0 due to 1.11.0 already being released.
comment:12 by , 7 years ago
Milestone: | 1.12.0 → Future |
---|
The milestone of this ticket has been reassigned to "Future".
If you think the issue is still valid and relevant for you, please select milestone 1.13.0 for back-end, code generation and run-time issues, or 2.0.0 for front-end issues.
If you are aware that the problem is no longer present, please select the milestone corresponding to the version of OMC you used to check that, and set the status to "worksforme".
In both cases, a short informative comment would be welcome.
How old omc version did they use? The C-code is very small and compiles fast even on my laptop...
Why you would consider getting rid of the #define I have no clue... That's the fastest part of compilation:
It only seems to run slowly on the default linux packages because then gcc 4.6 or 4.7 is used (it uses the default gcc on the system).