Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#3451 closed defect (fixed)

Internal error GetVarIndexListByMapping

Reported by: Rüdiger Franke Owned by: Marcus Walther
Priority: high Milestone: 1.9.4
Component: Cpp Run-time Version:
Keywords: Cc: Marcus Walther, Niklas Worschech, Per Östlund, sjoelund, Lennart Ochel

Description

We had one day when a simulator could be generated for all MSL 3.2.1 examples. Today's test produce a strange new error, e.g. for PumpingSystem:

Error: Internal error GetVarIndexListByMapping: No Element for $PRE.PumpRPMGenerator.y found!

The error only shows up in the Cpp runtime!? See the examples:

Modelica.Fluid.Examples.PumpingSystem
Modelica.Fluid.Examples.AST_BatchPlant.BatchPlant_StandardWater

(and some more examples from ModelicaTest)

I'm adding all by CC who committed yesterday. The error was there before the last two commits by bernhard and myself. Please check if this is related to your contribution.

Change History (10)

comment:1 by Rüdiger Franke, 9 years ago

The error message comes from SimCodeUtil.mo, protected function getVarIndexInfosByMapping, called from the public functions getVarIndexListByMapping and getVarIndexByMapping, called from CodegenCpp.tpl and CodegenCppInit.tpl.

@mwalther: theses things were changed with your commit "- strings are now handled in arrays as well"

https://github.com/OpenModelica/OMCompiler/commit/f23c4961ad314ec55b63c6fd8266abe284d95f93

Can you please check?
Btw. there are some string arrays in MSL that were handled before. What did this commit improve?

comment:2 by Marcus Walther, 9 years ago

Hi Ruediger,
sorry there was no time to work on OpenModelica yesterday. My commit was quite large, so it's possible that I make a failure in my implementation which broke the model. I will have a look today.

Regarding the string arrays: This was related to the SimVars-Class of the C++ runtime. The class had storage arrays for int, double and bool values in the past. Now it has a string array as well, so we can put all string variables of the model there.

I think I should improve my commit messages a little bit :-).

comment:3 by Marcus Walther, 9 years ago

Status: newassigned

comment:4 by Marcus Walther, 9 years ago

The models are compiling again but they fail in initialization. I think this is unrelated to this issue, because the history 'MSL_3.2.1_cpp-2015-09-09' shows the same behaviour.

@rfranke: Can I close the ticket now?

comment:5 by Rüdiger Franke, 9 years ago

What is the reason? Is it related to your commit "- removed unused parts of init.xml-file (cpp runtime) "

https://github.com/OpenModelica/OMCompiler/commit/00ba1c4e99e8f99bb50753ddec14cce9781eb9a0

or is it because some equation systems don't appear anymore after the recent backend changes?

comment:6 by Lennart Ochel, 9 years ago

Cc: Lennart Ochel added

comment:7 by Marcus Walther, 9 years ago

I just forgot to remove some experimental output from the XML initialization file of the c++ simulation runtime.
A colleague tries to shrink the output that is required for the alg-loops, because we do not want to create a class for each loop that occurs. To get a better understanding for that, we've added some information about the initial values of the alg loops and the related jacobian - but that's not needed at the moment.

comment:8 by Rüdiger Franke, 9 years ago

Resolution: fixed
Status: assignedclosed

comment:9 by Martin Sjölund, 9 years ago

Milestone: 1.9.41.9.4-1.9.x

Milestone renamed

comment:10 by Martin Sjölund, 9 years ago

Milestone: 1.9.4-1.9.x1.9.4

Milestone renamed

Note: See TracTickets for help on using tickets.