Opened 5 years ago
Last modified 4 years ago
#5744 assigned defect
Problems to simulate MSL models with OM nightly
Reported by: | Owned by: | Martin Sjölund | |
---|---|---|---|
Priority: | high | Milestone: | Future |
Component: | Installation program | Version: | v1.16.0-dev |
Keywords: | Linux | Cc: | Adrian Pop |
Description
Im am using the following version of OM nightly und Linux Mint 19.2:
Connected to OpenModelica 1.16.0~dev-72-gc3a557c Connected to OMSimulator unknown-linux
However, I have a lot of difficulties to run OM simulations currently, but I cannot say whether this is the installation on my machine (which I guess is the case) or the actual OpenModelica version. After I noticed some problems a week ago, I re-installed everything (through Synaptic) but that did not change anything. Please let me step-by-step explain what I notice:
1) Start of OMEdit
I get the following messages:
[1] 20:18:35 Scripting Notification Skipped loading package Complex (3.2.3,default) using MODELICAPATH /usr/bin/../lib/omlibrary:/home/christian/.openmodelica/libraries/ (uses-annotation may be wrong). [2] 20:18:35 Scripting Notification Skipped loading package ModelicaServices (3.2.3,default) using MODELICAPATH /usr/bin/../lib/omlibrary:/home/christian/.openmodelica/libraries/ (uses-annotation may be wrong). [3] 20:18:35 Scripting Error Failed to load package ModelicaReference (3.2.3) using MODELICAPATH /usr/bin/../lib/omlibrary:/home/christian/.openmodelica/libraries/.
I go to the indicated directory omlibrary
and see all the installed libraries:
christian@Yogix:/> christian@Yogix:/> cd /usr/bin/../lib/omlibrary christian@Yogix:omlibrary> ls 'Buildings 5.1.0' OpenBLDC 'ElectroMechanicalDrives 2.2.0' 'PhotoVoltaics 1.5.0' 'EMOTH 1.4.0' 'PhotoVoltaics_TGM 1.5.0' GNU_ScientificLibrary 'PlanarMechanics 1.4.1' 'HanserModelica 1.1.0' PlanarMechanicsTest 'KeyWordIO 0.9.0' 'PowerFlow 0.3' 'Modelica 3.1' PraxisSimulationstechnik 'Modelica 3.2.1' 'PVSystems 0.6.3' 'Modelica 3.2.2' 'SiemensPower 2.2' 'Modelica 3.2.3' 'Spot 0.706.1' 'ModelicaTest 3.2.1' 'SpotExamples 0.706.1' 'ModelicaTest 3.2.2' 'SystemDynamics 2.1' 'ModelicaTest 3.2.3' 'VehicleInterfaces 1.2.4' 'ModelicaTest trunk' 'WindPowerPlants 1.3.0' 'Modelica trunk' 'XogenyTest 1.1'
2) I try a simple Model
model Test Real x(start = 1); equation der(x) = -x; end Test;
This model simulates OK with no complaints.
3) I simulate Modelica.Blocks.Examples.Filter
When I try to simulate this model I get asked to switch back the old frontend and then the following error messages occur in the Messages Browser:
[1] 20:25:59 Scripting Notification Skipped loading package Complex (3.2.3,default) using MODELICAPATH /usr/bin/../lib/omlibrary:/home/christian/.openmodelica/libraries/ (uses-annotation may be wrong). [2] 20:25:59 Scripting Notification Skipped loading package ModelicaServices (3.2.3,default) using MODELICAPATH /usr/bin/../lib/omlibrary:/home/christian/.openmodelica/libraries/ (uses-annotation may be wrong). [3] 20:25:59 Translation Error [Modelica.Constants: 25:3-26:101]: Variable ModelicaServices.Machine.Integer_inf not found in scope Constants. [4] 20:25:59 Translation Error [Modelica.Blocks.Continuous: 2271:9-2271:37]: Import Modelica.Constants.pi not found in scope <top>. [5] 20:25:59 Translation Error [Modelica.Blocks.Continuous: 2293:11-2293:73]: Variable pi not found in scope Butterworth. [6] 20:26:08 Scripting Notification Skipped loading package Complex (3.2.3,default) using MODELICAPATH /usr/bin/../lib/omlibrary:/home/christian/.openmodelica/libraries/ (uses-annotation may be wrong). [7] 20:26:08 Scripting Notification Skipped loading package ModelicaServices (3.2.3,default) using MODELICAPATH /usr/bin/../lib/omlibrary:/home/christian/.openmodelica/libraries/ (uses-annotation may be wrong). [8] 20:26:08 Translation Error [Modelica.Blocks.Continuous: 2410:9-2411:40]: Variable .Modelica.Constants.pi not found in scope Modelica.Blocks.Continuous.Internal.Filter.coefficients.lowPass. [9] 20:26:08 Translation Error [Modelica.Constants: 19:3-20:47]: Variable ModelicaServices.Machine.eps not found in scope Modelica.Constants. [10] 20:26:08 Translation Error [Modelica.Blocks.Continuous: 2446:9-2447:40]: Variable .Modelica.Constants.pi not found in scope Modelica.Blocks.Continuous.Internal.Filter.coefficients.highPass. [11] 20:26:08 Translation Error Error occurred while flattening model Modelica.Blocks.Examples.Filter
So this model does neither compile nor simulate.
---
So it seems there is a problem with loading and/or treating the Modelica Standard Library correctly.
- Could anyone on a Linux machine please confirm / not confirm my findings?
- Any ideas what could have gone wrong?
- Could that have been caused by installing some other software?
Attachments (1)
Change History (14)
comment:1 by , 5 years ago
comment:2 by , 5 years ago
I would like to wait for some comment from the OM support team here. If there isn't anything to add, we can close this ticket.
comment:3 by , 5 years ago
Cc: | added |
---|---|
Component: | OMEdit → Installation program |
Keywords: | Linux added |
Owner: | changed from | to
Status: | new → assigned |
comment:4 by , 5 years ago
Even Complex
was missing: Now after removing and re-installing everything I see:
christian@Yogix:omlibrary> ls 'Buildings 5.0.1' 'ModelicaServices 3.2.2' 'Buildings 5.1.0' 'ModelicaServices 3.2.3' 'Complex 3.2.1.mo' 'ModelicaServices trunk' 'Complex 3.2.2.mo' 'Modelica trunk' 'Complex 3.2.3.mo' 'NcDataReader2 2.5.0' 'Complex trunk.mo' 'PhotoVoltaics 1.5.0' 'DriveControl 3.1.0' 'PhotoVoltaics_TGM 1.5.0' 'ElectroMechanicalDrives 2.2.0' 'PlanarMechanics 1.4.1' 'EMOTH 1.4.0' PlanarMechanicsTest GNU_ScientificLibrary PraxisSimulationstechnik 'HanserModelica 1.1.0' 'SiemensPower 2.2' 'KeyWordIO 0.9.0' 'Spot 0.706.1' 'Modelica 3.1' 'SpotExamples 0.706.1' 'Modelica 3.2.1' 'VehicleInterfaces 1.2.4' 'Modelica 3.2.2' 'WindPowerPlants 1.3.0' 'Modelica 3.2.3' 'XogenyTest 1.1' 'ModelicaServices 3.2.1'
Everything seems to work OK after manually re-installing the libraries. However, there is still the following message left after starting OMEdit:
[1] 21:09:34 Scripting Error Failed to load package ModelicaReference (3.2.3) using MODELICAPATH /usr/bin/../lib/omlibrary:/home/christian/.openmodelica/libraries/.
comment:5 by , 5 years ago
You are still missing some, for sure omlib-modelicareference:
@dev:/usr/lib/omlibrary# ls ADGenKinetics.mo 'ModelicaReference trunk' ADMSL 'ModelicaServices 1.0' 'Annex60 0.1' 'ModelicaServices 3.2.1' 'BioChem 1.0.1' 'ModelicaServices 3.2.3' BondGraph.mo 'ModelicaServices trunk' 'BondLib 2.3' 'Modelica_StateGraph2 2.0.2' 'BrineProp 0.4.1' 'Modelica_Synchronous 0.92' 'Buildings 2.1.0' 'ModelicaTest 3.2.1' 'Buildings latest' 'ModelicaTest trunk' 'Complex 3.2.1.mo' 'Modelica trunk' 'Complex 3.2.3.mo' MotorcycleDynamics ComplexLib.mo NcDataReader2 'Complex trunk.mo' 'NeuralNetwork 1.0' ConPNlib 'ObjectStab 1.1 Dev' 'DESLib 1.6.1' ObsoleteModelica3.mo 'ExtendedPetriNets 1.0' OpenBLDC 'ExternData 1.0.3-dev' 'OpenHydraulics 1.0' 'FastBuildings 0.0' 'Physiolibrary 2.3.1alpha' 'FaultTriggering 0.5.0' 'PlanarMechanics 1.4.0 Development Version' 'FCSys 0.2.6' 'PNlib 1.1' FCSysTest 'PowerFlow 0.3' FuzzyControl 'PowerSystems 0.4.0' HelmholtzMedia 'PowerSystems latest' 'IdealizedContact 0.2.0' PraxisSimulationstechnik 'IndustrialControlSystems 1' QCalc InstantaneousSymmetricalComponents.mo QCalcTests 'LinearMPC 1.mo' 'QSSFluidFlow 1.0' 'MessagePack 0.1' 'RealTimeCoordinationLibrary 1.0.2' 'Modelica 1.6' 'ScalableTestSuite 1.0.0' 'Modelica 2.2.2' 'Servomechanisms 1.0' 'Modelica 3.1' 'SiemensPower 2.1 beta' 'Modelica 3.2.1' 'SiemensPower 2.2' 'Modelica 3.2.3' 'SiemensPower OMCtest' 'ModelicaAdditions 1.5' 'Spot 0.706.1' ModelicaByExample 'SpotExamples 0.706.1' 'ModelicaCompliance 3.2' 'SystemDynamics 2.1' 'Modelica_DeviceDrivers 1.4.0-dev' 'ThermoPower 3.1' 'ModelicaDEVS 1.mo' 'ThermoSysPro 3.0' 'Modelica_EnergyStorages 3.2.1.mo' 'ThermoSysPro 3.1' 'Modelica_LinearSystems2 2.4' 'VehicleInterfaces 1.2.2' 'Modelica_Noise 1.0 Beta.1' 'WasteWater 2.1.0' ModelicaReference 'XogenyTest 1.1'
You get that message because OMEdit loads ModelicaReference on startup. You can disable that via OMEdit->Tools->Options->Libraries.
follow-up: 9 comment:6 by , 5 years ago
@Christian, are you compiling from sources or using the nightly builds? The nightlies have not been updated since Dec 3.
comment:7 by , 5 years ago
See also #5347.
@sjoelund.se proposes to solve this issue with a new Modelica package manager. I agree with that, but we do need a short term solution to avoid the kind of issues Christian is experiencing.
comment:8 by , 5 years ago
Well, I think the packages use recommends for some dependencies, so it's possible to uninstall some packages and not have them reinstalled when you upgrade omc/omedit...
comment:9 by , 5 years ago
Replying to casella:
@Christian, are you compiling from sources or using the nightly builds? The nightlies have not been updated since Dec 3.
I am not compiling from sources, I am using the nightly builds.
comment:10 by , 4 years ago
@christiankral, @sjoelund has implemented a new package manager, which is available in 1.16.0-dev.03 and in the forthcoming 1.16.0 release. It is documented here.
Would you mind giving it a look and reporting if it solves your problems?
Currently this tool is command-line only, but we plan to integrate it in OMEdit in the next 1.17.0 release.
comment:11 by , 4 years ago
I just updated one of my computers to Linux Mint 20. I thus had the chance to perform a "new" installation of OpenModelica. I am currently running:
Connected to OpenModelica 1.16.0~dev-548-gd3091d6 Connected to OMSimulator unknown-linux
I installed the following libraries:
> cd /usr/bin/../lib/omlibrary > ls 'Buildings 6.0.0' 'ModelicaServices 3.2.3' 'Complex 3.2.3.mo' 'NcDataReader2 2.5.0' 'ElectroMechanicalDrives 2.2.0' 'PhotoVoltaics 1.6.0' GNU_ScientificLibrary 'PhotoVoltaics_TGM 1.6.0' 'HanserModelica 1.1.0' 'PowerGrids 1.0.0' 'KeyWordIO 0.9.0' 'PowerSystems 1.0.0' 'Modelica 3.2.3' 'VehicleInterfaces 1.2.5' 'ModelicaByExample 0.5.0' 'WindPowerPlants 1.2.0' ModelicaReference
So the following libraries are installed (see also attached "installed.png"):
Modelica 3.2.3
ModelicaReference
ModelicaServices 3.2.3
Complex 3.2.3
After starting OpenModelica I get the following messages:
[1] 22:02:59 Scripting Notification DSvgRenderer::load: XML parse error: error code=99 (3) in (null):7:35: xmlns:ns1: '&#38;ns_ai;' is not a valid URI DSvgRenderer::load: XML parse error: error code=99 (3) in (null):7:35: xmlns:ns1: '&#38;ns_ai;' is not a valid URI qt5ct: D-Bus system tray: no qt5ct: D-Bus global menu: no [2] 22:03:00 Scripting Notification You can install the requested package using one of the commands: installPackage(ModelicaReference, "3.2.3+maint.om", exactMatch=true) installPackage(ModelicaReference, "3.2.3", exactMatch=false) installPackage(ModelicaReference, "3.2.3", exactMatch=false). [3] 22:03:00 Scripting Error Failed to load package ModelicaReference (3.2.3) using MODELICAPATH /usr/bin/../lib/omlibrary:/home/christian/.openmodelica/libraries/.
comment:12 by , 4 years ago
After following the recommendation of using the package manager (even though a similar version seems to be installed), using
>> installPackage(ModelicaReference, "3.2.3", exactMatch=false) true
The issue with ModelicaReference disappears. Then only the following message remains:
[1] 22:11:38 Scripting Notification DSvgRenderer::load: XML parse error: error code=99 (3) in (null):7:35: xmlns:ns1: '&#38;ns_ai;' is not a valid URI DSvgRenderer::load: XML parse error: error code=99 (3) in (null):7:35: xmlns:ns1: '&#38;ns_ai;' is not a valid URI qt5ct: D-Bus system tray: no qt5ct: D-Bus global menu: no
as the "missing" library is installed:
> cd ~/.openmodelica/libraries/ > ls index.json 'ModelicaReference 3.2.3+maint.om'
So yes, this solves my issue (even though I do not understand why "omlib-modelicareference" from the Linux Mint package manager does not provide / install the required package "ModelicaReference 3.2.3+maint.om" installed by the OM package manager).
comment:13 by , 4 years ago
Thank for the report! @sjoelund needs to look into that, but he's currently on vacation
I just wonder where
omlib-modelicaservices
shall be located.Trying
I simulate
Modelica.Blocks.Examples.Filter
now and it goes all OK.Any idea what could have gone wrong here? Why disappeared the ModelicaServices?