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.00103/0.00103, allocations: 110.7 kB / 17.06 MB, free: 5.828 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.001094/0.001094, allocations: 200 kB / 18.01 MB, free: 4.938 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.366/1.366, allocations: 222.9 MB / 241.7 MB, free: 15.16 MB / 206.1 MB Notification: Performance of FrontEnd - loaded program: time 0.001197/0.001197, allocations: 43.94 kB / 350.8 MB, free: 3.773 MB / 286.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.2878/0.289, allocations: 49.44 MB / 400.2 MB, free: 8.426 MB / 318.1 MB Notification: Performance of NFInst.instantiate(Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge): time 0.007424/0.2964, allocations: 5.794 MB / 406 MB, free: 3.016 MB / 318.1 MB Notification: Performance of NFInst.instExpressions: time 0.004328/0.3008, allocations: 2.586 MB / 408.6 MB, free: 432 kB / 318.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.0008772/0.3017, allocations: 23.88 kB / 408.6 MB, free: 408 kB / 318.1 MB Notification: Performance of NFTyping.typeComponents: time 0.001902/0.3037, allocations: 0.7661 MB / 409.4 MB, free: 15.63 MB / 334.1 MB Notification: Performance of NFTyping.typeBindings: time 0.001687/0.3054, allocations: 0.5205 MB / 409.9 MB, free: 15.11 MB / 334.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.001492/0.3069, allocations: 0.499 MB / 410.4 MB, free: 14.61 MB / 334.1 MB Notification: Performance of NFFlatten.flatten: time 0.002281/0.3092, allocations: 1.598 MB / 412 MB, free: 13 MB / 334.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.00091/0.3101, allocations: 0.5961 MB / 412.6 MB, free: 12.38 MB / 334.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.001047/0.3112, allocations: 0.6112 MB / 413.2 MB, free: 11.77 MB / 334.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.001357/0.3125, allocations: 0.7432 MB / 414 MB, free: 11.02 MB / 334.1 MB Notification: Performance of NFPackage.collectConstants: time 0.000444/0.313, allocations: 132 kB / 414.1 MB, free: 10.89 MB / 334.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0007701/0.3138, allocations: 215.8 kB / 414.3 MB, free: 10.68 MB / 334.1 MB Notification: Performance of NFScalarize.scalarize: time 0.00088/0.3147, allocations: 0.6349 MB / 414.9 MB, free: 10.05 MB / 334.1 MB Notification: Performance of NFVerifyModel.verify: time 0.001772/0.3164, allocations: 0.9244 MB / 415.9 MB, free: 9.117 MB / 334.1 MB Notification: Performance of NFConvertDAE.convert: time 0.002661/0.3191, allocations: 2.486 MB / 418.4 MB, free: 6.621 MB / 334.1 MB Notification: Performance of FrontEnd - DAE generated: time 4.608e-06/0.3191, allocations: 0 / 418.4 MB, free: 6.621 MB / 334.1 MB Notification: Performance of FrontEnd: time 3.606e-06/0.3191, allocations: 0 / 418.4 MB, free: 6.621 MB / 334.1 MB Notification: Performance of Transformations before backend: time 3.396e-05/0.3192, allocations: 3.938 kB / 418.4 MB, free: 6.617 MB / 334.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.005083/0.3243, allocations: 2.632 MB / 421 MB, free: 3.926 MB / 334.1 MB Notification: Performance of prepare preOptimizeDAE: time 4.488e-05/0.3243, allocations: 12.03 kB / 421 MB, free: 3.914 MB / 334.1 MB Notification: Performance of preOpt introduceOutputAliases (simulation): time 0.0001643/0.3245, allocations: 135.5 kB / 421.1 MB, free: 3.773 MB / 334.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0003405/0.3248, allocations: 239.4 kB / 421.4 MB, free: 3.539 MB / 334.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.002356/0.3272, allocations: 1.552 MB / 422.9 MB, free: 1.941 MB / 334.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 0.0001114/0.3273, allocations: 100 kB / 423 MB, free: 1.84 MB / 334.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 0.0001184/0.3275, allocations: 84 kB / 423.1 MB, free: 1.758 MB / 334.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.001697/0.3292, allocations: 1.1 MB / 424.2 MB, free: 0.5781 MB / 334.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 2.222e-05/0.3292, allocations: 7.922 kB / 424.2 MB, free: 0.5703 MB / 334.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 9.403e-05/0.3293, allocations: 40 kB / 424.2 MB, free: 0.5312 MB / 334.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 1.755e-05/0.3293, allocations: 20 kB / 424.3 MB, free: 0.5117 MB / 334.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.001311/0.3306, allocations: 0.7143 MB / 425 MB, free: 15.8 MB / 350.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.006361/0.337, allocations: 4.6 MB / 429.6 MB, free: 11.02 MB / 350.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.001227/0.3383, allocations: 0.9512 MB / 430.5 MB, free: 9.969 MB / 350.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0007112/0.339, allocations: 382 kB / 430.9 MB, free: 9.59 MB / 350.1 MB Notification: Performance of preOpt evalFunc (simulation): time 4.69e-05/0.339, allocations: 8 kB / 430.9 MB, free: 9.582 MB / 350.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 2.837e-05/0.3391, allocations: 38.56 kB / 430.9 MB, free: 9.535 MB / 350.1 MB Notification: Performance of pre-optimization done (n=44): time 1.923e-06/0.3391, allocations: 4 kB / 431 MB, free: 9.531 MB / 350.1 MB Notification: Performance of matching and sorting (n=44): time 0.001662/0.3407, allocations: 0.8326 MB / 431.8 MB, free: 8.691 MB / 350.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 0.0001818/0.3409, allocations: 427.2 kB / 432.2 MB, free: 8.176 MB / 350.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.003203/0.3442, allocations: 2.739 MB / 434.9 MB, free: 5.395 MB / 350.1 MB Notification: Performance of collectPreVariables (initialization): time 5.326e-05/0.3442, allocations: 37.7 kB / 435 MB, free: 5.352 MB / 350.1 MB Notification: Performance of collectInitialEqns (initialization): time 0.0007577/0.345, allocations: 0.8834 MB / 435.9 MB, free: 4.461 MB / 350.1 MB Notification: Performance of collectInitialBindings (initialization): time 0.0001352/0.3451, allocations: 166.6 kB / 436 MB, free: 4.297 MB / 350.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 0.0001994/0.3453, allocations: 126.3 kB / 436.1 MB, free: 4.168 MB / 350.1 MB Notification: Performance of setup shared object (initialization): time 0.0001364/0.3455, allocations: 330 kB / 436.5 MB, free: 3.84 MB / 350.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0005191/0.346, allocations: 257.1 kB / 436.7 MB, free: 3.586 MB / 350.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0007277/0.3467, allocations: 0.5324 MB / 437.3 MB, free: 2.934 MB / 350.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.001063/0.3478, allocations: 0.6171 MB / 437.9 MB, free: 2.238 MB / 350.1 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 3.667e-06/0.3478, allocations: 4 kB / 437.9 MB, free: 2.234 MB / 350.1 MB Notification: Performance of matching and sorting (n=76) (initialization): time 0.001465/0.3493, allocations: 0.8578 MB / 438.7 MB, free: 1.367 MB / 350.1 MB Notification: Performance of prepare postOptimizeDAE: time 1.892e-05/0.3493, allocations: 7.219 kB / 438.7 MB, free: 1.363 MB / 350.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 9.037e-06/0.3493, allocations: 8 kB / 438.7 MB, free: 1.355 MB / 350.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 2.088e-05/0.3494, allocations: 12 kB / 438.8 MB, free: 1.344 MB / 350.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.000599/0.35, allocations: 167.7 kB / 438.9 MB, free: 1.18 MB / 350.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.494e-05/0.35, allocations: 15.88 kB / 438.9 MB, free: 1.164 MB / 350.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0009658/0.351, allocations: 159.4 kB / 439.1 MB, free: 1.008 MB / 350.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 4.972e-05/0.351, allocations: 28 kB / 439.1 MB, free: 0.9805 MB / 350.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.0006803/0.3517, allocations: 0.5638 MB / 439.7 MB, free: 416 kB / 350.1 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.0002301/0.3519, allocations: 186.8 kB / 439.9 MB, free: 228 kB / 350.1 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.001303/0.3533, allocations: 0.6923 MB / 440.6 MB, free: 15.53 MB / 366.1 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 8.937e-06/0.3533, allocations: 11.94 kB / 440.6 MB, free: 15.52 MB / 366.1 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 4.499e-06/0.3533, allocations: 0 / 440.6 MB, free: 15.52 MB / 366.1 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 5.109e-06/0.3533, allocations: 0 / 440.6 MB, free: 15.52 MB / 366.1 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.003174/0.3565, allocations: 2.117 MB / 442.7 MB, free: 13.32 MB / 366.1 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 2.965e-06/0.3565, allocations: 4 kB / 442.7 MB, free: 13.32 MB / 366.1 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0004908/0.357, allocations: 107.9 kB / 442.8 MB, free: 13.21 MB / 366.1 MB Notification: Performance of postOpt tearingSystem (simulation): time 6.432e-06/0.357, allocations: 4 kB / 442.8 MB, free: 13.21 MB / 366.1 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 3.547e-05/0.357, allocations: 16.09 kB / 442.8 MB, free: 13.2 MB / 366.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 3.106e-06/0.3571, allocations: 0 / 442.8 MB, free: 13.2 MB / 366.1 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 4.007e-06/0.3571, allocations: 7.984 kB / 442.8 MB, free: 13.19 MB / 366.1 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.001755/0.3588, allocations: 1.056 MB / 443.9 MB, free: 12.1 MB / 366.1 MB Notification: Performance of postOpt removeConstants (simulation): time 0.0007597/0.3596, allocations: 415.7 kB / 444.3 MB, free: 11.68 MB / 366.1 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 0.0001778/0.3598, allocations: 19.98 kB / 444.3 MB, free: 11.66 MB / 366.1 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.00102/0.3608, allocations: 135.8 kB / 444.4 MB, free: 11.52 MB / 366.1 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0003082/0.3611, allocations: 155.7 kB / 444.6 MB, free: 11.37 MB / 366.1 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 3.836e-05/0.3612, allocations: 16 kB / 444.6 MB, free: 11.36 MB / 366.1 MB Notification: Performance of sorting global known variables: time 0.002525/0.3637, allocations: 1.943 MB / 446.5 MB, free: 9.391 MB / 366.1 MB Notification: Performance of sort global known variables: time 1.5e-07/0.3637, allocations: 0 / 446.5 MB, free: 9.391 MB / 366.1 MB Notification: Performance of remove unused functions: time 0.0009117/0.3646, allocations: 323.4 kB / 446.9 MB, free: 9.074 MB / 366.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.003133/0.3678, allocations: 1.96 MB / 448.8 MB, free: 7.254 MB / 366.1 MB Notification: Performance of simCode: created initialization part: time 0.001208/0.369, allocations: 0.5892 MB / 449.4 MB, free: 6.668 MB / 366.1 MB Notification: Performance of simCode: created event and clocks part: time 6.763e-06/0.369, allocations: 7.938 kB / 449.4 MB, free: 6.66 MB / 366.1 MB Notification: Performance of simCode: created simulation system equations: time 0.0006105/0.3697, allocations: 343.4 kB / 449.8 MB, free: 6.324 MB / 366.1 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.001549/0.3712, allocations: 331.9 kB / 450.1 MB, free: 6.004 MB / 366.1 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.02318/0.3944, allocations: 17.2 MB / 467.3 MB, free: 4.418 MB / 382.1 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.001073/0.3955, allocations: 1.437 MB / 468.7 MB, free: 2.953 MB / 382.1 MB Notification: Performance of simCode: alias equations: time 0.0007898/0.3963, allocations: 290.8 kB / 469 MB, free: 2.664 MB / 382.1 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0008505/0.3972, allocations: 0.7023 MB / 469.7 MB, free: 1.961 MB / 382.1 MB Notification: Performance of SimCode: time 6.11e-07/0.3972, allocations: 0 / 469.7 MB, free: 1.961 MB / 382.1 MB Notification: Performance of buildModelFMU: Generate the FMI files: time 0.07426/0.4714, allocations: 38.81 MB / 0.4966 GB, free: 11.47 MB / 430.1 MB Notification: Performance of buildModelFMU: Generate platform static: time 10.55/11.02, allocations: 0.7188 kB / 0.4966 GB, free: 11.47 MB / 430.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