Opened 7 years ago
Closed 7 years ago
#4545 closed defect (fixed)
Code generation for algorithms involving arrays broken in commit 453e1c7
Reported by: | Francesco Casella | Owned by: | Willi Braun |
---|---|---|---|
Priority: | blocker | Milestone: | 1.13.0 |
Component: | Code Generation | Version: | |
Keywords: | Cc: | albertoleva |
Description
Please consider the MWE.Loop_alg
and MWE_2017_10_06.Test_vector
models in the two attachments. They ran fine with 453e1c7 and were broken in da38b3e. In all likelyood, the latest commit is to blame, as the other ones in between seem hardly relevant.
The first example gives these warnings during code generation
[1] 09:49:38 Translation Error Internal error checkAndGetAlgorithmOutputs failed. [2] 09:49:38 Translation Error [/build/openmodelica-TEh4Jb/openmodelica-1.13.0~dev-129-g52108c7 /OMCompiler/Compiler/SimCode/SimCodeUtil.mo: 6248:7-6248:88]: Internal error function createSingleAlgorithmCode failed [3] 09:49:38 Translation Error [/build/openmodelica-TEh4Jb/openmodelica-1.13.0~dev-129-g52108c7 /OMCompiler/Compiler/SimCode/SimCodeUtil.mo: 4758:9-4758:135]: Internal error Generation of symbolic matrix SimCode (SimCode.createSymbolicJacobianssSimCode) failed [4] 09:49:38 Translation Error [/build/openmodelica-TEh4Jb/openmodelica-1.13.0~dev-129-g52108c7 /OMCompiler/Compiler/SimCode/SimCodeUtil.mo: 592:5-592:146]: Internal error function createSimCode failed [Transformation from optimised DAE to simulation code structure failed]
while the second generates the C code but then fails during compilation:
MWE_2017_10_06.Test_vector_13opt.c MWE_2017_10_06.Test_vector_12jac.c:220:11: error: use of undeclared identifier '$Pu$Pi$P$pDERC$PdummyVarC' $Pu$Pi$P$pDERC$PdummyVarC = (-$Py$Pi$P$pDERC$PdummyVarC); ^ MWE_2017_10_06.Test_vector_12jac.c:220:41: error: use of undeclared identifier '$Py$Pi$P$pDERC$PdummyVarC' $Pu$Pi$P$pDERC$PdummyVarC = (-$Py$Pi$P$pDERC$PdummyVarC); ^ MWE_2017_10_06.Test_vector_12jac.c:363:11: error: use of undeclared identifier '$Pu$Pi$P$pDERB$PdummyVarB' $Pu$Pi$P$pDERB$PdummyVarB = (-$Py$Pi$P$pDERB$PdummyVarB); ^ MWE_2017_10_06.Test_vector_12jac.c:363:41: error: use of undeclared identifier '$Py$Pi$P$pDERB$PdummyVarB' $Pu$Pi$P$pDERB$PdummyVarB = (-$Py$Pi$P$pDERB$PdummyVarB); ^ MWE_2017_10_06.Test_vector_12jac.c:506:11: error: use of undeclared identifier '$Pu$Pi$P$pDERA$PdummyVarA' $Pu$Pi$P$pDERA$PdummyVarA = (-$Py$Pi$P$pDERA$PdummyVarA); ^ MWE_2017_10_06.Test_vector_12jac.c:506:41: error: use of undeclared identifier '$Py$Pi$P$pDERA$PdummyVarA' $Pu$Pi$P$pDERA$PdummyVarA = (-$Py$Pi$P$pDERA$PdummyVarA); ^ 6 errors generated. <builtin>: recipe for target 'MWE_2017_10_06.Test_vector_12jac.o' failed make: *** [MWE_2017_10_06.Test_vector_12jac.o] Error 1 make: *** Waiting for unfinished jobs.... Compilation process failed. Exited with code 2.
Please make sure that these test cases work again ASAP. As I understand there are preciously few test cases with algorithms in the testsuite, I would also suggest to add them to it, to avoid similar problems in the future.
Attachments (2)
Change History (4)
by , 7 years ago
by , 7 years ago
Attachment: | MWE_2017_10_06.mo added |
---|
comment:1 by , 7 years ago
Status: | new → accepted |
---|
comment:2 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
Fixed in OMCompiler/0773cd4.