Comments (9)
Sure thing, see OpenModelica/OpenModelica#8595
from externalmedia.
from externalmedia.
from externalmedia.
Please use the latest code. I think I fixed this already in 3.4.0 and in the 4.0.0 branch…
Will do.
from externalmedia.
Wait - do you want to make the static library work with OM?
No, I don't care about that, since shared libraries are required to get the package constants working out of the box. I would also switch to shared libraries only for Dymola as well, so we can reduce the amount of binaries to generate, basically just one for each operating system.
Why are you asking that?
Wait - do you want to make the static library work with OM? Why did you change your mind? I thought we were pushing to get the shared lib running. On 21 Feb 2022, at 23.33, Jorrit Wronski @.> wrote: Please use the latest code. I think I fixed this already in 3.4.0 and in the 4.0.0 branch… On 21 Feb 2022, at 22.57, Francesco Casella @.> wrote: Run ExternalMedia.Test.TestMedium.TestConstants with the latest nightly build of OpenModelica. The following error is generated: [1] 20:08:32 Translation Error [ExternalMedia.Media.BaseClasses.ExternalTwoPhaseMedium: 192:15-196:29]: External function ‘TwoPhaseMedium_getCriticalTemperature_C_impl‘ could not be found in any of the given shared libraries: C:/Program Files/OpenModelica1.19.0-dev-64bit/lib//omc/ExternalMediaLib.dll D:/Lavoro/Modelica/ExternalMedia 3.3.1/Resources/Library/win64/ExternalMediaLib.dll D:/Lavoro/Modelica/ExternalMedia 3.3.1/Resources/Library/ExternalMediaLib.dll The reason for that is that the OpenModelica front-end tries to constant-evaluate the package constant Medium.externalFluidConstants.criticalTemperature at compile time during flattening. This constant is bound to the external function Medium.getCriticalTemperature(), which calls an external function to get the value from the external solver. Recent improvements to version 1.19.0-dev of OpenModelica make it possible for the front-end to call such external functions, provided that they are available in dynamically linked/shared libraries. This will be addressed in #50<#50>. — Reply to this email directly, view it on GitHub<#54>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAF34OKNJ36LFCVQ7GTEXSDU4KYLFANCNFSM5O7VUDEQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you are subscribed to this thread.Message ID: @.***>
from externalmedia.
Why are you asking that?
I suspect because this issue's title talks about static libraries.
In any case, using the snapshot from #42 (comment) and OM v1.19.0-dev-613-gd6e04c0efc, I can compile and run ExternalMedia.Test.TestMedium.TestConstants
without warnings.
However, compiling the WaterComparison model (#42), I get the exact same error (with a couple more paths mentioned). At the paths mentioned those dlls don't exist.
from externalmedia.
Why are you asking that?
I suspect because this issue's title talks about static libraries.
Aha, now I get it. The issue is that OMC cannot handle static libraries. The cure can be either to have OMC handle them, or to avoid them entirely, and of course we want to take the second approach, as planned in #50.
from externalmedia.
In any case, using the snapshot from #42 (comment) and OM v1.19.0-dev-613-gd6e04c0efc, I can compile and run
ExternalMedia.Test.TestMedium.TestConstants
without warnings.
Yes, @jowr mentioned that the dll's are actually built in the 4.0.0 branch. They won't handle errors correctly, and that's my part to implement.
However, compiling the WaterComparison model (#42), I get the exact same error (with a couple more paths mentioned). At the paths mentioned those dlls don't exist.
OK, as far as I can understand, omc is looking inside ExternalMedia 4.0.0/Resources/Library/
and inside ExternalMedia 4.0.0/Resources/Library/win64
, but not inside ExternalMedia 4.0.0/Resources/Library/mingw64, which is where the .dll file is actually located. Sounds like an easy fix.
Would you mind opening a ticket that addresses this specific issue (and only this one!) with clear instructions to reproduce the problem? Please do that directly on OMC's issue tracker https://github.com/OpenModelica/OpenModelica/issues, and then I'll follow it up from there. We need to one ticket for each issue, othersiwe the whole thing becomes a bloody mess...
Thanks!
from externalmedia.
This issue should now be fixed. As soon as #50 is finalized and OpenModelica #8995 are solved, ExternalMedia should work fine in OpenModelica as well.
from externalmedia.
Related Issues (20)
- Incompressible package runs in OpenModelica but not Dymola
- Model fails to execute when using two different fluids
- Model fails to run when using Modelica.Fluid.Sensors.Temperature
- Call ExternalMedia from OMPython HOT 1
- External function could not be found in any of the given shared libraries HOT 1
- External functions in ExternalMedia should be explicitly declared as pure
- Use CoolProp 6.4.4 as soon as it is released, instead of nightly build HOT 1
- support for older gcc versions HOT 4
- Compilation errors in OpenModelica HOT 7
- Selection of different state variables (ph, pt, dT) for a CoolProp 2-phase medium HOT 1
- Cannot compute arbitrary partial derivatives with function `partialDeriv_state` HOT 2
- Wrong version of cmake required to compile the library HOT 1
- Restructuring of the repository HOT 4
- build error using cmake on windows HOT 1
- State functions do not seem to work properly HOT 6
- Compressible mixture support? HOT 2
- Custom fluid property support
- Incompressible CoolProp tests do not compile HOT 3
- Remove experiment annotation from partial models
- how to use fliudprop in external Media?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from externalmedia.