Coder Social home page Coder Social logo

Comments (9)

bilderbuchi avatar bilderbuchi commented on July 24, 2024 1

Sure thing, see OpenModelica/OpenModelica#8595

from externalmedia.

jowr avatar jowr commented on July 24, 2024

from externalmedia.

jowr avatar jowr commented on July 24, 2024

from externalmedia.

casella avatar casella commented on July 24, 2024

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.

casella avatar casella commented on July 24, 2024

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.

bilderbuchi avatar bilderbuchi commented on July 24, 2024

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.

casella avatar casella commented on July 24, 2024

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.

casella avatar casella commented on July 24, 2024

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.

casella avatar casella commented on July 24, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.