Opened 7 years ago
Closed 7 years ago
#4696 closed defect (fixed)
createFMIModelStructure fails for a simple model with function
Reported by: | Rüdiger Franke | Owned by: | Willi Braun |
---|---|---|---|
Priority: | critical | Milestone: | 1.13.0 |
Component: | Backend | Version: | v1.13.0-dev-nightly |
Keywords: | Cc: | Willi Braun |
Description
Consider the following model:
model SortTest input Real[3] u; output Real[:] y = Modelica.Math.Vectors.sort(u); end SortTest;
Attempting to translate to FMU 2.0 gives the error:
[7] 21:58:56 Translation Error [/home/rfranke/OpenModelica/OMCompiler/Compiler/Util/Graph.mo: 990:5-990:101]: Internal error Graph.addForbiddenColors failed. [8] 21:58:56 Translation Error [/home/rfranke/OpenModelica/OMCompiler/Compiler/Util/Graph.mo: 971:5-971:107]: Internal error Graph.partialDistance2colorInt failed. [9] 21:58:56 Translation Error [/home/rfranke/OpenModelica/OMCompiler/Compiler/BackEnd/SymbolicJacobian.mo: 1553:5-1553:75]: Internal error function mapIndexColors failed [10] 21:58:56 Translation Error [/home/rfranke/OpenModelica/OMCompiler/Compiler/BackEnd/SymbolicJacobian.mo: 1296:5-1296:75]: Internal error function createColoring failed [11] 21:58:56 Translation Error [/home/rfranke/OpenModelica/OMCompiler/Compiler/BackEnd/SymbolicJacobian.mo: 1234:9-1234:86]: Internal error function generateSparsePattern failed [12] 21:58:56 Translation Error [/home/rfranke/OpenModelica/OMCompiler/Compiler/BackEnd/SymbolicJacobian.mo: 1651:3-1651:84]: Internal error function createFMIModelDerivatives failed [13] 21:58:56 Translation Error [/home/rfranke/OpenModelica/OMCompiler/Compiler/SimCode/SimCodeUtil.mo: 12761:3-12761:85]: Internal error SimCodeUtil.createFMIModelStructure failed [14] 21:58:56 Translation Error [/home/rfranke/OpenModelica/OMCompiler/Compiler/SimCode/SimCodeUtil.mo: 625:5-625:146]: Internal error function createSimCode failed [Transformation from optimised DAE to simulation code structure failed] [15] 21:58:56 Translation Error Internal error SimCode: The model SortTest could not be translated to FMU
Change History (7)
comment:1 by , 7 years ago
Cc: | added |
---|
comment:2 by , 7 years ago
Owner: | changed from | to
---|---|
Status: | new → accepted |
comment:3 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
comment:4 by , 7 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Generation of ModelStructure works now. FMI Jacobian code still fails though.
The fix challenges code generation by making use of a previously unused feature: assignment of arrays to Jacobian variables, see PR2230
There is a remaining issue: the backend introduces the variable uSeedFMIDER
that is unknown during code generation. This seems to be related to u
being input. FMI export with -disableDirectionalDerivatives
works with an intermediate variable:
model SortTest input Real[3] u; Real x = 2*u; output Real[:] y = Modelica.Math.Vectors.sort(x); end SortTest;
comment:5 by , 7 years ago
Status: | reopened → accepted |
---|
comment:7 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
Note:
See TracTickets
for help on using tickets.
It's fixed by PR2206.