Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries --ompython_omhome=/usr Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.ShowImpedance.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: translateModel(Modelica.Electrical.Batteries.Examples.ShowImpedance,tolerance=1e-06,outputFormat="mat",numberOfIntervals=20000,variableFilter="time|impedance.z.re|impedance.z.im",fileNamePrefix="Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.ShowImpedance") translateModel(Modelica.Electrical.Batteries.Examples.ShowImpedance,tolerance=1e-06,outputFormat="mat",numberOfIntervals=20000,variableFilter="time|impedance.z.re|impedance.z.im",fileNamePrefix="Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.ShowImpedance") Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.001015/0.001015, allocations: 86.28 kB / 16.31 MB, free: 6.449 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.001044/0.001044, allocations: 180 kB / 17.21 MB, free: 6.32 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.524/1.524, allocations: 223.3 MB / 241.2 MB, free: 5.191 MB / 190.1 MB Notification: Performance of FrontEnd - loaded program: time 0.0003645/0.0003653, allocations: 6.906 kB / 300.8 MB, free: 5.469 MB / 238.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.1397/0.1401, allocations: 50.42 MB / 351.2 MB, free: 11.37 MB / 286.1 MB Notification: Performance of NFInst.instantiate(Modelica.Electrical.Batteries.Examples.ShowImpedance): time 0.00289/0.143, allocations: 1.582 MB / 352.8 MB, free: 9.773 MB / 286.1 MB Notification: Performance of NFInst.instExpressions: time 0.002167/0.1453, allocations: 1.107 MB / 353.9 MB, free: 8.66 MB / 286.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.0001809/0.1455, allocations: 3.938 kB / 353.9 MB, free: 8.656 MB / 286.1 MB Notification: Performance of NFTyping.typeComponents: time 0.001144/0.1466, allocations: 494.6 kB / 354.4 MB, free: 8.172 MB / 286.1 MB Notification: Performance of NFTyping.typeBindings: time 0.0002239/0.1469, allocations: 183.5 kB / 354.6 MB, free: 7.992 MB / 286.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.0003875/0.1473, allocations: 131.6 kB / 354.7 MB, free: 7.863 MB / 286.1 MB Notification: Performance of NFFlatten.flatten: time 0.0002769/0.1475, allocations: 194.3 kB / 354.9 MB, free: 7.676 MB / 286.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0001046/0.1477, allocations: 29.66 kB / 354.9 MB, free: 7.645 MB / 286.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0001755/0.1478, allocations: 107.6 kB / 355 MB, free: 7.539 MB / 286.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0002701/0.1481, allocations: 171.5 kB / 355.2 MB, free: 7.371 MB / 286.1 MB Notification: Performance of NFPackage.collectConstants: time 2.582e-05/0.1482, allocations: 8 kB / 355.2 MB, free: 7.363 MB / 286.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0001505/0.1483, allocations: 59.95 kB / 355.3 MB, free: 7.305 MB / 286.1 MB Notification: Performance of NFScalarize.scalarize: time 0.0002157/0.1485, allocations: 271.3 kB / 355.5 MB, free: 7.039 MB / 286.1 MB Notification: Performance of NFVerifyModel.verify: time 0.0001089/0.1487, allocations: 121.3 kB / 355.7 MB, free: 6.914 MB / 286.1 MB Notification: Performance of NFConvertDAE.convert: time 0.0006073/0.1493, allocations: 0.604 MB / 356.3 MB, free: 6.309 MB / 286.1 MB Notification: Performance of FrontEnd - DAE generated: time 5.26e-06/0.1493, allocations: 0 / 356.3 MB, free: 6.309 MB / 286.1 MB Notification: Performance of FrontEnd: time 1.674e-06/0.1493, allocations: 0 / 356.3 MB, free: 6.309 MB / 286.1 MB Notification: Performance of Transformations before backend: time 7.685e-06/0.1493, allocations: 4 kB / 356.3 MB, free: 6.305 MB / 286.1 MB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 4 * Number of variables: 4 Notification: Performance of Generate backend data structure: time 0.002392/0.1517, allocations: 1.089 MB / 357.4 MB, free: 5.164 MB / 286.1 MB Notification: Performance of prepare preOptimizeDAE: time 4.706e-05/0.1518, allocations: 8.031 kB / 357.4 MB, free: 5.156 MB / 286.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0001568/0.1519, allocations: 94.81 kB / 357.5 MB, free: 5.062 MB / 286.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0009149/0.1529, allocations: 0.696 MB / 358.2 MB, free: 4.312 MB / 286.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 1.475e-05/0.1529, allocations: 0 / 358.2 MB, free: 4.312 MB / 286.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 2.139e-05/0.1529, allocations: 3.938 kB / 358.2 MB, free: 4.309 MB / 286.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0002905/0.1532, allocations: 125.6 kB / 358.3 MB, free: 4.18 MB / 286.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 8.195e-06/0.1532, allocations: 0 / 358.3 MB, free: 4.18 MB / 286.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 1.571e-05/0.1532, allocations: 3.938 kB / 358.3 MB, free: 4.176 MB / 286.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 6.572e-06/0.1533, allocations: 4 kB / 358.3 MB, free: 4.172 MB / 286.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.000342/0.1536, allocations: 159.8 kB / 358.4 MB, free: 4.016 MB / 286.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.001077/0.1547, allocations: 0.8142 MB / 359.3 MB, free: 3.152 MB / 286.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.0002241/0.1549, allocations: 94.45 kB / 359.4 MB, free: 3.051 MB / 286.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0001796/0.1551, allocations: 80.91 kB / 359.4 MB, free: 2.969 MB / 286.1 MB Notification: Performance of preOpt evalFunc (simulation): time 2.009e-05/0.1551, allocations: 0 / 359.4 MB, free: 2.969 MB / 286.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 2.989e-05/0.1552, allocations: 30.56 kB / 359.5 MB, free: 2.93 MB / 286.1 MB Notification: Performance of pre-optimization done (n=3): time 1.062e-06/0.1552, allocations: 0 / 359.5 MB, free: 2.93 MB / 286.1 MB Notification: Performance of matching and sorting (n=3): time 0.0007908/0.156, allocations: 348.4 kB / 359.8 MB, free: 2.582 MB / 286.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 4.594e-05/0.156, allocations: 55.41 kB / 359.9 MB, free: 2.516 MB / 286.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.001769/0.1578, allocations: 1.405 MB / 361.3 MB, free: 1.09 MB / 286.1 MB Notification: Performance of collectPreVariables (initialization): time 2.589e-05/0.1578, allocations: 29.69 kB / 361.3 MB, free: 1.055 MB / 286.1 MB Notification: Performance of collectInitialEqns (initialization): time 0.0003662/0.1582, allocations: 384.4 kB / 361.7 MB, free: 0.6758 MB / 286.1 MB Notification: Performance of collectInitialBindings (initialization): time 3.142e-05/0.1583, allocations: 3.906 kB / 361.7 MB, free: 0.6719 MB / 286.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 9.939e-06/0.1583, allocations: 7.938 kB / 361.7 MB, free: 0.6641 MB / 286.1 MB Notification: Performance of setup shared object (initialization): time 0.0001438/0.1584, allocations: 314 kB / 362 MB, free: 360 kB / 286.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0001709/0.1586, allocations: 67.95 kB / 362 MB, free: 292 kB / 286.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0001765/0.1588, allocations: 94.52 kB / 362.1 MB, free: 188 kB / 286.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.0001706/0.159, allocations: 75.94 kB / 362.2 MB, free: 112 kB / 286.1 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 1.934e-06/0.159, allocations: 0 / 362.2 MB, free: 112 kB / 286.1 MB Notification: Performance of matching and sorting (n=3) (initialization): time 0.0005624/0.1596, allocations: 276.6 kB / 362.5 MB, free: 15.83 MB / 302.1 MB Notification: Performance of prepare postOptimizeDAE: time 2.103e-05/0.1596, allocations: 9.875 kB / 362.5 MB, free: 15.82 MB / 302.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 8.987e-06/0.1596, allocations: 3.984 kB / 362.5 MB, free: 15.82 MB / 302.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 1.503e-05/0.1596, allocations: 3.781 kB / 362.5 MB, free: 15.82 MB / 302.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0001851/0.1598, allocations: 15.98 kB / 362.5 MB, free: 15.8 MB / 302.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 9.668e-06/0.1598, allocations: 4 kB / 362.5 MB, free: 15.8 MB / 302.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0001811/0.16, allocations: 20.02 kB / 362.5 MB, free: 15.78 MB / 302.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 1.621e-05/0.16, allocations: 0 / 362.5 MB, free: 15.78 MB / 302.1 MB Notification: Model statistics after passing the back-end for initialization: * Number of independent subsystems: 3 * Number of states: 0 () * Number of discrete variables: 0 () * Number of discrete states: 0 () * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for initialization (3): * Single equations (assignments): 3 * 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: 0 * Mixed (continuous/discrete) equation systems: 0 Notification: Performance of prepare postOptimizeDAE: time 0.0003334/0.1604, allocations: 341.6 kB / 362.9 MB, free: 15.43 MB / 302.1 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.0001521/0.1605, allocations: 87.23 kB / 363 MB, free: 15.35 MB / 302.1 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.0005965/0.1611, allocations: 285.3 kB / 363.2 MB, free: 15.06 MB / 302.1 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 8.987e-06/0.1612, allocations: 7.953 kB / 363.2 MB, free: 15.05 MB / 302.1 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 6.021e-06/0.1612, allocations: 0 / 363.2 MB, free: 15.05 MB / 302.1 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 2.945e-06/0.1612, allocations: 4 kB / 363.2 MB, free: 15.05 MB / 302.1 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0005315/0.1617, allocations: 0.5065 MB / 363.8 MB, free: 14.49 MB / 302.1 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 7.454e-06/0.1617, allocations: 4 kB / 363.8 MB, free: 14.49 MB / 302.1 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 8.052e-05/0.1618, allocations: 15.97 kB / 363.8 MB, free: 14.47 MB / 302.1 MB Notification: Performance of postOpt tearingSystem (simulation): time 2.475e-06/0.1618, allocations: 4 kB / 363.8 MB, free: 14.47 MB / 302.1 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 1.402e-05/0.1619, allocations: 0 / 363.8 MB, free: 14.47 MB / 302.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 1.212e-06/0.1619, allocations: 0 / 363.8 MB, free: 14.47 MB / 302.1 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 4.719e-06/0.1619, allocations: 7.891 kB / 363.8 MB, free: 14.46 MB / 302.1 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.0004743/0.1624, allocations: 326.9 kB / 364.1 MB, free: 14.12 MB / 302.1 MB Notification: Performance of postOpt removeConstants (simulation): time 0.0002848/0.1627, allocations: 227.9 kB / 364.3 MB, free: 13.88 MB / 302.1 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 6.395e-05/0.1627, allocations: 0 / 364.3 MB, free: 13.88 MB / 302.1 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0001811/0.1629, allocations: 15.98 kB / 364.3 MB, free: 13.87 MB / 302.1 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 5.578e-05/0.163, allocations: 4 kB / 364.3 MB, free: 13.86 MB / 302.1 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 1.174e-05/0.163, allocations: 7.938 kB / 364.4 MB, free: 13.86 MB / 302.1 MB Notification: Performance of sorting global known variables: time 0.001307/0.1643, allocations: 1.017 MB / 365.4 MB, free: 12.83 MB / 302.1 MB Notification: Performance of sort global known variables: time 1.1e-07/0.1643, allocations: 0 / 365.4 MB, free: 12.83 MB / 302.1 MB Notification: Performance of remove unused functions: time 0.0003577/0.1647, allocations: 60 kB / 365.4 MB, free: 12.77 MB / 302.1 MB Notification: Model statistics after passing the back-end for simulation: * Number of independent subsystems: 1 * Number of states: 0 () * Number of discrete variables: 0 () * Number of discrete states: 0 () * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for simulation (4): * Single equations (assignments): 3 * Array equations: 0 * Algorithm blocks: 0 * Record equations: 1 * When equations: 0 * If-equations: 0 * Equation systems (linear and non-linear blocks): 0 * Torn equation systems: 0 * Mixed (continuous/discrete) equation systems: 0 Notification: Performance of Backend phase and start with SimCode phase: time 0.0002766/0.165, allocations: 115.2 kB / 365.5 MB, free: 12.64 MB / 302.1 MB Notification: Performance of simCode: created initialization part: time 0.0004188/0.1654, allocations: 135.8 kB / 365.7 MB, free: 12.51 MB / 302.1 MB Notification: Performance of simCode: created event and clocks part: time 2.415e-06/0.1654, allocations: 0 / 365.7 MB, free: 12.51 MB / 302.1 MB Notification: Performance of simCode: created simulation system equations: time 0.0001634/0.1656, allocations: 64.14 kB / 365.7 MB, free: 12.45 MB / 302.1 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0005811/0.1662, allocations: 96.44 kB / 365.8 MB, free: 12.36 MB / 302.1 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.001895/0.1681, allocations: 1.469 MB / 367.3 MB, free: 10.85 MB / 302.1 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.000713/0.1688, allocations: 1.001 MB / 368.3 MB, free: 9.828 MB / 302.1 MB Notification: Performance of simCode: alias equations: time 0.0006255/0.1694, allocations: 470.1 kB / 368.8 MB, free: 9.367 MB / 302.1 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0001131/0.1695, allocations: 35.44 kB / 368.8 MB, free: 9.332 MB / 302.1 MB Notification: Performance of SimCode: time 5.31e-07/0.1696, allocations: 0 / 368.8 MB, free: 9.332 MB / 302.1 MB [CodegenCFunctions.tpl:7578:14-7578:14:writable] Error: Template error: non INDEX(_) (i.e., slice) subscripts probably should not reach here. Check indexedAssign template..