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

Posts

Posts

Feb-26-13 03:41:05
Is the fluid package working?

I tried a very simple pump from one tank to another with the fluid package, and it hangs forever trying to generate the simulator for that.

Oct-13-12 03:27:31
generated .mo files checked in?
Category: Developer

I see that some files which are generated by the build process are also checked into the Subversion repository.  For instance, both Compiler/Template/CodegenXML.tpl and Compiler/Template/CodegenXML.mo are checked in.  I was always taught that only the source file should be checked in; adding generated files just tends to produce hard-to-identify error cases.  Is there a reason for this?

Oct-09-12 22:36:38
OpenModelica doesn't save
Category: Developer

We've seen this kind of thing over and over with OMedit.  It seems to save some things, and not others.  I've more or less given up on using it to edit models.  Emacs is fine, but you can't really edit the graphics of the models with it.

Sep-28-12 22:12:41
release notes?

Are there any release notes for 1.9.0?  I'd like to know what changed.

Section 9.4 of the Modelica 3.2 spec?

Sep-28-12 20:12:53
can't simulate with latest trunk
Category: Developer

Wasn't sure it was a bug -- thought probably just me doing something stupid :-).   Will do, in the future.

Sep-28-12 04:45:33
can't simulate with latest trunk
Category: Developer

mmc_jumper is present in libSimulationRuntimeC.a, so it must be some linking issue I'm not seeing here.

Code:


% nm /Users/wjanssen/Desktop/OMedit.app/Contents/Resources/lib/omc/libSimulationRuntimeC.a | grep mmc_jumper
                 U _mmc_jumper
nm: no name list
                 U _mmc_jumper
0000000000000008 C _mmc_jumper
                 U _mmc_jumper
%

Sep-28-12 04:18:33
can't simulate with latest trunk
Category: Developer

I installed the latest mmc, then did a make clean and make in OpenModelica.  I got a working OMedit, but it can't simulate:

Code:

Translation    18:15:16        0:0-0:0    Error building simulator. Buildlog: gcc-4.2   -falign-functions -msse2 -mfpmath=sse   -I"/Users/wjanssen/Desktop/OMedit.app/Contents/Resources/include/omc" -I. -L"/local/PARC-QM/META/Modelica/test-circuits"   -c -o rlc_series.o rlc_series.c

gcc-4.2   -falign-functions -msse2 -mfpmath=sse   -I"/Users/wjanssen/Desktop/OMedit.app/Contents/Resources/include/omc" -I. -L"/local/PARC-QM/META/Modelica/test-circuits"   -c -o rlc_series_records.o rlc_series_records.c
g++-4.2 -I. -o rlc_series rlc_series.o rlc_series_records.o -I"/Users/wjanssen/Desktop/OMedit.app/Contents/Resources/include/omc" -I. -L"/local/PARC-QM/META/Modelica/test-circuits"  -L"/local/PARC-QM/META/Modelica/test-circuits"     -falign-functions -msse2 -mfpmath=sse   -L"/Users/wjanssen/Desktop/OMedit.app/Contents/Resources/lib/omc" -lSimulationRuntimeC   -ldl -linteractive  -lexpat -L/local/open-modelica/lib  -lintl -liconv  -lsundials_kinsol -lsundials_nvecserial -llapack  -lpthread -lf2c
Undefined symbols for architecture x86_64:
  "_mmc_jumper", referenced from:
      _omc_assert_function in libSimulationRuntimeC.a(omc_error.o)
      _omc_throw_function in libSimulationRuntimeC.a(omc_error.o)
      _omc_terminate_function in libSimulationRuntimeC.a(omc_error.o)
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make: *** [omc_main_target] Error 1

Sep-28-12 03:28:49
can't compile trunk
Category: Developer

Thanks, got it.

Sep-26-12 22:28:49
can't compile trunk
Category: Developer

Code:

make -f Makefile omc

/local/open-modelica/bin/rmlc -Wr,-Wshow-warnings,-ftrace,-I../FrontEnd,-I../BackEnd,-I../Template,-I../Util,-I../Script,-I../Main,-I../Global +C ../FrontEnd/Ceval.mo
"/local/open-modelica/bin/rml" -Eplain -Wshow-warnings -ftrace -I../FrontEnd -I../BackEnd -I../Template -I../Util -I../Script -I../Main -I../Global ../FrontEnd/Ceval.mo
Ceval.mo:6433.77-6433.81 Error: unbound variable info
Error: StaticElaborationError
make[3]: *** [Ceval.c] Error 1
make[2]: *** [all] Error 2
make[1]: *** [omc_release] Error 2
make: *** [omc] Error 2
[pippin:/local/open-modelica/src] wjanssen%

This is with the latest version of the trunk.

May-12-12 04:57:05
Category: Programming

Anything interesting happen at the Modelica Design Meeting?  Was, for instance, the critical issue #95 (rooted()) addressed?

The memory corruption is apparently due to a disagreement between RML (which detected a 64-bit platform), and OpenModelica (which detects a 32-bit platform).  When I force RML to build with 32-bit data structures, things work.

Still haven't figured out the memory corruption issue with omc.

I see what's going on with OMPlot.  I'm building on a Mac, but not using MacPorts, just treating it as a Unix box.  However, I've got Qt installed on this Mac, via the Qt installer for the Mac.  This puts qmake in /usr/bin/qmake.  That particular version of qmake generates xcode makefiles (Makefile.xcodeproj, for instance) instead of regular Makefiles.  This means that in the OMPlot/OMPlotGUI directory, the "Makefile" and "Makefile.lib" files exist, but they are empty.  The existing hack of qmake.sh for Macs doesn't allow for this.

If I just do "make omc", I get a build of omc, but it's strange.  Seems to have random memory corruption:

Code:

holmes : /local/open-modelica/src 87 % ./build/bin/omc /tmp/testEngine.mos 

File does not exist: /tmp/testEng^@^@^C\220V
# Error encountered! Exiting...
# Please check the error message and the flags.

Execution failed!
holmes : /local/open-modelica/src 88 % file /tmp/testEngine.mos
/tmp/testEngine.mos: ASCII text
holmes : /local/open-modelica/src 89 %

Code:

holmes : /local/open-modelica/src 89 % otool -L ./build/bin/omc

./build/bin/omc:
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.1.7)
    /usr/lib/libssl.0.9.7.dylib (compatibility version 0.9.7, current version 0.9.7)
    /usr/lib/libcrypto.0.9.7.dylib (compatibility version 0.9.7, current version 0.9.7)
    /usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
    /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib (compatibility version 1.0.0, current version 218.0.0)
    /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib (compatibility version 1.0.0, current version 218.0.0)
    /usr/lib/libsqlite3.0.dylib (compatibility version 9.0.0, current version 9.6.0)
    /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.4.0)
    /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
holmes : /local/open-modelica/src 90 %

I checked out a clean copy of the source trunk, and tried to build it today.  Errors out with this:


Code:

make -C OMPlot/OMPlotGUI -f Makefile.unix

sh /local/open-modelica/src/qmake.sh
cat: Makefile: No such file or directory
sh /local/open-modelica/src/qmake.sh OMPlotLib.pro -o Makefile.lib
cat: Makefile.lib: No such file or directory
make -f Makefile.lib
make[2]: *** No targets.  Stop.
make[1]: *** [libOMPlot] Error 2
make: *** [omplot] Error 2

My config is

Code:

'--disable-python-interface' '--without-paradiseo' '--with-MICO=/local/open-modelica' '--with-qwt=/local/open-modelica/qwt-6.0.1/lib' '--prefix=/local/open-modelica' '--with-static-lpsolve=/local/open-modelica' 'CFLAGS=-I/local/open-modelica/include -L/local/open-modelica/lib'

I'm using Qt 4.8.1 on OS X 10.5.8.

Bill

Apr-25-12 22:22:33
Category: Developer

Unfortunately, CFLAGS is usually a mess of LDFLAGS and CPPFLAGS and various other stuff, some of which may not even be appropriate for CXX.

But it's a good point.  I'm not really sure what should go into CXXFLAGS, so I can just put that into CFLAGS.

Apr-25-12 21:52:27
Category: Developer

My configure.in is a bit different:


Code:

Index: configure.in

===================================================================
--- configure.in    (revision 11797)
+++ configure.in    (working copy)
@@ -258,7 +258,7 @@
   LIBS=""
   AC_SEARCH_LIBS(dlopen,dl)
   AC_SEARCH_LIBS(sqrt,m)
-  LIBS="$LPLIB/liblpsolve55_pic.a $LPLIB/libcolamd.a $LIBS"
+  LIBS="$LPLIB/liblpsolve55_pic.a $LIBS"
   AC_MSG_CHECKING([for static lpsolve55])
   AC_LINK_IFELSE([AC_LANG_CALL([], [make_lp])], [LIBLPSOLVE55=$LIBS], [AC_MSG_ERROR([failed])])
   AC_MSG_RESULT([$LIBLPSOLVE55])
@@ -544,6 +544,7 @@
SimulationRuntime/c/ModelicaExternalC/Makefile \
SimulationRuntime/c/simulation/libf2c/makefile.u \
SimulationRuntime/interactive/Makefile \
+tools/Makefile \
mosh/src/Makefile \
"

./config.status -config  yields

Code:

'--disable-python-interface' '--without-paradiseo' '--with-MICO=/local/open-modelica' '--with-qwt=/usr/local/qwt-6.0.1/lib' '--prefix=/local/open-modelica' '--with-static-lpsolve=/local/open-modelica' 'CC=gcc-4.2' 'LDFLAGS=-L/local/QtSDK/Desktop/Qt/474/gcc/lib -L/local/open-modelica/lib -F/usr/local/qwt-6.0.1/lib' 'CPPFLAGS=-I/local/QtSDK/Desktop/Qt/474/gcc/include -I/local/open-modelica/include -I/usr/local/qwt-6.0.1/lib/qwt.fmework/Headers/qwt' 'CXX=g++-4.2' 'CXXFLAGS=-I/local/QtSDK/Desktop/Qt/474/gcc/include -I/local/open-modelica/include'

CXXFLAGS resolves to

Code:

-I/local/QtSDK/Desktop/Qt/474/gcc/include -I/local/open-modelica/include

Apr-25-12 19:01:05
Category: Developer

In mosh/src/Makefile.in, the line

Code:

CXXFLAGS = $(CFLAGS)

should be

Code:

CXXFLAGS = @CXXFLAGS@ -I.

Apr-25-12 18:57:06
Category: Developer

OK, tried that.  Now I error out at a different place:

Code:

...

echo Copying omc into ../build/bin
Copying omc into ../build/bin
cp omc_release/omc ../build/bin/
cp OpenModelicaBootstrappingHeader.h ../build/include/omc/
(time make -C PythonInterface -f Makefile)
*** Python interfaced was disabled by user configuration

real    0m0.005s
user    0m0.002s
sys    0m0.002s
*** OpenModelica configured without support for Qt
make -C mosh/src -f Makefile
g++-4.2 -O3 -Wall -DUSE_CORBA -DUSE_MICO -c mosh.cpp
In file included from mosh.cpp:55:
omc_communication.h:8:19: error: CORBA.h: No such file or directory
omc_communication.h:9:24: error: mico/throw.h: No such file or directory
In file included from mosh.cpp:55:
omc_communication.h:20: error: expected initializer before '<' token
omc_communication.h:21: error: expected initializer before '<' token
omc_communication.h:31: error: 'CORBA' has not been declared
omc_communication.h:31: error: expected `{' before 'Object'
omc_communication.h:31: error: function definition does not declare parameters
omc_communication.h:69: error: invalid use of incomplete type 'class OmcCommunication'
omc_communication.h:17: error: forward declaration of 'class OmcCommunication'
omc_communication.h:83: error: 'PortableServer' has not been declared
omc_communication.h:83: error: expected `{' before 'StubBase'
omc_communication.h:83: error: function definition does not declare parameters
omc_communication.h:101: error: 'PortableServer' has not been declared
omc_communication.h:101: error: expected `{' before 'StaticImplementation'
omc_communication.h:101: error: function definition does not declare parameters
omc_communication.h:129: error: 'CORBA' has not been declared
omc_communication.h:129: error: expected initializer before '*' token
mosh.cpp: In function 'void doCorbaCommunication(int, char**, const std::string*)':
mosh.cpp:173: error: 'CORBA' has not been declared
mosh.cpp:173: error: expected `;' before 'orb'
mosh.cpp:179: error: 'CORBA' has not been declared
mosh.cpp:179: error: expected `;' before 'obj'
mosh.cpp:181: error: 'OmcCommunication_var' was not declared in this scope
mosh.cpp:181: error: expected `;' before 'client'
mosh.cpp:187: error: 'client' was not declared in this scope
mosh.cpp:188: error: 'CORBA' has not been declared
mosh.cpp:193: error: 'client' was not declared in this scope
mosh.cpp:194: error: 'CORBA' has not been declared
mosh.cpp:199: error: 'CORBA' has not been declared
mosh.cpp:199: error: 'client' was not declared in this scope
mosh.cpp:218: error: 'client' was not declared in this scope
mosh.cpp:223: error: 'CORBA' has not been declared
make[1]: *** [mosh.o] Error 1
make: *** [mosh] Error 2
/local/open-modelica/src 88 %

Looks like the flags are not being passed properly to this Makefile.  That g++ compile line is just wrong.

What directory is this?

Apr-25-12 18:53:06
MICO no longer an option?
Category: Developer

Right :-).  OK, I'll just add "--disable-python-interface".

Apr-25-12 17:31:17
MICO no longer an option?
Category: Developer

Note that I do have a CORBA implementation, MICO.  But MICO only works for C++.

Apr-25-12 05:01:52
Category: Developer

This is revision 11797.

Apr-24-12 23:20:47
Category: Developer

I can't compile from the checked-in Subversion files (trunk).  Churns along for a while, then errors out with this:

Code:

...

OpenModelica has not been compiled yet. Using previously generated SimCode files.
cp FrontEnd/ModelicaBuiltin.mo FrontEnd/MetaModelicaBuiltin.mo ../build/lib/omc/
(cd omc_release && make)
# You're using the proper Unix Makefile. Thanks for making my life easier.
# Updated dependencies; reload make and compile the target
make -f Makefile omc
make -C ../runtime/ -f Makefile
g++-4.2 -O3 -DUSE_CORBA -DUSE_MICO -I/local/QtSDK/Desktop/Qt/474/gcc/include -I/local/open-modelica/include -I/usr/local/qwt-6.0.1/lib/qwt.fmework/Headers/qwt -I/local/open-modelica/include/plain/ -I../../SimulationRuntime/c -I../../SimulationRuntime/c/simulation/results -I../../SimulationRuntime/c/util -I../../SimulationRuntime/c/meta -I../../SimulationRuntime/c/meta/gc -I../ -I. -I/local/open-modelica//include    -c -o Error_omc.o Error_omc.cpp
In file included from Error_omc.cpp:42:
errorext.cpp: In function 'void* ErrorImpl__getMessages()':
errorext.cpp:347: error: 'Error__ERROR' was not declared in this scope
errorext.cpp:348: error: 'Error__WARNING' was not declared in this scope
errorext.cpp:349: error: 'Error__NOTIFICATION' was not declared in this scope
errorext.cpp:352: error: 'Error__SYNTAX' was not declared in this scope
errorext.cpp:353: error: 'Error__GRAMMAR' was not declared in this scope
errorext.cpp:354: error: 'Error__TRANSLATION' was not declared in this scope
errorext.cpp:355: error: 'Error__SYMBOLIC' was not declared in this scope
errorext.cpp:356: error: 'Error__SIMULATION' was not declared in this scope
errorext.cpp:357: error: 'Error__SCRIPTING' was not declared in this scope
errorext.cpp:360: error: 'Error__MESSAGE' was not declared in this scope
errorext.cpp:367: error: 'Absyn__TIMESTAMP' was not declared in this scope
errorext.cpp:367: error: 'Absyn__INFO' was not declared in this scope
errorext.cpp:368: error: 'Error__TOTALMESSAGE' was not declared in this scope
Error_omc.cpp: In function 'void Error_addMessage(int, void*, void*, const char*, void*)':
Error_omc.cpp:56: error: 'Error__SYNTAX_3dBOX0' was not declared in this scope
Error_omc.cpp:57: error: 'Error__ERROR_3dBOX0' was not declared in this scope
Error_omc.cpp: In function 'void Error_addSourceMessage(int, void*, void*, int, int, int, int, int, const char*, const char*, void*)':
Error_omc.cpp:81: error: 'Error__SYNTAX_3dBOX0' was not declared in this scope
Error_omc.cpp:82: error: 'Error__ERROR_3dBOX0' was not declared in this scope
make[4]: *** [Error_omc.o] Error 1
make[3]: *** [runtime] Error 2
make[2]: *** [all] Error 2
make[1]: *** [omc_release] Error 2
make: *** [omc] Error 2

Apr-24-12 22:47:20
MICO no longer an option?
Category: Developer

I'm compiling the trunk, using a configure option of "--with-MICO=/local/where-mico-is-installed".  However, when it gets down to OMPythonIDL, it tries to run omniidl:

Code:

...

(time make -C PythonInterface -f Makefile)
omniidl -bpython -Wbglobal=_OMCIDL -Wbpackage=OMPythonIDL ..//Compiler/runtime/omc_communication.idl
make[1]: omniidl: No such file or directory
make[1]: *** [OMPythonIDL/omc_communication_idl.py] Error 1

Thanks for the pointer.  Looks like a truly nasty bug.  The design meeting referred to is early May, isn't it?

If the call to world.gravityAcceleration(...) isn't legal Modelica, shouldn't there be an issue in trac.modelica.org about it?  I just looked and couldn't fine one.

Thanks,
Bill

Hi.  I'd like to write a Modelica program to load a model, instantiate it, call BackendDAEOptimize.generateLinearMatrix, and then write that matrix to stdout.  Can anyone point me to an example program which does almost this?  Thanks.

Apr-10-12 22:48:02
Can't install OpenModelica on OS X from MacPorts

I've had luck just checking out the sources and building from scratch on OS X.  Of course, you have to install the pre-reqs by hand, too, but that's not bad.

Thanks for all the info, Adrian and Martin.  I look forward to trying Per's work.

So, why is the 3.2 version so red with respect to MultiBody, while the 3.1 version is so green?  What needs to be done?  Is there anything an individual contributor could do to help with that?

Thanks for the explanation, Martin.

Thanks.  Looks like analog electrical works, but most of the rest is broken.  Ouch.  Is there a work plan or timeline of some sort as to when various things might get addressed?  Or does that mainly depend on graduate student priorities?

I'm being told that the MSL multi-body dynamics library is "known not to work" in OpenModelica.  Can anyone confirm that?  I searched the bug tracker for some indication of this, but found nothing apparently pertinent.

I've found some more quoting issues with XMLDump.mo, mainly spots where the text of an equation or constraint is spit out.  I'm not sure what the DTD for this XML format is, so I've been free with the way that the <function> tag is expressed.  I've also removed the unused import of Debug, just to avoid that error message.

Code:


Index: Compiler/BackEnd/XMLDump.mo
===================================================================
--- Compiler/BackEnd/XMLDump.mo    (revision 11108)
+++ Compiler/BackEnd/XMLDump.mo    (working copy)
@@ -92,7 +92,6 @@
protected import ComponentReference;
protected import Config;
protected import DAEUtil;
-protected import Debug;
protected import Dump;
protected import Error;
protected import Expression;
@@ -536,12 +535,15 @@
       list<Algorithm.Statement> stmts;
       Integer algNo,algNo_1;
       list<DAE.Algorithm> algs;
+      String s;
       
     case({},_) then ();
     case(DAE.ALGORITHM_STMTS(stmts)::algs,algNo)
       equation
         dumpStrOpenTagAttr(ALGORITHM, LABEL, stringAppend(stringAppend(ALGORITHM_REF,"_"),intString(algNo)));
-        Print.printBuf(DAEDump.dumpAlgorithmsStr({DAE.ALGORITHM(DAE.ALGORITHM_STMTS(stmts),DAE.emptyElementSource)}));
+        s = DAEDump.dumpAlgorithmsStr({DAE.ALGORITHM(DAE.ALGORITHM_STMTS(stmts),DAE.emptyElementSource)});
+        s = Util.xmlEscape(s);
+        Print.printBuf(s);
         dumpStrCloseTag(ALGORITHM);
         algNo_1=algNo+1;
         dumpAlgorithms2(algs,algNo_1);
@@ -2073,15 +2075,29 @@
algorithm
   _:= matchcontinue (fun)
     local
+/*
       Absyn.Path name;
+*/
+      String name;
+      String escapedFunctionText;
     case DAE.FUNCTION(type_ = DAE.T_FUNCTION(functionAttributes = DAE.FUNCTION_ATTRIBUTES(isBuiltin = DAE.FUNCTION_BUILTIN(_)))) then ();
     case(fun)
       equation
+/*
         name = DAEUtil.functionName(fun);
         Print.printBuf("\n<");Print.printBuf(FUNCTION);
         Print.printBuf(" ");Print.printBuf(FUNCTION_NAME);Print.printBuf("=\"");Print.printBuf(Absyn.pathStringNoQual(name));Print.printBuf("\"");
-        Print.printBuf(" ");Print.printBuf(MODELICA_IMPLEMENTATION);Print.printBuf("=\"");Print.printBuf(DAEDump.dumpFunctionStr(fun));
+        escapedFunctionText = Util.xmlEscape(DAEDump.dumpFunctionStr(fun));
+        Print.printBuf(" ");Print.printBuf(MODELICA_IMPLEMENTATION);Print.printBuf("=\"");Print.printBuf(escapedFunctionText);
         Print.printBuf("\"/>");
+*/
+        name = Util.xmlEscape(Absyn.pathStringNoQual(DAEUtil.functionName(fun)));
+        dumpStrOpenTagAttr(FUNCTION, FUNCTION_NAME, name);
+        dumpStrOpenTag(MODELICA_IMPLEMENTATION);
+        escapedFunctionText = Util.xmlEscape(DAEDump.dumpFunctionStr(fun));
+        Print.printBuf(escapedFunctionText);
+        dumpStrCloseTag(MODELICA_IMPLEMENTATION);
+        dumpStrCloseTag(FUNCTION);
       then();
     case (_) then();
/*
@@ -3452,6 +3468,7 @@
   _:=
   match (inZeroCrossingLst,addMathMLCode)
     local
+      String s;
       DAE.Exp e;
       Boolean addMMLCode;
       list<BackendDAE.Value> eq,wc;
@@ -3459,7 +3476,9 @@
     case ({},_) then ();
     case (BackendDAE.ZERO_CROSSING(relation_ = e,occurEquLst = eq,occurWhenLst = wc) :: zcLst,addMMLCode)
       equation
-        dumpStrOpenTagAttr(stringAppend(ZERO_CROSSING,ELEMENT_),EXP_STRING,ExpressionDump.printExpStr(e));
+        s = ExpressionDump.printExpStr(e);
+        s = Util.xmlEscape(s);
+        dumpStrOpenTagAttr(stringAppend(ZERO_CROSSING,ELEMENT_),EXP_STRING,s);
         dumpExp(e,addMMLCode);
         dumpLstIntAttr(eq,stringAppend(INVOLVED,EQUATIONS_),stringAppend(EQUATION,ID_));
         dumpLstIntAttr(wc,stringAppend(INVOLVED,stringAppend(WHEN_,EQUATIONS_)),stringAppend(WHEN,stringAppend(EQUATION_,ID_)));

I actually use nXML mode in GNU Emacs.

Either Firefox or Google Chrome works pretty well as an XML inspector.  They'll show you the tree and let you poke around in it.

Feb-11-12 00:29:17
Category: Developer

Yes, we also have problems with the MacPorts stuff.  None of my colleagues here were able to use OMEdit via MacPorts, so I built it from the Subversion sources.  Some interesting issues in doing that.  I'll file some issue tracker reports on it.

Yeah, you really need to look at it with an XML editor, not a text editor.

I noticed that the code to handle MathML tags is missing the emit of a close tag.  Here's a patch.

Bill

Code:


Index: Compiler/BackEnd/XMLDump.mo
===================================================================
--- Compiler/BackEnd/XMLDump.mo    (revision 11031)
+++ Compiler/BackEnd/XMLDump.mo    (working copy)
@@ -1700,6 +1700,7 @@
         dumpStrOpenTag(MathMLElseBranch);
         dumpExp2(fb);
         dumpStrCloseTag(MathMLElseBranch);
+        dumpStrCloseTag(MathMLIfClause);
         dumpStrCloseTag(MathMLApply);
       then ();
     case (DAE.CALL(path = Absyn.IDENT(name = "der"),expLst = args))

Feb-01-12 22:18:21
how to dump a model in XML format?

I'm trying to figure out how to use OMShell to dump a model in an XML format.  There appears to be a dumpBackendDAE method in Compiler/Backend/XMLDump.mo.  Is that the right thing to use?  How does one invoke it from a script?

Jan-27-12 04:03:23
Category: Developer

The latest Mac version of Qt (4.7.4) seems to support frameworks OK.  It's just a matter of putting the right things into OMEdit.config.in and OMPlotGUI.config.in.  I'll make up a patch and post it.

Meanwhile, what should the DIRECTORY argument to configure's "--with-qwt=DIRECTORY" point at?  The directory containing the include headers?  The directory containing the library?  The most specific parent directory of both?

I see that "make install" installs omc and OMPlot, but not OMEdit.  It probably should.

Jan-25-12 20:40:33
Category: Developer

On the Mac, I'm building OMEdit with Qt 4.7.4 and Qwt 6.0.1.  Both are framework installs.  The OMPlot and OMEdit build scripts don't seem to understand this.  The qmake processing seems to make this OK for Qt, but the link lines for Qwt still come out as if they were regular libraries, and thus don't work.  I had to manually modify the OMPlot/OMPlotGUI/OMPlotGUI.config and OMEdit/OMEditGUI/OMEdit.config files to manually add "-F/usr/local/qwt-6.0.1/lib -framework qwt" to each of the LIBS lines.

How do I make qmake pick this up automatically?  Note that the OM configure script is also broken, as "--with-qwt=FOO" doesn't address this either; it just adds the value given there to the INCLUDEPATH, which is conceptually unexpected; I'd expect it to add FOO/lib to the LIBS, and FOO/include to the INCLUDEPATH (which would also break for a framework build of Qwt, but at least it's reasonable).

Oh, and shouldn't there be some consistency of naming between OMEdit.config and OMPlotGUI.config?  Pick one or the other?

Hi.

I'm trying to build OM from source on a Ubuntu 10.4 system, using the following script, which is cribbed from README.Linux.txt:


Code:

#!/bin/bash

# from README.Linux.txt
#
sudo su -c "echo deb http://build.openmodelica.org/apt nightly contrib >> /etc/apt/sources.list"
sudo su -c "echo deb-src http://build.openmodelica.org/apt nightly contrib >> /etc/apt/sources.list"
sudo apt-get update
sudo apt-get build-dep openmodelica
./configure --with-omniORB
make # or make omc if you only want the omc core and not the qtclients

It errors out with this:

Code:


[...]
Reading package lists... Done
W: GPG error: http://build.openmodelica.org nightly Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 3A59B53664970947
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package libqtwebkit-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  libqt4-dev
E: Package libqtwebkit-dev has no installation candidate
E: Failed to satisfy Build-Depends dependency for openmodelica: libqtwebkit-dev
./buildit.ubuntu: line 8: ./configure: No such file or directory
make: *** No targets specified and no makefile found.  Stop.

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