Opened 5 years ago
Last modified 3 years ago
#6034 assigned enhancement
Briefly explain the compilation pipeline and the role of compilation vs. simulation flags
Reported by: | Francesco Casella | Owned by: | Adeel Asghar |
---|---|---|---|
Priority: | critical | Milestone: | |
Component: | Documentation | Version: | |
Keywords: | Cc: | tobias.krenz@…, Karim Adbdelhak, Adeel Asghar |
Description
Today I had an interesting discussion with Tobias Krenz, a German master student using OMC to study sulphuric acid production plants. He told me he was quite confused by the difference between compilation and simulation flags. Eventually he read the book by Peter Fritzson and got it, but maybe having some indications in the User's Guide would be nice.
We could add a short section in the Introduction, after System Overview and before Interactive session, where we explain what the main steps do (front-end, backend, code generation, C code compilation, simulation execution) and the role of compilation and simulation flags.
@Karim, @AnHeuermann, would you mind doing that? Otherwise, I can take care of that myself.
Thanks!
Change History (17)
comment:1 by , 5 years ago
Cc: | added |
---|---|
Component: | *unknown* → Documentation |
Owner: | changed from | to
Status: | new → assigned |
follow-up: 4 comment:2 by , 5 years ago
follow-up: 5 comment:3 by , 5 years ago
In OMEdit we have "Translation flags" and "Simulation Flags". Probably translation flags are compiler flags. In that case, probably the same terminology should be used.
comment:4 by , 5 years ago
Replying to sjoelund.se:
The user's guide has the following chapters and sections:
- OpenModelica Compiler Flags
- Options
- Debug flags
- Flags for Optimization Modules
- Small Overview of Simulation Flags
- OpenModelica (C-runtime) Simulation Flags
Yes. The problem is that we have no explanation whatsoever of why we have these two separate sets of flags. After many years of development work we give this for granted as the air we breathe, but it's not for anybody who is beginning to use the tool and has not yet studied Peter's book. Which is quite thick, so maybe a quick summary would help :)
follow-up: 6 comment:5 by , 5 years ago
Cc: | added |
---|
Replying to anonymous:
In OMEdit we have "Translation flags" and "Simulation Flags". Probably translation flags are compiler flags. In that case, probably the same terminology should be used.
I fully agree. In fact we have
- "Compilation flags" in the User's Guide
- "Translation flags" in OMEdit
- "commandLineOptions" in the vendor annotation
- "setCommandLineOptions" and "oms_setCommandLineOption" (witout the 's) in the API
Consistency is not our forte...
We also have C compilation flags in the General tab of OMEdit, but that is yet another story. Which is also not explained clearly.
Changing the API function names is probably not a good idea because of backwards compatibility. But I guess we could change the "Translation flags" tab name into "Compilation flags" in OMEdit, and also add some indication in the introductory section I mentioned above on what are the different possibilities to set those flags.
Comments?
follow-up: 7 comment:6 by , 5 years ago
Replying to casella:
Changing the API function names is probably not a good idea because of backwards compatibility. But I guess we could change the "Translation flags" tab name into "Compilation flags" in OMEdit, and also add some indication in the introductory section I mentioned above on what are the different possibilities to set those flags.
Previously they were called Command Line Options
in OMEdit and AFAIR they are changed to Translation Flags
based on your suggestion (there should be an old ticket about it) though I am not sure. Basically in OMEdit the simulation is split in 3 steps. This is what happens when you click on the simulate button.
- Model is translated to generate the C-code using
translateModel
API. That is whereTranslation Flags
are used hence the nameTranlsation Flags.
- The generated C-code is compiled to get the simulation executable. That is where
C/C++ Compiler Flags (Optional):
are used. - The simulation executable is started with
Simulation Flags
.
Maybe the above information can be added to users guide specifically here.
comment:7 by , 5 years ago
Replying to adeas31:
Previously they were called
Command Line Options
in OMEdit and AFAIR they are changed toTranslation Flags
based on your suggestion (there should be an old ticket about it)
I couldn't find it but I guess you ar right.
Basically in OMEdit the simulation is split in 3 steps. This is what happens when you click on the simulate button.
- Model is translated to generate the C-code using
translateModel
API. That is whereTranslation Flags
are used hence the nameTranlsation Flags.
- The generated C-code is compiled to get the simulation executable. That is where
C/C++ Compiler Flags (Optional):
are used.- The simulation executable is started with
Simulation Flags
.
Makes perfect sense, once you explain it.
Maybe the above information can be added to users guide specifically here.
Sounds good. Shall I try to do that?
comment:9 by , 4 years ago
Owner: | changed from | to
---|
follow-up: 13 comment:10 by , 4 years ago
@adeas31, for the record, I couldn't find any translateModel()
API call. What is the API funtion that OMEdit calls?
comment:11 by , 4 years ago
See PR #6654.
Feel free to add direct links to other relevant parts of the User's Guide, and to amend the text in the PR if you deem it necessary. For example, the existing guide was only referring to experiment and simulation annotations, I understand command line annotations apply as well, so I updated the text accordingly - please check.
comment:12 by , 4 years ago
Owner: | changed from | to
---|
comment:13 by , 4 years ago
comment:14 by , 4 years ago
I guess we need to fix that. Do you have any suggestions? Just add it manually?
comment:16 by , 4 years ago
Milestone: | 1.17.0 → 1.18.0 |
---|
Retargeted to 1.18.0 because of 1.17.0 timed release.
The user's guide has the following chapters and sections: