Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenModelica #29

Closed
capirossi1 opened this issue Oct 29, 2018 · 11 comments · Fixed by #37
Closed

OpenModelica #29

capirossi1 opened this issue Oct 29, 2018 · 11 comments · Fixed by #37

Comments

@capirossi1
Copy link

Hi all,

I read somethings about the OpenModelica troubles. My question, is the library working in openmodelica at all? Or is it just the examples that don't work?

kind regards

@overtaker
Copy link
Collaborator

Which OpenModelica version do you use on which platform and which operating system?

See also https://trac.openmodelica.org/OpenModelica/ticket/4448 for some more details.

@capirossi1
Copy link
Author

I'm using the OMEdit v1.12.0 (64-bit) on Windows 10.
Can I conclude that it is not working at all? Then i will stop trying..

@overtaker
Copy link
Collaborator

Luckily, there is an autotools build script provided by @sjoelund that should care for building the required MinGW binaries of ExternData libs.

@umutkarahan
Copy link

Hi overtaker,
I tried to build autotools script (autogen.sh) in ExternData\Resources\BuildProjects\autotools\autogen.sh with minGW. However I stuck somewhere and got the error
"autoreconf-2.69: failed to run aclocal: No such file or directory"

Can you please guide how we can build those binaries?
Thanks in advance.

@sjoelund
Copy link
Contributor

sjoelund commented Feb 7, 2019

Should just be pacman -Sy automake1.16 in msys2.

@umutkarahan
Copy link

umutkarahan commented Feb 7, 2019

Thank you @sjoelund for the prompt answer. I think I successfully ran autogen.sh with msys2. The screenshot of the files after I ran autogen is

Imgur

However the OM error still exists as below. Maybe I missed something. Sorry for my innocence.
Thank you!

[1] 18:40:27 Scripting Notification
Check of Test.XMLTest completed successfully.

[1] 18:40:50 Translation Notification
[ExternData: 763:7-770:18]: Created directory C:\\Users\\Umut\\AppData\\Local\\Temp\\/omc_compile_ED_XMLFile_166148

[2] 18:40:50 Translation Notification
[ExternData: 763:7-770:18]: cp -a "C:/OpenModelica1.13.2/lib/omlibrary/ExternData 2.4.0/Resources"/* "C:\\Users\\Umut\\AppData\\Local\\Temp\\/omc_compile_ED_XMLFile_166148"

[3] 18:40:50 Translation Notification
[ExternData: 763:7-770:18]: Changed directory to C:/Users/Umut/AppData/Local/Temp/omc_compile_ED_XMLFile_166148/BuildProjects/autotools

[4] 18:40:50 Scripting Error
Error opening file: log: No such file or directory.

[5] 18:40:50 Translation Error
[C:/OM113/OM64bit/OMCompiler/Compiler/SimCode/SimCodeFunctionUtil.mo: 752:9-752:129]: Internal error function elaborateFunction failed for function: 
function ExternData.Functions.XML.getReal"Inline never" "Get scalar Real value from XML file"
  input String varName "Key";
  output Real y "Real value";
  output Boolean exist "= true, if varName exits; = false, if it does not exist and y is set to 0.0";
  input ExternalObject ExternData.Types.ExternXMLFile xml "External XML file object";   external "C" y = ED_getDoubleFromXML(xml, varName, exist);
end ExternData.Functions.XML.getReal; 

[6] 18:40:50 Translation Error
[C:/OM113/OM64bit/OMCompiler/Compiler/SimCode/SimCodeUtil.mo: 663:5-663:83]: Internal error Creation of Modelica functions failed.

@umutkarahan
Copy link

umutkarahan commented Feb 8, 2019

Hi,
I found the solution thanks to @vwaurich fork.
I added mingw32 and ming64 folders to my ExternData library. The files located in https://github.com/vwaurich/ExternData/tree/mingw/ExternData/Resources/Library

It works perfectly for me.
Thanks to everbody.

@mahesRBR
Copy link

Hi,
is there a downloadable ExternData library that would work with out any errors /or require any modification to work with Open Modelica 1.17 and Modelica library 4.0.0
Thanks

@sjoelund
Copy link
Contributor

is there a downloadable ExternData library that would work with out any errors /or require any modification to work with Open Modelica 1.17 and Modelica library 4.0.0

The standard one should work rather well, provided that you use the Linux version of OpenModelica.

@mahesRBR
Copy link

Dear sjoelund,
Thanks for prompt reply. I have only windows 10
what changes are requierd to make it run on Windows 10 ?
thanks

@adrpo
Copy link
Contributor

adrpo commented Jun 15, 2021

For OpeModelica 1.17+ on Windows you need these libs: https://github.com/adrpo/ExternData/tree/AddMinGWOpenModelicaLibs/ExternData/Resources/Library
Because the compiler cannot find the libs we try to build the library on the fly when we compile a model but fail to do so on Windows. You need to disable this until we find a solution for this bug: In OMEdit go to:
OMEdit->Tools->Options->Simulation->Additional Translation Flags: add: -d=-buildExternalLibs
if you have anything there just add it, i.e.:
-d=initialization,-buildExternalLibs
Then restart OMEdit and you should be able to run the example models.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

6 participants