Opened 7 years ago
Closed 6 years ago
#4836 closed defect (fixed)
Red warnings show up in OMEdit when using --daeMode=new
Reported by: | Francesco Casella | Owned by: | Willi Braun |
---|---|---|---|
Priority: | high | Milestone: | 1.13.0 |
Component: | Code Generation | Version: | |
Keywords: | Cc: | Martin Sjölund, Adeel Asghar |
Description
When compiling models with -daeMode=new
, I get red lines in the compilation window about this issue:
ScalablePowerGrids.Tests.GridBusSimpleControl_N_1_M_1_16dae.c:2151:1: warning: 'optimize' attribute ignored [-Wattributes] static void (*functionDAERes_systems[3])(DATA *, threadData_t *threadData) = { ^
Please make sure this is fixed before the release.
Change History (6)
follow-up: 3 comment:1 by , 7 years ago
Cc: | added |
---|---|
Status: | new → accepted |
follow-up: 4 comment:2 by , 7 years ago
The attributes are added by Susan since compilation is too slow for example for large functions containing simple bindings. I cannot reproduce this in OMEdit or in a terminal.
You can re-compile the OMEdit-generated sources by running:
make -C /tmp/OpenModelica_userName/OMEdit/ModelName/ -f ModelName.makefile
comment:3 by , 7 years ago
Replying to wbraun:
Although it's hard to debug, since OMEdit deletes the sources or I'm just unable to find them.
@adeas31 Does OMEdit delete all sources? Would it possible to suppress that somehow?
Ah, I found the check box "Delete intermediate compilation files".
comment:4 by , 7 years ago
Replying to sjoelund.se:
The attributes are added by Susan since compilation is too slow for example for large functions containing simple bindings. I cannot reproduce this in OMEdit or in a terminal.
It depends on a model and is related to separated partitions. The relevant code looks like:
OMC_DISABLE_OPT static void (*functionDAERes_systems[3])(DATA *, threadData_t *threadData) = { functionDAERes_system0, functionDAERes_system1, functionDAERes_system2 };
comment:5 by , 7 years ago
Ah, yes. If it's split you put the OMC_DISABLE_OPT on functionDAERes_system0, functionDAERes_system1, and functionDAERes_system2 and you can remove it for the array of function pointers.
comment:6 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
As of OMEdit v1.13.0-dev-253-g8f7c38ac
OMC-v1.13.0-dev-1052-g5c466368f
, there are no more red lines in the C code showing up.
Okay, I'm able to reproduce it in OMEdit, but not in a terminal.
Although it's hard to debug, since OMEdit deletes the sources or I'm just unable to find them.
@adeas31 Does OMEdit delete all sources? Would it possible to suppress that somehow?
Also I'm unsure when and where this optimization attributes are added.
@sjoelund.se Can you enlighten me?