Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries --ompython_omhome=/usr Modelica_trunk_Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge.conf.json loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices trunk/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex trunk/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica trunk/package.mo", uses=false) Using package Modelica with version trunk (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica trunk/package.mo) Using package Complex with version trunk (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex trunk/package.mo) Using package ModelicaServices with version trunk (/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices trunk/package.mo) Running command: "" <> buildModelFMU(Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge,fileNamePrefix="Modelica_trunk_Modelica_Electrical_Batteries_Examples_BatteryDischargeCharge",fmuType="me",version="2.0",platforms={"static"}) "" <> buildModelFMU(Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge,fileNamePrefix="Modelica_trunk_Modelica_Electrical_Batteries_Examples_BatteryDischargeCharge",fmuType="me",version="2.0",platforms={"static"}) Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices trunk/package.mo): time 0.001094/0.001094, allocations: 117.6 kB / 17.79 MB, free: 5.125 MB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex trunk/package.mo): time 0.001093/0.001093, allocations: 200.7 kB / 18.74 MB, free: 4.184 MB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica trunk/package.mo): time 1.386/1.386, allocations: 227.4 MB / 246.9 MB, free: 10.47 MB / 206.1 MB Notification: Performance of FrontEnd - loaded program: time 0.001295/0.001295, allocations: 59.91 kB / 358.2 MB, free: 13.43 MB / 302.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.301/0.3023, allocations: 50.54 MB / 408.7 MB, free: 1.527 MB / 318.1 MB Notification: Performance of NFInst.instantiate(Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge): time 0.007621/0.31, allocations: 5.843 MB / 414.6 MB, free: 11.66 MB / 334.1 MB Notification: Performance of NFInst.instExpressions: time 0.004677/0.3147, allocations: 2.749 MB / 417.3 MB, free: 8.902 MB / 334.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.0006595/0.3154, allocations: 19.94 kB / 417.4 MB, free: 8.883 MB / 334.1 MB Notification: Performance of NFTyping.typeComponents: time 0.001756/0.3172, allocations: 0.7622 MB / 418.1 MB, free: 8.117 MB / 334.1 MB Notification: Performance of NFTyping.typeBindings: time 0.001471/0.3187, allocations: 0.5672 MB / 418.7 MB, free: 7.547 MB / 334.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.001391/0.3201, allocations: 0.5062 MB / 419.2 MB, free: 7.047 MB / 334.1 MB Notification: Performance of NFFlatten.flatten: time 0.002048/0.3222, allocations: 1.606 MB / 420.8 MB, free: 5.434 MB / 334.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0007382/0.3229, allocations: 0.5883 MB / 421.4 MB, free: 4.816 MB / 334.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0007488/0.3237, allocations: 0.619 MB / 422 MB, free: 4.195 MB / 334.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.000813/0.3245, allocations: 0.7393 MB / 422.7 MB, free: 3.453 MB / 334.1 MB Notification: Performance of NFPackage.collectConstants: time 0.0001739/0.3247, allocations: 136 kB / 422.9 MB, free: 3.32 MB / 334.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0004247/0.3251, allocations: 215.9 kB / 423.1 MB, free: 3.109 MB / 334.1 MB Notification: Performance of NFScalarize.scalarize: time 0.0005861/0.3257, allocations: 0.6465 MB / 423.7 MB, free: 2.461 MB / 334.1 MB Notification: Performance of NFVerifyModel.verify: time 0.0008565/0.3266, allocations: 0.9243 MB / 424.7 MB, free: 1.531 MB / 334.1 MB Notification: Performance of NFConvertDAE.convert: time 0.002494/0.3291, allocations: 2.498 MB / 427.2 MB, free: 15.02 MB / 350.1 MB Notification: Performance of FrontEnd - DAE generated: time 5.099e-06/0.3291, allocations: 0 / 427.2 MB, free: 15.02 MB / 350.1 MB Notification: Performance of FrontEnd: time 2.454e-06/0.3291, allocations: 0 / 427.2 MB, free: 15.02 MB / 350.1 MB Notification: Performance of Transformations before backend: time 4.5e-05/0.3292, allocations: 0 / 427.2 MB, free: 15.02 MB / 350.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.00511/0.3343, allocations: 2.66 MB / 429.8 MB, free: 12.3 MB / 350.1 MB Notification: Performance of prepare preOptimizeDAE: time 5.549e-05/0.3343, allocations: 8.031 kB / 429.8 MB, free: 12.29 MB / 350.1 MB Notification: Performance of preOpt introduceOutputAliases (simulation): time 0.000185/0.3345, allocations: 139.5 kB / 430 MB, free: 12.15 MB / 350.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0003881/0.3349, allocations: 239.4 kB / 430.2 MB, free: 11.91 MB / 350.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.002473/0.3374, allocations: 1.568 MB / 431.8 MB, free: 10.27 MB / 350.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 0.0001129/0.3375, allocations: 100 kB / 431.9 MB, free: 10.17 MB / 350.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 0.0001358/0.3377, allocations: 84 kB / 431.9 MB, free: 10.09 MB / 350.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.001759/0.3395, allocations: 1.096 MB / 433 MB, free: 8.914 MB / 350.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 2.193e-05/0.3395, allocations: 7.922 kB / 433 MB, free: 8.906 MB / 350.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 8.635e-05/0.3396, allocations: 40 kB / 433.1 MB, free: 8.867 MB / 350.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 1.811e-05/0.3396, allocations: 23.94 kB / 433.1 MB, free: 8.844 MB / 350.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.00129/0.3409, allocations: 0.7222 MB / 433.8 MB, free: 8.125 MB / 350.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.00707/0.348, allocations: 4.604 MB / 438.4 MB, free: 3.348 MB / 350.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.001397/0.3494, allocations: 0.9381 MB / 439.4 MB, free: 2.309 MB / 350.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0007623/0.3502, allocations: 386 kB / 439.7 MB, free: 1.93 MB / 350.1 MB Notification: Performance of preOpt evalFunc (simulation): time 5.565e-05/0.3503, allocations: 8 kB / 439.8 MB, free: 1.922 MB / 350.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 4.176e-05/0.3503, allocations: 42.56 kB / 439.8 MB, free: 1.871 MB / 350.1 MB Notification: Performance of pre-optimization done (n=44): time 5.891e-06/0.3503, allocations: 3.984 kB / 439.8 MB, free: 1.867 MB / 350.1 MB Notification: Performance of matching and sorting (n=44): time 0.001765/0.3521, allocations: 0.8327 MB / 440.6 MB, free: 1.027 MB / 350.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 0.000216/0.3523, allocations: 419.2 kB / 441 MB, free: 0.5195 MB / 350.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.00352/0.3558, allocations: 2.764 MB / 443.8 MB, free: 13.71 MB / 366.1 MB Notification: Performance of collectPreVariables (initialization): time 6.938e-05/0.3559, allocations: 37.7 kB / 443.8 MB, free: 13.67 MB / 366.1 MB Notification: Performance of collectInitialEqns (initialization): time 0.0007057/0.3566, allocations: 0.8991 MB / 444.7 MB, free: 12.77 MB / 366.1 MB Notification: Performance of collectInitialBindings (initialization): time 0.0001447/0.3568, allocations: 162.6 kB / 444.9 MB, free: 12.61 MB / 366.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 0.0002103/0.357, allocations: 126.3 kB / 445 MB, free: 12.48 MB / 366.1 MB Notification: Performance of setup shared object (initialization): time 0.0001347/0.3572, allocations: 330 kB / 445.3 MB, free: 12.15 MB / 366.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0005108/0.3577, allocations: 253.2 kB / 445.6 MB, free: 11.9 MB / 366.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0007051/0.3584, allocations: 0.5363 MB / 446.1 MB, free: 11.25 MB / 366.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.0009975/0.3594, allocations: 0.6171 MB / 446.7 MB, free: 10.55 MB / 366.1 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 4.488e-06/0.3594, allocations: 0 / 446.7 MB, free: 10.55 MB / 366.1 MB Notification: Performance of matching and sorting (n=76) (initialization): time 0.001801/0.3612, allocations: 0.8622 MB / 447.6 MB, free: 9.684 MB / 366.1 MB Notification: Performance of prepare postOptimizeDAE: time 2.701e-05/0.3613, allocations: 10.19 kB / 447.6 MB, free: 9.676 MB / 366.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.227e-05/0.3613, allocations: 4 kB / 447.6 MB, free: 9.672 MB / 366.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 2.587e-05/0.3613, allocations: 8 kB / 447.6 MB, free: 9.664 MB / 366.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0005978/0.3619, allocations: 163.7 kB / 447.8 MB, free: 9.504 MB / 366.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.828e-05/0.3619, allocations: 15.92 kB / 447.8 MB, free: 9.488 MB / 366.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.001251/0.3632, allocations: 163.4 kB / 448 MB, free: 9.328 MB / 366.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 6.23e-05/0.3633, allocations: 24 kB / 448 MB, free: 9.305 MB / 366.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.001192/0.3645, allocations: 0.5561 MB / 448.5 MB, free: 8.738 MB / 366.1 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.0003264/0.3648, allocations: 202.7 kB / 448.7 MB, free: 8.539 MB / 366.1 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.001402/0.3662, allocations: 0.6846 MB / 449.4 MB, free: 7.852 MB / 366.1 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 9.969e-06/0.3662, allocations: 11.94 kB / 449.4 MB, free: 7.84 MB / 366.1 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 9.868e-06/0.3663, allocations: 11.92 kB / 449.5 MB, free: 7.828 MB / 366.1 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 4.829e-06/0.3663, allocations: 0 / 449.5 MB, free: 7.828 MB / 366.1 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.003344/0.3696, allocations: 2.125 MB / 451.6 MB, free: 5.629 MB / 366.1 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 3.667e-06/0.3696, allocations: 0 / 451.6 MB, free: 5.629 MB / 366.1 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0005209/0.3702, allocations: 108 kB / 451.7 MB, free: 5.523 MB / 366.1 MB Notification: Performance of postOpt tearingSystem (simulation): time 6.763e-06/0.3702, allocations: 4 kB / 451.7 MB, free: 5.52 MB / 366.1 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 3.773e-05/0.3702, allocations: 15.98 kB / 451.7 MB, free: 5.504 MB / 366.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 5.049e-06/0.3702, allocations: 4 kB / 451.7 MB, free: 5.5 MB / 366.1 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 2.104e-06/0.3702, allocations: 3.938 kB / 451.7 MB, free: 5.496 MB / 366.1 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.001795/0.372, allocations: 1.06 MB / 452.8 MB, free: 4.406 MB / 366.1 MB Notification: Performance of postOpt removeConstants (simulation): time 0.0007644/0.3728, allocations: 419.7 kB / 453.2 MB, free: 3.977 MB / 366.1 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 0.000179/0.373, allocations: 12 kB / 453.2 MB, free: 3.965 MB / 366.1 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.001037/0.374, allocations: 135.8 kB / 453.3 MB, free: 3.832 MB / 366.1 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0002933/0.3744, allocations: 155.7 kB / 453.5 MB, free: 3.68 MB / 366.1 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 3.719e-05/0.3744, allocations: 20 kB / 453.5 MB, free: 3.66 MB / 366.1 MB Notification: Performance of sorting global known variables: time 0.002465/0.3769, allocations: 1.967 MB / 455.5 MB, free: 1.672 MB / 366.1 MB Notification: Performance of sort global known variables: time 1.2e-07/0.3769, allocations: 0 / 455.5 MB, free: 1.672 MB / 366.1 MB Notification: Performance of remove unused functions: time 0.0009323/0.3778, allocations: 319.4 kB / 455.8 MB, free: 1.359 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.003049/0.3809, allocations: 1.971 MB / 457.7 MB, free: 15.51 MB / 382.1 MB Notification: Performance of simCode: created initialization part: time 0.001214/0.3821, allocations: 0.5884 MB / 458.3 MB, free: 14.92 MB / 382.1 MB Notification: Performance of simCode: created event and clocks part: time 6.012e-06/0.3821, allocations: 4 kB / 458.3 MB, free: 14.92 MB / 382.1 MB Notification: Performance of simCode: created simulation system equations: time 0.0006058/0.3827, allocations: 344.5 kB / 458.7 MB, free: 14.58 MB / 382.1 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.001521/0.3843, allocations: 334.3 kB / 459 MB, free: 14.26 MB / 382.1 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.0227/0.407, allocations: 17.26 MB / 476.3 MB, free: 12.62 MB / 398.1 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0009748/0.408, allocations: 1.437 MB / 477.7 MB, free: 11.15 MB / 398.1 MB Notification: Performance of simCode: alias equations: time 0.0008012/0.4088, allocations: 295.1 kB / 478 MB, free: 10.86 MB / 398.1 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0008314/0.4097, allocations: 0.7062 MB / 478.7 MB, free: 10.15 MB / 398.1 MB Notification: Performance of SimCode: time 6.21e-07/0.4097, allocations: 0 / 478.7 MB, free: 10.15 MB / 398.1 MB Notification: Performance of buildModelFMU: Generate the FMI files: time 0.07479/0.4845, allocations: 38.93 MB / 0.5055 GB, free: 3.496 MB / 430.1 MB Notification: Performance of buildModelFMU: Generate platform static: time 10.73/11.22, allocations: 15.75 kB / 0.5055 GB, free: 3.48 MB / 430.1 MB (rm -f Modelica_trunk_Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge.pipe ; mkfifo Modelica_trunk_Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge.pipe ; head -c 1048576 < Modelica_trunk_Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge.pipe >> ../files/Modelica_trunk_Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge.sim & python3 -m fmpy simulate --output-file Modelica_trunk_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_trunk_Modelica_Electrical_Batteries_Examples_BatteryDischargeCharge.fmu > Modelica_trunk_Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge.pipe 2>&1) diffSimulationResults("Modelica_trunk_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_trunk_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_trunk_Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge_res.csv. Warning: Get data of variable energy2.y from file Modelica_trunk_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