Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#3641 closed defect (fixed)

FMU generation doesn't work on Windows

Reported by: casella Owned by: adrpo
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 casella 9 years ago.
TestPackage.mo (127 bytes) - added by casella 9 years ago.

Download all attachments as: .zip

Change History (11)

Changed 9 years ago by casella

Changed 9 years ago by casella

comment:1 Changed 9 years ago by adrpo

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 Changed 9 years ago by rfranke

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 Changed 9 years ago by rfranke

  • Priority changed from blocker to critical

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 Changed 9 years ago by casella

  • 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 Changed 9 years ago by casella

  • Priority changed from critical to blocker

comment:6 Changed 9 years ago by olivier

  • 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 Changed 9 years ago by adrpo

  • Resolution set to fixed
  • Status changed from new to closed

Should be fixed in dd6bae/OMCompiler.

comment:8 Changed 8 years ago by sjoelund.se

  • Milestone changed from 1.9.4 to 1.9.4-1.9.x

Milestone renamed

comment:9 Changed 8 years ago by sjoelund.se

  • Milestone changed from 1.9.4-1.9.x to 1.9.4

Milestone renamed

Note: See TracTickets for help on using tickets.