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.00124/0.00124, allocations: 117.6 kB / 17.79 MB, free: 5.254 MB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex trunk/package.mo): time 0.001281/0.001281, allocations: 199.9 kB / 18.74 MB, free: 4.312 MB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica trunk/package.mo): time 1.457/1.457, allocations: 227.4 MB / 246.9 MB, free: 10.54 MB / 206.1 MB Notification: Performance of FrontEnd - loaded program: time 0.001796/0.001796, allocations: 63.89 kB / 358.2 MB, free: 13.45 MB / 302.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.2796/0.2815, allocations: 50.54 MB / 408.8 MB, free: 1.66 MB / 318.1 MB Notification: Performance of NFInst.instantiate(Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge): time 0.008421/0.2899, allocations: 5.847 MB / 414.6 MB, free: 11.79 MB / 334.1 MB Notification: Performance of NFInst.instExpressions: time 0.005704/0.2957, allocations: 2.722 MB / 417.3 MB, free: 9.059 MB / 334.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.0009404/0.2967, allocations: 23.94 kB / 417.4 MB, free: 9.035 MB / 334.1 MB Notification: Performance of NFTyping.typeComponents: time 0.001953/0.2987, allocations: 0.7738 MB / 418.1 MB, free: 8.258 MB / 334.1 MB Notification: Performance of NFTyping.typeBindings: time 0.001446/0.3001, allocations: 0.5438 MB / 418.7 MB, free: 7.711 MB / 334.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.001282/0.3014, allocations: 0.5137 MB / 419.2 MB, free: 7.203 MB / 334.1 MB Notification: Performance of NFFlatten.flatten: time 0.002055/0.3035, allocations: 1.602 MB / 420.8 MB, free: 5.594 MB / 334.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0008544/0.3044, allocations: 0.6 MB / 421.4 MB, free: 4.965 MB / 334.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.000883/0.3053, allocations: 0.6073 MB / 422 MB, free: 4.355 MB / 334.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0009367/0.3062, allocations: 0.7393 MB / 422.7 MB, free: 3.613 MB / 334.1 MB Notification: Performance of NFPackage.collectConstants: time 0.0002057/0.3064, allocations: 135.9 kB / 422.9 MB, free: 3.48 MB / 334.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0004294/0.3069, allocations: 212 kB / 423.1 MB, free: 3.273 MB / 334.1 MB Notification: Performance of NFScalarize.scalarize: time 0.0006692/0.3076, allocations: 0.6543 MB / 423.7 MB, free: 2.617 MB / 334.1 MB Notification: Performance of NFVerifyModel.verify: time 0.001057/0.3086, allocations: 0.9205 MB / 424.6 MB, free: 1.691 MB / 334.1 MB Notification: Performance of NFConvertDAE.convert: time 0.003147/0.3118, allocations: 2.502 MB / 427.2 MB, free: 15.18 MB / 350.1 MB Notification: Performance of FrontEnd - DAE generated: time 6.643e-06/0.3118, allocations: 4 kB / 427.2 MB, free: 15.18 MB / 350.1 MB Notification: Performance of FrontEnd: time 1.843e-06/0.3118, allocations: 0 / 427.2 MB, free: 15.18 MB / 350.1 MB Notification: Performance of Transformations before backend: time 5.026e-05/0.3119, allocations: 0 / 427.2 MB, free: 15.18 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.00542/0.3173, allocations: 2.656 MB / 429.8 MB, free: 12.46 MB / 350.1 MB Notification: Performance of prepare preOptimizeDAE: time 4.514e-05/0.3174, allocations: 15.97 kB / 429.8 MB, free: 12.44 MB / 350.1 MB Notification: Performance of preOpt introduceOutputAliases (simulation): time 0.0001911/0.3176, allocations: 143.4 kB / 430 MB, free: 12.29 MB / 350.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0004086/0.318, allocations: 235.4 kB / 430.2 MB, free: 12.06 MB / 350.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.002713/0.3207, allocations: 1.56 MB / 431.8 MB, free: 10.43 MB / 350.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 0.0001206/0.3208, allocations: 104 kB / 431.9 MB, free: 10.32 MB / 350.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 0.0001428/0.321, allocations: 84 kB / 431.9 MB, free: 10.24 MB / 350.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.00193/0.3229, allocations: 1.1 MB / 433 MB, free: 9.062 MB / 350.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 1.95e-05/0.323, allocations: 3.938 kB / 433 MB, free: 9.059 MB / 350.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 9.224e-05/0.3231, allocations: 40 kB / 433.1 MB, free: 9.02 MB / 350.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 2.158e-05/0.3231, allocations: 20 kB / 433.1 MB, free: 9 MB / 350.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.001392/0.3245, allocations: 0.7221 MB / 433.8 MB, free: 8.281 MB / 350.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.007784/0.3323, allocations: 4.608 MB / 438.4 MB, free: 3.5 MB / 350.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.001454/0.3338, allocations: 0.9332 MB / 439.4 MB, free: 2.465 MB / 350.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0008136/0.3346, allocations: 386 kB / 439.7 MB, free: 2.086 MB / 350.1 MB Notification: Performance of preOpt evalFunc (simulation): time 4.821e-05/0.3347, allocations: 4 kB / 439.7 MB, free: 2.082 MB / 350.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 4.792e-05/0.3347, allocations: 50.5 kB / 439.8 MB, free: 2.023 MB / 350.1 MB Notification: Performance of pre-optimization done (n=44): time 2.836e-06/0.3348, allocations: 0 / 439.8 MB, free: 2.023 MB / 350.1 MB Notification: Performance of matching and sorting (n=44): time 0.002063/0.3368, allocations: 0.8249 MB / 440.6 MB, free: 1.191 MB / 350.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 0.0002772/0.3371, allocations: 431.2 kB / 441 MB, free: 0.6719 MB / 350.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.004988/0.3421, allocations: 2.76 MB / 443.8 MB, free: 13.87 MB / 366.1 MB Notification: Performance of collectPreVariables (initialization): time 0.0001522/0.3423, allocations: 33.7 kB / 443.8 MB, free: 13.83 MB / 366.1 MB Notification: Performance of collectInitialEqns (initialization): time 0.001041/0.3433, allocations: 0.899 MB / 444.7 MB, free: 12.93 MB / 366.1 MB Notification: Performance of collectInitialBindings (initialization): time 0.0002466/0.3436, allocations: 170.6 kB / 444.9 MB, free: 12.76 MB / 366.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 0.000293/0.3439, allocations: 126.3 kB / 445 MB, free: 12.63 MB / 366.1 MB Notification: Performance of setup shared object (initialization): time 0.0001592/0.3441, allocations: 326 kB / 445.3 MB, free: 12.3 MB / 366.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0006243/0.3447, allocations: 257.1 kB / 445.6 MB, free: 12.05 MB / 366.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0008456/0.3456, allocations: 0.5324 MB / 446.1 MB, free: 11.4 MB / 366.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.001187/0.3468, allocations: 0.6171 MB / 446.7 MB, free: 10.71 MB / 366.1 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 8.806e-06/0.3468, allocations: 3.984 kB / 446.7 MB, free: 10.7 MB / 366.1 MB Notification: Performance of matching and sorting (n=76) (initialization): time 0.002105/0.3489, allocations: 0.8582 MB / 447.6 MB, free: 9.84 MB / 366.1 MB Notification: Performance of prepare postOptimizeDAE: time 2.639e-05/0.349, allocations: 8.094 kB / 447.6 MB, free: 9.832 MB / 366.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.578e-05/0.349, allocations: 8 kB / 447.6 MB, free: 9.824 MB / 366.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 3.074e-05/0.349, allocations: 8 kB / 447.6 MB, free: 9.816 MB / 366.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0006391/0.3497, allocations: 163.7 kB / 447.8 MB, free: 9.656 MB / 366.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 2.254e-05/0.3497, allocations: 8 kB / 447.8 MB, free: 9.648 MB / 366.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.001308/0.351, allocations: 159.4 kB / 448 MB, free: 9.492 MB / 366.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 7.028e-05/0.3511, allocations: 28 kB / 448 MB, free: 9.465 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.001014/0.3521, allocations: 0.5599 MB / 448.5 MB, free: 8.895 MB / 366.1 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.0005363/0.3526, allocations: 186.8 kB / 448.7 MB, free: 8.711 MB / 366.1 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.001686/0.3543, allocations: 0.7041 MB / 449.4 MB, free: 8.004 MB / 366.1 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 1.128e-05/0.3544, allocations: 7.938 kB / 449.4 MB, free: 7.996 MB / 366.1 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 7.363e-06/0.3544, allocations: 4 kB / 449.4 MB, free: 7.992 MB / 366.1 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 5.38e-06/0.3544, allocations: 0 / 449.4 MB, free: 7.992 MB / 366.1 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.004765/0.3592, allocations: 2.137 MB / 451.6 MB, free: 5.781 MB / 366.1 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 6.141e-06/0.3592, allocations: 0 / 451.6 MB, free: 5.781 MB / 366.1 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0005206/0.3597, allocations: 108 kB / 451.7 MB, free: 5.676 MB / 366.1 MB Notification: Performance of postOpt tearingSystem (simulation): time 1.124e-05/0.3598, allocations: 8 kB / 451.7 MB, free: 5.668 MB / 366.1 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 4.318e-05/0.3598, allocations: 12 kB / 451.7 MB, free: 5.656 MB / 366.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 7.394e-06/0.3598, allocations: 4 kB / 451.7 MB, free: 5.652 MB / 366.1 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 2.485e-06/0.3598, allocations: 0 / 451.7 MB, free: 5.652 MB / 366.1 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.002208/0.362, allocations: 1.06 MB / 452.8 MB, free: 4.566 MB / 366.1 MB Notification: Performance of postOpt removeConstants (simulation): time 0.001065/0.3631, allocations: 423.7 kB / 453.2 MB, free: 4.133 MB / 366.1 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 0.0004083/0.3635, allocations: 8 kB / 453.2 MB, free: 4.125 MB / 366.1 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.001224/0.3648, allocations: 143.8 kB / 453.3 MB, free: 3.984 MB / 366.1 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0003205/0.3651, allocations: 151.7 kB / 453.5 MB, free: 3.836 MB / 366.1 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 6.501e-05/0.3652, allocations: 15.98 kB / 453.5 MB, free: 3.82 MB / 366.1 MB Notification: Performance of sorting global known variables: time 0.003663/0.3689, allocations: 1.967 MB / 455.5 MB, free: 1.832 MB / 366.1 MB Notification: Performance of sort global known variables: time 2.5e-07/0.3689, allocations: 7.938 kB / 455.5 MB, free: 1.824 MB / 366.1 MB Notification: Performance of remove unused functions: time 0.001345/0.3702, allocations: 315.4 kB / 455.8 MB, free: 1.516 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.004323/0.3746, allocations: 1.965 MB / 457.7 MB, free: 15.67 MB / 382.1 MB Notification: Performance of simCode: created initialization part: time 0.001384/0.376, allocations: 0.5964 MB / 458.3 MB, free: 15.07 MB / 382.1 MB Notification: Performance of simCode: created event and clocks part: time 7.083e-06/0.376, allocations: 0 / 458.3 MB, free: 15.07 MB / 382.1 MB Notification: Performance of simCode: created simulation system equations: time 0.0006724/0.3767, allocations: 343.5 kB / 458.7 MB, free: 14.74 MB / 382.1 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.002141/0.3788, allocations: 326.6 kB / 459 MB, free: 14.42 MB / 382.1 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.03136/0.4102, allocations: 17.27 MB / 476.3 MB, free: 12.77 MB / 398.1 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.001557/0.4118, allocations: 1.437 MB / 477.7 MB, free: 11.3 MB / 398.1 MB Notification: Performance of simCode: alias equations: time 0.00102/0.4129, allocations: 287.1 kB / 478 MB, free: 11.02 MB / 398.1 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.001176/0.414, allocations: 0.7062 MB / 478.7 MB, free: 10.31 MB / 398.1 MB Notification: Performance of SimCode: time 1.183e-06/0.4141, allocations: 3.938 kB / 478.7 MB, free: 10.31 MB / 398.1 MB Notification: Performance of buildModelFMU: Generate the FMI files: time 0.08506/0.4991, allocations: 38.93 MB / 0.5055 GB, free: 3.652 MB / 430.1 MB Notification: Performance of buildModelFMU: Generate platform static: time 11.48/11.98, allocations: 13.78 kB / 0.5055 GB, free: 3.645 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.1.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