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: "" <> buildModelFMU(BLDC.Examples.DemoElectronicCommutator,fileNamePrefix="BLDC_BLDC_Examples_DemoElectronicCommutator",fmuType="me",version="2.0",platforms={"static"}) "" <> buildModelFMU(BLDC.Examples.DemoElectronicCommutator,fileNamePrefix="BLDC_BLDC_Examples_DemoElectronicCommutator",fmuType="me",version="2.0",platforms={"static"}) Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.0009759/0.000976, allocations: 99.86 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.001127/0.001127, allocations: 177.3 kB / 15.95 MB, free: 216 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.397/1.397, allocations: 223.2 MB / 239.9 MB, free: 5.457 MB / 190.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/BLDC 1.9.0/package.mo): time 0.1347/0.1347, allocations: 2.561 MB / 293.5 MB, free: 4.125 MB / 238.1 MB Notification: Performance of FrontEnd - loaded program: time 0.0004476/0.0004477, allocations: 16 kB / 355.1 MB, free: 4.863 MB / 286.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.1188/0.1193, allocations: 51.01 MB / 406.2 MB, free: 1.801 MB / 334.1 MB Notification: Performance of NFInst.instantiate(BLDC.Examples.DemoElectronicCommutator): time 0.002944/0.1223, allocations: 2.48 MB / 408.6 MB, free: 15.31 MB / 350.1 MB Notification: Performance of NFInst.instExpressions: time 0.001949/0.1243, allocations: 1.22 MB / 409.9 MB, free: 14.09 MB / 350.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.0001946/0.1245, allocations: 7.938 kB / 409.9 MB, free: 14.08 MB / 350.1 MB Notification: Performance of NFTyping.typeComponents: time 0.0002224/0.1247, allocations: 63.55 kB / 409.9 MB, free: 14.02 MB / 350.1 MB Notification: Performance of NFTyping.typeBindings: time 0.0009087/0.1256, allocations: 350.8 kB / 410.3 MB, free: 13.67 MB / 350.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.0003058/0.1259, allocations: 131.7 kB / 410.4 MB, free: 13.54 MB / 350.1 MB Notification: Performance of NFFlatten.flatten: time 0.0007565/0.1267, allocations: 0.4996 MB / 410.9 MB, free: 13.04 MB / 350.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0003827/0.1271, allocations: 279 kB / 411.2 MB, free: 12.77 MB / 350.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0001889/0.1273, allocations: 179.2 kB / 411.3 MB, free: 12.59 MB / 350.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0002845/0.1276, allocations: 254.9 kB / 411.6 MB, free: 12.34 MB / 350.1 MB Notification: Performance of NFPackage.collectConstants: time 4.483e-05/0.1277, allocations: 20 kB / 411.6 MB, free: 12.32 MB / 350.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0001968/0.1279, allocations: 87.88 kB / 411.7 MB, free: 12.23 MB / 350.1 MB Notification: Performance of NFScalarize.scalarize: time 0.000154/0.128, allocations: 171.4 kB / 411.9 MB, free: 12.07 MB / 350.1 MB Notification: Performance of NFVerifyModel.verify: time 0.0001001/0.1281, allocations: 137.3 kB / 412 MB, free: 11.93 MB / 350.1 MB Notification: Performance of NFConvertDAE.convert: time 0.0005602/0.1287, allocations: 0.6122 MB / 412.6 MB, free: 11.31 MB / 350.1 MB Notification: Performance of FrontEnd - DAE generated: time 2.505e-06/0.1287, allocations: 3.938 kB / 412.6 MB, free: 11.31 MB / 350.1 MB Notification: Performance of FrontEnd: time 1.934e-06/0.1287, allocations: 0 / 412.6 MB, free: 11.31 MB / 350.1 MB Notification: Performance of Transformations before backend: time 8.626e-06/0.1287, allocations: 0 / 412.6 MB, free: 11.31 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.002596/0.1313, allocations: 1.14 MB / 413.8 MB, free: 10.12 MB / 350.1 MB Notification: Performance of prepare preOptimizeDAE: time 3.903e-05/0.1314, allocations: 8.031 kB / 413.8 MB, free: 10.11 MB / 350.1 MB Notification: Performance of preOpt introduceOutputAliases (simulation): time 0.0001219/0.1315, allocations: 94.52 kB / 413.9 MB, free: 10.01 MB / 350.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0001936/0.1317, allocations: 90.94 kB / 413.9 MB, free: 9.918 MB / 350.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0009761/0.1327, allocations: 0.602 MB / 414.5 MB, free: 9.273 MB / 350.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 3.21e-05/0.1327, allocations: 37.31 kB / 414.6 MB, free: 9.238 MB / 350.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 7.799e-05/0.1328, allocations: 52 kB / 414.6 MB, free: 9.188 MB / 350.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.001305/0.1341, allocations: 0.7145 MB / 415.3 MB, free: 8.453 MB / 350.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 1.797e-05/0.1342, allocations: 7.859 kB / 415.4 MB, free: 8.445 MB / 350.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 5.714e-05/0.1342, allocations: 27.98 kB / 415.4 MB, free: 8.418 MB / 350.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 5.127e-05/0.1343, allocations: 37.3 kB / 415.4 MB, free: 8.379 MB / 350.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.00156/0.1359, allocations: 0.6256 MB / 416 MB, free: 7.754 MB / 350.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.003898/0.1398, allocations: 2.25 MB / 418.3 MB, free: 5.434 MB / 350.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.001623/0.1414, allocations: 0.5533 MB / 418.8 MB, free: 4.867 MB / 350.1 MB Notification: Performance of preOpt evalFunc (simulation): time 0.0001905/0.1416, allocations: 178.2 kB / 419 MB, free: 4.656 MB / 350.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 4.455e-05/0.1417, allocations: 38.5 kB / 419.1 MB, free: 4.609 MB / 350.1 MB Notification: Performance of pre-optimization done (n=44): time 2.264e-06/0.1417, allocations: 0 / 419.1 MB, free: 4.609 MB / 350.1 MB Notification: Performance of matching and sorting (n=44): time 0.002182/0.1439, allocations: 0.799 MB / 419.9 MB, free: 3.785 MB / 350.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 4.997e-05/0.1439, allocations: 55.52 kB / 419.9 MB, free: 3.719 MB / 350.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.001054/0.145, allocations: 0.7371 MB / 420.6 MB, free: 2.973 MB / 350.1 MB Notification: Performance of collectPreVariables (initialization): time 5.214e-05/0.145, allocations: 37.7 kB / 420.7 MB, free: 2.93 MB / 350.1 MB Notification: Performance of collectInitialEqns (initialization): time 0.0002635/0.1453, allocations: 311.9 kB / 421 MB, free: 2.621 MB / 350.1 MB Notification: Performance of collectInitialBindings (initialization): time 0.0001293/0.1455, allocations: 138.1 kB / 421.1 MB, free: 2.484 MB / 350.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 2.963e-05/0.1455, allocations: 12 kB / 421.1 MB, free: 2.473 MB / 350.1 MB Notification: Performance of setup shared object (initialization): time 0.0001839/0.1457, allocations: 374.7 kB / 421.5 MB, free: 2.098 MB / 350.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0006109/0.1463, allocations: 221 kB / 421.7 MB, free: 1.883 MB / 350.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0006979/0.147, allocations: 339.1 kB / 422.1 MB, free: 1.504 MB / 350.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.000598/0.1476, allocations: 217.1 kB / 422.3 MB, free: 1.289 MB / 350.1 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 3.447e-06/0.1476, allocations: 0 / 422.3 MB, free: 1.289 MB / 350.1 MB Notification: Performance of matching and sorting (n=60) (initialization): time 0.001538/0.1492, allocations: 0.6119 MB / 422.9 MB, free: 0.6719 MB / 350.1 MB Notification: Performance of prepare postOptimizeDAE: time 2.308e-05/0.1492, allocations: 4 kB / 422.9 MB, free: 0.668 MB / 350.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.484e-05/0.1492, allocations: 7.984 kB / 422.9 MB, free: 0.6602 MB / 350.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 2.343e-05/0.1493, allocations: 8 kB / 422.9 MB, free: 0.6523 MB / 350.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0003287/0.1496, allocations: 87.81 kB / 423 MB, free: 0.5664 MB / 350.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.539e-05/0.1496, allocations: 8 kB / 423 MB, free: 0.5586 MB / 350.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0005752/0.1502, allocations: 119.5 kB / 423.1 MB, free: 452 kB / 350.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 5.062e-05/0.1503, allocations: 27.98 kB / 423.1 MB, free: 424 kB / 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.0003585/0.1506, allocations: 271.8 kB / 423.4 MB, free: 144 kB / 350.1 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.0001459/0.1508, allocations: 67.09 kB / 423.5 MB, free: 76 kB / 350.1 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.2947/0.4455, allocations: 0.6125 MB / 424.1 MB, free: 47.37 MB / 350.1 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 1.46e-05/0.4456, allocations: 4.688 kB / 424.1 MB, free: 47.37 MB / 350.1 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 5.901e-06/0.4456, allocations: 0.9062 kB / 424.1 MB, free: 47.37 MB / 350.1 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 9.268e-06/0.4456, allocations: 4.375 kB / 424.1 MB, free: 47.37 MB / 350.1 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.002619/0.4482, allocations: 1.351 MB / 425.4 MB, free: 47.07 MB / 350.1 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 4.338e-06/0.4482, allocations: 0 / 425.4 MB, free: 47.07 MB / 350.1 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.000241/0.4485, allocations: 62.08 kB / 425.5 MB, free: 47.07 MB / 350.1 MB Notification: Performance of postOpt tearingSystem (simulation): time 8.807e-06/0.4485, allocations: 6.328 kB / 425.5 MB, free: 47.07 MB / 350.1 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 3.7e-05/0.4486, allocations: 16.39 kB / 425.5 MB, free: 47.07 MB / 350.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 5.751e-06/0.4486, allocations: 3.312 kB / 425.5 MB, free: 47.07 MB / 350.1 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 1.623e-06/0.4486, allocations: 2.188 kB / 425.5 MB, free: 47.07 MB / 350.1 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.001952/0.4505, allocations: 0.95 MB / 426.5 MB, free: 46.93 MB / 350.1 MB Notification: Performance of postOpt removeConstants (simulation): time 0.0002786/0.4508, allocations: 210 kB / 426.7 MB, free: 46.81 MB / 350.1 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 8.002e-05/0.4509, allocations: 9.156 kB / 426.7 MB, free: 46.81 MB / 350.1 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0005424/0.4515, allocations: 104 kB / 426.8 MB, free: 46.81 MB / 350.1 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0002366/0.4517, allocations: 124.4 kB / 426.9 MB, free: 46.81 MB / 350.1 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 3.784e-05/0.4517, allocations: 22.94 kB / 426.9 MB, free: 46.81 MB / 350.1 MB Notification: Performance of sorting global known variables: time 0.0006856/0.4524, allocations: 0.5224 MB / 427.5 MB, free: 46.72 MB / 350.1 MB Notification: Performance of sort global known variables: time 2.41e-07/0.4524, allocations: 3.25 kB / 427.5 MB, free: 46.72 MB / 350.1 MB Notification: Performance of remove unused functions: time 0.0005298/0.453, allocations: 151.4 kB / 427.6 MB, free: 46.71 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.002298/0.4553, allocations: 1.534 MB / 429.1 MB, free: 46.01 MB / 350.1 MB Notification: Performance of simCode: created initialization part: time 0.001266/0.4566, allocations: 0.5292 MB / 429.7 MB, free: 46 MB / 350.1 MB Notification: Performance of simCode: created event and clocks part: time 2.585e-06/0.4566, allocations: 0 / 429.7 MB, free: 46 MB / 350.1 MB Notification: Performance of simCode: created simulation system equations: time 0.0005922/0.4572, allocations: 286.4 kB / 430 MB, free: 45.99 MB / 350.1 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0003755/0.4576, allocations: 59.42 kB / 430 MB, free: 45.99 MB / 350.1 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.007597/0.4652, allocations: 6.692 MB / 436.7 MB, free: 42.34 MB / 350.1 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0004309/0.4656, allocations: 0.9628 MB / 437.7 MB, free: 41.61 MB / 350.1 MB Notification: Performance of simCode: alias equations: time 0.0004804/0.4661, allocations: 186.1 kB / 437.8 MB, free: 41.6 MB / 350.1 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0003102/0.4664, allocations: 236.8 kB / 438.1 MB, free: 41.42 MB / 350.1 MB Notification: Performance of SimCode: time 2.224e-06/0.4664, allocations: 0 / 438.1 MB, free: 41.42 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..