Opened 10 years ago

Closed 10 years ago

#2878 closed defect (fixed)

compiled model crashes for some integration times

Reported by: alexander_rusako@… Owned by: Willi Braun
Priority: critical Milestone: 1.9.2
Component: Run-time Version: 1.9.0Beta
Keywords: Cc: Lennart Ochel

Description

Hi,

I am a bit new to open modelica. I built my model and see that it may or may not crash for some integration time.

Model with stop time 80 and 200 it works fine. But integration time 100 leads to crash. I managed to reproduce the problem with old open modelica versions as well.

Below is part of the log. I am also attaching models and runExp.mos script which runs the model.

simulate(OneMuscleWithGland, startTime = 0.0, stopTime=100)

record SimulationResult

resultFile = "",
simulationOptions = "startTime = 0.0, stopTime = 100.0, numberOfIntervals = 5000, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'OneMuscleWithGland', options = , outputFormat = 'mat', variableFilter = '.*', cflags = , simflags = ",
messages = "Simulation execution failed for model: OneMuscleWithGland

assert | debug | division by zero at time 55.45137084070143, (a=1.000010000000006e-05) / (b=0), where divisor b expression is: if m.MF <= 0.0 then 0.0 else 1.0
stdout | warning | Integrator attempt to handle a problem with a called assert.
assert | debug | division by zero at time 55.44, (a=9.999606888309255e-06) / (b=0), where divisor b expression is: if m.MF <= 0.0 then 0.0 else 1.0
stdout | info | model terminate | Simulation terminated by an assert at time: 55.44

Limited backtrace at point of segmentation fault
/lib/x86_64-linux-gnu/libpthread.so.0(+0xfcb0)[0x7fd1e3927cb0]
/lib/x86_64-linux-gnu/libc.so.6(cfree+0x1c)[0x7fd1e35dc24c]
/usr/lib/omc/libSimulationRuntimeC.so(deInitializeDataStruc+0x1d)[0x7fd1e3e86cbd]
/usr/lib/omc/libSimulationRuntimeC.so(_main_SimulationRuntime+0x154)[0x7fd1e3ebf3d4]
/tmp/OpenModelica/OneMuscleWithGland(main+0x15e)[0x405e1e]
/lib/x86_64-linux-gnu/libc.so.6(libc_start_main+0xed)[0x7fd1e357a76d]
/tmp/OpenModelica/OneMuscleWithGland[0x4033a9]
Segmentation fault (core dumped)
",

timeFrontend = 0.017031358,
timeBackend = 0.016784455,
timeSimCode = 0.015486948,
timeTemplates = 0.011841404,
timeCompile = 0.74921455

end SimulationResult;
Warning: The initial conditions are not fully specified. Use +d=initialization for more information.

Attachments (1)

bug_2878.tar.gz (1.7 KB ) - added by alexander_rusako@… 10 years ago.
mo and mos file to reproduce crash

Download all attachments as: .zip

Change History (8)

by alexander_rusako@…, 10 years ago

Attachment: bug_2878.tar.gz added

mo and mos file to reproduce crash

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

Cc: Lennart Ochel added
Component: UnknownRun-time
Owner: changed from somebody to Willi Braun
Status: newassigned

This happens only when running using method="dassl" (localData[0]->realVars becomes 0x21 or something like that instead of being a pointer to a real array).

comment:2 by alexander_rusako@…, 10 years ago

Do you mean that workaround is to switch to another integration method?

thanks
Alexander

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

No, I meant that wbraun should fix it because he knows the dassl code. But yes, a workaround is to switch the integration method until it is fixed.

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

Milestone: 1.9.11.9.2

This ticket was not closed for 1.9.1, which has now been released. It was batch modified for milestone 1.9.2 (but maybe an empty milestone was more appropriate; feel free to change it).

comment:5 by alexander_rusako@…, 10 years ago

I can not push you to fix it in specific branch/release. But i would be glad to get ticket fixed soon as seems still blocks because other than dassl methods seem to be not so robust.

thanks
Alexander

comment:6 by Willi Braun, 10 years ago

Status: assignedaccepted

comment:7 by Willi Braun, 10 years ago

Resolution: fixed
Status: acceptedclosed

fixed in r23223.

Note: See TracTickets for help on using tickets.