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.0009869/0.0009869, allocations: 103.8 kB / 17.63 MB, free: 5.48 MB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex trunk/package.mo): time 0.001275/0.001275, allocations: 212.6 kB / 18.58 MB, free: 4.535 MB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica trunk/package.mo): time 1.443/1.443, allocations: 227.4 MB / 246.8 MB, free: 10.61 MB / 206.1 MB Notification: Performance of FrontEnd - loaded program: time 0.001287/0.001287, allocations: 67.38 kB / 307.1 MB, free: 0.5547 MB / 238.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.1013/0.1026, allocations: 50.53 MB / 357.6 MB, free: 14.02 MB / 302.1 MB Notification: Performance of NFInst.instantiate(Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge): time 0.00783/0.1105, allocations: 5.838 MB / 363.4 MB, free: 8.148 MB / 302.1 MB Notification: Performance of NFInst.instExpressions: time 0.005246/0.1158, allocations: 2.742 MB / 366.2 MB, free: 5.395 MB / 302.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.0009141/0.1167, allocations: 23.88 kB / 366.2 MB, free: 5.371 MB / 302.1 MB Notification: Performance of NFTyping.typeComponents: time 0.002046/0.1188, allocations: 0.766 MB / 367 MB, free: 4.602 MB / 302.1 MB Notification: Performance of NFTyping.typeBindings: time 0.001507/0.1204, allocations: 0.5633 MB / 367.5 MB, free: 4.035 MB / 302.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.001371/0.1218, allocations: 0.4947 MB / 368 MB, free: 3.543 MB / 302.1 MB Notification: Performance of NFFlatten.flatten: time 0.002098/0.1239, allocations: 1.601 MB / 369.6 MB, free: 1.941 MB / 302.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0008854/0.1248, allocations: 0.5961 MB / 370.2 MB, free: 1.32 MB / 302.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0007953/0.1256, allocations: 0.6112 MB / 370.8 MB, free: 0.707 MB / 302.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.1658/0.2913, allocations: 0.7382 MB / 371.6 MB, free: 11.04 MB / 302.1 MB Notification: Performance of NFPackage.collectConstants: time 0.0006102/0.292, allocations: 133.8 kB / 371.7 MB, free: 11.04 MB / 302.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0006144/0.2926, allocations: 205.3 kB / 371.9 MB, free: 11.04 MB / 302.1 MB Notification: Performance of NFScalarize.scalarize: time 0.0006155/0.2932, allocations: 0.6403 MB / 372.5 MB, free: 11.04 MB / 302.1 MB Notification: Performance of NFVerifyModel.verify: time 0.0009775/0.2942, allocations: 0.9211 MB / 373.5 MB, free: 10.86 MB / 302.1 MB Notification: Performance of NFConvertDAE.convert: time 0.003054/0.2973, allocations: 2.46 MB / 375.9 MB, free: 10.48 MB / 302.1 MB Notification: Performance of FrontEnd - DAE generated: time 6.983e-06/0.2973, allocations: 1.312 kB / 375.9 MB, free: 10.48 MB / 302.1 MB Notification: Performance of FrontEnd: time 1.923e-06/0.2973, allocations: 2.406 kB / 375.9 MB, free: 10.48 MB / 302.1 MB Notification: Performance of Transformations before backend: time 8.034e-05/0.2974, allocations: 2.719 kB / 375.9 MB, free: 10.48 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.006776/0.3042, allocations: 2.583 MB / 378.5 MB, free: 9.254 MB / 302.1 MB Notification: Performance of prepare preOptimizeDAE: time 4.994e-05/0.3043, allocations: 9.688 kB / 378.5 MB, free: 9.254 MB / 302.1 MB Notification: Performance of preOpt introduceOutputAliases (simulation): time 0.0002149/0.3045, allocations: 140.8 kB / 378.6 MB, free: 9.215 MB / 302.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.000506/0.305, allocations: 223.1 kB / 378.9 MB, free: 9.102 MB / 302.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.002458/0.3075, allocations: 1.525 MB / 380.4 MB, free: 8.586 MB / 302.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 0.0005307/0.308, allocations: 175.9 kB / 380.6 MB, free: 8.551 MB / 302.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 0.0001266/0.3082, allocations: 87.09 kB / 380.6 MB, free: 8.547 MB / 302.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.00194/0.3101, allocations: 1.128 MB / 381.8 MB, free: 8.18 MB / 302.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 2.172e-05/0.3101, allocations: 7.469 kB / 381.8 MB, free: 8.176 MB / 302.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 8.772e-05/0.3102, allocations: 38.56 kB / 381.8 MB, free: 8.148 MB / 302.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 2.287e-05/0.3103, allocations: 21.69 kB / 381.8 MB, free: 8.148 MB / 302.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.001469/0.3117, allocations: 0.7361 MB / 382.6 MB, free: 7.91 MB / 302.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.00794/0.3197, allocations: 4.667 MB / 387.2 MB, free: 5.344 MB / 302.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.001447/0.3212, allocations: 0.9807 MB / 388.2 MB, free: 4.66 MB / 302.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0008715/0.3221, allocations: 405.4 kB / 388.6 MB, free: 4.539 MB / 302.1 MB Notification: Performance of preOpt evalFunc (simulation): time 5.455e-05/0.3221, allocations: 10.08 kB / 388.6 MB, free: 4.539 MB / 302.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 3.505e-05/0.3222, allocations: 39.75 kB / 388.7 MB, free: 4.496 MB / 302.1 MB Notification: Performance of pre-optimization done (n=44): time 2.805e-06/0.3222, allocations: 0 / 388.7 MB, free: 4.496 MB / 302.1 MB Notification: Performance of matching and sorting (n=44): time 0.002449/0.3246, allocations: 0.8856 MB / 389.6 MB, free: 4.176 MB / 302.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 0.000107/0.3247, allocations: 424.1 kB / 390 MB, free: 3.672 MB / 302.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.00414/0.3289, allocations: 2.768 MB / 392.7 MB, free: 2.531 MB / 302.1 MB Notification: Performance of collectPreVariables (initialization): time 0.0001163/0.329, allocations: 35.2 kB / 392.8 MB, free: 2.496 MB / 302.1 MB Notification: Performance of collectInitialEqns (initialization): time 0.0005791/0.3296, allocations: 0.8866 MB / 393.7 MB, free: 1.73 MB / 302.1 MB Notification: Performance of collectInitialBindings (initialization): time 0.0001267/0.3298, allocations: 160.6 kB / 393.8 MB, free: 1.594 MB / 302.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 0.0002022/0.33, allocations: 132.4 kB / 393.9 MB, free: 1.508 MB / 302.1 MB Notification: Performance of setup shared object (initialization): time 5.892e-05/0.33, allocations: 327.4 kB / 394.3 MB, free: 1.188 MB / 302.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0006253/0.3307, allocations: 274.5 kB / 394.5 MB, free: 1.062 MB / 302.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0007439/0.3314, allocations: 0.5611 MB / 395.1 MB, free: 0.5742 MB / 302.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.001158/0.3326, allocations: 0.6558 MB / 395.7 MB, free: 132 kB / 302.1 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 5.189e-06/0.3326, allocations: 1.312 kB / 395.7 MB, free: 132 kB / 302.1 MB Notification: Performance of matching and sorting (n=76) (initialization): time 0.002012/0.3346, allocations: 0.9011 MB / 396.7 MB, free: 15.71 MB / 318.1 MB Notification: Performance of prepare postOptimizeDAE: time 1.907e-05/0.3346, allocations: 7.906 kB / 396.7 MB, free: 15.71 MB / 318.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 9.298e-06/0.3347, allocations: 3.969 kB / 396.7 MB, free: 15.71 MB / 318.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 1.716e-05/0.3347, allocations: 10.53 kB / 396.7 MB, free: 15.71 MB / 318.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.000627/0.3353, allocations: 172.3 kB / 396.8 MB, free: 15.67 MB / 318.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 2.363e-05/0.3354, allocations: 19.86 kB / 396.9 MB, free: 15.66 MB / 318.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.001476/0.3368, allocations: 171.6 kB / 397 MB, free: 15.57 MB / 318.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 6.97e-05/0.3369, allocations: 27.53 kB / 397.1 MB, free: 15.57 MB / 318.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.001162/0.3381, allocations: 0.5583 MB / 397.6 MB, free: 15.25 MB / 318.1 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.0003547/0.3385, allocations: 179.9 kB / 397.8 MB, free: 15.16 MB / 318.1 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.001659/0.3401, allocations: 0.7403 MB / 398.5 MB, free: 14.76 MB / 318.1 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 6.502e-06/0.3401, allocations: 7.594 kB / 398.5 MB, free: 14.76 MB / 318.1 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 6.593e-06/0.3401, allocations: 3.938 kB / 398.5 MB, free: 14.75 MB / 318.1 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 7.434e-06/0.3402, allocations: 3.984 kB / 398.5 MB, free: 14.75 MB / 318.1 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.003681/0.3438, allocations: 2.183 MB / 400.7 MB, free: 13.31 MB / 318.1 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 5.831e-06/0.3439, allocations: 6.828 kB / 400.7 MB, free: 13.31 MB / 318.1 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0005488/0.3444, allocations: 119 kB / 400.8 MB, free: 13.28 MB / 318.1 MB Notification: Performance of postOpt tearingSystem (simulation): time 5.741e-06/0.3444, allocations: 1.688 kB / 400.9 MB, free: 13.28 MB / 318.1 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 3.773e-05/0.3445, allocations: 8.406 kB / 400.9 MB, free: 13.28 MB / 318.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 5.43e-06/0.3445, allocations: 6.625 kB / 400.9 MB, free: 13.27 MB / 318.1 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 2.766e-06/0.3445, allocations: 2.5 kB / 400.9 MB, free: 13.27 MB / 318.1 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.002217/0.3467, allocations: 1.118 MB / 402 MB, free: 12.62 MB / 318.1 MB Notification: Performance of postOpt removeConstants (simulation): time 0.0007493/0.3475, allocations: 413.6 kB / 402.4 MB, free: 12.3 MB / 318.1 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 0.0002119/0.3477, allocations: 8 kB / 402.4 MB, free: 12.29 MB / 318.1 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.001159/0.3489, allocations: 155.8 kB / 402.6 MB, free: 12.14 MB / 318.1 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0003048/0.3492, allocations: 154.4 kB / 402.7 MB, free: 11.99 MB / 318.1 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 3.983e-05/0.3492, allocations: 23.94 kB / 402.7 MB, free: 11.96 MB / 318.1 MB Notification: Performance of sorting global known variables: time 0.002824/0.3521, allocations: 1.967 MB / 404.7 MB, free: 9.977 MB / 318.1 MB Notification: Performance of sort global known variables: time 1.2e-07/0.3521, allocations: 0 / 404.7 MB, free: 9.977 MB / 318.1 MB Notification: Performance of remove unused functions: time 0.001053/0.3531, allocations: 311.2 kB / 405 MB, free: 9.672 MB / 318.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.003499/0.3567, allocations: 2.03 MB / 407 MB, free: 7.789 MB / 318.1 MB Notification: Performance of simCode: created initialization part: time 0.001576/0.3582, allocations: 0.6758 MB / 407.7 MB, free: 7.141 MB / 318.1 MB Notification: Performance of simCode: created event and clocks part: time 5.801e-06/0.3583, allocations: 8.625 kB / 407.7 MB, free: 7.133 MB / 318.1 MB Notification: Performance of simCode: created simulation system equations: time 0.0007577/0.359, allocations: 371.7 kB / 408.1 MB, free: 6.777 MB / 318.1 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.001445/0.3605, allocations: 325.3 kB / 408.4 MB, free: 6.461 MB / 318.1 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.02953/0.39, allocations: 19.87 MB / 428.3 MB, free: 1.348 MB / 334.1 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.001097/0.3912, allocations: 1.441 MB / 429.7 MB, free: 15.88 MB / 350.1 MB Notification: Performance of simCode: alias equations: time 0.0009172/0.3921, allocations: 299.1 kB / 430 MB, free: 15.58 MB / 350.1 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0008693/0.393, allocations: 0.7062 MB / 430.7 MB, free: 14.87 MB / 350.1 MB Notification: Performance of SimCode: time 9.82e-07/0.393, allocations: 3.375 kB / 430.7 MB, free: 14.87 MB / 350.1 MB Notification: Performance of buildModelFMU: Generate the FMI files: time 0.08039/0.4734, allocations: 38.46 MB / 469.2 MB, free: 8.719 MB / 382.1 MB Notification: Performance of buildModelFMU: Generate platform static: time 8.73/9.203, allocations: 11.11 kB / 469.2 MB, free: 8.711 MB / 382.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