Opened 6 years ago
Closed 6 years ago
#5329 closed enhancement (fixed)
How to group flags for code generation options in OMEdit
Reported by: | Francesco Casella | Owned by: | Adeel Asghar |
---|---|---|---|
Priority: | high | Milestone: | 1.14.0 |
Component: | OMEdit | Version: | |
Keywords: | Cc: | massimo ceraolo, Rüdiger Franke, Andrea Bartolini, Adrian Pop |
Description
The requirement of #5132 is actually just a particular case. Other compiler flags may be useful for the normal end-user and should be possible to activate in OMEdit without the need of setting obscure flags, e.g. -d=evaluateAllParameters
, --dynamicTearing
, -d=NLSanalyticJacobian
, -d=pedantic
, -d=parmodauto
, -d=newInst
, etc.
The question is, where to group them.
The current proposal is to have global settings in Tools|Options|Simulation, where these parameters can be set via checkboxes, and then giving the possibility to locally override them for specific simulation runs by adding a Compiler Flags tab to the Simulation Setup windows, where the same checkboxes are to be found. These options should be kept among subsequent re-runs of the same model.
The logic to combine local, global, and annotation-set flags should be the same as with Simulation Flags. Unfortunately at the moment I cannot find any place where we possibly wrote that out.
Any further feedback is welcome.
Attachments (2)
Change History (6)
follow-up: 2 comment:1 by , 6 years ago
comment:2 by , 6 years ago
Replying to adeas31:
I suggest to use
Translation Flags
instead ofCompiler Flags
since there is already an option calledC/C++ Compiler Flags (Optional):
so it might be confusing for the users.
Fine for me. We just need to explain that these flags are called "Compiler Flags" in the User's Guide :)
by , 6 years ago
Attachment: | Global.png added |
---|
by , 6 years ago
comment:3 by , 6 years ago
See OMEdit:PR:217.
We now have global flags in Tools->Options->Simulation
(see attachment:Global.png) and the same flags are also available locally in Simulation Setup
window (see attachment:Local.png) under Translations Flags
tab.
The global flags uses the default values of the flags. The local flags have the following order default, gloabl, model specific via the __OpenModelica_commandLineOptions
annotation and then it preserves any changes done by the user.
I have also added the option to save the flags inside the model using the __OpenModelica_commandLineOptions
so there is a checkbox now in the bottom of Simulation Setup
called Save translation flags inside model i.e., __OpenModelica_commandLineOptions annotation
.
The flags mentioned by Francesco in this ticket are made visible to the users, we could add more if needed, and it is also possible to set the additional flags as before.
Note that I have used the term Translation Flags
instead of Compiler Flags
. We use to have the wording OMC Flags
in the start but then it was misleading/confusing so we changed it to OMC Command Line Options
. I realized that command line options is not a best so I have chosen Translation Flags
instead.
Of course the users guide needs to be updated once OMEdit:PR:217 is merged.
I suggest to use
Translation Flags
instead ofCompiler Flags
since there is already an option calledC/C++ Compiler Flags (Optional):
so it might be confusing for the users.