Opened 7 years ago

Last modified 3 years ago

#4902 assigned defect

Tiny simulation steps after recent nightly build

Reported by: stig Owned by: Francesco Casella
Priority: high Milestone:
Component: Backend Version: v1.13.0-dev-nightly
Keywords: Cc: Willi Braun

Description

I'm not sure exactly which build caused the problem, but after software updater did its thing sometime last week my models run with a tiny step-size in both DASSL and IDA whereas they have been just fine before. They are quite big models, but usually solve in 3-6 seconds. Now it takes many hours to simulate the same.

I'm on Lubuntu 16.04 and I've used nightly builds from the repo for the last two years or so, updating the packages maybe once a week. It's for this reason difficult to say exactly which version I was using just before I encountered the problem.

The package containing my models is at https://github.com/FishSim/LibRAS and LibRAS/Examples/Inline.mo is the one I suggest for testing. Even minimal working examples using my package run incredibly slowly due to tiny steps.

In a short test, I got 495 s spent on jacobian for 560 s simulation time, according to DASSL statistics. Can not tell if this is normal or not, but it seems a bit high compared to MSL examples.

Examples from the MSL run just fine, so I don't think it's my system.

Change History (13)

comment:1 by Per Östlund, 7 years ago

Component: *unknown*Backend
Owner: changed from somebody to Lennart Ochel

comment:2 by Martin Sjölund, 7 years ago

I tried to add some automatic testing of the library, but it is missing a uses-annotation. Would be good if https://github.com/FishSim/LibRAS/pull/5 was merged.

comment:3 by stig, 7 years ago

Merged.

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

https://libraries.openmodelica.org/branches/overview.html now lists this and shows a regression (due to a timeout on the simulations). I only ran 1.11, 1.12 and the master branches with the proper flags (--std=3.3), but hopefully we can fix this before the next release. The backend seems to report a model of the same size, etc...

I am a bit unsure what would be the problem, but there are some delayed signals where the delay is in the thousands of seconds and the simulation starts very slowly in the master.

comment:5 by Martin Sjölund, 7 years ago

Cc: Willi Braun added

comment:6 by stig, 7 years ago

A MWE model without the components that include the delay also solves very slowly compared to "before". It's now ~8 seconds on my system and was <1 s before things broke. Dassl timer says 99.4 % of the time is allocated to simulation, and it takes significantly shorter steps in the early parts of the sim.

comment:7 by Francesco Casella, 6 years ago

I tried to make some analysis by reducing StopTime to 10, but unfortunately the profiler is currently broken (see #5030), so I can't see where the simulation code is spending most of the time. I suspect something's wrong with the delay operator, but it may also be due to the the coupling between the solver and the delay, or some other issue. In order to say something definite, I need to be able to check the profiling data as soon as #5030 is resolved.

If you could please add the model now taking 8 seconds to your library on GitHub with an experiment(StopTime)) annotation and/or attach it to this ticket, I'd be glad to use it as a starting point for the analysis - the models which are currently available are quite cumbersome and do not make the analysis easy.

comment:8 by stig, 6 years ago

I uploaded the smaller model to GitHub. It's in LibRAS/Examples/ReactorTest.

Again, this test does not actually involve the delay operator, but is still slowed down significantly compared to before.

https://github.com/FishSim/LibRAS/blob/master/LibRAS/Examples/ReactorTest.mo

comment:9 by Francesco Casella, 6 years ago

Milestone: Future1.14.0
Owner: changed from Lennart Ochel to Francesco Casella
Status: newassigned

comment:10 by Francesco Casella, 5 years ago

Milestone: 1.14.01.16.0

Releasing 1.14.0 which is stable and has many improvements w.r.t. 1.13.2. This issue is rescheduled to 1.16.0

comment:11 by Francesco Casella, 4 years ago

Milestone: 1.16.01.17.0

Retargeted to 1.17.0 after 1.16.0 release

comment:12 by Francesco Casella, 4 years ago

Milestone: 1.17.01.18.0

Retargeted to 1.18.0 because of 1.17.0 timed release.

comment:13 by Francesco Casella, 3 years ago

Milestone: 1.18.0

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.