Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

Translate Error Runing “Guideline36” in Buildings

Translate Error Runing “Guideline36” in Buildings

As I can see in the Buildings_8 test using OpenModelica, Buildings.Air.Systems.SingleZone.VAV.Examples.Guideline36 can be simulated well with OMCompiler v1.19.0-dev.563+gf605064aef, Modelica 3.2.3. and Buildings 8.1.1

However, when I would like to simulate the Guideline36 with OMCompiler v1.19.0-dev.563+gf605064aef, Modelica 3.2.3 and Buildings 8.1.1, translate errors occur:


[1] 22:12:52 Translation Warning [Buildings.BoundaryConditions.WeatherData.BaseClasses.getHeaderElementTMY3: 2:1-105:25]: Pure function ‘Buildings.BoundaryConditions.WeatherData.BaseClasses.getHeaderElementTMY3‘ contains a call to impure function ‘Modelica.Utilities.Streams.readLine‘.
[2] 22:12:52 Translation Warning [Buildings.BoundaryConditions.WeatherData.BaseClasses.getLongitudeTMY3: 2:1-48:21]: Pure function ‘Buildings.BoundaryConditions.WeatherData.BaseClasses.getLongitudeTMY3‘ contains a call to impure function ‘Buildings.BoundaryConditions.WeatherData.BaseClasses.getHeaderElementTMY3‘.
[3] 22:12:52 Translation Warning [Buildings.BoundaryConditions.WeatherData.BaseClasses.getLatitudeTMY3: 2:1-48:20]: Pure function ‘Buildings.BoundaryConditions.WeatherData.BaseClasses.getLatitudeTMY3‘ contains a call to impure function ‘Buildings.BoundaryConditions.WeatherData.BaseClasses.getHeaderElementTMY3‘.
[4] 22:12:52 Translation Warning [Buildings.BoundaryConditions.WeatherData.BaseClasses.getTimeZoneTMY3: 2:1-47:20]: Pure function ‘Buildings.BoundaryConditions.WeatherData.BaseClasses.getTimeZoneTMY3‘ contains a call to impure function ‘Buildings.BoundaryConditions.WeatherData.BaseClasses.getHeaderElementTMY3‘.
[5] 22:12:52 Translation Warning [Buildings.Fluid.Chillers.BaseClasses.warnIfPerformanceOutOfBounds: 2:1-41:33]: Pure function ‘Buildings.Fluid.Chillers.BaseClasses.warnIfPerformanceOutOfBounds‘ contains a call to impure function ‘Modelica.Utilities.Streams.print‘.

[6] 22:12:52 Translation Error [Modelica.Utilities.Strings: 84:3-113:14]: External function ‘ModelicaStrings_compare‘ could not be found in any of the given shared libraries:   D:/OM/lib//omc/ModelicaExternalC.dll   D:/OM/lib/omlibrary/Modelica 3.2.3/Resources/Library/win64/ModelicaExternalC.dll   D:/OM/lib/omlibrary/Modelica 3.2.3/Resources/Library/ModelicaExternalC.dll
[7] 22:12:52 Translation Error [Modelica.Utilities.Strings: 123:5-123:80]: Failed to evaluate function: Modelica.Utilities.Strings.compare.


when I adopted the suggestion "Try the old frontend once", the errors change to:

[1] 22:20:23 Translation Warning [Buildings.BoundaryConditions.WeatherData.BaseClasses.getHeaderElementTMY3: 2:1-105:25]: Pure function ‘Buildings.BoundaryConditions.WeatherData.BaseClasses.getHeaderElementTMY3‘ contains a call to impure function ‘Modelica.Utilities.Streams.readLine‘.
[2] 22:20:23 Translation Warning [Buildings.BoundaryConditions.WeatherData.BaseClasses.getLongitudeTMY3: 2:1-48:21]: Pure function ‘Buildings.BoundaryConditions.WeatherData.BaseClasses.getLongitudeTMY3‘ contains a call to impure function ‘Buildings.BoundaryConditions.WeatherData.BaseClasses.getHeaderElementTMY3‘.
[3] 22:20:23 Translation Warning [Buildings.BoundaryConditions.WeatherData.BaseClasses.getLatitudeTMY3: 2:1-48:20]: Pure function ‘Buildings.BoundaryConditions.WeatherData.BaseClasses.getLatitudeTMY3‘ contains a call to impure function ‘Buildings.BoundaryConditions.WeatherData.BaseClasses.getHeaderElementTMY3‘.
[4] 22:20:23 Translation Warning [Buildings.BoundaryConditions.WeatherData.BaseClasses.getTimeZoneTMY3: 2:1-47:20]: Pure function ‘Buildings.BoundaryConditions.WeatherData.BaseClasses.getTimeZoneTMY3‘ contains a call to impure function ‘Buildings.BoundaryConditions.WeatherData.BaseClasses.getHeaderElementTMY3‘.
[5] 22:20:23 Translation Warning [Buildings.Fluid.Chillers.BaseClasses.warnIfPerformanceOutOfBounds: 2:1-41:33]: Pure function ‘Buildings.Fluid.Chillers.BaseClasses.warnIfPerformanceOutOfBounds‘ contains a call to impure function ‘Modelica.Utilities.Streams.print‘.

[6] 22:20:23 Translation Error [Modelica.Utilities.Strings: 84:3-113:14]: External function ‘ModelicaStrings_compare‘ could not be found in any of the given shared libraries:   D:/OM/lib//omc/ModelicaExternalC.dll   D:/OM/lib/omlibrary/Modelica 3.2.3/Resources/Library/win64/ModelicaExternalC.dll   D:/OM/lib/omlibrary/Modelica 3.2.3/Resources/Library/ModelicaExternalC.dll
[7] 22:20:23 Translation Error [Modelica.Utilities.Strings: 123:5-123:80]: Failed to evaluate function: Modelica.Utilities.Strings.compare.
[8] 22:21:41 Translation Error [Buildings.Utilities.Psychrometrics.X_pTphi: 37:3-40:14]: Illegal subscript i_w for dimensions 2 in component X[i_w].
[9] 22:21:41 Translation Error [Buildings.Utilities.Psychrometrics.X_pTphi: 37:3-40:14]: Variable X[i_w] not found in scope Buildings.Utilities.Psychrometrics.X_pTphi.
[10] 22:21:41 Translation Error Error occurred while flattening model test_811_323


So how could I simulate the Guildline36 well with OpenModelica?
Thanks in advance!!

Edited by: Youth - Feb-07-22 14:25:03

Re: Translate Error Runing “Guideline36” in Buildings

anyone helps?Thanks!!

Re: Translate Error Runing “Guideline36” in Buildings

There's currently an issue on Windows, see this issue. Our library testing is done on Linux, so that's why it works there but not for you.

Re: Translate Error Runing “Guideline36” in Buildings

Thanks for your kindly reply, perost.
I see that this issue is under fixing now on GitHub here:  https://github.com/OpenModelica/OpenModelica/pull/8506
Could you please tell me when this fix can be present in the nightly-build 1.19 - dev released?
Thanks again!

Re: Translate Error Runing “Guideline36” in Buildings

Youth wrote:


Thanks for your kindly reply, perost.
I see that this issue is under fixing now on GitHub here:  https://github.com/OpenModelica/OpenModelica/pull/8506
Could you please tell me when this fix can be present in the nightly-build 1.19 - dev released?
Thanks again!

Hopefully soon, but I can't really give an accurate estimate. But it's a very high priority issue.

Re: Translate Error Runing “Guideline36” in Buildings

Dear perost,

This problem occurs again when I test on Unbuntu 18.04 instead of on Windows:

It said: External function ‘ModelicaStrings_compare‘ could not be found in any of the given shared libraries

As shown below:


"Notification: Performance of loadFile(/root/.openmodelica/libraries/Buildings 9.0.0-master/package.mo): time 0.6113/0.6113, allocations: 302.8 MB / 316.1 MB, free: 4.105 MB / 250.7 MB
"
true
"Notification: Performance of loadFile(/root/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo): time 0.001059/0.001059, allocations: 176.5 kB / 387.4 MB, free: 15.15 MB / 330.7 MB
"
true
"Notification: Performance of loadFile(/root/.openmodelica/libraries/Modelica 4.0.0+maint.om/package.mo): time 0.4318/0.4318, allocations: 224.8 MB / 0.6675 GB, free: 5.484 MB / 490.7 MB
"
true
"Notification: Performance of loadFile(/root/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.0008738/0.0008737, allocations: 95.69 kB / 0.7862 GB, free: 65.24 MB / 0.5886 GB
"
false
"Notification: Performance of FrontEnd - loaded program: time 0.0003177/0.0003177, allocations: 12 kB / 0.905 GB, free: 0.7305 MB / 0.6042 GB
Notification: Performance of FrontEnd - Absyn->SCode: time 0.1539/0.1543, allocations: 120.9 MB / 1.023 GB, free: 7.828 MB / 0.7292 GB
Notification: Performance of NFInst.instantiate(Buildings.Air.Systems.SingleZone.VAV.Examples.Guideline36): time 0.9922/1.147, allocations: 0.4992 GB / 1.522 GB, free: 47.52 MB / 0.9792 GB
Error: Internal error NFAlgorithm.getInputsOutputs failed.
Notification: Performance of NFInst.instExpressions: time 0.1083/1.255, allocations: 111.8 MB / 1.631 GB, free: 18.8 MB / 0.9792 GB
Notification: Performance of NFInst.updateImplicitVariability: time 0.01839/1.273, allocations: 0.5175 MB / 1.632 GB, free: 18.8 MB / 0.9792 GB
Notification: Performance of NFTyping.typeComponents: time 0.02457/1.298, allocations: 10.69 MB / 1.642 GB, free: 16.79 MB / 0.9792 GB
Notification: Performance of NFTyping.typeBindings: time 0.03425/1.332, allocations: 14.88 MB / 1.657 GB, free: 10.79 MB / 0.9792 GB
Notification: Performance of NFTyping.typeClassSections: time 0.02876/1.361, allocations: 15.32 MB / 1.672 GB, free: 6.406 MB / 0.9792 GB
Notification: Performance of NFFlatten.flatten: time 0.09528/1.456, allocations: 85.78 MB / 1.756 GB, free: 11.41 MB / 1.057 GB
Notification: Performance of NFFlatten.resolveConnections: time 0.05061/1.507, allocations: 33.34 MB / 1.788 GB, free: 10.34 MB / 1.089 GB
[/root/.openmodelica/libraries/Modelica 4.0.0+maint.om/Utilities/Strings.mo:82:3-111:14:writable] Error: External function ‘ModelicaStrings_compare‘ could not be found in any of the given shared libraries:
  /usr/bin/../lib/x86_64-linux-gnu/omc/ModelicaExternalC.so
  /root/.openmodelica/libraries/Modelica 4.0.0+maint.om/Resources/Library/linux64/ModelicaExternalC.so
  /root/.openmodelica/libraries/Modelica 4.0.0+maint.om/Resources/Library/ModelicaExternalC.so
  /usr/bin/../lib/x86_64-linux-gnu/omc/libModelicaExternalC.so
  /root/.openmodelica/libraries/Modelica 4.0.0+maint.om/Resources/Library/linux64/libModelicaExternalC.so
  /root/.openmodelica/libraries/Modelica 4.0.0+maint.om/Resources/Library/libModelicaExternalC.so
  /usr/bin/../lib/x86_64-linux-gnu/omc/ffi/ModelicaExternalC.so
  /usr/bin/../lib/x86_64-linux-gnu/omc/ffi/libModelicaExternalC.so
[/root/.openmodelica/libraries/Modelica 4.0.0+maint.om/Utilities/Strings.mo:121:5-121:80:writable] Error: Failed to evaluate function: Modelica.Utilities.Strings.compare.
Notification: Performance of FrontEnd: time 0.004076/1.511, allocations: 1.884 MB / 1.79 GB, free: 8.555 MB / 1.089 GB
"

Could you please tell me how could I run it well? Are there any flags or settings I forgot? Thanks a lot!

BTW, the script was written as follow:


setCommandLineOptions("-d=nogen");
setCommandLineOptions("-d=initialization");
setCommandLineOptions("-d=backenddaeinfo");
setCommandLineOptions("-d=discreteinfo");
setCommandLineOptions("-d=stateselection");
setCommandLineOptions("-d=execstat");
setMatchingAlgorithm("PFPlusExt");
setIndexReductionMethod("dynamicStateSelection");

loadFile("/root/.openmodelica/libraries/Buildings 9.0.0-master/package.mo", uses=false);getErrorString();
loadFile("/root/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo", uses=false);getErrorString();
loadFile("/root/.openmodelica/libraries/Modelica 4.0.0+maint.om/package.mo", uses=false);getErrorString();
loadFile("/root/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo", uses=false);getErrorString();

translateModel(Buildings.Air.Systems.SingleZone.VAV.Examples.Guideline36,tolerance=1e-06,outputFormat="empty",numberOfIntervals=480,variableFilter="",fileNamePrefix="Buildings.Air.Systems.SingleZone.VAV.Examples.Guideline36");
getErrorString();

Re: Translate Error Runing “Guideline36” in Buildings

perost wrote:


Youth wrote:


Thanks for your kindly reply, perost.
I see that this issue is under fixing now on GitHub here:  https://github.com/OpenModelica/OpenModelica/pull/8506
Could you please tell me when this fix can be present in the nightly-build 1.19 - dev released?
Thanks again!

Hopefully soon, but I can't really give an accurate estimate. But it's a very high priority issue.

Dear perost,

This problem occurs again when I test on Unbuntu 18.04 instead of on Windows:

It said: External function ‘ModelicaStrings_compare‘ could not be found in any of the given shared libraries

As shown below:


"Notification: Performance of loadFile(/root/.openmodelica/libraries/Buildings 9.0.0-master/package.mo): time 0.6113/0.6113, allocations: 302.8 MB / 316.1 MB, free: 4.105 MB / 250.7 MB
"
true
"Notification: Performance of loadFile(/root/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo): time 0.001059/0.001059, allocations: 176.5 kB / 387.4 MB, free: 15.15 MB / 330.7 MB
"
true
"Notification: Performance of loadFile(/root/.openmodelica/libraries/Modelica 4.0.0+maint.om/package.mo): time 0.4318/0.4318, allocations: 224.8 MB / 0.6675 GB, free: 5.484 MB / 490.7 MB
"
true
"Notification: Performance of loadFile(/root/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.0008738/0.0008737, allocations: 95.69 kB / 0.7862 GB, free: 65.24 MB / 0.5886 GB
"
false
"Notification: Performance of FrontEnd - loaded program: time 0.0003177/0.0003177, allocations: 12 kB / 0.905 GB, free: 0.7305 MB / 0.6042 GB
Notification: Performance of FrontEnd - Absyn->SCode: time 0.1539/0.1543, allocations: 120.9 MB / 1.023 GB, free: 7.828 MB / 0.7292 GB
Notification: Performance of NFInst.instantiate(Buildings.Air.Systems.SingleZone.VAV.Examples.Guideline36): time 0.9922/1.147, allocations: 0.4992 GB / 1.522 GB, free: 47.52 MB / 0.9792 GB
Error: Internal error NFAlgorithm.getInputsOutputs failed.
Notification: Performance of NFInst.instExpressions: time 0.1083/1.255, allocations: 111.8 MB / 1.631 GB, free: 18.8 MB / 0.9792 GB
Notification: Performance of NFInst.updateImplicitVariability: time 0.01839/1.273, allocations: 0.5175 MB / 1.632 GB, free: 18.8 MB / 0.9792 GB
Notification: Performance of NFTyping.typeComponents: time 0.02457/1.298, allocations: 10.69 MB / 1.642 GB, free: 16.79 MB / 0.9792 GB
Notification: Performance of NFTyping.typeBindings: time 0.03425/1.332, allocations: 14.88 MB / 1.657 GB, free: 10.79 MB / 0.9792 GB
Notification: Performance of NFTyping.typeClassSections: time 0.02876/1.361, allocations: 15.32 MB / 1.672 GB, free: 6.406 MB / 0.9792 GB
Notification: Performance of NFFlatten.flatten: time 0.09528/1.456, allocations: 85.78 MB / 1.756 GB, free: 11.41 MB / 1.057 GB
Notification: Performance of NFFlatten.resolveConnections: time 0.05061/1.507, allocations: 33.34 MB / 1.788 GB, free: 10.34 MB / 1.089 GB
[/root/.openmodelica/libraries/Modelica 4.0.0+maint.om/Utilities/Strings.mo:82:3-111:14:writable] Error: External function ‘ModelicaStrings_compare‘ could not be found in any of the given shared libraries:
  /usr/bin/../lib/x86_64-linux-gnu/omc/ModelicaExternalC.so
  /root/.openmodelica/libraries/Modelica 4.0.0+maint.om/Resources/Library/linux64/ModelicaExternalC.so
  /root/.openmodelica/libraries/Modelica 4.0.0+maint.om/Resources/Library/ModelicaExternalC.so
  /usr/bin/../lib/x86_64-linux-gnu/omc/libModelicaExternalC.so
  /root/.openmodelica/libraries/Modelica 4.0.0+maint.om/Resources/Library/linux64/libModelicaExternalC.so
  /root/.openmodelica/libraries/Modelica 4.0.0+maint.om/Resources/Library/libModelicaExternalC.so
  /usr/bin/../lib/x86_64-linux-gnu/omc/ffi/ModelicaExternalC.so
  /usr/bin/../lib/x86_64-linux-gnu/omc/ffi/libModelicaExternalC.so
[/root/.openmodelica/libraries/Modelica 4.0.0+maint.om/Utilities/Strings.mo:121:5-121:80:writable] Error: Failed to evaluate function: Modelica.Utilities.Strings.compare.
Notification: Performance of FrontEnd: time 0.004076/1.511, allocations: 1.884 MB / 1.79 GB, free: 8.555 MB / 1.089 GB
"

Could you please tell me how could I run it well? Are there any flags or settings I forgot? Thanks a lot!

BTW, the script was written as follow:


setCommandLineOptions("-d=nogen");
setCommandLineOptions("-d=initialization");
setCommandLineOptions("-d=backenddaeinfo");
setCommandLineOptions("-d=discreteinfo");
setCommandLineOptions("-d=stateselection");
setCommandLineOptions("-d=execstat");
setMatchingAlgorithm("PFPlusExt");
setIndexReductionMethod("dynamicStateSelection");

loadFile("/root/.openmodelica/libraries/Buildings 9.0.0-master/package.mo", uses=false);getErrorString();
loadFile("/root/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo", uses=false);getErrorString();
loadFile("/root/.openmodelica/libraries/Modelica 4.0.0+maint.om/package.mo", uses=false);getErrorString();
loadFile("/root/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo", uses=false);getErrorString();

translateModel(Buildings.Air.Systems.SingleZone.VAV.Examples.Guideline36,tolerance=1e-06,outputFormat="empty",numberOfIntervals=480,variableFilter="",fileNamePrefix="Buildings.Air.Systems.SingleZone.VAV.Examples.Guideline36");
getErrorString();

Re: Translate Error Runing “Guideline36” in Buildings

Youth wrote:


perost wrote:


Youth wrote:


Thanks for your kindly reply, perost.
I see that this issue is under fixing now on GitHub here:  https://github.com/OpenModelica/OpenModelica/pull/8506
Could you please tell me when this fix can be present in the nightly-build 1.19 - dev released?
Thanks again!

Hopefully soon, but I can't really give an accurate estimate. But it's a very high priority issue.

Dear perost,

This problem occurs again when I test on Unbuntu 18.04 instead of on Windows:

It said: External function ‘ModelicaStrings_compare‘ could not be found in any of the given shared libraries

As shown below:


"Notification: Performance of loadFile(/root/.openmodelica/libraries/Buildings 9.0.0-master/package.mo): time 0.6113/0.6113, allocations: 302.8 MB / 316.1 MB, free: 4.105 MB / 250.7 MB
"
true
"Notification: Performance of loadFile(/root/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo): time 0.001059/0.001059, allocations: 176.5 kB / 387.4 MB, free: 15.15 MB / 330.7 MB
"
true
"Notification: Performance of loadFile(/root/.openmodelica/libraries/Modelica 4.0.0+maint.om/package.mo): time 0.4318/0.4318, allocations: 224.8 MB / 0.6675 GB, free: 5.484 MB / 490.7 MB
"
true
"Notification: Performance of loadFile(/root/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.0008738/0.0008737, allocations: 95.69 kB / 0.7862 GB, free: 65.24 MB / 0.5886 GB
"
false
"Notification: Performance of FrontEnd - loaded program: time 0.0003177/0.0003177, allocations: 12 kB / 0.905 GB, free: 0.7305 MB / 0.6042 GB
Notification: Performance of FrontEnd - Absyn->SCode: time 0.1539/0.1543, allocations: 120.9 MB / 1.023 GB, free: 7.828 MB / 0.7292 GB
Notification: Performance of NFInst.instantiate(Buildings.Air.Systems.SingleZone.VAV.Examples.Guideline36): time 0.9922/1.147, allocations: 0.4992 GB / 1.522 GB, free: 47.52 MB / 0.9792 GB
Error: Internal error NFAlgorithm.getInputsOutputs failed.
Notification: Performance of NFInst.instExpressions: time 0.1083/1.255, allocations: 111.8 MB / 1.631 GB, free: 18.8 MB / 0.9792 GB
Notification: Performance of NFInst.updateImplicitVariability: time 0.01839/1.273, allocations: 0.5175 MB / 1.632 GB, free: 18.8 MB / 0.9792 GB
Notification: Performance of NFTyping.typeComponents: time 0.02457/1.298, allocations: 10.69 MB / 1.642 GB, free: 16.79 MB / 0.9792 GB
Notification: Performance of NFTyping.typeBindings: time 0.03425/1.332, allocations: 14.88 MB / 1.657 GB, free: 10.79 MB / 0.9792 GB
Notification: Performance of NFTyping.typeClassSections: time 0.02876/1.361, allocations: 15.32 MB / 1.672 GB, free: 6.406 MB / 0.9792 GB
Notification: Performance of NFFlatten.flatten: time 0.09528/1.456, allocations: 85.78 MB / 1.756 GB, free: 11.41 MB / 1.057 GB
Notification: Performance of NFFlatten.resolveConnections: time 0.05061/1.507, allocations: 33.34 MB / 1.788 GB, free: 10.34 MB / 1.089 GB
[/root/.openmodelica/libraries/Modelica 4.0.0+maint.om/Utilities/Strings.mo:82:3-111:14:writable] Error: External function ‘ModelicaStrings_compare‘ could not be found in any of the given shared libraries:
  /usr/bin/../lib/x86_64-linux-gnu/omc/ModelicaExternalC.so
  /root/.openmodelica/libraries/Modelica 4.0.0+maint.om/Resources/Library/linux64/ModelicaExternalC.so
  /root/.openmodelica/libraries/Modelica 4.0.0+maint.om/Resources/Library/ModelicaExternalC.so
  /usr/bin/../lib/x86_64-linux-gnu/omc/libModelicaExternalC.so
  /root/.openmodelica/libraries/Modelica 4.0.0+maint.om/Resources/Library/linux64/libModelicaExternalC.so
  /root/.openmodelica/libraries/Modelica 4.0.0+maint.om/Resources/Library/libModelicaExternalC.so
  /usr/bin/../lib/x86_64-linux-gnu/omc/ffi/ModelicaExternalC.so
  /usr/bin/../lib/x86_64-linux-gnu/omc/ffi/libModelicaExternalC.so
[/root/.openmodelica/libraries/Modelica 4.0.0+maint.om/Utilities/Strings.mo:121:5-121:80:writable] Error: Failed to evaluate function: Modelica.Utilities.Strings.compare.
Notification: Performance of FrontEnd: time 0.004076/1.511, allocations: 1.884 MB / 1.79 GB, free: 8.555 MB / 1.089 GB
"

Could you please tell me how could I run it well? Are there any flags or settings I forgot? Thanks a lot!

BTW, the script was written as follow:


setCommandLineOptions("-d=nogen");
setCommandLineOptions("-d=initialization");
setCommandLineOptions("-d=backenddaeinfo");
setCommandLineOptions("-d=discreteinfo");
setCommandLineOptions("-d=stateselection");
setCommandLineOptions("-d=execstat");
setMatchingAlgorithm("PFPlusExt");
setIndexReductionMethod("dynamicStateSelection");

loadFile("/root/.openmodelica/libraries/Buildings 9.0.0-master/package.mo", uses=false);getErrorString();
loadFile("/root/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo", uses=false);getErrorString();
loadFile("/root/.openmodelica/libraries/Modelica 4.0.0+maint.om/package.mo", uses=false);getErrorString();
loadFile("/root/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo", uses=false);getErrorString();

translateModel(Buildings.Air.Systems.SingleZone.VAV.Examples.Guideline36,tolerance=1e-06,outputFormat="empty",numberOfIntervals=480,variableFilter="",fileNamePrefix="Buildings.Air.Systems.SingleZone.VAV.Examples.Guideline36");
getErrorString();

BTW, the om version is : OpenModelica 1.19.0~dev-586-gbf2fb17

Re: Translate Error Runing “Guideline36” in Buildings

Hi Youth,

Can you please check if you have the file ModelicaExternalC.so somewhere in your /usr/lib folder? If not please try reinstalling OpenModelica. Otherwise we might have a faulty installer. I will check in the meantime.

Edited by: mahge - Feb-16-22 12:21:47

Re: Translate Error Runing “Guideline36” in Buildings

I think the weird part is looking in /omc/ffi. The ffi directory doesn't exist for me. What OMC version was this on Linux?

Re: Translate Error Runing “Guideline36” in Buildings

> I think the weird part is looking in /omc/ffi. The ffi directory doesn't exist for me. What OMC version was this on Linux?

What version of omc do you have? If it is not a nightly build from a few days back the omc/ffi directory should not be there. Otherwise it should.

If it is missing for Youth then it is probably the package not including everything in /lib/x86_64-linux-gnu/omc/. Maybe it is including only /lib/x86_64-linux-gnu/*.a and /lib/x86_64-linux-gnu/*.so?

Re: Translate Error Runing “Guideline36” in Buildings

mahge wrote:


> I think the weird part is looking in /omc/ffi. The ffi directory doesn't exist for me. What OMC version was this on Linux?

What version of omc do you have? If it is not a nightly build from a few days back the omc/ffi directory should not be there. Otherwise it should.

If it is missing for Youth then it is probably the package not including everything in /lib/x86_64-linux-gnu/omc/. Maybe it is including only /lib/x86_64-linux-gnu/*.a and /lib/x86_64-linux-gnu/*.so?

I did upgrade today, but maybe I forgot to use /usr/bin/omc. If you change any file installed, you need to update the installer or you will break everyone's Linux install... https://github.com/OpenModelica/OpenMod … ter/debian

Re: Translate Error Runing “Guideline36” in Buildings

sjoelund.se wrote:


I think the weird part is looking in /omc/ffi. The ffi directory doesn't exist for me. What OMC version was this on Linux?

Hi mahge,

The OM version is OpenModelica 1.19.0~dev-586-gbf2fb17, and I installed yestday.
I installed via:

Code:


echo "deb https://build.openmodelica.org/apt `lsb_release -cs` nightly" | sudo tee /etc/apt/sources.list.d/openmodelica.list
wget -q http://build.openmodelica.org/apt/openmodelica.asc -O- | sudo apt-key add -
sudo apt update
sudo apt install openmodelica

And installed the libraries via:

Code:


installPackage(Buildings, "9.0.0");
installPackage(Modelica, "4.0.0");

Re: Translate Error Runing “Guideline36” in Buildings

mahge wrote:


Hi Youth,

Can you please check if you have the file ModelicaExternalC.so somewhere in your /usr/lib folder? If not please try reinstalling OpenModelica. Otherwise we might have a faulty installer. I will check in the meantime.

I searched all my computer but no " ModelicaExternalC.so" was found.

Re: Translate Error Runing “Guideline36” in Buildings

I did upgrade today, but maybe I forgot to use /usr/bin/omc. If you change any file installed, you need to update the installer or you will break everyone's Linux install... https://github.com/OpenModelica/OpenMod … ter/debian

That is exactly what I just said.

The problem apparently is that the debian package selectively picks some libs instead of adding the whole /lib/x86_64-linux-gnu/omc/ folder. Examples from the script:

Code:

# MSL-external

debian/tmp/usr/lib/*/omc/libModelica*
debian/tmp/usr/lib/*/omc/libzlib**

for now I will add it manually as everything else. At some point we need to change it so that changes can be reflected in the package without having to manually list libraries.

Edited by: mahge - Feb-16-22 12:51:05

Re: Translate Error Runing “Guideline36” in Buildings

I searched all my computer but no " ModelicaExternalC.so" was found.

I see. The issue is from our side. The package did not include everything needed. We will update it today and you can try the nightly build tomorrow. Sorry for the inconvenience.

In the meantime you can use the nightly builds from about a week ago. They should work fine on Linux.

Edited by: mahge - Feb-16-22 13:13:11

Re: Translate Error Runing “Guideline36” in Buildings

mahge wrote:


I did upgrade today, but maybe I forgot to use /usr/bin/omc. If you change any file installed, you need to update the installer or you will break everyone's Linux install... https://github.com/OpenModelica/OpenMod … ter/debian

That is exactly what I just said.

The problem apparently is that the debian package selectively picks some libs instead of adding the whole /lib/x86_64-linux-gnu/omc/ folder. Examples from the script:

Code:

# MSL-external

debian/tmp/usr/lib/*/omc/libModelica*
debian/tmp/usr/lib/*/omc/libzlib**

for now I will add it manually as everything else. At some point we need to change it so that changes can be reflected in the package without having to manually list libraries.

Dear mahge,

BTW, I tried the Nightly Built on Windows just now but still same Error saying:

" External function ‘ModelicaStrings_compare‘ could not be found in any of the given shared libraries:   D:/OM/lib//omc/ModelicaExternalC.dll   D:/OM/lib/omlibrary/Modelica 3.2.3/Resources/Library/win64/ModelicaExternalC.dll   D:/OM/lib/omlibrary/Modelica 3.2.3/Resources/Library/ModelicaExternalC.dll
[7] 22:12:52 Translation Error [Modelica.Utilities.Strings: 123:5-123:80]: Failed to evaluate function: Modelica.Utilities.Strings.compare." 

Re: Translate Error Runing “Guideline36” in Buildings

mahge wrote:


I searched all my computer but no " ModelicaExternalC.so" was found.

I see. The issue is from our side. The package did not include everything needed. We will update it today and you can try the nightly build tomorrow. Sorry for the inconvenience.

In the meantime you can use the nightly builds from about a week ago. They should work fine on Linux.

Dear sjoelund.se,

Thanks very much for the rapid effort of you guys!! current/big_smile

Looking forward to tomorrow's Nightly Built!

Re: Translate Error Runing “Guideline36” in Buildings

Youth wrote:

BTW, I tried the Nightly Built on Windows just now but still same Error saying:

" External function ‘ModelicaStrings_compare‘ could not be found in any of the given shared libraries:   D:/OM/lib//omc/ModelicaExternalC.dll   D:/OM/lib/omlibrary/Modelica 3.2.3/Resources/Library/win64/ModelicaExternalC.dll   D:/OM/lib/omlibrary/Modelica 3.2.3/Resources/Library/ModelicaExternalC.dll
[7] 22:12:52 Translation Error [Modelica.Utilities.Strings: 123:5-123:80]: Failed to evaluate function: Modelica.Utilities.Strings.compare." 

Guessing from the error messages, I think the version you used does not include the new changes. The messages should be a bit different even if the library is not found (more directories listed).  I will see if it has indeed been built correctly.

Re: Translate Error Runing “Guideline36” in Buildings

mahge wrote:


Youth wrote:

BTW, I tried the Nightly Built on Windows just now but still same Error saying:

" External function ‘ModelicaStrings_compare‘ could not be found in any of the given shared libraries:   D:/OM/lib//omc/ModelicaExternalC.dll   D:/OM/lib/omlibrary/Modelica 3.2.3/Resources/Library/win64/ModelicaExternalC.dll   D:/OM/lib/omlibrary/Modelica 3.2.3/Resources/Library/ModelicaExternalC.dll
[7] 22:12:52 Translation Error [Modelica.Utilities.Strings: 123:5-123:80]: Failed to evaluate function: Modelica.Utilities.Strings.compare." 

Guessing from the error messages, I think the version you used does not include the new changes. The messages should be a bit different even if the library is not found (more directories listed).  I will see if it has indeed been built correctly.

You are right bro. I just copied the error msg from the first reply of this post current/big_smile I thought they are same but not.
I did tried the lastest night built on Windows and there is "Not Found library" error like what I post just now but not same.

Edited by: Youth - Feb-16-22 13:30:13

Re: Translate Error Runing “Guideline36” in Buildings

We have now fixed the issues in

https://github.com/OpenModelica/OpenMod … 5b1e9e9a0d and https://github.com/OpenModelica/OpenMod … ts/pull/25

For both Linux and Windows installations. You should be able to download a new Windows build in about 3 hours. For the Linux ones you have to wait until tomorrow (or use a week old nightly build in the meantime).

Re: Translate Error Runing “Guideline36” in Buildings

mahge wrote:


We have now fixed the issues in

https://github.com/OpenModelica/OpenMod … 5b1e9e9a0d and https://github.com/OpenModelica/OpenMod … ts/pull/25

For both Linux and Windows installations. You should be able to download a new Windows build in about 3 hours. For the Linux ones you have to wait until tomorrow (or use a week old nightly build in the meantime).

Dear mahge,

I tested the nightly build this morning:


Windows:
version: OpenModelica-v1.19.0-dev-595-g2590823b62-64bit

"This application failed to start because of no Qt platform plugin could be initialized" Reinstalled but failed again...

Linux:
version: OpenModelica 1.19.0~dev-590-g0897872

Error: External function ‘ModelicaStrings_compare‘ could not be found in any of the given shared libraries:
  /usr/bin/../lib/x86_64-linux-gnu/omc/ModelicaExternalC.so
  /root/.openmodelica/libraries/Modelica 4.0.0+maint.om/Resources/Library/linux64/ModelicaExternalC.so
  /root/.openmodelica/libraries/Modelica 4.0.0+maint.om/Resources/Library/ModelicaExternalC.so
  /usr/bin/../lib/x86_64-linux-gnu/omc/libModelicaExternalC.so
  /root/.openmodelica/libraries/Modelica 4.0.0+maint.om/Resources/Library/linux64/libModelicaExternalC.so
  /root/.openmodelica/libraries/Modelica 4.0.0+maint.om/Resources/Library/libModelicaExternalC.so
  /usr/bin/../lib/x86_64-linux-gnu/omc/ffi/ModelicaExternalC.so
  /usr/bin/../lib/x86_64-linux-gnu/omc/ffi/libModelicaExternalC.so
[/root/.openmodelica/libraries/Modelica 4.0.0+maint.om/Utilities/Strings.mo:121:5-121:80:writable] Error: Failed to evaluate function: Modelica.Utilities.Strings.compare.

Both failed... current/sad

Could you please tell me how could I install the nightly version a week ago on LINUX? I failed to find a way to install this version.

Thanks in advance!

Re: Translate Error Runing “Guideline36” in Buildings

Sorry for this. The Windows installer script fix I did yesterday broke the installer by copying a lot of the things needed in /bin into bin/ffi. I have now fixed the issue:
https://github.com/OpenModelica/OpenMod … 0c265c2dd9
and started a new nightly build.

The Linux builds where not finished when you tried, they start at 02:00 Stockholm time and take 4-5 hours to build. You can update now and try.

There are 0 guests and 0 other users also viewing this topic
You are here: