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.001605/0.001605, allocations: 108.1 kB / 17.06 MB, free: 5.82 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.001794/0.001794, allocations: 195.9 kB / 18 MB, free: 4.965 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.401/1.401, allocations: 222.9 MB / 241.7 MB, free: 15.17 MB / 206.1 MB Notification: Performance of FrontEnd - loaded program: time 0.001433/0.001433, allocations: 43.92 kB / 350.8 MB, free: 3.781 MB / 286.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.2751/0.2766, allocations: 49.45 MB / 400.2 MB, free: 8.438 MB / 318.1 MB Notification: Performance of NFInst.instantiate(Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge): time 0.008036/0.2846, allocations: 5.791 MB / 406 MB, free: 3.035 MB / 318.1 MB Notification: Performance of NFInst.instExpressions: time 0.004909/0.2896, allocations: 2.586 MB / 408.6 MB, free: 452 kB / 318.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.0008399/0.2905, allocations: 23.94 kB / 408.6 MB, free: 428 kB / 318.1 MB Notification: Performance of NFTyping.typeComponents: time 0.001934/0.2925, allocations: 0.7661 MB / 409.4 MB, free: 15.65 MB / 334.1 MB Notification: Performance of NFTyping.typeBindings: time 0.001292/0.2938, allocations: 0.5049 MB / 409.9 MB, free: 15.14 MB / 334.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.001218/0.295, allocations: 0.5069 MB / 410.4 MB, free: 14.64 MB / 334.1 MB Notification: Performance of NFFlatten.flatten: time 0.001976/0.297, allocations: 1.59 MB / 412 MB, free: 13.03 MB / 334.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0008049/0.2978, allocations: 0.5883 MB / 412.6 MB, free: 12.42 MB / 334.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0007707/0.2986, allocations: 0.615 MB / 413.2 MB, free: 11.8 MB / 334.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0008765/0.2995, allocations: 0.7354 MB / 413.9 MB, free: 11.07 MB / 334.1 MB Notification: Performance of NFPackage.collectConstants: time 0.0001843/0.2997, allocations: 132 kB / 414.1 MB, free: 10.94 MB / 334.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0004035/0.3001, allocations: 208 kB / 414.3 MB, free: 10.73 MB / 334.1 MB Notification: Performance of NFScalarize.scalarize: time 0.0005943/0.3007, allocations: 0.6504 MB / 414.9 MB, free: 10.08 MB / 334.1 MB Notification: Performance of NFVerifyModel.verify: time 0.0009004/0.3016, allocations: 0.9166 MB / 415.8 MB, free: 9.16 MB / 334.1 MB Notification: Performance of NFConvertDAE.convert: time 0.002653/0.3043, allocations: 2.49 MB / 418.3 MB, free: 6.66 MB / 334.1 MB Notification: Performance of FrontEnd - DAE generated: time 3.857e-06/0.3043, allocations: 0 / 418.3 MB, free: 6.66 MB / 334.1 MB Notification: Performance of FrontEnd: time 1.493e-06/0.3043, allocations: 0 / 418.3 MB, free: 6.66 MB / 334.1 MB Notification: Performance of Transformations before backend: time 3.249e-05/0.3043, allocations: 4 kB / 418.3 MB, free: 6.656 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.004956/0.3093, allocations: 2.632 MB / 421 MB, free: 3.965 MB / 334.1 MB Notification: Performance of prepare preOptimizeDAE: time 4.455e-05/0.3094, allocations: 12.03 kB / 421 MB, free: 3.953 MB / 334.1 MB Notification: Performance of preOpt introduceOutputAliases (simulation): time 0.000231/0.3096, allocations: 139.5 kB / 421.1 MB, free: 3.809 MB / 334.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.000361/0.31, allocations: 239.4 kB / 421.3 MB, free: 3.574 MB / 334.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.002314/0.3123, allocations: 1.556 MB / 422.9 MB, free: 1.973 MB / 334.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 0.00011/0.3124, allocations: 100 kB / 423 MB, free: 1.871 MB / 334.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 0.0001205/0.3125, allocations: 84 kB / 423.1 MB, free: 1.789 MB / 334.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.001937/0.3145, allocations: 1.096 MB / 424.2 MB, free: 0.6133 MB / 334.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 2.238e-05/0.3145, allocations: 0 / 424.2 MB, free: 0.6133 MB / 334.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 9.262e-05/0.3146, allocations: 40 kB / 424.2 MB, free: 0.5742 MB / 334.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 2.483e-05/0.3146, allocations: 20 kB / 424.2 MB, free: 0.5547 MB / 334.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.001427/0.3161, allocations: 0.7222 MB / 425 MB, free: 15.83 MB / 350.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.007135/0.3232, allocations: 4.599 MB / 429.6 MB, free: 11.06 MB / 350.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.001374/0.3246, allocations: 0.9459 MB / 430.5 MB, free: 10.01 MB / 350.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0007757/0.3254, allocations: 382 kB / 430.9 MB, free: 9.629 MB / 350.1 MB Notification: Performance of preOpt evalFunc (simulation): time 5.455e-05/0.3255, allocations: 11.98 kB / 430.9 MB, free: 9.617 MB / 350.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 4.691e-05/0.3255, allocations: 46.56 kB / 430.9 MB, free: 9.562 MB / 350.1 MB Notification: Performance of pre-optimization done (n=44): time 2.915e-06/0.3255, allocations: 0 / 430.9 MB, free: 9.562 MB / 350.1 MB Notification: Performance of matching and sorting (n=44): time 0.001897/0.3275, allocations: 0.8288 MB / 431.8 MB, free: 8.727 MB / 350.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 0.0002532/0.3277, allocations: 427.2 kB / 432.2 MB, free: 8.211 MB / 350.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.003702/0.3314, allocations: 2.739 MB / 434.9 MB, free: 5.43 MB / 350.1 MB Notification: Performance of collectPreVariables (initialization): time 7.845e-05/0.3315, allocations: 37.7 kB / 435 MB, free: 5.387 MB / 350.1 MB Notification: Performance of collectInitialEqns (initialization): time 0.0008182/0.3323, allocations: 0.8834 MB / 435.8 MB, free: 4.496 MB / 350.1 MB Notification: Performance of collectInitialBindings (initialization): time 0.0001606/0.3325, allocations: 170.6 kB / 436 MB, free: 4.328 MB / 350.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 0.0002236/0.3327, allocations: 122.3 kB / 436.1 MB, free: 4.203 MB / 350.1 MB Notification: Performance of setup shared object (initialization): time 0.0001455/0.3329, allocations: 326 kB / 436.4 MB, free: 3.879 MB / 350.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0005647/0.3335, allocations: 257.1 kB / 436.7 MB, free: 3.625 MB / 350.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0008061/0.3343, allocations: 0.5324 MB / 437.2 MB, free: 2.973 MB / 350.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.001093/0.3354, allocations: 0.6172 MB / 437.8 MB, free: 2.277 MB / 350.1 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 3.767e-06/0.3354, allocations: 0 / 437.8 MB, free: 2.277 MB / 350.1 MB Notification: Performance of matching and sorting (n=76) (initialization): time 0.001724/0.3371, allocations: 0.8621 MB / 438.7 MB, free: 1.406 MB / 350.1 MB Notification: Performance of prepare postOptimizeDAE: time 2.025e-05/0.3372, allocations: 8.094 kB / 438.7 MB, free: 1.398 MB / 350.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.039e-05/0.3372, allocations: 8 kB / 438.7 MB, free: 1.391 MB / 350.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 2.073e-05/0.3372, allocations: 8 kB / 438.7 MB, free: 1.383 MB / 350.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0006027/0.3378, allocations: 159.7 kB / 438.9 MB, free: 1.227 MB / 350.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 2.009e-05/0.3378, allocations: 15.92 kB / 438.9 MB, free: 1.211 MB / 350.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.001034/0.3389, allocations: 167.3 kB / 439.1 MB, free: 1.047 MB / 350.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 6.335e-05/0.339, allocations: 31.98 kB / 439.1 MB, free: 1.016 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.0007914/0.3398, allocations: 0.5547 MB / 439.7 MB, free: 464 kB / 350.1 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.0002692/0.34, allocations: 190.8 kB / 439.8 MB, free: 272 kB / 350.1 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.001435/0.3415, allocations: 0.7039 MB / 440.5 MB, free: 15.56 MB / 366.1 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 9.277e-06/0.3415, allocations: 7.938 kB / 440.5 MB, free: 15.55 MB / 366.1 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 6.933e-06/0.3415, allocations: 8 kB / 440.6 MB, free: 15.54 MB / 366.1 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 7.765e-06/0.3415, allocations: 3.984 kB / 440.6 MB, free: 15.54 MB / 366.1 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.003479/0.345, allocations: 2.113 MB / 442.7 MB, free: 13.35 MB / 366.1 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 6.172e-06/0.345, allocations: 0 / 442.7 MB, free: 13.35 MB / 366.1 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0004984/0.3455, allocations: 107.9 kB / 442.8 MB, free: 13.25 MB / 366.1 MB Notification: Performance of postOpt tearingSystem (simulation): time 7.944e-06/0.3456, allocations: 8 kB / 442.8 MB, free: 13.24 MB / 366.1 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 4.154e-05/0.3456, allocations: 11.98 kB / 442.8 MB, free: 13.23 MB / 366.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 6.382e-06/0.3456, allocations: 4 kB / 442.8 MB, free: 13.22 MB / 366.1 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 2.054e-06/0.3456, allocations: 0 / 442.8 MB, free: 13.22 MB / 366.1 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.001926/0.3476, allocations: 1.059 MB / 443.9 MB, free: 12.13 MB / 366.1 MB Notification: Performance of postOpt removeConstants (simulation): time 0.00067/0.3482, allocations: 415.7 kB / 444.3 MB, free: 11.71 MB / 366.1 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 0.0001782/0.3484, allocations: 16 kB / 444.3 MB, free: 11.69 MB / 366.1 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.00102/0.3494, allocations: 135.8 kB / 444.4 MB, free: 11.56 MB / 366.1 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0003194/0.3498, allocations: 155.7 kB / 444.6 MB, free: 11.41 MB / 366.1 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 4.361e-05/0.3498, allocations: 16 kB / 444.6 MB, free: 11.39 MB / 366.1 MB Notification: Performance of sorting global known variables: time 0.002709/0.3525, allocations: 1.951 MB / 446.5 MB, free: 9.418 MB / 366.1 MB Notification: Performance of sort global known variables: time 1.71e-07/0.3526, allocations: 4 kB / 446.5 MB, free: 9.414 MB / 366.1 MB Notification: Performance of remove unused functions: time 0.0009227/0.3535, allocations: 311.4 kB / 446.8 MB, free: 9.109 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.003794/0.3573, allocations: 1.965 MB / 448.8 MB, free: 7.293 MB / 366.1 MB Notification: Performance of simCode: created initialization part: time 0.00131/0.3586, allocations: 0.5888 MB / 449.4 MB, free: 6.707 MB / 366.1 MB Notification: Performance of simCode: created event and clocks part: time 5.31e-06/0.3586, allocations: 3.938 kB / 449.4 MB, free: 6.703 MB / 366.1 MB Notification: Performance of simCode: created simulation system equations: time 0.0006761/0.3593, allocations: 347.4 kB / 449.7 MB, free: 6.363 MB / 366.1 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.001509/0.3608, allocations: 330 kB / 450.1 MB, free: 6.043 MB / 366.1 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.02656/0.3874, allocations: 17.21 MB / 467.3 MB, free: 4.453 MB / 382.1 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.001336/0.3888, allocations: 1.433 MB / 468.7 MB, free: 2.992 MB / 382.1 MB Notification: Performance of simCode: alias equations: time 0.001058/0.3899, allocations: 294.8 kB / 469 MB, free: 2.699 MB / 382.1 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.001091/0.391, allocations: 0.6945 MB / 469.7 MB, free: 2.004 MB / 382.1 MB Notification: Performance of SimCode: time 2.344e-06/0.391, allocations: 3.938 kB / 469.7 MB, free: 2 MB / 382.1 MB Notification: Performance of buildModelFMU: Generate the FMI files: time 0.0828/0.4738, allocations: 38.82 MB / 0.4966 GB, free: 11.5 MB / 430.1 MB Notification: Performance of buildModelFMU: Generate platform static: time 11.22/11.69, allocations: 8.781 kB / 0.4966 GB, free: 11.49 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