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
  • » Xwang
  • » Profile

Posts

Posts

Jun-27-15 11:37:45
Category: Developer

yesterday it compiled correctly.
Today it gives the following errors:

Code:


/usr/bin/omc +n=1 build/Patternm.stamp.mos
2 errors out of 2 messages:
[/home/andreak/tmp/yaourt-tmp-andreak/aur-openmodelica-git/src/openmodelica-git/OMCompiler/Compiler/FrontEnd/Patternm.mo:2340:5-2340:112:writable] Error: Could not solve the polymorphism in the function call to .DAEUtil.traverseDAEEquationsStmts
  Input bindings:
    $Type_a:
      tuple<.Patternm.traverseCasesTopDown.FuncExpType<function>(DAE.Exp inExp, polymorphic<A> inTypeA) => (DAE.Exp outExp, #Boolean cont, polymorphic<A> outA), polymorphic<A>>
      tuple<.Expression.traverseSubexpressionsTopDownHelper.FuncExpType2<function>(DAE.Exp inExp, polymorphic<$.Expression.traverseSubexpressionsTopDownHelper.Type_a> inTypeA) => (DAE.Exp outExp, #Boolean cont, polymorphic<$.Expression.traverseSubexpressionsTopDownHelper.Type_a> outA), polymorphic<$.Expression.traverseSubexpressionsTopDownHelper.Type_a>>
      tuple<.Expression.traverseSubexpressionsTopDownHelper.FuncExpType2<function>(DAE.Exp inExp, polymorphic<$.Expression.traverseSubexpressionsTopDownHelper.Type_a> inTypeA) => (DAE.Exp outExp, #Boolean cont, polymorphic<$.Expression.traverseSubexpressionsTopDownHelper.Type_a> outA), polymorphic<$.Expression.traverseSubexpressionsTopDownHelper.Type_a>>
  Solved bindings:
    $.Expression.traverseSubexpressionsTopDownHelper.Type_a:
      polymorphic<A>
  Unsolved bindings:
    $Type_a:
      tuple<.Patternm.traverseCasesTopDown.FuncExpType<function>(DAE.Exp inExp, polymorphic<A> inTypeA) => (DAE.Exp outExp, #Boolean cont, polymorphic<A> outA), polymorphic<A>>
      tuple<.Expression.traverseSubexpressionsTopDownHelper.FuncExpType2<function>(DAE.Exp inExp, polymorphic<A> inTypeA) => (DAE.Exp, Boolean, polymorphic<A>), polymorphic<A>>
[/home/andreak/tmp/yaourt-tmp-andreak/aur-openmodelica-git/src/openmodelica-git/OMCompiler/Compiler/FrontEnd/Patternm.mo:32:1-2949:13:writable] Error: Failed to compile all functions in package Patternm.
Makefile.common:113: set di istruzioni per l'obiettivo "build/Patternm.stamp" non riuscito

Can you help me, please?
Xwang

Jun-27-15 01:09:56
Category: Developer

Thanks.
I've merged my PKGBUILD with your.
This is the result:
https://aur4.archlinux.org/packages/openmodelica-git/
Please let me know if you want that I add you as a contributor and in such a case with which name/username.

Jun-14-15 18:15:48
Category: Developer

I've created this PKGBUILD to compile on arch linux openmodelica from git.

Code:


# Maintainer: xwang
pkgname=openmodelica-git
pkgver=25920
pkgrel=1
pkgdesc="The Open Source Modelica Compiler "
arch=('i686' 'x86_64')
url="https://openmodelica.org"
license=('GPL3')

depends=('java-environment' 'lpsolve' 'hdf5-openmpi' 'omniorb' 'openscenegraph' 'qtwebkit' 'sundials' 'libatomic_ops' 'python' 'gtkglext'  'ruby'   'ipopt' 'qjson' 'suitesparse')

makedepends=('autoconf' 'automake' 'libtool' 'gcc' 'gcc-fortran-multilib' 'boost' 'clang' 'cmake' 'jre7-openjdk' 'antlr2' 'subversion' 'lib32-expat' 'lib32-ncurses' 'lib32-readline')

conflicts=('openmodelica-svn')

source=('openmodelica::git+https://openmodelica.org/git-readonly/OpenModelica.git')
md5sums=('SKIP')

_gitmod="openmodelica"


prepare() {
   cd "${srcdir}"
   rm -r -f "${srcdir}/${_gitmod}"
   git clone https://openmodelica.org/git-readonly/OpenModelica.git "${_gitmod}" --recursive
   rm -r -f "${srcdir}/${_gitmod}/OMOptim"
}

build() {
   cd "${srcdir}/${_gitmod}"
   autoconf
   ./configure --prefix=/usr/ \
       --without-paradiseo \
       --with-omniORB \
       --with-lapack='-llapack -lblas'

   make
}

#check() {
#   cd "${srcdir}/${_svnmod}"
#   make test
#}

package() {
  mkdir -p ${pkgdir}/usr/
  cd "${srcdir}/${_gitmod}"
  cp -r build/* ${pkgdir}/usr/
}


If someone uses arch linux and wants to cross test it then I can put it on AUR.
Actually I'm running the make test in the testsuite directory.

As you can see I have erased the OMOptim directory because it has given me a compiling error (later I can try again to search a solution) and I don't know how to modify the prepare() function in order to avoid to delete all the folder and clone from git every time the package is recreated (is the git is already present maybe it is possible to only update it, but I don't know how to detect if it is present and which command in such case should I use to update the local copy instead of git clone).

Thank you,
Xwang

Jun-14-15 09:45:51
Category: Developer

Ok, than you.

I've downloaded the sources from git and I'm compiling with -O1 option.
make exited with the following error whwn compiling OMOptim:

No rules to generate the target " /usr/share/omc//omc_communication.idl " necessary for " omc_communication.cc " . Arrest

(traslated from italian)

Now I'm trying to compile without OMOptim (I've erased that folder)

Jun-09-15 20:58:17
Category: Developer

I to all.
I'm trying to compile and install the trunk repository on my Arch linux 64 system.
First of all I've had to set the optimization flag to -O1 because -O2 gave an internal compiler error (I'm using gcc (GCC) 5.1.0).
I've compiled the trunk repository with the following configuration options:
    ./configure --prefix=/usr/ --with-paradiseo=/usr/lib64

The make finished correctly.
Then I've executed make test and in the attached file there are the logs of the tests with errors
failedTestsLogs.zip

Then I've tried to execute the make install and it exited with this error:

Code:


if [ "" = ".app" ]; then mkdir -p /home/andreak/tmp/yaourt-tmp-andreak/aur-openmodelica-svn/pkg/openmodelica-svn/Applications/MacPorts/; fi
mkdir -p /home/andreak/tmp/yaourt-tmp-andreak/aur-openmodelica-svn/pkg/openmodelica-svn/usr/bin
mkdir -p /home/andreak/tmp/yaourt-tmp-andreak/aur-openmodelica-svn/pkg/openmodelica-svn/usr/lib/
mkdir -p /home/andreak/tmp/yaourt-tmp-andreak/aur-openmodelica-svn/pkg/openmodelica-svn/usr/include/omc
mkdir -p /home/andreak/tmp/yaourt-tmp-andreak/aur-openmodelica-svn/pkg/openmodelica-svn/usr/include/x86_64-linux-gnu/omc/antlr3
mkdir -p /home/andreak/tmp/yaourt-tmp-andreak/aur-openmodelica-svn/pkg/openmodelica-svn/usr/share/doc//omc/testmodels
mkdir -p /home/andreak/tmp/yaourt-tmp-andreak/aur-openmodelica-svn/pkg/openmodelica-svn/usr/share/man//man1/
mkdir -p /home/andreak/tmp/yaourt-tmp-andreak/aur-openmodelica-svn/pkg/openmodelica-svn/usr/share/locale
test ! -d ./build/share//omnotebook/ || mkdir -p /home/andreak/tmp/yaourt-tmp-andreak/aur-openmodelica-svn/pkg/openmodelica-svn/usr/share//omnotebook/
test ! -d ./build/share//omshell/nls/ || mkdir -p /home/andreak/tmp/yaourt-tmp-andreak/aur-openmodelica-svn/pkg/openmodelica-svn/usr/share//omshell/nls/
test ! -d ./build/share//omedit/nls/ || mkdir -p /home/andreak/tmp/yaourt-tmp-andreak/aur-openmodelica-svn/pkg/openmodelica-svn/usr/share//omedit/nls/
mkdir -p /home/andreak/tmp/yaourt-tmp-andreak/aur-openmodelica-svn/pkg/openmodelica-svn/usr/share//omc/scripts /home/andreak/tmp/yaourt-tmp-andreak/aur-openmodelica-svn/pkg/openmodelica-svn/usr/share/omc/java
echo Installing OpenModelica...
Installing OpenModelica...
# Application directory (OSX)
if [ "" = ".app" ]; then cp -rp ./build/Applications/ /home/andreak/tmp/yaourt-tmp-andreak/aur-openmodelica-svn/pkg/openmodelica-svn/Applications/MacPorts/; fi
# Binaries
cp -a ././build/bin/* /home/andreak/tmp/yaourt-tmp-andreak/aur-openmodelica-svn/pkg/openmodelica-svn/usr/bin
# Libraries
cp -a ././build/lib/* /home/andreak/tmp/yaourt-tmp-andreak/aur-openmodelica-svn/pkg/openmodelica-svn/usr/lib/
# Includes
cp -a ././build/include/omc/* /home/andreak/tmp/yaourt-tmp-andreak/aur-openmodelica-svn/pkg/openmodelica-svn/usr/include/omc
cp -a ././build/include/[b]omc[/b]/x86_64-linux-gnu/omc/antlr3 /home/andreak/tmp/yaourt-tmp-andreak/aur-openmodelica-svn/pkg/openmodelica-svn/usr/include/x86_64-linux-gnu/omc/antlr3
cp: impossibile eseguire stat di "././build/include/omc/x86_64-linux-gnu/omc/antlr3": File o directory non esistente
Makefile.common:388: set di istruzioni per l'obiettivo "install" non riuscito
make: *** [install] Errore 1

because the bold part of that path does not exists.
The build process has created this folder ././build/include/x86_64-linux-gnu/omc/antlr3

So I presume it is an error in the Makefile.common (line 388).
Can you confirm please?
Is it correct to change this line:

Code:


cp -a ./${builddir_inc}/$(host_short)/omc/antlr3 ${INSTALL_INCLUDEDIR}/$(host_short)/omc/antlr3

with this one:

Code:


cp -a ./${builddir_inc}/../$(host_short)/omc/antlr3 ${INSTALL_INCLUDEDIR}/$(host_short)/omc/antlr3

Thank you,
Xwang

May-19-13 02:02:03
Category: Developer

Perfect.
So there is no real problem in the above scenario.
Thank you for your help.
Xwang

May-18-13 21:39:49
Category: Developer

So the OSMC-PL is required? Can the OSMC-GPL be used instead (if I 've understood correctly OSMC-GPL covers the compiler which generally do not extend the licence to the compiled code or at least it is so with the gcc compiler)?

May-18-13 13:09:15
Category: Developer

So, if I've correctly understood, if I use openmodelica and my model uses only the modelica standard library, the C code generated from such a model can be distributed with whatever licence I want and, in case, linked to proprietary code.
Is it correct?
Xwang

May-16-13 23:53:33
Category: Developer

What licence should be used for a model in the binary form?
Xwang

sjoelund.se wrote:

You have the possibility to write any function you like using `external "C"`. This means you can make the simulation wait at certain times. For example by sampling every 0.01 seconds and sleeping until the correct time. This should work in any tool.

OpenModelica itself does not have built-in support for soft real-time simulations, although it might in the future.

Ok.
Thank you.
Xwang

PS what about multi body simulation?

Another question:
is it possible to run a model in soft real time? In Simulink is not possible, but using the tic and toc function I'm able to run the model in real time using a while loop. Is ther in case something similar in modelica?
Thank you again,
Xwang

PS next weekend I will try to install it on my arch x86_64 system

Sep-18-12 20:19:51
Incomplete instructions and obtuse errors
Category: Developer

Can someone summarize which packages are required from arch repos, which from AUR and which packages must be compiled with other PKGBUILDs (if any) not (yet) present in AUR, in order to have a complete OpenModelica environment on an x86_64 arch system?
Thank you,
Xwang

More over since I'm starting to develop a vehicle dynamic simulator, I would like to know if openmodelica supports multibody systems.
Thank you again,
Xwang

Is it possible to integrate python code in modelica (I've written some functions which get joystick inputs and send udp packets)?
What kind of ide are available (open source)?
I've seen some screenshots that shows modelica models in a graphical form (like simulink ones).
Moreover what is the difference between openmodelica and jmodelica?
Both are open source, can I use both of them with the same model or the model is somewhat "linked" with the program used to create it?
Is there any arch linux package available?
What about C code generation from a model?
Thank you,
Xwang

Hi to all,
I'm an advanced Simulink user. In particular I use it to create dynamical models of air-crafts for flight dynamics studies and to automatically generate C code from the above models.
Now I'm searching for an open source alternative to Matlab/Simulink and I wonder if I can use OpenModelica as an alternative.
Consider that actually I can use a joystick to popultae some imports of the simulink model and I can send data from simulink to other programs via UDP.
Thank you,
Xwang

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