Replies: 9 comments 1 reply
-
|
With the nightly build and the next release version of OpenModleica (v1.23) our FMUs are self-contained and have all needed runtime dependencies collected in the bin directory of the FMU (see #12065). This is mainly pThreads library and maybe CVODE for CoSimulation FMUs. You can check if tools like Dependencies are able to load your DLL from the FMU. If yes, maybe you'll need to update Femyou to call Another option is to remove the need for runtime dependencies in the first place. For this you have to re-compile the source-code FMU. We have some documentation about this in our user's guide. In addition you'll need to disable linking to threads by altering the following: fmu/sources/CMakeLists.txt # Look for a threading library and see if it is PThreads.
find_package(Threads)
# If we find a threading library and it is PThreads then we enable its usage.
if(Threads_FOUND AND CMAKE_USE_PTHREADS_INIT)
set(OM_HAVE_PTHREADS ON)
# Otherwise threading will be disabled.
else()
set(OM_HAVE_PTHREADS OFF)
endif()And keep in mind that OpenModelica exports 2.0.4 FMUs (that version of the standard was released in 2022) and the version of Femyou I found was last updated four years ago. |
Beta Was this translation helpful? Give feedback.
-
|
Sorry for the late response, I've tried a lot without success. I use OpenModelica version 1.4 under Windows 10. Here is the python console : No DLL problems found whith Dependencies I also added this without success at the very beginning of the program to the already decompressed FMU: Only the "model exchange" mode works, but apparently you cannot modify the values during simulation in this mode, and the performance would be worse?. |
Beta Was this translation helpful? Give feedback.
-
|
@BruceBoc OMC 1.4 is Jurassic, and FMI export there was really very primitive. We've made a lot of progress since then 😄. Please use a recent version of OpenModelica: 1.22.3, or possibly the 1.23.0 beta when it will be released, or the nighty build. |
Beta Was this translation helpful? Give feedback.
-
|
Sorry, i wanted to write 1.24. I use the last beta. |
Beta Was this translation helpful? Give feedback.
-
|
@BruceBoc maybe you need to set the cvode solver for the CS mode. The default solver is explicit Euler, if your system is stiff, all kind of things can go wrong. |
Beta Was this translation helpful? Give feedback.
-
|
Altready test. Always the same problem. I have also test Dynamic or static link... |
Beta Was this translation helpful? Give feedback.
-
|
When i tried to recompile the FMU in FMPy : |
Beta Was this translation helpful? Give feedback.
-
|
@BruceBoc Hi! Did you ever managed to load the FMU using Femyou? |
Beta Was this translation helpful? Give feedback.
-
|
I have never managed to load an Fmu in co simulation mode, whatever the method. I've given up for now. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I’m a new user of OpenModelica. I would like to use FMU generated by OpenModelica in a .net wpf application.
has anyone ever used Femyou? when I load an fmu created with OpenModelica, the visual studio compiler tells me that it cannot find the dll which is nevertheless in the fmu. It’s work with BouncingBall.fmu but not with a OpenModelica FMU…
I’m using visual studio 2022, with OpenModelica 1.24 64 bits with his gcc compiler on Windows 10.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions