Opened 6 years ago

Closed 6 years ago

Last modified 4 years ago

#5377 closed defect (fixed)

OMEdit sometimes does not refresh result file and/or plots after successful simulation

Reported by: RSchiemann Owned by: Adrian Pop
Priority: blocker Milestone: 1.14.0
Component: Run-time Version: v1.13.2
Keywords: Cc: Adrian Pop

Description

I am using OMEdit with OpenModelica 13.0.2.

I believe there are two issues to be distinguished, both of which might happen at the same time actually:

  1. There seems to be an issue that at some point OMEdit does not refresh the result file loaded. I recognized this when I added a component to the model, ran a new simulation and tried to explore the results for the new component: It was not existent in the shown result file. Hence I think the result file has not been refreshed.
  1. The issue might be related to 1. When OMEdit is in a state where it fails to refresh the result file, the already created plots of existing variables do not get refreshed either. To make them refresh, variable needs to be removed from the plot and added again. It is obvious that this is a critical issue for the end user because he can never be sure what results he is actually looking at.

Unfortunately, I have not yet found a way of reliably reproducing these issues. I have a feeling that they start occuring once a simulation run with the same model was unsuccessful (or maybe crashed?).

In my organization, I work quite a lot with OMEdit with a lot of simulation trials. Right now, since I can not really trust the correct results being loaded/shown, I switched to Matlab to import the generated result file (.mat) and read it (which has its problems as well).

Hence, if possible, I would kindly request this be fixed for the next release.

Thank you.

Attachments (1)

TestUpdate.mo (9.7 KB ) - added by massimo ceraolo 6 years ago.

Download all attachments as: .zip

Change History (34)

comment:1 by anonymous, 6 years ago

Sorry, mistyped the version number. I am using OpenModelica 1.13.2 (64bit).

comment:2 by anonymous, 6 years ago

I might add to this ticket because i think its related. But sometimes after the simulation is finished, the window didn't switch to plotting perspective either. Although the setting under Tools/Option/Simulation is set to swtich. This might happend when i deleted the simulation result from variable browser (marked as active) and run the simulation once again. I too can't consistently reproduce this issue

in reply to:  2 ; comment:3 by anonymous, 6 years ago

Replying to anonymous:

I might add to this ticket because i think its related. But sometimes after the simulation is finished, the window didn't switch to plotting perspective either.

Maybe this happens when the simulation is unsuccessful? If it is this, this is on purpose.

in reply to:  3 comment:4 by anonymous, 6 years ago

Replying to anonymous:

Maybe this happens when the simulation is unsuccessful? If it is this, this is on purpose.

Not necessarily. I had two basic resistors(each w/their own ground) in parallel with a constant voltage source. I simulated it once,deleted the result from variable browser, delete the connection between source and one of the resistor (but keeping the resistor in the model) and re-ran the simulation. The first re-run didn't move the view to plotting window and no result in variable browser (although the simulation run succesfully). The 2nd and next re-runs(slternating between connecting and disconnecting the resistor and deleting result before every re-run) works just perfectly (i.e. switch to plotting view and the results are there)

i don't know what happend :D

in reply to:  2 comment:5 by RSchiemann, 6 years ago

Replying to anonymous:

I might add to this ticket because i think its related. But sometimes after the simulation is finished, the window didn't switch to plotting perspective either. Although the setting under Tools/Option/Simulation is set to swtich. This might happend when i deleted the simulation result from variable browser (marked as active) and run the simulation once again. I too can't consistently reproduce this issue

That is a behavior I have observed a couple of times as well, it might be related.

comment:6 by Francesco Casella, 6 years ago

Component: *unknown*OMEdit
Owner: changed from somebody to Adeel Asghar
Status: newassigned
Version: v1.13.0v1.13.2

comment:7 by Francesco Casella, 6 years ago

I also observed this behaviour a few times, though I'm unable to reproduce it with certainty.

comment:8 by Adeel Asghar, 6 years ago

Cc: Adrian Pop added

@adrpo, do you think its related to #5251?

comment:9 by Adrian Pop, 6 years ago

@adeas31: could be, do you use the same functionality resultFileInfo.lastModified()?
That's why I actually added some notification message in #5251, but you didn't like it.
Because the functionality you get is very weird, you press simulate, everything builds
fine but then nothing happens.

comment:10 by Adrian Pop, 6 years ago

RSchiemann and casella, can you tell me on which operating systems do you get these errors?
#5251 was only an issue on Ubuntu 16.04 LTS but this might actually depend on the file system,
if it records modification time with milliseconds or not.

in reply to:  10 comment:11 by Francesco Casella, 6 years ago

Replying to adrpo:

RSchiemann and casella, can you tell me on which operating systems do you get these errors?

Windows 10 pro 64 bit.

in reply to:  10 comment:12 by RSchiemann, 6 years ago

Replying to adrpo:

RSchiemann and casella, can you tell me on which operating systems do you get these errors?
#5251 was only an issue on Ubuntu 16.04 LTS but this might actually depend on the file system,
if it records modification time with milliseconds or not.

I was using W7 64Bit. Might it be related to having admin privileges on your user account? Thought so since I used my work notebook with limited rights.

comment:13 by Francesco Casella, 6 years ago

Priority: highblocker

I'm currently using 1.13.2 for a lab activity at TU Delft. I had at least 3 students complaining about this issue, specifically: you run a simulation, it terminates successfully, but then nothing is shown in the plot window.

The good news is that the problem was "solved" by quitting OMEdit and restarting the session. The bad news is, I thus have no way to reproduce the problem. That said, it's really annoying, and it conveys an impression of sloppiness of the whole tool.

We should try hard to identify which chain of events trigger it and fix it for 1.14.0, so I'll make this a blocker.

comment:14 by anonymous, 6 years ago

I remember that there is somewhere a log file that has the command history and can help reproduce issues.
Can you please remember me where it is located? So in case this issue shows also to me I can store and send that log file.

in reply to:  14 comment:15 by Adeel Asghar, 6 years ago

Replying to anonymous:

I remember that there is somewhere a log file that has the command history and can help reproduce issues.
Can you please remember me where it is located? So in case this issue shows also to me I can store and send that log file.

%TEMP%/OpenModelica/OMEdit

in reply to:  14 ; comment:16 by Francesco Casella, 6 years ago

Replying to anonymous:

I remember that there is somewhere a log file that has the command history and can help reproduce issues.
Can you please remember me where it is located? So in case this issue shows also to me I can store and send that log file.

You can also use the Tools|Open Working Directory command

in reply to:  16 comment:17 by anonymous, 6 years ago

Replying to casella:

Replying to anonymous:

I remember that there is somewhere a log file that has the command history and can help reproduce issues.
Can you please remember me where it is located? So in case this issue shows also to me I can store and send that log file.

You can also use the Tools|Open Working Directory command

A don't see any log file in the working directory. Is it that the log file is produced only upon a crash? this would jeopardise trying to solve this ticket's issue through the log file.

comment:18 by Adeel Asghar, 6 years ago

The backtrace log file is of course only produced on the crash but other log files should be there.

in reply to:  13 comment:19 by Arinomo <trista.arinomo@…>, 6 years ago

Replying to casella:

I'm currently using 1.13.2 for a lab activity at TU Delft. I had at least 3 students complaining about this issue, specifically: you run a simulation, it terminates successfully, but then nothing is shown in the plot window.

The good news is that the problem was "solved" by quitting OMEdit and restarting the session. The bad news is, I thus have no way to reproduce the problem. That said, it's really annoying, and it conveys an impression of sloppiness of the whole tool.

We should try hard to identify which chain of events trigger it and fix it for 1.14.0, so I'll make this a blocker.

In #5412 someone posted steps to reproduce this bug. maybe it will help you

comment:20 by Adeel Asghar, 6 years ago

@RSchiemann I believe this is the same issue as it was in #5412. Please try the new nightly build tomorrow and let us know if the problem is still there.

in reply to:  20 comment:21 by RSchiemann, 6 years ago

Replying to adeas31:

@RSchiemann I believe this is the same issue as it was in #5412. Please try the new nightly build tomorrow and let us know if the problem is still there.

Thank you for getting back to this. I am currently out of office and will try what you suggested at some point next week.

in reply to:  20 comment:22 by Arinomo <trista.arinomo@…>, 6 years ago

Replying to adeas31:

@RSchiemann I believe this is the same issue as it was in #5412. Please try the new nightly build tomorrow and let us know if the problem is still there.

In my case the update fixed the issue. Thank you.

in reply to:  20 comment:23 by RSchiemann, 6 years ago

Replying to adeas31:

@RSchiemann I believe this is the same issue as it was in #5412. Please try the new nightly build tomorrow and let us know if the problem is still there.

After a couple of trials, I can confirm that it seems to be fixed, thanks a lot!

comment:24 by Adeel Asghar, 6 years ago

Resolution: fixed
Status: assignedclosed

comment:25 by massimo ceraolo, 6 years ago

Indeed the issues seems to be still there.
steps to reproduce:
1)Load TestUpdate and open FullFlux
2) run FullFlux and plot variable IdRef.y
3) change from the Plotting perspective Idref.height setting it to -50
4) re-simulate => the plot is not updated!

Checked with today's night build for windows, 64 bit.

Version 0, edited 6 years ago by massimo ceraolo (next)

comment:26 by massimo ceraolo, 6 years ago

Resolution: fixed
Status: closedreopened

by massimo ceraolo, 6 years ago

Attachment: TestUpdate.mo added

comment:27 by Adeel Asghar, 6 years ago

Uncheck Evaluate all parameters at compile time and should work fine.

I think the problem here is that even if you have Evaluate all parameters at compile time set you are still allowed to modify the values which is bad. I think isValueChangeable should be false when the -d=evaluateAllParameters is set.

in reply to:  27 comment:28 by massimo ceraolo, 6 years ago

Replying to adeas31:

Uncheck Evaluate all parameters at compile time and should work fine.

I think the problem here is that even if you have Evaluate all parameters at compile time set you are still allowed to modify the values which is bad. I think isValueChangeable should be false when the -d=evaluateAllParameters is set.

Yes. I confirm that evaluate all parameters at compile time was set.
This solves the problem for me, but to avoid other people to meet similar issues, as you mentioned, hopefully when this option is set parameters are made unmodifiable.

Last edited 6 years ago by massimo ceraolo (previous) (diff)

comment:29 by massimo ceraolo, 6 years ago

Ehm...
Every time I reopen OMEdit I find "Evaluate all parameters at compile time" checked, with any model whatever state I leave upon closing OMEdit.

Also with the model enclosed in this ticket, that I believe does not have any annotation asking this inside.

How should I set the default of this checkbox?

If the default of this setting is not under the user control is not good. Should I open a new ticket on this?

comment:30 by Adeel Asghar, 6 years ago

The default is under Tools->Options->Simulation.

comment:31 by Adeel Asghar, 6 years ago

Component: OMEditRun-time
Owner: changed from Adeel Asghar to Adrian Pop
Status: reopenedassigned

I talked with Adrian and he said he can make the parameters unmodifiable.

in reply to:  31 comment:32 by Francesco Casella, 6 years ago

Replying to adeas31:

I talked with Adrian and he said he can make the parameters unmodifiable.

OK, thanks!

in reply to:  31 comment:33 by Francesco Casella, 6 years ago

Resolution: fixed
Status: assignedclosed

Replying to adeas31:

I talked with Adrian and he said he can make the parameters unmodifiable.

I opened #5454 on this topic.

Note: See TracTickets for help on using tickets.