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

simulate() does not work on running OM copy

simulate() does not work on running OM copy

Hey!

I just downloaded the latest OM code from svn and compiled it on archlinux kernel 3.8.4 x86_64 with
g++ 4.7.2
./configure --with-omniORB --without-paradiseo

I tried it with paradisEO 1.3/1.4 beta and 2.0.1 (I know 2.0 is unsupported) but it seems like there are
too many comiler errors due to the original code itself... So I had to add the extra flag ...

Everything works (OMShell, OMEdit, OMNotebook, ...) but not a single code can be simulated! In
general the error starts like:

DASSL--  SOME ELEMENT OF INFO VECTOR IS NOT ZERO OR ONE
stdout            | warning | The code has encountered trouble from which it cannot recover.


I have no clue where to start on debugging this demon at all and would appreciate
any helpful advices as I need this to run on my laptop soon. Lately I used a different machine
with ubuntu (works like a charm) but I can not change my whole system just because of OM!

Edited by: mabu - Mar-29-13 19:59:27

Re: simulate() does not work on running OM copy

Since you had to use --without-paradiseo it means you are using some C-compiler that follows published standards (probably gcc 4.7 or 4.8).
I would need to see the output of checkSettings() to try to reproduce the error though.

Re: simulate() does not work on running OM copy

OMShell Copyright 1997-2013, Open Source Modelica Consortium (OSMC)
Distributed under OMSC-PL and GPL, see www.openmodelica.org

To get help on using OMShell and OpenModelica, type "help()" and press enter
Started server using:omc +d=interactive > /tmp/omshell.log 2>&1 &
>>> checkSettings()
record OpenModelica.Scripting.CheckSettingsResult
    OPENMODELICAHOME = "/usr/local",
    OPENMODELICALIBRARY = "/usr/local/lib/omlibrary:/home/mathias/.openmodelica/libraries/",
    OMC_PATH = "/usr/local/bin/omc",
    SYSTEM_PATH = "/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/bin/core_perl:/opt/qt/bin:/usr/lib/qt4/bin",
    OMDEV_PATH = "",
    OMC_FOUND = true,
    MODELICAUSERCFLAGS = "",
    WORKING_DIRECTORY = "/home/mathias",
    CREATE_FILE_WORKS = true,
    REMOVE_FILE_WORKS = true,
    OS = "linux",
    SYSTEM_INFO = "Linux laptop 3.8.4-1-ARCH #1 SMP PREEMPT Wed Mar 20 22:10:25 CET 2013 x86_64 GNU/Linux
",
    RTLIBS = "  -lrt -lgc -fopenmp -llapack  -lpthread",
    C_COMPILER = "gcc",
    C_COMPILER_VERSION = "Es werden eingebaute Spezifikationen verwendet.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.2/lto-wrapper
Ziel: x86_64-unknown-linux-gnu
Konfiguriert mit: /build/src/gcc-4.7.2/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --enable-libstdcxx-time --enable-gnu-unique-object --enable-linker-build-id --with-ppl --enable-cloog-backend=isl --disable-ppl-version-check --disable-cloog-version-check --enable-lto --enable-gold --enable-ld=default --enable-plugin --with-plugin-ld=ld.gold --with-linker-hash-style=gnu --enable-multilib --disable-libssp --disable-build-with-cxx --disable-build-poststage1-with-cxx --enable-checking=release
Thread-Modell: posix
gcc-Version 4.7.2 (GCC)
",
    C_COMPILER_RESPONDING = true,
    HAVE_CORBA = true,
    CONFIGURE_CMDLINE = "Configured 2013-03-29 14:46:31 using arguments: '--with-omniORB --without-paradiseo --prefix=/usr/local'"
end OpenModelica.Scripting.CheckSettingsResult;
>>>


The sentence "Es werden eingebaute Spezifikationen verwendet." tells the user that buildin specifications are used.

Re: simulate() does not work on running OM copy

I think I reproduced the system perfectly (compare my settings), but I cannot reproduce the error-message (I tried Modelica.Mechanics.MultiBody.Examples.Elementary.DoublePendulum). Did you use some other model or does this one also fail?

Code:

record OpenModelica.Scripting.CheckSettingsResult

    OPENMODELICAHOME = "/usr/local/",
    OPENMODELICALIBRARY = "/usr/local//lib/omlibrary:/home/xbmc/.openmodelica/libraries/",
    OMC_PATH = "/usr/local//bin/omc",
    SYSTEM_PATH = "/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/bin/core_perl",
    OMDEV_PATH = "",
    OMC_FOUND = true,
    MODELICAUSERCFLAGS = "",
    WORKING_DIRECTORY = "/home/xbmc/OpenModelica",
    CREATE_FILE_WORKS = true,
    REMOVE_FILE_WORKS = true,
    OS = "linux",
    SYSTEM_INFO = "Linux htpc 3.8.4-1-ARCH #1 SMP PREEMPT Wed Mar 20 22:10:25 CET 2013 x86_64 GNU/Linux
",
    RTLIBS = "  -lrt -lgc -fopenmp -llapack  -lpthread",
    C_COMPILER = "gcc",
    C_COMPILER_VERSION = "Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.2/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /build/src/gcc-4.7.2/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --enable-libstdcxx-time --enable-gnu-unique-object --enable-linker-build-id --with-ppl --enable-cloog-backend=isl --disable-ppl-version-check --disable-cloog-version-check --enable-lto --enable-gold --enable-ld=default --enable-plugin --with-plugin-ld=ld.gold --with-linker-hash-style=gnu --disable-multilib --disable-libssp --disable-build-with-cxx --disable-build-poststage1-with-cxx --enable-checking=release
Thread model: posix
gcc version 4.7.2 (GCC)
",
    C_COMPILER_RESPONDING = true,
    HAVE_CORBA = true,
    CONFIGURE_CMDLINE = "Configured 2013-03-29 21:14:35 using arguments: '--with-omniORB --without-paradiseo --disable-modelica3d'"
end OpenModelica.Scripting.CheckSettingsResult;

Re: simulate() does not work on running OM copy

It is still the same error. But I can change to euler (forward I guess?) and it will work. I know it means
less accuracy, but I have never heard of DASSL before. What kind of integration method is it?

Still, thanks for the work sjoelund.se! I have no idea why I have this error and why you can not reproduce it,
so I do not know if there is a way for further investigations. Please tell me what kind of data I can send to
you...

Happy eastern to you!

Code:


DASSL--  SOME ELEMENT OF INFO VECTOR IS NOT ZERO OR ONE
stdout            | warning | The code has encountered trouble from which it cannot recover.
stdout            | warning | can't continue. time = 0.006000
stdout            | info    | model terminate | Integrator failed. | Simulation terminated at time 0.006
LOG_STATS         | info    | ### STATISTICS ###
LOG_STATS         | info    | timer
|                 | |       | |   0.00125966s [ 55.8%] pre-initialization
|                 | |       | |  0.000697574s [ 30.9%] initialization
|                 | |       | |  0.000175581s [  7.8%] steps
|                 | |       | |   0.00127572s [ 56.6%] creating output-file
|                 | |       | |    1.676e-06s [  0.1%] event-handling
|                 | |       | |   1.0336e-05s [  0.5%] overhead
|                 | |       | |    0.0022558s [100.0%] simulation
LOG_STATS         | info    | events
|                 | |       | |     0 state events
|                 | |       | |     0 sample events
LOG_STATS         | info    | solver
|                 | |       | |     0 steps taken
|                 | |       | |     0 calls of functionODE
|                 | |       | |     0 evaluations of jacobian
|                 | |       | |     0 error test failures
|                 | |       | |     0 convergence test failures
LOG_STATS         | info    | ### END STATISTICS ###

Re: simulate() does not work on running OM copy

Dassl is an implicit, variable-step solver that can handle stiff systems. Most Modelica tools use some variation of dassl as the default solver.

It might be that the code would run if you ./configure [...] CFLAGS="-O2" since then some SSE instructions might be skipped (my CPU is an Intel Atom D525).

You could see if the code I generated works for you: http://dev.openmodelica.org/~marsj/DP.tar.xz

Code:

tar xJf DP.tar.xz

make -f Modelica.Mechanics.MultiBody.Examples.Elementary.DoublePendulum.makefile
./Modelica.Mechanics.MultiBody.Examples.Elementary.DoublePendulum

Changing the compiler used to compile omc may also help. /configure [...] CC=clang CXX=clang++ compiles code much faster than gcc.

After changing CFLAGS, it is enough to "make -C SimulationRuntime/c/ clean". If you change CC and CXX a full make clean is safer.

Re: simulate() does not work on running OM copy

I am building on a Mac, (using the Macports instructions).  I have been running the daily versions.  I also can't get dassl to work at all.  All the examples consistently give the same results as above, with just the default settings.  On the other hand if I use euler I can get results from the examples that make sense. 
I have tried building both with clang and with gcc44 and they each give the same results with dassl
     DASSL--  SOME ELEMENT OF INFO VECTOR IS NOT ZERO OR ONE
This is both from OMShell and OMEdit.  I also just installed sundials and now I can get results from radau.

There are 0 guests and 0 other users also viewing this topic
You are here: