Opened 9 years ago
Closed 9 years ago
#3913 closed defect (fixed)
modelica_Synchronous runtime error
| Reported by: | Owned by: | Willi Braun | |
|---|---|---|---|
| Priority: | high | Milestone: | Future |
| Component: | Backend | Version: | v1.10.0-dev-nightly |
| Keywords: | modelica_Synchronous | Cc: | Lennart Ochel, Adeel Asghar |
Description
Not able to run modelica_Synchronous examples. It compiles correctly but crashes during runtime with the following error:
stdout | OMEditInfo | <p>/tmp/OpenModelica_rahul/OMEdit/Modelica_Synchronous.Examples.SimpleControlledDrive.ExactlyClockedWithDiscreteController -port=35846 -logFormat=xml -override=startTime=0,stopTime=5,stepSize=0.01,tolerance=0.0001,solver=dassl,outputFormat=mat,variableFilter=.* -r=Modelica_Synchronous.Examples.SimpleControlledDrive.ExactlyClockedWithDiscreteController_res.mat -jacobian=coloredNumerical -w -lv=LOG_STATS</p>
stdout | error | <p>Got number 30.000000, expected: 23.000000<br>
stdout | error | <p>Process crashed<br>
Simulation process failed. Exited with code 0.</p>
Running on Linux Debian Jessie. omc version 1.10.0~dev-595-g8fdd61b. OM flag --std=3.3
Change History (9)
comment:1 by , 9 years ago
| Cc: | added |
|---|---|
| Owner: | changed from to |
| Status: | new → assigned |
comment:2 by , 9 years ago
This error means that the equations in json file are not in an expected order or not all are written to that file.
comment:3 by , 9 years ago
| Component: | OMEdit → Backend |
|---|---|
| Owner: | changed from to |
Yes, the equations from SimCode.clockedPartitions are missing in SerializeModelInfo.serializeWork.
follow-up: 6 comment:4 by , 9 years ago
| Cc: | added |
|---|
How difficult is it to fix this?
It's great that we now support a good portion of the synchronous features, but we can hardly advertise that as long as it doesn't work in OMEdit. As long as it doesn't work in OMEdit, users will perceive it as not working.
comment:5 by , 9 years ago
Is there anything we need to add in OMEdit to support it?
From Willi's comment it looks like some information is missing in the json file which is causing the error.
comment:6 by , 9 years ago
| Owner: | changed from to |
|---|---|
| Status: | assigned → accepted |
Replying to bthiele:
How difficult is it to fix this?
No, it's just write all additional generated equations into the json file.
comment:9 by , 9 years ago
| Resolution: | → fixed |
|---|---|
| Status: | accepted → closed |

It seems the problem is with simulation flag:
-lv=LOG_STATS.Running from command line works fine:
> cat t.mos loadModel(Modelica); getErrorString(); loadModel(Modelica_Synchronous); getErrorString(); simulate(Modelica_Synchronous.Examples.SimpleControlledDrive.ExactlyClockedWithDiscreteController); getErrorString(); // running t.mos > ./omc +std=3.3 t.mos true "" true "" record SimulationResult resultFile = "Modelica_Synchronous.Examples.SimpleControlledDrive.ExactlyClockedWithDiscreteController_res.mat", simulationOptions = "startTime = 0.0, stopTime = 5.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'Modelica_Synchronous.Examples.SimpleControlledDrive.ExactlyClockedWithDiscreteController', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''", messages = "", timeFrontend = 0.22443394, timeBackend = 0.006147009, timeSimCode = 0.011732565, timeTemplates = 0.014316412, timeCompile = 0.308819234, timeSimulation = 0.015396438, timeTotal = 0.5809576950000001 end SimulationResult; ""