Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#3641 closed defect (fixed)

FMU generation doesn't work on Windows

Reported by: Francesco Casella Owned by: Adrian Pop
Priority: blocker Milestone: 1.9.4
Component: FMI Version:
Keywords: Cc: akshay.ranade@…, olivier

Description

Try to run omc Test.mos on the attached files.

On Linux, an FMU is eventually generated. On Windows, the following error message is eventually issued:

Error opening file: TestPackage_Test.log: No such file or directory

I understand from Martin that this happens since he added support for source code FMUs.

Attachments (2)

Test.mos (183 bytes ) - added by Francesco Casella 9 years ago.
TestPackage.mo (127 bytes ) - added by Francesco Casella 9 years ago.

Download all attachments as: .zip

Change History (11)

by Francesco Casella, 9 years ago

Attachment: Test.mos added

by Francesco Casella, 9 years ago

Attachment: TestPackage.mo added

comment:1 by Adrian Pop, 9 years ago

Yes, this is known, we need to provide msys inside the installer so we have access to configure (sh.exe). I'm working on the installer package now.

comment:2 by Rüdiger Franke, 9 years ago

I'm afraid that the new automatic configuration would hardly do anything of interest under Windows, because the OpenModelica installation is everywhere the same and possible additional packages would find at arbitrary user defined positions.

The alternative would be to not rely on msys under Windows. It is pretty much clear what has to be done during simulation or FMU export -- just compile all generated files and link them against preinstalled libraries. The usage of make or nmake for this already appears to be overkill. The actions could be coded into a bat-file that runs under Windows per default.

comment:3 by Rüdiger Franke, 9 years ago

Priority: blockercritical

You might also consider using the new Tools->Options->Simulation selectors

Target Language: Cpp

and for large models:

Target Compiler: msvc

This makes FMU for model exchange work under Windows -- and maybe reduce criticality of the ticket.

The attached example works for sure.

comment:4 by Francesco Casella, 9 years ago

Cc: akshay.ranade@… added

Thanks Ruediger for pointing this out!

If this is the case, it would be good if these could be made the default settings for FMU generation (at least using the cpp runtime), so that beginners get things running up front. Would that be possible?

comment:5 by Francesco Casella, 9 years ago

Priority: criticalblocker

comment:6 by olivier, 9 years ago

Cc: olivier added

Hello,

I found that from the UI, FMU generation doesn't work if I remove Cpp runtime option in Tools->Options->Simulation. This is the error:

[4] 19:02:33 Scripting Error
Error opening file: test.log: No such file or directory.

Is C runtime deprecated?

comment:7 by Adrian Pop, 9 years ago

Resolution: fixed
Status: newclosed

Should be fixed in dd6bae/OMCompiler.

comment:8 by Martin Sjölund, 9 years ago

Milestone: 1.9.41.9.4-1.9.x

Milestone renamed

comment:9 by Martin Sjölund, 9 years ago

Milestone: 1.9.4-1.9.x1.9.4

Milestone renamed

Note: See TracTickets for help on using tickets.