Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries --ompython_omhome=/usr Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge.conf.json loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 4.0.0+maint.om/package.mo", uses=false) Using package Modelica with version 4.0.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 4.0.0+maint.om/package.mo) Using package Complex with version 4.0.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo) Using package ModelicaServices with version 4.0.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo) Running command: "" <> buildModelFMU(Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge,fileNamePrefix="Modelica_4_0_0_Modelica_Electrical_Batteries_Examples_BatteryDischargeCharge",fmuType="me",version="2.0",platforms={"static"}) "" <> buildModelFMU(Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge,fileNamePrefix="Modelica_4_0_0_Modelica_Electrical_Batteries_Examples_BatteryDischargeCharge",fmuType="me",version="2.0",platforms={"static"}) Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.001201/0.001201, allocations: 107.9 kB / 16.92 MB, free: 6.332 MB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo): time 0.001164/0.001164, allocations: 191.4 kB / 17.85 MB, free: 5.414 MB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 4.0.0+maint.om/package.mo): time 1.534/1.534, allocations: 222.9 MB / 241.5 MB, free: 15.3 MB / 206.1 MB Notification: Performance of FrontEnd - loaded program: time 0.001667/0.001668, allocations: 47.95 kB / 300.7 MB, free: 5.801 MB / 238.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.1365/0.1382, allocations: 49.44 MB / 350.2 MB, free: 4.352 MB / 286.1 MB Notification: Performance of NFInst.instantiate(Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge): time 0.0107/0.149, allocations: 5.802 MB / 356 MB, free: 14.51 MB / 302.1 MB Notification: Performance of NFInst.instExpressions: time 0.006433/0.1555, allocations: 2.571 MB / 358.5 MB, free: 11.93 MB / 302.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.001292/0.1568, allocations: 27.88 kB / 358.6 MB, free: 11.9 MB / 302.1 MB Notification: Performance of NFTyping.typeComponents: time 0.002558/0.1594, allocations: 0.77 MB / 359.3 MB, free: 11.13 MB / 302.1 MB Notification: Performance of NFTyping.typeBindings: time 0.002251/0.1617, allocations: 0.501 MB / 359.8 MB, free: 10.62 MB / 302.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.001923/0.1637, allocations: 0.5008 MB / 360.3 MB, free: 10.13 MB / 302.1 MB Notification: Performance of NFFlatten.flatten: time 0.00266/0.1664, allocations: 1.585 MB / 361.9 MB, free: 8.543 MB / 302.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.001157/0.1675, allocations: 0.5922 MB / 362.5 MB, free: 7.926 MB / 302.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.001285/0.1688, allocations: 0.6112 MB / 363.1 MB, free: 7.312 MB / 302.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.00137/0.1702, allocations: 0.7471 MB / 363.9 MB, free: 6.562 MB / 302.1 MB Notification: Performance of NFPackage.collectConstants: time 0.0004394/0.1707, allocations: 132 kB / 364 MB, free: 6.434 MB / 302.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0007086/0.1714, allocations: 200 kB / 364.2 MB, free: 6.238 MB / 302.1 MB Notification: Performance of NFScalarize.scalarize: time 0.0008339/0.1722, allocations: 0.6426 MB / 364.8 MB, free: 5.594 MB / 302.1 MB Notification: Performance of NFVerifyModel.verify: time 0.001591/0.1738, allocations: 0.9205 MB / 365.8 MB, free: 4.668 MB / 302.1 MB Notification: Performance of NFConvertDAE.convert: time 0.002754/0.1766, allocations: 2.449 MB / 368.2 MB, free: 2.211 MB / 302.1 MB Notification: Performance of FrontEnd - DAE generated: time 7.444e-06/0.1766, allocations: 3.984 kB / 368.2 MB, free: 2.207 MB / 302.1 MB Notification: Performance of FrontEnd: time 1.863e-06/0.1766, allocations: 0 / 368.2 MB, free: 2.207 MB / 302.1 MB Notification: Performance of Transformations before backend: time 4.285e-05/0.1767, allocations: 0 / 368.2 MB, free: 2.207 MB / 302.1 MB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 215 * Number of variables: 215 Notification: Performance of Generate backend data structure: time 0.1719/0.3486, allocations: 2.556 MB / 370.8 MB, free: 24.25 MB / 302.1 MB Notification: Performance of prepare preOptimizeDAE: time 5.643e-05/0.3487, allocations: 12.31 kB / 370.8 MB, free: 24.25 MB / 302.1 MB Notification: Performance of preOpt introduceOutputAliases (simulation): time 0.0002098/0.3489, allocations: 142 kB / 370.9 MB, free: 24.21 MB / 302.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0004701/0.3494, allocations: 221.7 kB / 371.1 MB, free: 24.1 MB / 302.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.002441/0.3518, allocations: 1.515 MB / 372.6 MB, free: 23.54 MB / 302.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 0.0004958/0.3523, allocations: 177.8 kB / 372.8 MB, free: 23.48 MB / 302.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 0.0001151/0.3525, allocations: 85.48 kB / 372.9 MB, free: 23.45 MB / 302.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.001828/0.3543, allocations: 1.13 MB / 374 MB, free: 22.88 MB / 302.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 2.153e-05/0.3543, allocations: 8.344 kB / 374 MB, free: 22.88 MB / 302.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 8.245e-05/0.3544, allocations: 40.11 kB / 374.1 MB, free: 22.85 MB / 302.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 1.765e-05/0.3544, allocations: 20.72 kB / 374.1 MB, free: 22.85 MB / 302.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.001402/0.3559, allocations: 0.7407 MB / 374.8 MB, free: 22.61 MB / 302.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.006546/0.3624, allocations: 4.649 MB / 379.5 MB, free: 20.02 MB / 302.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.001359/0.3638, allocations: 0.9917 MB / 380.5 MB, free: 19.32 MB / 302.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0008231/0.3646, allocations: 411.2 kB / 380.9 MB, free: 19.2 MB / 302.1 MB Notification: Performance of preOpt evalFunc (simulation): time 4.45e-05/0.3647, allocations: 5.266 kB / 380.9 MB, free: 19.2 MB / 302.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 2.329e-05/0.3647, allocations: 44.28 kB / 380.9 MB, free: 19.15 MB / 302.1 MB Notification: Performance of pre-optimization done (n=44): time 1.783e-06/0.3647, allocations: 0 / 380.9 MB, free: 19.15 MB / 302.1 MB Notification: Performance of matching and sorting (n=44): time 0.002115/0.3668, allocations: 0.8834 MB / 381.8 MB, free: 18.83 MB / 302.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 7.737e-05/0.3669, allocations: 423.5 kB / 382.2 MB, free: 18.33 MB / 302.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.003516/0.3705, allocations: 2.742 MB / 385 MB, free: 17.43 MB / 302.1 MB Notification: Performance of collectPreVariables (initialization): time 7.228e-05/0.3705, allocations: 34.3 kB / 385 MB, free: 17.39 MB / 302.1 MB Notification: Performance of collectInitialEqns (initialization): time 0.0005335/0.3711, allocations: 0.8752 MB / 385.9 MB, free: 16.71 MB / 302.1 MB Notification: Performance of collectInitialBindings (initialization): time 0.0001031/0.3712, allocations: 154.9 kB / 386 MB, free: 16.6 MB / 302.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 0.0001855/0.3714, allocations: 132.8 kB / 386.2 MB, free: 16.52 MB / 302.1 MB Notification: Performance of setup shared object (initialization): time 5.446e-05/0.3715, allocations: 342.5 kB / 386.5 MB, free: 16.2 MB / 302.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0006117/0.3721, allocations: 276.8 kB / 386.8 MB, free: 16.11 MB / 302.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0006907/0.3728, allocations: 0.5521 MB / 387.3 MB, free: 15.62 MB / 302.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.001092/0.3739, allocations: 0.6557 MB / 388 MB, free: 15.15 MB / 302.1 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 6.583e-06/0.3739, allocations: 2.188 kB / 388 MB, free: 15.15 MB / 302.1 MB Notification: Performance of matching and sorting (n=76) (initialization): time 0.002038/0.3759, allocations: 0.8946 MB / 388.9 MB, free: 14.7 MB / 302.1 MB Notification: Performance of prepare postOptimizeDAE: time 2.66e-05/0.376, allocations: 11.09 kB / 388.9 MB, free: 14.7 MB / 302.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.18e-05/0.376, allocations: 5.375 kB / 388.9 MB, free: 14.7 MB / 302.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 3.339e-05/0.376, allocations: 8.969 kB / 388.9 MB, free: 14.7 MB / 302.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0006178/0.3767, allocations: 179 kB / 389.1 MB, free: 14.64 MB / 302.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.7e-05/0.3767, allocations: 7.844 kB / 389.1 MB, free: 14.64 MB / 302.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.001226/0.3779, allocations: 169.2 kB / 389.2 MB, free: 14.55 MB / 302.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 4.771e-05/0.378, allocations: 35.66 kB / 389.3 MB, free: 14.54 MB / 302.1 MB Notification: Model statistics after passing the back-end for initialization: * Number of independent subsystems: 25 * Number of states: 0 () * Number of discrete variables: 6 (pulseSeries.on2,pulseSeries.on1,energy2.local_reset,battery2.limIntegrator.local_reset,energy1.local_reset,battery1.limIntegrator.local_reset) * Number of discrete states: 0 () * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for initialization (76): * Single equations (assignments): 76 * Array equations: 0 * Algorithm blocks: 0 * Record equations: 0 * When equations: 0 * If-equations: 0 * Equation systems (not torn): 0 * Torn equation systems: 0 * Mixed (continuous/discrete) equation systems: 0 Notification: Performance of prepare postOptimizeDAE: time 0.0006394/0.3786, allocations: 0.5515 MB / 389.8 MB, free: 14.22 MB / 302.1 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.0002548/0.3789, allocations: 183.1 kB / 390 MB, free: 14.12 MB / 302.1 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.001472/0.3804, allocations: 0.7355 MB / 390.7 MB, free: 13.73 MB / 302.1 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 7.755e-06/0.3804, allocations: 8.125 kB / 390.7 MB, free: 13.73 MB / 302.1 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 5.721e-06/0.3804, allocations: 0 / 390.7 MB, free: 13.73 MB / 302.1 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 6.863e-06/0.3804, allocations: 7.266 kB / 390.8 MB, free: 13.73 MB / 302.1 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.003234/0.3836, allocations: 2.174 MB / 392.9 MB, free: 12.29 MB / 302.1 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 4.068e-06/0.3837, allocations: 3.938 kB / 392.9 MB, free: 12.29 MB / 302.1 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0005087/0.3842, allocations: 120.1 kB / 393.1 MB, free: 12.25 MB / 302.1 MB Notification: Performance of postOpt tearingSystem (simulation): time 6.512e-06/0.3842, allocations: 0 / 393.1 MB, free: 12.25 MB / 302.1 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 3.452e-05/0.3842, allocations: 19.39 kB / 393.1 MB, free: 12.24 MB / 302.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 3.226e-06/0.3842, allocations: 0 / 393.1 MB, free: 12.24 MB / 302.1 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 2.615e-06/0.3842, allocations: 11.08 kB / 393.1 MB, free: 12.24 MB / 302.1 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.00181/0.3861, allocations: 1.108 MB / 394.2 MB, free: 11.59 MB / 302.1 MB Notification: Performance of postOpt removeConstants (simulation): time 0.0005111/0.3866, allocations: 409 kB / 394.6 MB, free: 11.3 MB / 302.1 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 0.0001803/0.3868, allocations: 11.94 kB / 394.6 MB, free: 11.29 MB / 302.1 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.001075/0.3879, allocations: 151.1 kB / 394.7 MB, free: 11.21 MB / 302.1 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0002768/0.3881, allocations: 151.8 kB / 394.9 MB, free: 11.07 MB / 302.1 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 3.703e-05/0.3882, allocations: 22.61 kB / 394.9 MB, free: 11.05 MB / 302.1 MB Notification: Performance of sorting global known variables: time 0.002141/0.3903, allocations: 1.951 MB / 396.9 MB, free: 9.074 MB / 302.1 MB Notification: Performance of sort global known variables: time 3.11e-07/0.3903, allocations: 0 / 396.9 MB, free: 9.074 MB / 302.1 MB Notification: Performance of remove unused functions: time 0.0009203/0.3913, allocations: 310.2 kB / 397.2 MB, free: 8.773 MB / 302.1 MB Notification: Model statistics after passing the back-end for simulation: * Number of independent subsystems: 4 * Number of states: 6 (battery1.limIntegrator.y,energy1.y,battery2.limIntegrator.y,battery2.capacitor[1].v,battery2.capacitor[2].v,energy2.y) * Number of discrete variables: 2 (pulseSeries.on1,pulseSeries.on2) * Number of discrete states: 0 () * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for simulation (44): * Single equations (assignments): 44 * Array equations: 0 * Algorithm blocks: 0 * Record equations: 0 * When equations: 0 * If-equations: 0 * Equation systems (not torn): 0 * Torn equation systems: 0 * Mixed (continuous/discrete) equation systems: 0 Notification: Performance of Backend phase and start with SimCode phase: time 0.002953/0.3942, allocations: 2.035 MB / 399.2 MB, free: 6.918 MB / 302.1 MB Notification: Performance of simCode: created initialization part: time 0.001456/0.3957, allocations: 0.6722 MB / 399.9 MB, free: 6.254 MB / 302.1 MB Notification: Performance of simCode: created event and clocks part: time 5.34e-06/0.3957, allocations: 11.94 kB / 399.9 MB, free: 6.242 MB / 302.1 MB Notification: Performance of simCode: created simulation system equations: time 0.0006484/0.3964, allocations: 371.6 kB / 400.3 MB, free: 5.879 MB / 302.1 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.001443/0.3978, allocations: 323.2 kB / 400.6 MB, free: 5.566 MB / 302.1 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.0234/0.4212, allocations: 19.78 MB / 420.3 MB, free: 484 kB / 318.1 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.001004/0.4223, allocations: 1.437 MB / 421.8 MB, free: 15 MB / 334.1 MB Notification: Performance of simCode: alias equations: time 0.000795/0.4231, allocations: 294.8 kB / 422.1 MB, free: 14.71 MB / 334.1 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0008594/0.424, allocations: 0.6984 MB / 422.8 MB, free: 14.01 MB / 334.1 MB Notification: Performance of SimCode: time 9.51e-07/0.424, allocations: 0 / 422.8 MB, free: 14.01 MB / 334.1 MB Notification: Performance of buildModelFMU: Generate the FMI files: time 0.09265/0.5166, allocations: 38.36 MB / 461.1 MB, free: 7.992 MB / 366.1 MB Notification: Performance of buildModelFMU: Generate platform static: time 10.12/10.63, allocations: 6.516 kB / 461.1 MB, free: 7.988 MB / 366.1 MB (rm -f Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge.pipe ; mkfifo Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge.pipe ; head -c 1048576 < Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge.pipe >> ../files/Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge.sim & python3 -m fmpy simulate --output-file Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge_res.csv --start-time 0 --stop-time 3600 --timeout 50 --relative-tolerance 1e-06 --interface-type ModelExchange --solver CVode --output-interval 0.1 Modelica_4_0_0_Modelica_Electrical_Batteries_Examples_BatteryDischargeCharge.fmu > Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge.pipe 2>&1) diffSimulationResults("Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge_res.csv","/var/lib/jenkins1/ws/OpenModelicaLibraryTestingWork/Reference-modelica.org/ReferenceResults/MAP-LIB_ReferenceResults/v4.0.0/Modelica/Electrical/Batteries/Examples/BatteryDischargeCharge/BatteryDischargeCharge.csv","/var/lib/jenkins1/ws/OpenModelicaLibraryTestingWork/OpenModelicaLibraryTesting/files/Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge.diff",relTol=0.003,relTolDiffMinMax=0.003,rangeDelta=0.001) "Warning: Resultfile and Reference have different end time points! Reffile[72030]=3600.000000 File[9250]=1024.000000 Error: Could not read variable energy2.y in file Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge_res.csv. Warning: Get data of variable energy2.y from file Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge_res.csv failed! " Variables in the reference:time,battery1.limIntegrator.y,battery2.capacitor[1].v,battery2.capacitor[2].v,battery2.limIntegrator.y,energy1.y,energy2.y Variables in the result:time,battery1.limIntegrator.y,battery2.capacitor[1].v,battery2.capacitor[2].v,battery2.limIntegrator.y,energy1.y