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

OpenModelica 1.8.1: FMU Export Fails under Mac OS X

OpenModelica 1.8.1: FMU Export Fails under Mac OS X

I'm new to OpenModelica and MacPorts, so I'm not sure if this is a bug in my installation or a general OpenModelica bug on the Mac.

The problem is that I can't export Bouncing Ball to a FMU under Mac OS X 10.7.3

The bug does *not* occur under OpenModelica 1.8.1 under Windows Server 2008 R2, I was able to export Bouncing Ball.

I downloaded openmodelica-devel-11449.dmg and installed it.

I tried creating an BouncingBall.mo file from
http://proactive.inria.fr/trunk/Schedul … elica.html
and then exporting and FMU and received the following:

Translation    18:09:03        0:0-0:0    Error building simulator. Buildlog: /opt/openmodelica/bin/gcc-mp-4.4  -I"/opt/openmodelica/include/omc" -O2 -falign-functions -msse2 -mfpmath=sse   -I"/opt/openmodelica/include/omc" -I. -L"/Users/cxh/src/fmu/openmodelica"   -c -o BouncingBall_FMU.o BouncingBall_FMU.c
In file included from BouncingBall_FMU.c:64:
/opt/openmodelica/include/omc/fmu_model_interface.c: In function 'BouncingBall_fmiInitialize':
/opt/openmodelica/include/omc/fmu_model_interface.c:559: error: too few arguments to function 'initialization'
gmake: *** [BouncingBall_FMU.o] Error 1



Looking at the code, I can see that there is a problem.

BouncingBall_FMU.c contains:

#include "initialization.h"
#include "events.h"
#include "fmu_model_interface.h"



/opt/openmodelica/include/omc/fmu_model_interface.c line 559 is

if (initialization(comp->fmuData, "state", "nelder_mead_ex")){



/opt/openmodelica/include/omc/initialization.h has a different declaration:

extern int initialization(DATA *data, const char* pInitMethod,
    const char* pOptiMethod, const char* pInitFile, double initTime);



I deleted /opt/openmodelica and reinstalled the prebuilt dmg and the same problem occurred, so I don't think it is my MacPorts set up, but I'm not sure.

Also, when I created a FMU file with darwin64 binaries from my port of the FMUSDK at http://github.com/cxbrooks/fmusdk, it failed to import:

Following Error has occurred.
date Mar 16 2012, time 12:37:23, file moGenerator.c, line 1467]: #### parsing model description xml file occurred error: md = NULL
while importing /Users/cxh/src/fmu/fmusdk/fmu/cs/bouncingBall.fmu



Here, I suspect that the problem might be the platform name, which should be darwin64.  I vaguely remember seeing that one of the Modelica tools had a different platform name for the binaries under Mac OS X.

_Christopher

Re: OpenModelica 1.8.1: FMU Export Fails under Mac OS X

The platform name for FMI 1.0 on OSX is actually unspecified. And the new names for FMI 2.0 are totally weird (darwin64? doesn't even say what processor you're running...)

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