Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries/ --ompython_omhome=/usr Modelica_trunk_cpp_Modelica.Electrical.Batteries.Examples.CCCVcharging.conf.json 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) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices trunk/package.mo", uses=false) Using package ModelicaServices with version trunk (/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices trunk/package.mo) 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) Running command: translateModel(Modelica.Electrical.Batteries.Examples.CCCVcharging,tolerance=1e-06,outputFormat="mat",numberOfIntervals=24000,variableFilter="time|battery.capacitor.1..v|battery.capacitor.2..v|battery.limIntegrator.y|energy.y",fileNamePrefix="Modelica_trunk_cpp_Modelica.Electrical.Batteries.Examples.CCCVcharging") translateModel(Modelica.Electrical.Batteries.Examples.CCCVcharging,tolerance=1e-06,outputFormat="mat",numberOfIntervals=24000,variableFilter="time|battery.capacitor.1..v|battery.capacitor.2..v|battery.limIntegrator.y|energy.y",fileNamePrefix="Modelica_trunk_cpp_Modelica.Electrical.Batteries.Examples.CCCVcharging") Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex trunk/package.mo): time 0.001583/0.001583, allocations: 198.9 kB / 17.05 MB, free: 5.094 MB / 13.93 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica trunk/package.mo): time 1.275/1.275, allocations: 226.5 MB / 244.3 MB, free: 6.578 MB / 202.7 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices trunk/package.mo): time 0.0007292/0.0007291, allocations: 90.17 kB / 296.4 MB, free: 6.801 MB / 234.7 MB Notification: Performance of FrontEnd - loaded program: time 0.0001962/0.0001963, allocations: 4 kB / 356.2 MB, free: 11 MB / 298.7 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.2038/0.204, allocations: 51.29 MB / 407.5 MB, free: 27.82 MB / 298.7 MB Notification: Performance of NFInst.instantiate(Modelica.Electrical.Batteries.Examples.CCCVcharging): time 0.002864/0.2069, allocations: 3.452 MB / 410.9 MB, free: 24.35 MB / 298.7 MB Notification: Performance of NFInst.instExpressions: time 0.002172/0.2091, allocations: 1.909 MB / 412.9 MB, free: 22.45 MB / 298.7 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.0003419/0.2095, allocations: 11.94 kB / 412.9 MB, free: 22.44 MB / 298.7 MB Notification: Performance of NFTyping.typeComponents: time 0.0009067/0.2104, allocations: 0.5385 MB / 413.4 MB, free: 21.9 MB / 298.7 MB [/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica trunk/Electrical/Batteries/BatteryStacks/CellRCStack.mo:14:26-14:33:writable] Warning: 'each' used when modifying non-array element v. Notification: Performance of NFTyping.typeBindings: time 0.0005617/0.2109, allocations: 344.4 kB / 413.7 MB, free: 21.56 MB / 298.7 MB Notification: Performance of NFTyping.typeClassSections: time 0.0005318/0.2115, allocations: 211.7 kB / 413.9 MB, free: 21.36 MB / 298.7 MB Notification: Performance of NFFlatten.flatten: time 0.0007054/0.2122, allocations: 0.8463 MB / 414.8 MB, free: 20.51 MB / 298.7 MB Notification: Performance of NFFlatten.resolveConnections: time 0.000333/0.2125, allocations: 268.1 kB / 415.1 MB, free: 20.24 MB / 298.7 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0003106/0.2129, allocations: 298.9 kB / 415.3 MB, free: 19.95 MB / 298.7 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0004058/0.2133, allocations: 402.5 kB / 415.7 MB, free: 19.55 MB / 298.7 MB Notification: Performance of NFPackage.collectConstants: time 8.758e-05/0.2134, allocations: 36 kB / 415.8 MB, free: 19.52 MB / 298.7 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0002139/0.2136, allocations: 95.97 kB / 415.9 MB, free: 19.42 MB / 298.7 MB Notification: Performance of NFScalarize.scalarize: time 0.0002104/0.2138, allocations: 422.8 kB / 416.3 MB, free: 19.01 MB / 298.7 MB Notification: Performance of NFVerifyModel.verify: time 0.0001644/0.214, allocations: 244.9 kB / 416.5 MB, free: 18.76 MB / 298.7 MB Notification: Performance of NFConvertDAE.convert: time 0.0007844/0.2148, allocations: 1.391 MB / 417.9 MB, free: 17.37 MB / 298.7 MB Notification: Performance of FrontEnd - DAE generated: time 4.959e-06/0.2148, allocations: 4 kB / 417.9 MB, free: 17.36 MB / 298.7 MB Notification: Performance of FrontEnd: time 1.693e-06/0.2148, allocations: 3.938 kB / 417.9 MB, free: 17.36 MB / 298.7 MB Notification: Performance of Transformations before backend: time 3.608e-05/0.2148, allocations: 0 / 417.9 MB, free: 17.36 MB / 298.7 MB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 123 * Number of variables: 123 Notification: Performance of Generate backend data structure: time 0.002284/0.2171, allocations: 1.616 MB / 419.5 MB, free: 15.69 MB / 298.7 MB Notification: Performance of prepare preOptimizeDAE: time 3.394e-05/0.2172, allocations: 12.03 kB / 419.5 MB, free: 15.68 MB / 298.7 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0002525/0.2174, allocations: 158 kB / 419.7 MB, free: 15.52 MB / 298.7 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.001395/0.2188, allocations: 1.107 MB / 420.8 MB, free: 14.36 MB / 298.7 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 0.0002954/0.2191, allocations: 148.3 kB / 421 MB, free: 14.21 MB / 298.7 MB Notification: Performance of preOpt expandDerOperator (simulation): time 6.606e-05/0.2192, allocations: 51.91 kB / 421 MB, free: 14.16 MB / 298.7 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0009683/0.2202, allocations: 0.6635 MB / 421.7 MB, free: 13.45 MB / 298.7 MB Notification: Performance of preOpt findStateOrder (simulation): time 1.17e-05/0.2202, allocations: 0 / 421.7 MB, free: 13.45 MB / 298.7 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 4.845e-05/0.2203, allocations: 28 kB / 421.7 MB, free: 13.42 MB / 298.7 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 9.448e-06/0.2203, allocations: 16 kB / 421.7 MB, free: 13.41 MB / 298.7 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0007216/0.221, allocations: 443.7 kB / 422.1 MB, free: 12.97 MB / 298.7 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.003307/0.2243, allocations: 2.93 MB / 425.1 MB, free: 9.941 MB / 298.7 MB Notification: Performance of preOpt comSubExp (simulation): time 0.0009097/0.2253, allocations: 470.5 kB / 425.5 MB, free: 9.473 MB / 298.7 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0005868/0.2259, allocations: 338.3 kB / 425.9 MB, free: 9.141 MB / 298.7 MB Notification: Performance of preOpt evalFunc (simulation): time 2.529e-05/0.2259, allocations: 0 / 425.9 MB, free: 9.141 MB / 298.7 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 1.888e-05/0.2259, allocations: 46.55 kB / 425.9 MB, free: 9.086 MB / 298.7 MB Notification: Performance of pre-optimization done (n=30): time 1.123e-06/0.2259, allocations: 0 / 425.9 MB, free: 9.086 MB / 298.7 MB Notification: Performance of matching and sorting (n=30): time 0.001765/0.2277, allocations: 0.8348 MB / 426.7 MB, free: 8.223 MB / 298.7 MB Notification: Performance of inlineWhenForInitialization (initialization): time 7.855e-05/0.2278, allocations: 269 kB / 427 MB, free: 7.898 MB / 298.7 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.001942/0.2297, allocations: 2.242 MB / 429.2 MB, free: 5.645 MB / 298.7 MB Notification: Performance of collectPreVariables (initialization): time 3.087e-05/0.2298, allocations: 33.7 kB / 429.3 MB, free: 5.605 MB / 298.7 MB Notification: Performance of collectInitialEqns (initialization): time 0.0004021/0.2302, allocations: 0.6391 MB / 429.9 MB, free: 4.957 MB / 298.7 MB Notification: Performance of collectInitialBindings (initialization): time 6.119e-05/0.2303, allocations: 110.4 kB / 430 MB, free: 4.848 MB / 298.7 MB Notification: Performance of simplifyInitialFunctions (initialization): time 1.756e-05/0.2303, allocations: 8 kB / 430 MB, free: 4.84 MB / 298.7 MB Notification: Performance of setup shared object (initialization): time 5.271e-05/0.2303, allocations: 318 kB / 430.3 MB, free: 4.523 MB / 298.7 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0003442/0.2307, allocations: 180.6 kB / 430.5 MB, free: 4.344 MB / 298.7 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0003809/0.2311, allocations: 312.6 kB / 430.8 MB, free: 3.984 MB / 298.7 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.0003649/0.2314, allocations: 211.8 kB / 431 MB, free: 3.777 MB / 298.7 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 2.285e-06/0.2315, allocations: 0 / 431 MB, free: 3.777 MB / 298.7 MB Notification: Performance of matching and sorting (n=46) (initialization): time 0.0009999/0.2325, allocations: 0.6365 MB / 431.7 MB, free: 3.129 MB / 298.7 MB Notification: Performance of prepare postOptimizeDAE: time 2.036e-05/0.2325, allocations: 8 kB / 431.7 MB, free: 3.121 MB / 298.7 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 7.223e-06/0.2325, allocations: 0 / 431.7 MB, free: 3.121 MB / 298.7 MB Notification: Performance of postOpt tearingSystem (initialization): time 0.0002735/0.2328, allocations: 76.94 kB / 431.8 MB, free: 3.043 MB / 298.7 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0003611/0.2332, allocations: 95.86 kB / 431.8 MB, free: 2.949 MB / 298.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 0.001242/0.2344, allocations: 1.619 MB / 433.5 MB, free: 1.195 MB / 298.7 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0004417/0.2349, allocations: 71.69 kB / 433.5 MB, free: 1.125 MB / 298.7 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 2.332e-05/0.2349, allocations: 16 kB / 433.6 MB, free: 1.109 MB / 298.7 MB Notification: Model statistics after passing the back-end for initialization: * Number of independent subsystems: 10 * Number of states: 0 () * Number of discrete variables: 3 (cccvCharger.CV,energy.local_reset,battery.limIntegrator.local_reset) * Number of discrete states: 0 () * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for initialization (41): * Single equations (assignments): 40 * Array equations: 0 * Algorithm blocks: 0 * Record equations: 0 * When equations: 0 * If-equations: 0 * Equation systems (linear and non-linear blocks): 0 * Torn equation systems: 1 * Mixed (continuous/discrete) equation systems: 0 Notification: Torn system details for strict tearing set: * Linear torn systems: 0 * Non-linear torn systems: 1 {1 5} Notification: Performance of prepare postOptimizeDAE: time 0.0004331/0.2353, allocations: 489.4 kB / 434 MB, free: 0.6211 MB / 298.7 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.0001255/0.2355, allocations: 138.2 kB / 434.2 MB, free: 496 kB / 298.7 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.0001446/0.2356, allocations: 165.6 kB / 434.3 MB, free: 324 kB / 298.7 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 2.775e-06/0.2356, allocations: 4 kB / 434.3 MB, free: 320 kB / 298.7 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 2.334e-06/0.2356, allocations: 0 / 434.3 MB, free: 320 kB / 298.7 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 3.437e-06/0.2356, allocations: 3.938 kB / 434.3 MB, free: 316 kB / 298.7 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.002625/0.2383, allocations: 1.715 MB / 436.1 MB, free: 14.52 MB / 314.7 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 2.525e-06/0.2383, allocations: 0 / 436.1 MB, free: 14.52 MB / 314.7 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.000356/0.2386, allocations: 75.88 kB / 436.1 MB, free: 14.45 MB / 314.7 MB Notification: Performance of postOpt tearingSystem (simulation): time 0.0001778/0.2388, allocations: 60.89 kB / 436.2 MB, free: 14.39 MB / 314.7 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 2.539e-05/0.2389, allocations: 11.98 kB / 436.2 MB, free: 14.38 MB / 314.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 0.001392/0.2403, allocations: 1.576 MB / 437.8 MB, free: 12.67 MB / 314.7 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 3.436e-06/0.2403, allocations: 3.953 kB / 437.8 MB, free: 12.66 MB / 314.7 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.001608/0.2419, allocations: 0.8601 MB / 438.6 MB, free: 11.77 MB / 314.7 MB Notification: Performance of postOpt removeConstants (simulation): time 0.0004712/0.2424, allocations: 343.2 kB / 439 MB, free: 11.42 MB / 314.7 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 0.0001051/0.2425, allocations: 8 kB / 439 MB, free: 11.41 MB / 314.7 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0004888/0.243, allocations: 63.95 kB / 439 MB, free: 11.35 MB / 314.7 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 8.92e-05/0.2431, allocations: 31.94 kB / 439.1 MB, free: 11.32 MB / 314.7 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 2.365e-05/0.2431, allocations: 8 kB / 439.1 MB, free: 11.31 MB / 314.7 MB Notification: Performance of sorting global known variables: time 0.002081/0.2452, allocations: 1.611 MB / 440.7 MB, free: 9.699 MB / 314.7 MB Notification: Performance of sort global known variables: time 1.5e-07/0.2452, allocations: 4 kB / 440.7 MB, free: 9.695 MB / 314.7 MB Notification: Performance of remove unused functions: time 0.0006841/0.2459, allocations: 203.5 kB / 440.9 MB, free: 9.496 MB / 314.7 MB Notification: Model statistics after passing the back-end for simulation: * Number of independent subsystems: 3 * Number of states: 4 (battery.limIntegrator.y,battery.capacitor[1].v,battery.capacitor[2].v,energy.y) * Number of discrete variables: 1 (cccvCharger.CV) * Number of discrete states: 0 () * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for simulation (26): * Single equations (assignments): 25 * Array equations: 0 * Algorithm blocks: 0 * Record equations: 0 * When equations: 0 * If-equations: 0 * Equation systems (linear and non-linear blocks): 0 * Torn equation systems: 1 * Mixed (continuous/discrete) equation systems: 0 Notification: Torn system details for strict tearing set: * Linear torn systems: 0 * Non-linear torn systems: 1 {1 4} Notification: Performance of Backend phase and start with SimCode phase: time 0.0009302/0.2469, allocations: 460 kB / 441.3 MB, free: 9.211 MB / 314.7 MB Notification: Performance of simCode: created initialization part: time 0.00125/0.2481, allocations: 0.5375 MB / 441.9 MB, free: 8.66 MB / 314.7 MB Notification: Performance of simCode: created event and clocks part: time 3.607e-06/0.2481, allocations: 0 / 441.9 MB, free: 8.66 MB / 314.7 MB Notification: Performance of simCode: created simulation system equations: time 0.0005926/0.2487, allocations: 330.9 kB / 442.2 MB, free: 8.324 MB / 314.7 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0009704/0.2497, allocations: 199.5 kB / 442.4 MB, free: 8.129 MB / 314.7 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.004602/0.2543, allocations: 3.026 MB / 445.4 MB, free: 5.059 MB / 314.7 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0008603/0.2552, allocations: 1.249 MB / 446.7 MB, free: 3.785 MB / 314.7 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.000308/0.2556, allocations: 75.41 kB / 446.7 MB, free: 3.711 MB / 314.7 MB Notification: Performance of SimCode: time 8.42e-07/0.2556, allocations: 0 / 446.7 MB, free: 3.711 MB / 314.7 MB Notification: Performance of Templates: time 0.02888/0.2845, allocations: 20.82 MB / 467.6 MB, free: 14.91 MB / 346.7 MB make -j1 -f Modelica_trunk_cpp_Modelica.Electrical.Batteries.Examples.CCCVcharging.makefile (rm -f Modelica_trunk_cpp_Modelica.Electrical.Batteries.Examples.CCCVcharging.pipe ; mkfifo Modelica_trunk_cpp_Modelica.Electrical.Batteries.Examples.CCCVcharging.pipe ; head -c 1048576 < Modelica_trunk_cpp_Modelica.Electrical.Batteries.Examples.CCCVcharging.pipe >> ../files/Modelica_trunk_cpp_Modelica.Electrical.Batteries.Examples.CCCVcharging.sim & ./Modelica_trunk_cpp_Modelica.Electrical.Batteries.Examples.CCCVcharging --alarm=480 -emit_protected > Modelica_trunk_cpp_Modelica.Electrical.Batteries.Examples.CCCVcharging.pipe 2>&1) diffSimulationResults("Modelica_trunk_cpp_Modelica.Electrical.Batteries.Examples.CCCVcharging_res.mat","/var/lib/jenkins/ws/OpenModelicaLibraryTestingWork/Reference-modelica.org/ReferenceResults/MAP-LIB_ReferenceResults/v4.0.0/Modelica/Electrical/Batteries/Examples/CCCVcharging/CCCVcharging.csv","../files/Modelica_trunk_cpp_Modelica.Electrical.Batteries.Examples.CCCVcharging.diff",relTol=0.003,relTolDiffMinMax=0.003,rangeDelta=0.001) Reference file matches