Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#3451 closed defect (fixed)

Internal error GetVarIndexListByMapping

Reported by: rfranke Owned by: mwalther
Priority: high Milestone: 1.9.4
Component: Cpp Run-time Version:
Keywords: Cc: mwalther, niklwors, perost, sjoelund, lochel

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 Changed 9 years ago by rfranke

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 Changed 9 years ago by mwalther

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 Changed 9 years ago by mwalther

  • Status changed from new to assigned

comment:4 Changed 9 years ago by mwalther

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 Changed 9 years ago by rfranke

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 Changed 9 years ago by lochel

  • Cc lochel added

comment:7 Changed 9 years ago by mwalther

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 Changed 9 years ago by rfranke

  • Resolution set to fixed
  • Status changed from assigned to closed

comment:9 Changed 8 years ago by sjoelund.se

  • Milestone changed from 1.9.4 to 1.9.4-1.9.x

Milestone renamed

comment:10 Changed 8 years ago by sjoelund.se

  • Milestone changed from 1.9.4-1.9.x to 1.9.4

Milestone renamed

Note: See TracTickets for help on using tickets.