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

The .fmu file is not generated

The .fmu file is not generated

Hello,

when I export  a model to FMU, the Message Browser shows that the "The FMU XX.fmu is generated at /tmp/OpenModelica_ik/OMEdit", but there is no XX.fmu file in this path. I have tried to install and uninstall OM in linux with different versions, but the problem still there. Any suggestion?
I am using a Linux 64 Virtual Machine.

Thank you

Edited by: Dub - Dec-27-16 09:28:47

Re: The .fmu file is not generated

Do you have any .log files in that directory? If so, it should tell you what went wrong.
Does the normal simulation works fine?

Re: The .fmu file is not generated

This is what contains the log file:

rm -f Modelica_Electrical_Machines_Examples_AsynchronousInductionMachines_AIMC_withLosses.fmutmp/sources/Modelica_Electrical_Machines_Examples_AsynchronousInductionMachines_AIMC_withLosses_init.xml
cp -a /usr/include/omc/c/* Modelica_Electrical_Machines_Examples_AsynchronousInductionMachines_AIMC_withLosses.fmutmp/sources/include/
cp -a /usr/share/omc/runtime/c/fmi/buildproject/* Modelica_Electrical_Machines_Examples_AsynchronousInductionMachines_AIMC_withLosses.fmutmp/sources
cp -a Modelica_Electrical_Machines_Examples_AsynchronousInductionMachines_AIMC_withLosses_FMU.libs Modelica_Electrical_Machines_Examples_AsynchronousInductionMachines_AIMC_withLosses.fmutmp/sources/

It seems that an space is missing between X.fmu and tmp/sources...

The simulation runs fine, but gives this warning :

In file included from Modelica.Electrical.Machines.Examples.AsynchronousInductionMachines.AIMC_withLosses.c:2030:
./Modelica.Electrical.Machines.Examples.AsynchronousInductionMachines.AIMC_withLosses_12jac.h:2:51: warning: excess elements in struct initializer
static const REAL_ATTRIBUTE dummyREAL_ATTRIBUTE = omc_dummyRealAttribute;
                                                  ^~~~~~~~~~~~~~~~~~~~~~
/usr/include/omc/c/simulation_data.h:50:70: note: expanded from macro 'omc_dummyRealAttribute'
#define omc_dummyRealAttribute {NULL,NULL,DBL_MAX,-DBL_MAX,0,0,1.0,0,0.0}

This warning also appears with other models. But I have tried in other computer and this models runs fine, I don't know what happen in my computer

Re: The .fmu file is not generated

The warning is fixed in the latest revision.

There is no space missing. We generate a Model.fmutmp directory in which we put sources, binaries and so on which we then zip into Model.fmu.
Are you by any chance missing the "zip" utility? Write zip in a terminal to see if you have it.

Re: The .fmu file is not generated

Ì have zip installed:

Copyright (c) 1990-2008 Info-ZIP - Type 'zip "-L"' for software license.
Zip 3.0 (July 5th 2008). Usage:
zip [-options] [-b path] [-t mmddyyyy] [-n suffixes] [zipfile list] [-xi list]

I have made an apt-get upgrade and the warning has dissapear. But the .fmu still no generating.

Re: The .fmu file is not generated

Ok. Let's try something else. Start your terminal and go someplace where you can write files like your home:

Code:


> cd ~
# create a testing directory
> mkdir testfmus
# change directory to the testing directory
> cd testfmus

Using any editor you want in the tesfmus directory we created, create a file called script.mos containing:

Code:


loadModel(Modelica); getErrorString();
translateModelFMU(Modelica.Electrical.Machines.Examples.AsynchronousInductionMachines.AIMC_withLosses);  getErrorString();

now back in the terminal:

Code:


> omc script.mos

See what files are generated in the ~/testfmus directory, especially .log files, also look into any directories inside.
If you can, zip ~/testfmus directory and attach it here. If you cannot attach them here just go to our Trac:
https://trac.openmodelica.org/OpenModelica
click on New Ticket and create a new ticket with your issue, then attach the zip file to the ticket.

Re: The .fmu file is not generated

I send you the zip file. It gives me 6 errors and 1 warning on terminal. Do you need something else?

Thanks a lot adrpo!
testfmus.zip

Edited by: Dub - Dec-28-16 18:53:21
Attachments:

Re: The .fmu file is not generated

Solved!

I went to FMU Options (Tools->Options  and then FMI) and in Platforms i chose "Dynamic"  and that's it.

Thank you!

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