Opened 6 years ago
Closed 6 years ago
#5030 closed defect (fixed)
Profiling is broken
Reported by: | Francesco Casella | Owned by: | Adeel Asghar |
---|---|---|---|
Priority: | blocker | Milestone: | 1.14.0 |
Component: | OMEdit | Version: | |
Keywords: | Cc: | Adeel Asghar, Willi Braun, Martin Sjölund |
Description
As it is apparent from this page the profiler is broken.
You can also run any MSL model (e.g. Modelica.Blocks.Examples.Filter
with OMEdit turning on profiling+html
profiling; the following output is obtained:
LOG_SUCCESS | info | <p>The simulation finished successfully.</p> stdout | error | <p>W</p> stdout | error | <p>arning: empty y range [1e-030:1e-030], adjusti</p> stdout | error | <p>ng to [9.9e-031:1e-030] <br> This needs to be fixed before the 1.13.0 release. stdout | error | <p>W</p> stdout | error | <p>arning: empty y range [1e-030:1e-030], ad</p> stdout | error | <p>justing to [9.9e-031:1e-030] <br> stdout | error | <p>W</p> stdout | error | <p>arning: empty y range [1e-030:1e-030], adjust</p> stdout | error | <p>ing to [9.9e-031:1e-030] <br> stdout | error | <p>W</p> stdout | error | <p>arning: empty y range [1e-030:1e-</p> stdout | error | <p>030], adjusting to [9.9e-031</p> stdout | error | <p>:1e-030] <br> stdout | error | <p>W</p> stdout | error | <p>arning: empty y range [1e-030:1e</p> stdout | error | <p>-030], adjusting to [9.9e-031:</p> stdout | error | <p>1e-030] <br> stdout | error | <p>W</p> stdout | error | <p>arning: empty y range [1e-030:1e-</p> stdout | error | <p>030], adjusting to [9.9e-031:1e-0</p> stdout | error | <p>30] <br> stdout | error | <p>W</p> stdout | error | <p>arning: empty y range [1e-030:1e-030], a</p> stdout | error | <p>djusting to [9.9e-031:1e-030] <br> stdout | error | <p>W</p> stdout | error | <p>arning: empty y range [1e-030:1e-030], adjusting</p> stdout | error | <p> to [9.9e-031:1e-030] <br> stdout | error | <p>W</p> stdout | error | <p>arning: empty y range [1e-030:1e-03</p> stdout | error | <p>0], adjusting to [9.9e-031:1e-030</p> stdout | error | <p>] <br> stdout | error | <p>W</p> stdout | error | <p>arning: empty y range [1e-030:1e-030]</p> stdout | error | <p>, adjusting to [9.9e-031:1e-0</p> stdout | error | <p>30] <br> stdout | error | <p>W</p> stdout | error | <p>arning: empty y range [1e-030:1e-030], adju</p> stdout | error | <p>sting to [9.9e-031:1e-030] <br> stdout | error | <p>W</p> stdout | error | <p>arning: empty y range [1e-030:1e-030], </p> stdout | error | <p>adjusting to [9.9</p> stdout | error | <p>e-031:1e-030] <br> stdout | error | <p>W</p> stdout | error | <p>arning: empty y range [1e-030:1e-03</p> stdout | error | <p>0], adjusting to [9.9e-031:1e-030</p> stdout | error | <p>] <br> stdout | error | <p>W</p> stdout | error | <p>arning: empty y range [1e-030:1e-030], </p> stdout | error | <p>adjusting to [9.9e-031:1e-030]</p> stdout | error | <p> <br> stdout | error | <p>W</p> stdout | error | <p>arning: empty y range [1e-030:1e-030], adjusting to [9.9e-031:1e-030] <br> stdout | error | <p>W</p> stdout | error | <p>arning: empty y range [1e-030:1e-030], adjusting to [9.9e-031:1e-030] <br> stdout | error | <p>W</p> stdout | error | <p>arning: empty y range [1e-030:1e-030], ad</p> stdout | error | <p>justing to [9.9e-031:1e-030] <br> stdout | error | <p>W</p> stdout | error | <p>arning: empty y range [1e-030:1e-030], adjusting to [9.9e-031:1e</p> stdout | error | <p>-030] <br> stdout | error | <p>W</p> stdout | error | <p>arning: empty y range [1e-030:1e-0</p> stdout | error | <p>3</p> stdout | error | <p>0</p> stdout | error | <p>]</p> stdout | error | <p>, adjusting to [9.9e-</p> stdout | error | <p>0</p> stdout | error | <p>31</p> stdout | error | <p>:1e-030] <br> stdout | error | <p>W</p> stdout | error | <p>arning: empty y range [1e-030:1e-030], adju</p> stdout | error | <p>sting to [9.9e-031:1e-030] <br> stdout | error | <p>W</p> stdout | error | <p>arning: empty y range [1e-030:1e-030], adjusting to [9.9e-0</p> stdout | error | <p>31:1e-030] <br> stdout | error | <p>W</p> stdout | error | <p>arning: empty y range [1e-030:1e-030], adjusting to</p> stdout | error | <p> [9.9e-031:1e-030] <br> stdout | error | <p>W</p> stdout | error | <p>arning: empty y range [1e-030:1e-030], adju</p> stdout | error | <p>sting to [9.9e-031:1e-030]</p> stdout | error | <p> <br> stdout | error | <p>W</p> stdout | error | <p>arning: empty y range [1e-030:1e-030], </p> stdout | error | <p>adjusting to [9.9e-031:1e-030]</p> stdout | error | <p> <br> stdout | error | <p>W</p> stdout | error | <p>arning: empty y range [1e-030:1e-030</p> stdout | error | <p>], adjusting to [9.9e-031:1e-030</p> stdout | error | <p>] <br> stdout | error | <p>W</p> stdout | error | <p>arning: empty y range [1e-030:1e-030], a</p> stdout | error | <p>djusting to [9.9e-031:1e-030] <br> stdout | info | <p>Time measurements are stored in C:/Users/casella/AppData/Local/Temp/OpenModelica/OMEdit/Modelica.Blocks.Examples.Filter/Modelica.Blocks.Examples.Filter_prof.html (human-readable) and C:/Users/casella/AppData/Local/Temp/OpenModelica/OMEdit/Modelica.Blocks.Examples.Filter/Modelica.Blocks.Examples.Filter_prof.xml (for XSL transforms or more details)</p> stdout | error | <p>Process crashed</p> stdout | error | <p>Process crashed<br> Simulation process failed. Exited with code -1073740940.</p>
Change History (18)
comment:1 by , 6 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:3 by , 6 years ago
We should also add a test to avoid people breaking this feature with their commits. @adrpo can you please add that?
comment:4 by , 6 years ago
@adrpo, if you can't make it by Wednesday, we can postpone this fix to 1.13.1 in January, no need to further delay the 1.13.0 release.
comment:5 by , 6 years ago
The error on the page here: https://openmodelica.org/doc/OpenModelicaUsersGuide/latest/profiler.html
is actually put there manually by @sjoelund a while back (2016!):
https://github.com/OpenModelica/OpenModelica-doc/commit/7af6b5108c8c34830a04caabd54e0eb24e7a1629
So, the profiling actually works fine, at least partially.
comment:6 by , 6 years ago
Cc: | added |
---|
comment:7 by , 6 years ago
There are some issues with displaying equations in the html page and also the fact that some models crash at the end of the simulation.
comment:8 by , 6 years ago
Milestone: | 1.13.0 → 1.14.0 |
---|
PR https://github.com/OpenModelica/OMCompiler/pull/2841 fixes equation listing and variable references.
There are more things to fix until we get the profiling to fully work.
As far as I can tell some code generation needs to change so that the profiling is added to all types of equations/systems/functions. Currently all the called functions report no calls in Modelica.Blocks.Examples.Filter.
I'll make this a blocker for 1.14.0, we cannot hold the 1.13.0 anymore.
comment:10 by , 6 years ago
@adrpo, I followed the instructions to get the profiling info in the OMEdit debugger, but if I run Modelica.Blocks.Examples.Filters I still don't get any profiling information.
I also tried Modelica.Fluid.Examples.HeatExchanger.HeatExchangerSimulation, but I didn't get any profiling info either.
Can you please check what is wrong?
comment:12 by , 6 years ago
Do you mean the "Reload" button on the top left corner of the Transformational Debugger Window? I did press it, but I still see no profiling data.
Besides the .json file, a _prof.intdata and a _prof.realdata files are present in the results directory, with 0.5 and 1 MB of data, respectively. They seem to be binary files, so I cannot inspect them to check what's inside.
comment:13 by , 6 years ago
Component: | Run-time → OMEdit |
---|---|
Owner: | changed from | to
In fact, I get these error messages in the Simulation Output window:
C annot open load file 'C:/Users/Francesco' <br> "C:/Users/Francesco", line 0: util.c: No such file or directory <br> <br> Plot command failed: C:/OpenModelica1.14.0-dev-64bit//lib/omc/libexec/gnuplot/binary/gnuplot.exe C:/Users/Francesco Casella/AppData/Local/Temp/OpenModelica/OMEdit/Modelica.Fluid.Examples.HeatExchanger.HeatExchangerSimulation/Modelica.Fluid.Examples.HeatExchanger.HeatExchangerSimulation_prof.plt<br> warning: failed to load external entity "Casella/AppData/Local/Temp/OpenModelica/OMEdit/Modelica.Fluid.Examples.HeatExchanger.HeatExchangerSimulation/Modelica.Fluid.Examples.HeatExchanger.HeatExchangerSimulation_prof.html" <br> cannot parse Casella/AppData/Local/Temp/OpenModelica/OMEdit/Modelica.Fluid.Examples.HeatExchanger.HeatExchangerSimulation/Modelica.Fluid.Examples.HeatExchanger.HeatExchangerSimulation_prof.html <br> Process crashed Process crashed<br> Simulation process failed. Exited with code -1073740940.
and no .html file is found in the simulation output directory. Probably something goes wrong during the simulation post-processing phase.
On the other hand, if I run this mos script from the command line:
loadModel(Modelica);getErrorString(); setCommandLineOptions("--profiling=blocks+html");getErrorString(); simulate(Modelica.Fluid.Examples.HeatExchanger.HeatExchangerSimulation);getErrorString();
I get the html file with all information.
So, I guess this is an OMEdit issue, @adeas31, could you please give a look?
comment:14 by , 6 years ago
I also opened PR#108 to update the online manual of the profiler, @adeas31, can you please check and merge into master?
comment:18 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Adrian will look into this