Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register
  • Index
  • » Users
  • » Raphael
  • » Profile

Posts

Posts

Mar-08-13 12:14:41
OMEdit crashes directly after flash window is visible

I have also this problem when trying to launch OMEdit on OS X 10.8.2 since several months.
Before the segmentation fault occurs, I can see the starting screen of OMEdit. MSL starts loading and it fails some seconds after.
Since I mainly use OMShell which works well, I didn't take time to report this error earlier.

OMEdit in the release 1.8.1 of OpenModelica works well.

Here are the following versions of qt package installed via macports (if there is a link with this seg fault when launching OMEdit):
  qt4-mac @4.8.4_6 (active)
  qwt52 @5.2.3_0+qt4 (active)

Hi,

Sorry for late answer, but i got these timings:
* with partial model and 4 combiTimeTables:
    timeFrontend = 1.5306536700000002,
    timeBackend = 0.669462612,
    timeSimCode = 0.12590120600000002,
    timeTemplates = 0.09917368600000001,
    timeCompile = 0.832953845,
    timeSimulation = 139.272365344,
    timeTotal = 142.530665018
* with partial model and 7 combiTimeTables:
    timeFrontend = 2.034122126,
    timeBackend = 0.872566469,
    timeSimCode = 0.17585834,
    timeTemplates = 0.126219451,
    timeCompile = 1.054016333,
    timeSimulation = 438.42944458200003,
    timeTotal = 442.69237597100005

The two simulations use the same model, but several additional time tables are defined in the second run.

I got additional information using measureTime=true:
<simulation>
<modelinfo>
  <name>test</name>
  <prefix>test</prefix>
  <date>2012-07-18 17:20:18</date>
  <method>dassl</method>
  <outputFormat>csv</outputFormat>
  <outputFilename>test_res.csv</outputFilename>
  <outputFilesize>590675</outputFilesize>
  <overheadTime>0.000431</overheadTime>
  <preinitTime>0.000542</preinitTime>
  <initTime>438.074586</initTime>
  <eventTime>0.002683</eventTime>
  <outputTime>0.048277</outputTime>
  <linearizeTime>0.000000</linearizeTime>
  <totalTime>876.257215</totalTime>
  <totalStepsTime>0.007271</totalStepsTime>
  <numStep>365</numStep>
  <maxTime>0.001215089</maxTime>
</modelinfo>
<profilingdataheader>
  <filename>test_prof.data</filename>
  <filesize>38064</filesize>
  <format>
    <uint32>step</uint32>
    <double>time</double>
    <double>cpu time</double>
    <uint32>Modelica.Blocks.Sources.CombiTimeTable.tableTimeIpo (calls)</uint32>
    <uint32>Modelica.Blocks.Sources.CombiTimeTable.tableTimeInit (calls)</uint32>
    <uint32>EonavLib.Components.PowerSystemC.Control.PMS (calls)</uint32>
    <uint32>Modelica.Blocks.Tables.CombiTable1D.tableIpo (calls)</uint32>
    <uint32>Modelica.Blocks.Tables.CombiTable1D.tableInit (calls)</uint32>
    <uint32>Modelica.Blocks.Sources.CombiTimeTable.tableTimeTmin (calls)</uint32>
    <uint32>Modelica.Blocks.Sources.CombiTimeTable.tableTimeTmax (calls)</uint32>
    <double>Modelica.Blocks.Sources.CombiTimeTable.tableTimeIpo (cpu time)</double>
    <double>Modelica.Blocks.Sources.CombiTimeTable.tableTimeInit (cpu time)</double>
    <double>EonavLib.Components.PowerSystemC.Control.PMS (cpu time)</double>
    <double>Modelica.Blocks.Tables.CombiTable1D.tableIpo (cpu time)</double>
    <double>Modelica.Blocks.Tables.CombiTable1D.tableInit (cpu time)</double>
    <double>Modelica.Blocks.Sources.CombiTimeTable.tableTimeTmin (cpu time)</double>
    <double>Modelica.Blocks.Sources.CombiTimeTable.tableTimeTmax (cpu time)</double>
  </format>
</profilingdataheader>
<functions>
  <function id="fun152">
    <name>Modelica.Blocks.Sources.CombiTimeTable.tableTimeIpo</name>
    <ncall>357222166</ncall>
    <time>25.055090068</time>
    <maxTime>0.000128783</maxTime></function>
  <function id="fun153">
    <name>Modelica.Blocks.Sources.CombiTimeTable.tableTimeInit</name>
    <ncall>14</ncall>
    <time>0.002904343</time>
    <maxTime>0.002904343</maxTime>
  </function>
  <function id="fun154">
    <name>f1</name>
    <ncall>51031924</ncall>
    <time>18.877085101</time>
    <maxTime>18.876788672</maxTime>
  </function>
  <function id="fun155">
    <name>Modelica.Blocks.Tables.CombiTable1D.tableIpo</name>
    <ncall>1224762270</ncall>
    <time>81.967103370</time>
    <maxTime>81.966007920</maxTime>
  </function>
  <function id="fun156">
    <name>Modelica.Blocks.Tables.CombiTable1D.tableInit</name>
    <ncall>48</ncall>
    <time>0.000099072</time>
    <maxTime>0.000099072</maxTime>
  </function>
  <function id="fun157">
    <name>Modelica.Blocks.Sources.CombiTimeTable.tableTimeTmin</name>
    <ncall>357216181</ncall>
    <time>16.263642791</time>
    <maxTime>0.000000000</maxTime>
  </function>
  <function id="fun158">
    <name>Modelica.Blocks.Sources.CombiTimeTable.tableTimeTmax</name>
    <ncall>357216181</ncall>
    <time>18.669338380</time>
    <maxTime>18.669338380</maxTime>
  </function>
</functions><profileblocks>
</profileblocks>
</simulation>

If i understand well what is generated in test_prof.xml, the major time consuming phase is initialization with a lots of calls of Modelica.Blocks.Tables.CombiTable1D.tableIpo function calls (475342134 calls for about 33 seconds in the 1rst case and 1224762270 calls for 82 seconds in the second case). Is there a way to improve these timings?

Regards,
R.C.

Hi again,

I made a simple test using a previous version of omc (1.8.1 release, i.e. r11645) comparing to my current development version (r12101) and it is really faster with r11645. With r12101 compared to r11645, simulation times are at least multiplied by 5.
Maybe some solving algorithms have been modified between these releases and it is not the same problem than the one with combitimetables.
This great time difference has been mesured on 2 different computers, one under windows and the other under macos.

I'll make a bug report soon, but if any of you have others clues...

Raphael.

Hi,

I'm having performance problems with my models including several combitimetables. There are less than 1000 variables/equations and the models does not seem so complex, but I noticed that a reduced version, without some tables and a component, simulates in 16 seconds, whereas for the complete model I have to wait 1000 seconds. Moreover, the component, that is not used in the reduced version, simulate alone in 0.2 s.

My simulations take some input data depending on time and we have 10 combitimetables at the moment, but we have to take into account some additional ones. At the beginning, we try to simulate on 2677800 seconds with 4464 number of intervals corresponding to the duration and sampling of our data. I can imagine that it may be difficult to simulate on about 1 month, but now we consider 3-4 days and each sub-model simulate very quickly (also for one month simulation) in less than 1s.

I made a simple test with my partial model simulating in 16s. If I just add the 2 combitimetables needed for the last component, which I kept in comment, and I have to wait a very long time (I stop the simulation after a few minutes). In that case, the simulation should be the same, there are only 2 tables to load in additions to previous ones and they do not interfere with models to simulate.

Previously, I also noticed some errors when my file names and table names are not enough different. I don't take time to clarify that, but I had the feeling that omc didn't take the right tables. I'll try to make a simple test model if I have time.

I hope i was clear and that the(se) problem(s) could be solved quickly. I don't know if I should report a bug on that and if some of you already encounter such issues.

Hopefully it works with last devel build with default variant: @11454_0+qt

Thanks for all!

Unfortunately, it does not work current/sad.

openmodelica is installed in /opt/openmodelica and when i try to use omc i got the following error:
terminate called after throwing an instance of '__gnu_cxx::__concurrence_lock_error'
  what():  __gnu_cxx::__concurrence_lock_error
Abort trap

When i try to launch OMShell i get:
dyld: Library not loaded: /opt/openmodelica/lib/libreadline.6.2.dylib
  Referenced from: /opt/openmodelica/bin/./OMShell-terminal
  Reason: image not found
Trace/BPT trap

With macports i can install package openmodelica, but not openmodelica-devel. In the first case, omc command fails to execute the simulation, but the other steps work well (checkModel, instantiateModel).

Thanks, i'll try this binary version! I hope this will solve my problem.

I already made port clean command (each time i got a problem).

After several weeks, i decided to update my running openmodelica-devel install. I am on osX 10.6 with macports 2.04. (Openmodelica package make some error when executing the simulation: ld: duplicate symbol ___inline_isinff already detailed in a bug report)
I get errors when trying to install openmodelica-devel:
- first i got a _globaljmpbuf error, so i uninstall macports and i make a fresh macports 2.04 install.
- i have now the folowwing error (last lines of the generated main.log):

:info:build make[2]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-devel/openmodelica-devel/work/openmodelica_11448/OMShell/OMShellGUI'
:info:build /opt/local/bin/g++-mp-4.4 -headerpad_max_install_names  -Xarch_x86_64 -mmacosx-version-min=10.6 -o ../bin/OMShell.app/Contents/MacOS/OMShell commandcompletion.o omc_communication.o omc_communicator.o omcinteractiveenvironment.o oms.o main.o moc_commandcompletion.o moc_omc_communicator.o moc_oms.o qrc_oms.o     /opt/local/lib/libomniORB4.a /opt/local/lib/libomnithread.a -lpthread -L/opt/local/lib -lQtXml -lQtGui -lQtCore
:info:build g++-mp-4.4: unrecognized option '-Xarch_x86_64'
:info:build ld: can't write output file: ../bin/OMShell.app/Contents/MacOS/OMShell
:info:build collect2: ld returned 1 exit status
:info:build make[2]: *** [../bin/OMShell.app/Contents/MacOS/OMShell] Error 1
:info:build make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-devel/openmodelica-devel/work/openmodelica_11448/OMShell/OMShellGUI'
:info:build make[1]: *** [OMShell] Error 2
:info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-devel/openmodelica-devel/work/openmodelica_11448/OMShell/OMShellGUI'
:info:build make: *** [omshell] Error 2
:info:build make: *** Waiting for unfinished jobs....
:info:build thread.cpp: In member function 'bool Semaphore::Post()':
:info:build thread.cpp:184: warning: comparison between signed and unsigned integer expressions
:info:build thread.cpp: In member function 'bool Semaphore::Post(unsigned int)':
:info:build thread.cpp:206: warning: comparison between signed and unsigned integer expressions
:info:build thread.cpp:208: warning: comparison between signed and unsigned integer expressions
:info:build ld: can't write output file: SampleClient/client
:info:build collect2: ld returned 1 exit status
:info:build make[1]: *** [client] Error 1
:info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-devel/openmodelica-devel/work/openmodelica_11448/SimulationRuntime/interactive'
:info:build make: *** [interactive] Error 2
:info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-devel/openmodelica-devel/work/openmodelica_11448'
:info:build shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-devel/openmodelica-devel/work/openmodelica_11448" && /usr/bin/make -j2 -w all omlibrary " returned error 2
:error:build Target org.macports.build returned: shell command failed (see log for details)
:debug:build Backtrace: shell command failed (see log for details)
    while executing
"command_exec build"
    (procedure "portbuild::build_main" line 8)
    invoked from within
"$procedure $targetname"
:info:build Warning: the following items did not execute (for openmodelica-devel): org.macports.activate org.macports.build org.macports.destroot org.macports.install
:notice:build Log for openmodelica-devel is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-devel/openmodelica-devel/main.log


It seems like macports 2.04 create a new user macports and it makes some problems even if i use sudo to become root.

  • Index
  • » Users
  • » Raphael
  • » Profile
You are here: