Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries/ --ompython_omhome=/usr BLDC_BLDC.Examples.DemoElectronicCommutator.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) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/BLDC 1.9.0/package.mo", uses=false) Using package BLDC with version 1.9.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/BLDC 1.9.0/package.mo) 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(BLDC.Examples.DemoElectronicCommutator,tolerance=1e-06,outputFormat="empty",numberOfIntervals=199998,variableFilter="",fileNamePrefix="BLDC_BLDC.Examples.DemoElectronicCommutator") translateModel(BLDC.Examples.DemoElectronicCommutator,tolerance=1e-06,outputFormat="empty",numberOfIntervals=199998,variableFilter="",fileNamePrefix="BLDC_BLDC.Examples.DemoElectronicCommutator") Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.0008541/0.0008541, allocations: 92.23 kB / 15.06 MB, free: 1.098 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.0008995/0.0008995, allocations: 172.7 kB / 15.95 MB, free: 208 kB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 4.0.0+maint.om/package.mo): time 1.372/1.372, allocations: 223.3 MB / 240 MB, free: 5.414 MB / 190.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/BLDC 1.9.0/package.mo): time 0.121/0.121, allocations: 2.572 MB / 293.7 MB, free: 4.203 MB / 238.1 MB Notification: Performance of FrontEnd - loaded program: time 0.0004111/0.0004112, allocations: 15.98 kB / 355.2 MB, free: 4.93 MB / 286.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.08526/0.08569, allocations: 51 MB / 406.2 MB, free: 1.879 MB / 334.1 MB Notification: Performance of NFInst.instantiate(BLDC.Examples.DemoElectronicCommutator): time 0.003092/0.08882, allocations: 2.546 MB / 408.7 MB, free: 15.32 MB / 350.1 MB Notification: Performance of NFInst.instExpressions: time 0.002011/0.09086, allocations: 1.216 MB / 409.9 MB, free: 14.1 MB / 350.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.0002863/0.09117, allocations: 15.88 kB / 409.9 MB, free: 14.09 MB / 350.1 MB Notification: Performance of NFTyping.typeComponents: time 0.0003108/0.0915, allocations: 67.5 kB / 410 MB, free: 14.02 MB / 350.1 MB Notification: Performance of NFTyping.typeBindings: time 0.001028/0.09254, allocations: 350.7 kB / 410.3 MB, free: 13.68 MB / 350.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.0003119/0.09286, allocations: 111.9 kB / 410.5 MB, free: 13.57 MB / 350.1 MB Notification: Performance of NFFlatten.flatten: time 0.001092/0.09396, allocations: 0.7758 MB / 411.2 MB, free: 12.79 MB / 350.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0004458/0.09442, allocations: 283 kB / 411.5 MB, free: 12.51 MB / 350.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0002906/0.09472, allocations: 203.1 kB / 411.7 MB, free: 12.31 MB / 350.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0004076/0.09514, allocations: 294.7 kB / 412 MB, free: 12.02 MB / 350.1 MB Notification: Performance of NFPackage.collectConstants: time 7.659e-05/0.09523, allocations: 20 kB / 412 MB, free: 12 MB / 350.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.000248/0.09548, allocations: 87.95 kB / 412.1 MB, free: 11.91 MB / 350.1 MB Notification: Performance of NFScalarize.scalarize: time 0.0001922/0.09568, allocations: 179.4 kB / 412.3 MB, free: 11.74 MB / 350.1 MB Notification: Performance of NFVerifyModel.verify: time 0.0001196/0.09581, allocations: 137.3 kB / 412.4 MB, free: 11.6 MB / 350.1 MB Notification: Performance of NFConvertDAE.convert: time 0.0006201/0.09644, allocations: 0.6238 MB / 413 MB, free: 10.97 MB / 350.1 MB Notification: Performance of FrontEnd - DAE generated: time 2.915e-06/0.09645, allocations: 0 / 413 MB, free: 10.97 MB / 350.1 MB Notification: Performance of FrontEnd: time 1.182e-06/0.09646, allocations: 4 kB / 413 MB, free: 10.97 MB / 350.1 MB Notification: Performance of Transformations before backend: time 1.997e-05/0.09649, allocations: 0 / 413 MB, free: 10.97 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: 143 * Number of variables: 143 Notification: Performance of Generate backend data structure: time 0.002637/0.09913, allocations: 1.126 MB / 414.2 MB, free: 9.789 MB / 350.1 MB Notification: Performance of prepare preOptimizeDAE: time 3.804e-05/0.09918, allocations: 16.02 kB / 414.2 MB, free: 9.773 MB / 350.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0002795/0.09947, allocations: 86.97 kB / 414.3 MB, free: 9.688 MB / 350.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.001011/0.1005, allocations: 0.6098 MB / 414.9 MB, free: 9.035 MB / 350.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 3.671e-05/0.1005, allocations: 37.31 kB / 414.9 MB, free: 9 MB / 350.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 9.861e-05/0.1006, allocations: 48 kB / 415 MB, free: 8.953 MB / 350.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.001386/0.102, allocations: 0.7184 MB / 415.7 MB, free: 8.215 MB / 350.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 1.688e-05/0.1021, allocations: 0 / 415.7 MB, free: 8.215 MB / 350.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 5.654e-05/0.1021, allocations: 31.88 kB / 415.7 MB, free: 8.184 MB / 350.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 5.195e-05/0.1022, allocations: 37.3 kB / 415.7 MB, free: 8.145 MB / 350.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.001541/0.1037, allocations: 0.6257 MB / 416.4 MB, free: 7.52 MB / 350.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.003758/0.1075, allocations: 2.265 MB / 418.6 MB, free: 5.184 MB / 350.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.001528/0.109, allocations: 0.5611 MB / 419.2 MB, free: 4.609 MB / 350.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.000612/0.1097, allocations: 260.6 kB / 419.4 MB, free: 4.352 MB / 350.1 MB Notification: Performance of preOpt evalFunc (simulation): time 0.0001642/0.1099, allocations: 170.2 kB / 419.6 MB, free: 4.148 MB / 350.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 2.637e-05/0.1099, allocations: 38.56 kB / 419.7 MB, free: 4.102 MB / 350.1 MB Notification: Performance of pre-optimization done (n=44): time 1.643e-06/0.1099, allocations: 0 / 419.7 MB, free: 4.102 MB / 350.1 MB Notification: Performance of matching and sorting (n=44): time 0.001938/0.1118, allocations: 0.7198 MB / 420.4 MB, free: 3.375 MB / 350.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 3.45e-05/0.1119, allocations: 55.41 kB / 420.4 MB, free: 3.309 MB / 350.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0009919/0.1129, allocations: 0.7332 MB / 421.2 MB, free: 2.566 MB / 350.1 MB Notification: Performance of collectPreVariables (initialization): time 4.035e-05/0.1129, allocations: 33.81 kB / 421.2 MB, free: 2.527 MB / 350.1 MB Notification: Performance of collectInitialEqns (initialization): time 0.0002251/0.1132, allocations: 327.9 kB / 421.5 MB, free: 2.203 MB / 350.1 MB Notification: Performance of collectInitialBindings (initialization): time 0.0001149/0.1133, allocations: 134.1 kB / 421.6 MB, free: 2.07 MB / 350.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 3.204e-05/0.1133, allocations: 12 kB / 421.7 MB, free: 2.059 MB / 350.1 MB Notification: Performance of setup shared object (initialization): time 0.0001416/0.1135, allocations: 374.7 kB / 422 MB, free: 1.684 MB / 350.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0005982/0.1141, allocations: 220.9 kB / 422.2 MB, free: 1.469 MB / 350.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0006709/0.1148, allocations: 341.4 kB / 422.6 MB, free: 1.09 MB / 350.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.0005817/0.1154, allocations: 217.1 kB / 422.8 MB, free: 0.875 MB / 350.1 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 3.126e-06/0.1154, allocations: 0 / 422.8 MB, free: 0.875 MB / 350.1 MB Notification: Performance of matching and sorting (n=60) (initialization): time 0.00146/0.1168, allocations: 0.6194 MB / 423.4 MB, free: 256 kB / 350.1 MB Notification: Performance of prepare postOptimizeDAE: time 1.665e-05/0.1169, allocations: 4 kB / 423.4 MB, free: 252 kB / 350.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 9.548e-06/0.1169, allocations: 4 kB / 423.4 MB, free: 248 kB / 350.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 1.909e-05/0.1169, allocations: 8 kB / 423.4 MB, free: 240 kB / 350.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0003065/0.1172, allocations: 84.3 kB / 423.5 MB, free: 156 kB / 350.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.418e-05/0.1172, allocations: 15.98 kB / 423.5 MB, free: 140 kB / 350.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0005171/0.1178, allocations: 119.4 kB / 423.6 MB, free: 20 kB / 350.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 4.858e-05/0.1178, allocations: 20 kB / 423.7 MB, free: 0 / 350.1 MB Notification: Model statistics after passing the back-end for initialization: * Number of independent subsystems: 16 * Number of states: 0 () * Number of discrete variables: 16 (hallSensor.yC[1],hallSensor.yC[2],hallSensor.yC[3],hallSensor.yC[4],hallSensor.yC[5],electronicCommutator.fire_p[1],electronicCommutator.fire_p[2],electronicCommutator.fire_p[3],electronicCommutator.fire_p[4],electronicCommutator.fire_p[5],electronicCommutator.fire_n[1],electronicCommutator.fire_n[2],electronicCommutator.fire_n[3],electronicCommutator.fire_n[4],electronicCommutator.fire_n[5],sinCosEvaluation.integralController.local_reset) * Number of discrete states: 0 () * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for initialization (59): * Single equations (assignments): 58 * 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 prepare postOptimizeDAE: time 0.1684/0.2863, allocations: 265.8 kB / 423.9 MB, free: 47.3 MB / 350.1 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.0002492/0.2865, allocations: 64.45 kB / 424 MB, free: 47.3 MB / 350.1 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.001838/0.2884, allocations: 0.6209 MB / 424.6 MB, free: 47.26 MB / 350.1 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 1.406e-05/0.2884, allocations: 5.953 kB / 424.6 MB, free: 47.26 MB / 350.1 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 7.274e-06/0.2884, allocations: 0.7188 kB / 424.6 MB, free: 47.26 MB / 350.1 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 8.005e-06/0.2884, allocations: 4.406 kB / 424.6 MB, free: 47.26 MB / 350.1 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.002435/0.2909, allocations: 1.353 MB / 426 MB, free: 46.96 MB / 350.1 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 4.428e-06/0.2909, allocations: 3.516 kB / 426 MB, free: 46.96 MB / 350.1 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0002571/0.2912, allocations: 61.36 kB / 426 MB, free: 46.96 MB / 350.1 MB Notification: Performance of postOpt tearingSystem (simulation): time 1.914e-05/0.2912, allocations: 3.188 kB / 426 MB, free: 46.96 MB / 350.1 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 4.47e-05/0.2913, allocations: 16.38 kB / 426 MB, free: 46.96 MB / 350.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 4.89e-06/0.2913, allocations: 3.344 kB / 426 MB, free: 46.96 MB / 350.1 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 1.673e-06/0.2913, allocations: 0 / 426 MB, free: 46.96 MB / 350.1 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.001948/0.2932, allocations: 0.958 MB / 427 MB, free: 46.82 MB / 350.1 MB Notification: Performance of postOpt removeConstants (simulation): time 0.0002579/0.2935, allocations: 206.6 kB / 427.2 MB, free: 46.7 MB / 350.1 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 0.0001051/0.2936, allocations: 10.16 kB / 427.2 MB, free: 46.7 MB / 350.1 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.000521/0.2941, allocations: 106 kB / 427.3 MB, free: 46.7 MB / 350.1 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0002344/0.2944, allocations: 127.6 kB / 427.4 MB, free: 46.7 MB / 350.1 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 3.938e-05/0.2944, allocations: 17.17 kB / 427.5 MB, free: 46.7 MB / 350.1 MB Notification: Performance of sorting global known variables: time 0.0006899/0.2951, allocations: 0.5267 MB / 428 MB, free: 46.61 MB / 350.1 MB Notification: Performance of sort global known variables: time 2.41e-07/0.2951, allocations: 0 / 428 MB, free: 46.61 MB / 350.1 MB Notification: Performance of remove unused functions: time 0.0005758/0.2957, allocations: 151 kB / 428.1 MB, free: 46.6 MB / 350.1 MB Notification: Model statistics after passing the back-end for simulation: * Number of independent subsystems: 1 * Number of states: 2 (constantSpeed.phi,sinCosEvaluation.integralController.y) * Number of discrete variables: 15 (hallSensor.yC[1],hallSensor.yC[2],hallSensor.yC[3],hallSensor.yC[4],hallSensor.yC[5],electronicCommutator.fire_p[1],electronicCommutator.fire_p[2],electronicCommutator.fire_p[3],electronicCommutator.fire_p[4],electronicCommutator.fire_p[5],electronicCommutator.fire_n[1],electronicCommutator.fire_n[2],electronicCommutator.fire_n[3],electronicCommutator.fire_n[4],electronicCommutator.fire_n[5]) * Number of discrete states: 0 () * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for simulation (45): * Single equations (assignments): 44 * 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.0002364/0.296, allocations: 149 kB / 428.3 MB, free: 46.51 MB / 350.1 MB Notification: Performance of simCode: created initialization part: time 0.001374/0.2973, allocations: 0.5244 MB / 428.8 MB, free: 46.5 MB / 350.1 MB Notification: Performance of simCode: created event and clocks part: time 3.677e-06/0.2974, allocations: 3.625 kB / 428.8 MB, free: 46.5 MB / 350.1 MB Notification: Performance of simCode: created simulation system equations: time 0.0006099/0.298, allocations: 292.8 kB / 429.1 MB, free: 46.49 MB / 350.1 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0005806/0.2986, allocations: 61.53 kB / 429.2 MB, free: 46.49 MB / 350.1 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.002278/0.3009, allocations: 1.447 MB / 430.6 MB, free: 45.85 MB / 350.1 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0004521/0.3013, allocations: 0.9359 MB / 431.5 MB, free: 45.14 MB / 350.1 MB Notification: Performance of simCode: alias equations: time 0.0005264/0.3019, allocations: 192.9 kB / 431.7 MB, free: 45.12 MB / 350.1 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0001731/0.3021, allocations: 57.97 kB / 431.8 MB, free: 45.12 MB / 350.1 MB Notification: Performance of SimCode: time 7.21e-07/0.3021, allocations: 0 / 431.8 MB, free: 45.12 MB / 350.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..