Skip to content

Error when instantiating DualMassOscillator FMU on Windows #1489

@cofri

Description

@cofri

Description

Hello OMSimulator team,

Thanks for your software! It's an enjoyable work.
I'm trying to run the Dual Mass Oscillator example available in testsuite/resources/. It runs as expected on Linux but it fails on Windows 11 with the following error:

Failed to load DLL C:\Users\myname\AppData\Local\Temp\fmi4c_490C.tmp\binaries\win64\DualMassOscillator_System1.dll

I also tried with other Python tools like FMPy and I got the same behaviour:

# Error with FMPy
FileNotFoundError: Could not find module 'C:\Users\myname\AppData\Local\Temp\tmp57q2vgz9\binaries\win64\DualMassOscillator_System1.dll' (or one of its dependencies).

Steps to reproduce the behavior

from OMSimulator import OMSimulator

oms = OMSimulator()
oms.setTempDirectory("./temp/")
oms.newModel("model")
oms.addSystem("model.root", oms.system_sc)

oms.addSubModel("model.root.system1", "./DualMassOscillator.System1.fmu")

oms.instantiate("model")  # <-- fail here
oms.initialize("model")

oms.terminate("model")
oms.delete("model")

Version and OS

  • Version: v2.1.3
  • OS: Win11, 64bit

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions