Opened 4 years ago
Last modified 4 years ago
#6296 closed defect
FMI export recently fails with array outputs — at Version 1
Reported by: | Rüdiger Franke | Owned by: | Rüdiger Franke |
---|---|---|---|
Priority: | blocker | Milestone: | 1.16.3 |
Component: | FMI | Version: | 1.16.0 |
Keywords: | Cc: | Adrian Pop, arunkumar palanisamy |
Description (last modified by )
This is a modified version of testArrayEquations, reduced by many features, but extended with a vector output yx1:
model ArrayEquationsTest parameter Integer n = 10; input Real[n] u(start = 1:n); Real[n] x1(each start = 1); output Real[n] yx1; equation when Clock(0.1) then // for eqation for i in 1:n loop x1[i] = if firstTick(x1[i]) then previous(x1[i]) else previous(x1[i]) + u[i]; yx1[i] = x1[i]; end for; end ArrayEquationsTest;
Attempting to export this model as FMU with:
setCommandLineOptions("--std=3.3"); getErrorString(); setCommandLineOptions("-d=newInst,-nfScalarize,disableFMIDependency"); getErrorString(); setCommandLineOptions("--simCodeTarget=Cpp"); getErrorString(); loadFile("ArrayEquationsTest.mo"); getErrorString(); translateModelFMU(ArrayEquationsTest, version = "2.0"); getErrorString();
gives the error:
[/home/rfranke/OpenModelica/OMCompiler/Compiler/Template/Tpl.mo:2027:8-2027:159:writable] Error: Internal error Stack overflow when evaluating function: [bt] #1 /home/rfranke/OpenModelica/build/bin/../lib/x86_64-linux-gnu/omc/libOpenModelicaRuntimeC.so(mmc_setStacktraceMessages_threadData) [bt] #2 /home/rfranke/OpenModelica/build/bin/../lib/x86_64-linux-gnu/omc/libOpenModelicaRuntimeC.so(mmc_do_stackoverflow) [bt] #3 /home/rfranke/OpenModelica/build/bin/../lib/x86_64-linux-gnu/omc/libOpenModelicaCompiler.so(CodegenCppInit.fun_87) [bt] #4 /home/rfranke/OpenModelica/build/bin/../lib/x86_64-linux-gnu/omc/libOpenModelicaCompiler.so(CodegenCppInit.ScalarVariableTypeStartAttribute) [bt] #5 /home/rfranke/OpenModelica/build/bin/../lib/x86_64-linux-gnu/omc/libOpenModelicaCompiler.so(CodegenCppInit.fun_83) [bt] #6 /home/rfranke/OpenModelica/build/bin/../lib/x86_64-linux-gnu/omc/libOpenModelicaCompiler.so(CodegenCppInit.ScalarVariableType) [bt] #7 /home/rfranke/OpenModelica/build/bin/../lib/x86_64-linux-gnu/omc/libOpenModelicaCompiler.so(CodegenCppInit.fun_73) [bt] #8 /home/rfranke/OpenModelica/build/bin/../lib/x86_64-linux-gnu/omc/libOpenModelicaCompiler.so(CodegenCppInit.fun_76) [bt] #9 /home/rfranke/OpenModelica/build/bin/../lib/x86_64-linux-gnu/omc/libOpenModelicaCompiler.so(CodegenCppInit.scalarVariableXML) [bt] #10 /home/rfranke/OpenModelica/build/bin/../lib/x86_64-linux-gnu/omc/libOpenModelicaCompiler.so(CodegenCppInit.lm_74) [bt] #11 /home/rfranke/OpenModelica/build/bin/../lib/x86_64-linux-gnu/omc/libOpenModelicaCompiler.so(CodegenCppInit.fun_76) [bt] #12 /home/rfranke/OpenModelica/build/bin/../lib/x86_64-linux-gnu/omc/libOpenModelicaCompiler.so(CodegenCppInit.scalarVariableXML) ... [bt] #1024 /home/rfranke/OpenModelica/build/bin/../lib/x86_64-linux-gnu/omc/libOpenModelicaCompiler.so(CodegenCppInit.lm_74) [bt] #1025 [...] Error: Template error: A template call failed (/home/rfranke/OpenModelica/build/bin/../lib/x86_64-linux-gnu/omc/libOpenModelicaCompiler.so: (null)). One possible reason could be that a template imported function call failed (which should not happen for functions called from within template code; templates assert pure 'match'/non-failing semantics).
It was working with OM 1.14. It is not working with 1.16 and 1.17 anymore.
Note:
See TracTickets
for help on using tickets.