Opened 9 years ago

Closed 8 years ago

#3913 closed defect (fixed)

modelica_Synchronous runtime error

Reported by: rahul.dutta.bits@… 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 Adrian Pop, 9 years ago

Cc: Lennart Ochel added
Owner: changed from Adeel Asghar to Willi Braun
Status: newassigned

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;
""

comment:2 by Willi Braun, 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 Willi Braun, 9 years ago

Component: OMEditBackend
Owner: changed from Willi Braun to Lennart Ochel

Yes, the equations from SimCode.clockedPartitions are missing in SerializeModelInfo.serializeWork.

comment:4 by Bernhard Thiele, 8 years ago

Cc: Adeel Asghar 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 Adeel Asghar, 8 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.

in reply to:  4 comment:6 by Willi Braun, 8 years ago

Owner: changed from Lennart Ochel to Willi Braun
Status: assignedaccepted

Replying to bthiele:

How difficult is it to fix this?

No, it's just write all additional generated equations into the json file.

comment:7 by Willi Braun, 8 years ago

Fixed in 0e0982/OMCompiler.

comment:8 by Bernhard Thiele, 8 years ago

Thanks a lot. Just recompiled and tested it and it worked :-)

comment:9 by Willi Braun, 8 years ago

Resolution: fixed
Status: acceptedclosed
Note: See TracTickets for help on using tickets.