#2933 closed defect (fixed)
Problem with array reductions in code generation
Reported by: | Francesco Casella | Owned by: | Mahder Alemseged Gebremedhin |
---|---|---|---|
Priority: | high | Milestone: | 1.9.4 |
Component: | Code Generation | Version: | trunk |
Keywords: | Cc: | Mahder Alemseged Gebremedhin, Willi Braun, andrea.bartolini@… |
Description
Please have a look at this test case in ThermoPower:
https://test.openmodelica.org/libraries/ThermoPower/files/ThermoPower.Test.WaterComponents.WaterPumps.err
The compiler generates this error:
[CodegenC.tpl:9712:24-9712:24:writable] Error: Template error: array reduction unable to generate code for element of unknown dimension sizes; type Real[:]: array(q_nom[i] ^ /*Real*/(j + -1) for j in 1:N)
For some reason, the size information is not propagated correctly all the way down to the code generation.
Change History (9)
comment:1 by , 10 years ago
Cc: | added |
---|
comment:2 by , 10 years ago
Cc: | added |
---|
comment:3 by , 10 years ago
Owner: | changed from | to
---|---|
Status: | new → accepted |
comment:4 by , 10 years ago
Milestone: | 1.9.2 → 1.9.3 |
---|
comment:7 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
Fixed in 4300bd200d268d9e3377e47e8e9353a4c1dad384/OMCompiler
This was an issue in Code generation as well as FrontEnd. The code generation for reduction operations should probably be rewritten. It quite messy right now.
Note:
See TracTickets
for help on using tickets.
Milestone changed to 1.9.3 since 1.9.2 was released.