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.001582/0.001582, allocations: 99.55 kB / 15.05 MB, free: 1.105 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.001998/0.001998, allocations: 177.3 kB / 15.94 MB, free: 228 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.38/1.38, allocations: 223.2 MB / 239.9 MB, free: 5.328 MB / 190.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/BLDC 1.9.0/package.mo): time 0.1268/0.1268, allocations: 2.558 MB / 293.5 MB, free: 4.191 MB / 238.1 MB Notification: Performance of FrontEnd - loaded program: time 0.0003931/0.0003932, allocations: 23.98 kB / 355.1 MB, free: 4.914 MB / 286.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.104/0.1044, allocations: 51 MB / 406.1 MB, free: 1.863 MB / 334.1 MB Notification: Performance of NFInst.instantiate(BLDC.Examples.DemoElectronicCommutator): time 0.003839/0.1083, allocations: 2.48 MB / 408.5 MB, free: 15.37 MB / 350.1 MB Notification: Performance of NFInst.instExpressions: time 0.002445/0.1108, allocations: 1.216 MB / 409.8 MB, free: 14.15 MB / 350.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.0003242/0.1111, allocations: 15.88 kB / 409.8 MB, free: 14.14 MB / 350.1 MB Notification: Performance of NFTyping.typeComponents: time 0.0003283/0.1115, allocations: 71.53 kB / 409.8 MB, free: 14.07 MB / 350.1 MB Notification: Performance of NFTyping.typeBindings: time 0.00128/0.1128, allocations: 346.9 kB / 410.2 MB, free: 13.73 MB / 350.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.0003497/0.1131, allocations: 119.8 kB / 410.3 MB, free: 13.61 MB / 350.1 MB Notification: Performance of NFFlatten.flatten: time 0.001167/0.1143, allocations: 0.5034 MB / 410.8 MB, free: 13.11 MB / 350.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0005691/0.1149, allocations: 298.9 kB / 411.1 MB, free: 12.81 MB / 350.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0003366/0.1152, allocations: 171.3 kB / 411.3 MB, free: 12.64 MB / 350.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0004639/0.1157, allocations: 254.9 kB / 411.5 MB, free: 12.39 MB / 350.1 MB Notification: Performance of NFPackage.collectConstants: time 0.0001008/0.1158, allocations: 16 kB / 411.5 MB, free: 12.38 MB / 350.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.000318/0.1162, allocations: 91.88 kB / 411.6 MB, free: 12.29 MB / 350.1 MB Notification: Performance of NFScalarize.scalarize: time 0.0002106/0.1164, allocations: 163.5 kB / 411.8 MB, free: 12.12 MB / 350.1 MB Notification: Performance of NFVerifyModel.verify: time 0.0001643/0.1166, allocations: 137.3 kB / 411.9 MB, free: 11.98 MB / 350.1 MB Notification: Performance of NFConvertDAE.convert: time 0.0007045/0.1173, allocations: 0.616 MB / 412.5 MB, free: 11.37 MB / 350.1 MB Notification: Performance of FrontEnd - DAE generated: time 3.206e-06/0.1173, allocations: 0 / 412.5 MB, free: 11.37 MB / 350.1 MB Notification: Performance of FrontEnd: time 1.523e-06/0.1173, allocations: 0 / 412.5 MB, free: 11.37 MB / 350.1 MB Notification: Performance of Transformations before backend: time 3.189e-05/0.1173, allocations: 0 / 412.5 MB, free: 11.37 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.003388/0.1207, allocations: 1.122 MB / 413.6 MB, free: 10.19 MB / 350.1 MB Notification: Performance of prepare preOptimizeDAE: time 5.502e-05/0.1208, allocations: 12.03 kB / 413.7 MB, free: 10.18 MB / 350.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0004595/0.1213, allocations: 94.94 kB / 413.7 MB, free: 10.09 MB / 350.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.001372/0.1226, allocations: 0.5981 MB / 414.3 MB, free: 9.445 MB / 350.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 4.771e-05/0.1227, allocations: 37.3 kB / 414.4 MB, free: 9.41 MB / 350.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 0.0001048/0.1228, allocations: 48 kB / 414.4 MB, free: 9.363 MB / 350.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.001497/0.1243, allocations: 0.7144 MB / 415.1 MB, free: 8.629 MB / 350.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 1.772e-05/0.1243, allocations: 4 kB / 415.1 MB, free: 8.625 MB / 350.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 5.751e-05/0.1244, allocations: 23.95 kB / 415.2 MB, free: 8.602 MB / 350.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 5.607e-05/0.1245, allocations: 41.3 kB / 415.2 MB, free: 8.559 MB / 350.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.001563/0.126, allocations: 0.6257 MB / 415.8 MB, free: 7.934 MB / 350.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.004104/0.1302, allocations: 2.257 MB / 418.1 MB, free: 5.605 MB / 350.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.001619/0.1318, allocations: 0.5572 MB / 418.7 MB, free: 5.035 MB / 350.1 MB Notification: Performance of preOpt evalFunc (simulation): time 0.0001779/0.132, allocations: 178.2 kB / 418.8 MB, free: 4.824 MB / 350.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 3.325e-05/0.132, allocations: 38.56 kB / 418.9 MB, free: 4.777 MB / 350.1 MB Notification: Performance of pre-optimization done (n=44): time 2.575e-06/0.1321, allocations: 0 / 418.9 MB, free: 4.777 MB / 350.1 MB Notification: Performance of matching and sorting (n=44): time 0.002111/0.1342, allocations: 0.7912 MB / 419.7 MB, free: 3.961 MB / 350.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 5.001e-05/0.1342, allocations: 63.34 kB / 419.7 MB, free: 3.887 MB / 350.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.00101/0.1353, allocations: 0.7332 MB / 420.5 MB, free: 3.145 MB / 350.1 MB Notification: Performance of collectPreVariables (initialization): time 4.611e-05/0.1353, allocations: 37.64 kB / 420.5 MB, free: 3.102 MB / 350.1 MB Notification: Performance of collectInitialEqns (initialization): time 0.0002344/0.1356, allocations: 320 kB / 420.8 MB, free: 2.785 MB / 350.1 MB Notification: Performance of collectInitialBindings (initialization): time 0.0001192/0.1357, allocations: 138.1 kB / 420.9 MB, free: 2.648 MB / 350.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 2.871e-05/0.1357, allocations: 8.109 kB / 420.9 MB, free: 2.641 MB / 350.1 MB Notification: Performance of setup shared object (initialization): time 0.0001756/0.1359, allocations: 382.7 kB / 421.3 MB, free: 2.258 MB / 350.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0006276/0.1365, allocations: 217 kB / 421.5 MB, free: 2.047 MB / 350.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0007102/0.1372, allocations: 343.2 kB / 421.9 MB, free: 1.664 MB / 350.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.0005975/0.1379, allocations: 209.1 kB / 422.1 MB, free: 1.457 MB / 350.1 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 4.318e-06/0.1379, allocations: 0 / 422.1 MB, free: 1.457 MB / 350.1 MB Notification: Performance of matching and sorting (n=60) (initialization): time 0.001556/0.1394, allocations: 0.6116 MB / 422.7 MB, free: 0.8398 MB / 350.1 MB Notification: Performance of prepare postOptimizeDAE: time 2.525e-05/0.1395, allocations: 8 kB / 422.7 MB, free: 0.832 MB / 350.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.194e-05/0.1395, allocations: 0 / 422.7 MB, free: 0.832 MB / 350.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 2.123e-05/0.1395, allocations: 8 kB / 422.7 MB, free: 0.8242 MB / 350.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0003265/0.1398, allocations: 96.28 kB / 422.8 MB, free: 0.7305 MB / 350.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.503e-05/0.1399, allocations: 7.938 kB / 422.8 MB, free: 0.7227 MB / 350.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0006027/0.1405, allocations: 127.4 kB / 422.9 MB, free: 0.5977 MB / 350.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 5.087e-05/0.1405, allocations: 23.98 kB / 422.9 MB, free: 0.5742 MB / 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.0003913/0.1409, allocations: 271.8 kB / 423.2 MB, free: 308 kB / 350.1 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.0001508/0.1411, allocations: 67.16 kB / 423.3 MB, free: 240 kB / 350.1 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.2552/0.3963, allocations: 0.6107 MB / 423.9 MB, free: 47.71 MB / 350.1 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 2.328e-05/0.3963, allocations: 5.422 kB / 423.9 MB, free: 47.71 MB / 350.1 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 1.243e-05/0.3964, allocations: 0.7812 kB / 423.9 MB, free: 47.71 MB / 350.1 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 1.238e-05/0.3964, allocations: 2.391 kB / 423.9 MB, free: 47.71 MB / 350.1 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.00305/0.3994, allocations: 1.345 MB / 425.2 MB, free: 47.41 MB / 350.1 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 4.228e-06/0.3995, allocations: 0.5938 kB / 425.2 MB, free: 47.41 MB / 350.1 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0002397/0.3997, allocations: 57.83 kB / 425.3 MB, free: 47.41 MB / 350.1 MB Notification: Performance of postOpt tearingSystem (simulation): time 9.718e-06/0.3997, allocations: 2.422 kB / 425.3 MB, free: 47.41 MB / 350.1 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 4.059e-05/0.3998, allocations: 19.7 kB / 425.3 MB, free: 47.41 MB / 350.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 4.979e-06/0.3998, allocations: 3.359 kB / 425.3 MB, free: 47.41 MB / 350.1 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 2.655e-06/0.3998, allocations: 0 / 425.3 MB, free: 47.41 MB / 350.1 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.002035/0.4018, allocations: 0.9541 MB / 426.3 MB, free: 47.26 MB / 350.1 MB Notification: Performance of postOpt removeConstants (simulation): time 0.000316/0.4022, allocations: 215 kB / 426.5 MB, free: 47.15 MB / 350.1 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 8.798e-05/0.4023, allocations: 12.95 kB / 426.5 MB, free: 47.15 MB / 350.1 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0005338/0.4028, allocations: 105.1 kB / 426.6 MB, free: 47.15 MB / 350.1 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.000255/0.4031, allocations: 120.8 kB / 426.7 MB, free: 47.15 MB / 350.1 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 3.797e-05/0.4031, allocations: 18.86 kB / 426.7 MB, free: 47.15 MB / 350.1 MB Notification: Performance of sorting global known variables: time 0.0006946/0.4038, allocations: 0.5269 MB / 427.3 MB, free: 47.06 MB / 350.1 MB Notification: Performance of sort global known variables: time 1.5e-07/0.4038, allocations: 6.031 kB / 427.3 MB, free: 47.06 MB / 350.1 MB Notification: Performance of remove unused functions: time 0.0005564/0.4044, allocations: 143.4 kB / 427.4 MB, free: 47.05 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.0002353/0.4046, allocations: 142.2 kB / 427.5 MB, free: 46.96 MB / 350.1 MB Notification: Performance of simCode: created initialization part: time 0.001302/0.4059, allocations: 0.5277 MB / 428.1 MB, free: 46.96 MB / 350.1 MB Notification: Performance of simCode: created event and clocks part: time 3.707e-06/0.406, allocations: 5.875 kB / 428.1 MB, free: 46.96 MB / 350.1 MB Notification: Performance of simCode: created simulation system equations: time 0.0006874/0.4066, allocations: 286.4 kB / 428.4 MB, free: 46.95 MB / 350.1 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0004418/0.4071, allocations: 57.42 kB / 428.4 MB, free: 46.95 MB / 350.1 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.002541/0.4096, allocations: 1.447 MB / 429.9 MB, free: 46.32 MB / 350.1 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0004598/0.4101, allocations: 0.9557 MB / 430.8 MB, free: 45.61 MB / 350.1 MB Notification: Performance of simCode: alias equations: time 0.0005113/0.4106, allocations: 189.3 kB / 431 MB, free: 45.6 MB / 350.1 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0001536/0.4108, allocations: 56.41 kB / 431.1 MB, free: 45.59 MB / 350.1 MB Notification: Performance of SimCode: time 1.282e-06/0.4108, allocations: 0 / 431.1 MB, free: 45.59 MB / 350.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..