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.0009142/0.0009138, allocations: 94.81 kB / 16.3 MB, free: 5.523 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.0009582/0.0009584, allocations: 181.2 kB / 17.2 MB, free: 5.457 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.419/1.419, allocations: 223.2 MB / 241.1 MB, free: 14.56 MB / 206.1 MB Notification: Performance of FrontEnd - loaded program: time 0.0002787/0.0002788, allocations: 15.94 kB / 300.7 MB, free: 6.23 MB / 238.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.1169/0.1172, allocations: 50.41 MB / 351.1 MB, free: 3.809 MB / 286.1 MB Notification: Performance of NFInst.instantiate(Modelica.Electrical.Batteries.Examples.ShowImpedance): time 0.002145/0.1194, allocations: 1.538 MB / 352.7 MB, free: 2.258 MB / 286.1 MB Notification: Performance of NFInst.instExpressions: time 0.001478/0.1209, allocations: 1.091 MB / 353.8 MB, free: 1.16 MB / 286.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 7.553e-05/0.121, allocations: 7.938 kB / 353.8 MB, free: 1.152 MB / 286.1 MB Notification: Performance of NFTyping.typeComponents: time 0.001292/0.1223, allocations: 0.7094 MB / 354.5 MB, free: 452 kB / 286.1 MB Notification: Performance of NFTyping.typeBindings: time 6.404e-05/0.1224, allocations: 39.86 kB / 354.5 MB, free: 412 kB / 286.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.0003804/0.1228, allocations: 151.5 kB / 354.7 MB, free: 260 kB / 286.1 MB Notification: Performance of NFFlatten.flatten: time 0.0003195/0.1231, allocations: 235.5 kB / 354.9 MB, free: 24 kB / 286.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0001329/0.1232, allocations: 29.69 kB / 354.9 MB, free: 15.99 MB / 302.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0001548/0.1234, allocations: 95.69 kB / 355 MB, free: 15.9 MB / 302.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0001751/0.1236, allocations: 107.7 kB / 355.1 MB, free: 15.79 MB / 302.1 MB Notification: Performance of NFPackage.collectConstants: time 2.306e-05/0.1236, allocations: 3.938 kB / 355.1 MB, free: 15.79 MB / 302.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0001526/0.1238, allocations: 47.91 kB / 355.2 MB, free: 15.74 MB / 302.1 MB Notification: Performance of NFScalarize.scalarize: time 0.0001618/0.1239, allocations: 183.5 kB / 355.4 MB, free: 15.56 MB / 302.1 MB Notification: Performance of NFVerifyModel.verify: time 8.391e-05/0.124, allocations: 129.2 kB / 355.5 MB, free: 15.43 MB / 302.1 MB Notification: Performance of NFConvertDAE.convert: time 0.0004473/0.1245, allocations: 463.2 kB / 355.9 MB, free: 14.98 MB / 302.1 MB Notification: Performance of FrontEnd - DAE generated: time 2.815e-06/0.1245, allocations: 4 kB / 355.9 MB, free: 14.97 MB / 302.1 MB Notification: Performance of FrontEnd: time 2.044e-06/0.1245, allocations: 0 / 355.9 MB, free: 14.97 MB / 302.1 MB Notification: Performance of Transformations before backend: time 6.923e-06/0.1245, allocations: 0 / 355.9 MB, free: 14.97 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: 4 * Number of variables: 4 Notification: Performance of Generate backend data structure: time 0.002011/0.1265, allocations: 1.007 MB / 356.9 MB, free: 13.91 MB / 302.1 MB Notification: Performance of prepare preOptimizeDAE: time 4.065e-05/0.1266, allocations: 8.031 kB / 357 MB, free: 13.91 MB / 302.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0001515/0.1267, allocations: 94.86 kB / 357 MB, free: 13.81 MB / 302.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0007272/0.1275, allocations: 0.5826 MB / 357.6 MB, free: 13.18 MB / 302.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 2.24e-05/0.1275, allocations: 4 kB / 357.6 MB, free: 13.17 MB / 302.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 1.698e-05/0.1275, allocations: 4 kB / 357.6 MB, free: 13.17 MB / 302.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0002968/0.1278, allocations: 117.6 kB / 357.7 MB, free: 13.05 MB / 302.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 8.356e-06/0.1279, allocations: 0 / 357.7 MB, free: 13.05 MB / 302.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 1.746e-05/0.1279, allocations: 4 kB / 357.8 MB, free: 13.04 MB / 302.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 7.163e-06/0.1279, allocations: 3.953 kB / 357.8 MB, free: 13.04 MB / 302.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0003601/0.1283, allocations: 155.9 kB / 357.9 MB, free: 12.89 MB / 302.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.0007236/0.129, allocations: 0.5371 MB / 358.4 MB, free: 12.3 MB / 302.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.0002028/0.1292, allocations: 90.62 kB / 358.5 MB, free: 12.2 MB / 302.1 MB Notification: Performance of preOpt evalFunc (simulation): time 1.524e-05/0.1292, allocations: 3.984 kB / 358.5 MB, free: 12.2 MB / 302.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 2.83e-05/0.1293, allocations: 30.56 kB / 358.6 MB, free: 12.16 MB / 302.1 MB Notification: Performance of pre-optimization done (n=3): time 1.352e-06/0.1293, allocations: 0 / 358.6 MB, free: 12.16 MB / 302.1 MB Notification: Performance of matching and sorting (n=3): time 0.0007412/0.13, allocations: 344.4 kB / 358.9 MB, free: 11.82 MB / 302.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 3.85e-05/0.1301, allocations: 51.41 kB / 359 MB, free: 11.75 MB / 302.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.001065/0.1312, allocations: 1.022 MB / 360 MB, free: 10.71 MB / 302.1 MB Notification: Performance of collectPreVariables (initialization): time 2.246e-05/0.1312, allocations: 25.7 kB / 360 MB, free: 10.68 MB / 302.1 MB Notification: Performance of collectInitialEqns (initialization): time 0.0003198/0.1315, allocations: 400.3 kB / 360.4 MB, free: 10.29 MB / 302.1 MB Notification: Performance of collectInitialBindings (initialization): time 2.225e-05/0.1315, allocations: 3.906 kB / 360.4 MB, free: 10.28 MB / 302.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 1.072e-05/0.1316, allocations: 4 kB / 360.4 MB, free: 10.28 MB / 302.1 MB Notification: Performance of setup shared object (initialization): time 0.0001116/0.1317, allocations: 314 kB / 360.7 MB, free: 9.965 MB / 302.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0001639/0.1318, allocations: 67.94 kB / 360.8 MB, free: 9.898 MB / 302.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0001751/0.132, allocations: 90.52 kB / 360.9 MB, free: 9.801 MB / 302.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.0001734/0.1322, allocations: 79.94 kB / 360.9 MB, free: 9.723 MB / 302.1 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 1.963e-06/0.1322, allocations: 0 / 360.9 MB, free: 9.723 MB / 302.1 MB Notification: Performance of matching and sorting (n=3) (initialization): time 0.0005149/0.1327, allocations: 280.4 kB / 361.2 MB, free: 9.441 MB / 302.1 MB Notification: Performance of prepare postOptimizeDAE: time 1.875e-05/0.1328, allocations: 4 kB / 361.2 MB, free: 9.438 MB / 302.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 7.084e-06/0.1328, allocations: 0 / 361.2 MB, free: 9.438 MB / 302.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 1.405e-05/0.1328, allocations: 3.953 kB / 361.2 MB, free: 9.434 MB / 302.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.00019/0.133, allocations: 27.91 kB / 361.2 MB, free: 9.406 MB / 302.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 7.234e-06/0.133, allocations: 0 / 361.2 MB, free: 9.406 MB / 302.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0001632/0.1332, allocations: 16 kB / 361.3 MB, free: 9.391 MB / 302.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 1.858e-05/0.1332, allocations: 7.984 kB / 361.3 MB, free: 9.383 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.000348/0.1336, allocations: 333.7 kB / 361.6 MB, free: 9.047 MB / 302.1 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.0001384/0.1337, allocations: 82.97 kB / 361.7 MB, free: 8.965 MB / 302.1 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.000628/0.1343, allocations: 293.6 kB / 362 MB, free: 8.668 MB / 302.1 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 8.245e-06/0.1344, allocations: 3.953 kB / 362 MB, free: 8.664 MB / 302.1 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 3.897e-06/0.1344, allocations: 0 / 362 MB, free: 8.664 MB / 302.1 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 2.795e-06/0.1344, allocations: 0 / 362 MB, free: 8.664 MB / 302.1 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0004819/0.1349, allocations: 454.8 kB / 362.4 MB, free: 8.172 MB / 302.1 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 4.138e-06/0.1349, allocations: 4 kB / 362.4 MB, free: 8.168 MB / 302.1 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 9.025e-05/0.135, allocations: 15.92 kB / 362.4 MB, free: 8.152 MB / 302.1 MB Notification: Performance of postOpt tearingSystem (simulation): time 2.274e-06/0.135, allocations: 3.938 kB / 362.4 MB, free: 8.148 MB / 302.1 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 1.502e-05/0.135, allocations: 7.984 kB / 362.4 MB, free: 8.141 MB / 302.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 1.533e-06/0.135, allocations: 0 / 362.4 MB, free: 8.141 MB / 302.1 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 2.896e-06/0.135, allocations: 3.953 kB / 362.4 MB, free: 8.137 MB / 302.1 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.0004806/0.1355, allocations: 326.9 kB / 362.8 MB, free: 7.801 MB / 302.1 MB Notification: Performance of postOpt removeConstants (simulation): time 0.000151/0.1357, allocations: 148 kB / 362.9 MB, free: 7.637 MB / 302.1 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 4.532e-05/0.1357, allocations: 0 / 362.9 MB, free: 7.637 MB / 302.1 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0001666/0.1359, allocations: 15.98 kB / 362.9 MB, free: 7.621 MB / 302.1 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 4.643e-05/0.136, allocations: 7.984 kB / 362.9 MB, free: 7.613 MB / 302.1 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 1.393e-05/0.136, allocations: 7.953 kB / 362.9 MB, free: 7.605 MB / 302.1 MB Notification: Performance of sorting global known variables: time 0.0007828/0.1368, allocations: 0.7359 MB / 363.7 MB, free: 6.859 MB / 302.1 MB Notification: Performance of sort global known variables: time 1.31e-07/0.1368, allocations: 0 / 363.7 MB, free: 6.859 MB / 302.1 MB Notification: Performance of remove unused functions: time 0.0002925/0.1371, allocations: 43.94 kB / 363.7 MB, free: 6.816 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.0002211/0.1373, allocations: 123.2 kB / 363.8 MB, free: 6.684 MB / 302.1 MB Notification: Performance of simCode: created initialization part: time 0.0003747/0.1377, allocations: 123.9 kB / 364 MB, free: 6.562 MB / 302.1 MB Notification: Performance of simCode: created event and clocks part: time 1.963e-06/0.1377, allocations: 0 / 364 MB, free: 6.562 MB / 302.1 MB Notification: Performance of simCode: created simulation system equations: time 0.0001703/0.1379, allocations: 64.14 kB / 364 MB, free: 6.5 MB / 302.1 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0004915/0.1384, allocations: 95.22 kB / 364.1 MB, free: 6.41 MB / 302.1 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.001868/0.1402, allocations: 1.453 MB / 365.6 MB, free: 4.922 MB / 302.1 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0006785/0.1409, allocations: 1.02 MB / 366.6 MB, free: 3.875 MB / 302.1 MB Notification: Performance of simCode: alias equations: time 0.0005786/0.1415, allocations: 386.6 kB / 367 MB, free: 3.5 MB / 302.1 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 6.173e-05/0.1416, allocations: 27.44 kB / 367 MB, free: 3.473 MB / 302.1 MB Notification: Performance of SimCode: time 2.6e-07/0.1416, allocations: 0 / 367 MB, free: 3.473 MB / 302.1 MB [CodegenCFunctions.tpl:7542:14-7542:14:writable] Error: Template error: non INDEX(_) (i.e., slice) subscripts probably should not reach here. Check indexedAssign template..