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/BLDC 1.9.0/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/ModelicaServices 4.0.0+maint.om/package.mo", uses=false) Using package ModelicaServices with version 4.0.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/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 BLDC with version 1.9.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/BLDC 1.9.0/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/BLDC 1.9.0/package.mo): time 0.02394/0.02394, allocations: 2.58 MB / 17.55 MB, free: 4.746 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.001019/0.001019, allocations: 170.5 kB / 19 MB, free: 3.867 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.44/1.44, allocations: 223.3 MB / 243.6 MB, free: 13.02 MB / 206.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.0008825/0.0008826, allocations: 92.98 kB / 295.4 MB, free: 11.37 MB / 238.1 MB Notification: Performance of FrontEnd - loaded program: time 0.000415/0.0004151, allocations: 16 kB / 357 MB, free: 13.78 MB / 302.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.2487/0.2491, allocations: 51.02 MB / 408 MB, free: 32.59 MB / 302.1 MB Notification: Performance of NFInst.instantiate(BLDC.Examples.DemoElectronicCommutator): time 0.002861/0.252, allocations: 2.541 MB / 410.5 MB, free: 30.04 MB / 302.1 MB Notification: Performance of NFInst.instExpressions: time 0.002114/0.2542, allocations: 1.213 MB / 411.7 MB, free: 28.83 MB / 302.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.0004334/0.2546, allocations: 8 kB / 411.8 MB, free: 28.82 MB / 302.1 MB Notification: Performance of NFTyping.typeComponents: time 0.0003644/0.255, allocations: 71.42 kB / 411.8 MB, free: 28.75 MB / 302.1 MB Notification: Performance of NFTyping.typeBindings: time 0.001097/0.2561, allocations: 350.6 kB / 412.2 MB, free: 28.41 MB / 302.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.0003136/0.2565, allocations: 123.8 kB / 412.3 MB, free: 28.29 MB / 302.1 MB Notification: Performance of NFFlatten.flatten: time 0.000845/0.2573, allocations: 0.772 MB / 413.1 MB, free: 27.51 MB / 302.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0003595/0.2577, allocations: 286.9 kB / 413.3 MB, free: 27.23 MB / 302.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0001746/0.2579, allocations: 195.1 kB / 413.5 MB, free: 27.04 MB / 302.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0002799/0.2582, allocations: 290.8 kB / 413.8 MB, free: 26.75 MB / 302.1 MB Notification: Performance of NFPackage.collectConstants: time 4.328e-05/0.2582, allocations: 16 kB / 413.8 MB, free: 26.74 MB / 302.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0002053/0.2584, allocations: 99.88 kB / 413.9 MB, free: 26.64 MB / 302.1 MB Notification: Performance of NFScalarize.scalarize: time 0.0001313/0.2586, allocations: 179.4 kB / 414.1 MB, free: 26.46 MB / 302.1 MB Notification: Performance of NFVerifyModel.verify: time 7.978e-05/0.2587, allocations: 137.3 kB / 414.2 MB, free: 26.32 MB / 302.1 MB Notification: Performance of NFConvertDAE.convert: time 0.0004487/0.2591, allocations: 0.6102 MB / 414.8 MB, free: 25.71 MB / 302.1 MB Notification: Performance of FrontEnd - DAE generated: time 4.899e-06/0.2591, allocations: 0 / 414.8 MB, free: 25.71 MB / 302.1 MB Notification: Performance of FrontEnd: time 1.463e-06/0.2591, allocations: 0 / 414.8 MB, free: 25.71 MB / 302.1 MB Notification: Performance of Transformations before backend: time 8.445e-06/0.2592, allocations: 0 / 414.8 MB, free: 25.71 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: 143 * Number of variables: 143 Notification: Performance of Generate backend data structure: time 0.002183/0.2613, allocations: 1.142 MB / 416 MB, free: 24.52 MB / 302.1 MB Notification: Performance of prepare preOptimizeDAE: time 4.816e-05/0.2614, allocations: 12.03 kB / 416 MB, free: 24.51 MB / 302.1 MB Notification: Performance of preOpt introduceOutputAliases (simulation): time 0.0001149/0.2615, allocations: 98.52 kB / 416.1 MB, free: 24.4 MB / 302.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0001684/0.2617, allocations: 86.95 kB / 416.2 MB, free: 24.32 MB / 302.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0007616/0.2625, allocations: 0.6021 MB / 416.8 MB, free: 23.67 MB / 302.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 2.468e-05/0.2625, allocations: 41.31 kB / 416.8 MB, free: 23.63 MB / 302.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 7.065e-05/0.2626, allocations: 48 kB / 416.9 MB, free: 23.59 MB / 302.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.001122/0.2637, allocations: 0.7261 MB / 417.6 MB, free: 22.84 MB / 302.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 1.898e-05/0.2637, allocations: 7.906 kB / 417.6 MB, free: 22.83 MB / 302.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 5.048e-05/0.2638, allocations: 24 kB / 417.6 MB, free: 22.81 MB / 302.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 4.661e-05/0.2639, allocations: 37.3 kB / 417.7 MB, free: 22.77 MB / 302.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.001228/0.2651, allocations: 0.6179 MB / 418.3 MB, free: 22.15 MB / 302.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.002948/0.268, allocations: 2.273 MB / 420.6 MB, free: 19.81 MB / 302.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.001293/0.2694, allocations: 0.5534 MB / 421.1 MB, free: 19.25 MB / 302.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0005049/0.2699, allocations: 256.7 kB / 421.4 MB, free: 18.99 MB / 302.1 MB Notification: Performance of preOpt evalFunc (simulation): time 0.000137/0.27, allocations: 178.2 kB / 421.5 MB, free: 18.78 MB / 302.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 1.968e-05/0.27, allocations: 38.56 kB / 421.6 MB, free: 18.73 MB / 302.1 MB Notification: Performance of pre-optimization done (n=44): time 3.036e-06/0.27, allocations: 0 / 421.6 MB, free: 18.73 MB / 302.1 MB Notification: Performance of matching and sorting (n=44): time 0.00167/0.2717, allocations: 0.7198 MB / 422.3 MB, free: 18.01 MB / 302.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 3.253e-05/0.2718, allocations: 59.39 kB / 422.3 MB, free: 17.94 MB / 302.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0007714/0.2725, allocations: 0.7293 MB / 423.1 MB, free: 17.2 MB / 302.1 MB Notification: Performance of collectPreVariables (initialization): time 3.481e-05/0.2726, allocations: 37.64 kB / 423.1 MB, free: 17.15 MB / 302.1 MB Notification: Performance of collectInitialEqns (initialization): time 0.0001808/0.2728, allocations: 327.8 kB / 423.4 MB, free: 16.83 MB / 302.1 MB Notification: Performance of collectInitialBindings (initialization): time 8.386e-05/0.2729, allocations: 130.2 kB / 423.6 MB, free: 16.7 MB / 302.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 2.97e-05/0.2729, allocations: 12.11 kB / 423.6 MB, free: 16.69 MB / 302.1 MB Notification: Performance of setup shared object (initialization): time 0.0001003/0.273, allocations: 374.7 kB / 423.9 MB, free: 16.31 MB / 302.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0004854/0.2735, allocations: 221 kB / 424.2 MB, free: 16.09 MB / 302.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0005255/0.274, allocations: 343.1 kB / 424.5 MB, free: 15.71 MB / 302.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.0004784/0.2745, allocations: 217.1 kB / 424.7 MB, free: 15.5 MB / 302.1 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 2.855e-06/0.2745, allocations: 4 kB / 424.7 MB, free: 15.5 MB / 302.1 MB Notification: Performance of matching and sorting (n=60) (initialization): time 0.001199/0.2757, allocations: 0.6077 MB / 425.3 MB, free: 14.88 MB / 302.1 MB Notification: Performance of prepare postOptimizeDAE: time 2.231e-05/0.2758, allocations: 6.344 kB / 425.3 MB, free: 14.88 MB / 302.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.09e-05/0.2758, allocations: 4.469 kB / 425.3 MB, free: 14.88 MB / 302.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 2.056e-05/0.2758, allocations: 12 kB / 425.3 MB, free: 14.86 MB / 302.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0002736/0.2761, allocations: 83.83 kB / 425.4 MB, free: 14.78 MB / 302.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.124e-05/0.2761, allocations: 8 kB / 425.4 MB, free: 14.77 MB / 302.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0004422/0.2766, allocations: 123.3 kB / 425.5 MB, free: 14.65 MB / 302.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 4.718e-05/0.2766, allocations: 27.98 kB / 425.6 MB, free: 14.62 MB / 302.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.0002669/0.2769, allocations: 263.8 kB / 425.8 MB, free: 14.36 MB / 302.1 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.0001204/0.277, allocations: 63.16 kB / 425.9 MB, free: 14.3 MB / 302.1 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.001289/0.2783, allocations: 0.6279 MB / 426.5 MB, free: 13.66 MB / 302.1 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 7.845e-06/0.2783, allocations: 8 kB / 426.5 MB, free: 13.66 MB / 302.1 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 5.02e-06/0.2783, allocations: 0 / 426.5 MB, free: 13.66 MB / 302.1 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 7.083e-06/0.2784, allocations: 4 kB / 426.5 MB, free: 13.65 MB / 302.1 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.001967/0.2803, allocations: 1.357 MB / 427.9 MB, free: 12.24 MB / 302.1 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 2.846e-06/0.2804, allocations: 0 / 427.9 MB, free: 12.24 MB / 302.1 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0002241/0.2806, allocations: 63.89 kB / 428 MB, free: 12.18 MB / 302.1 MB Notification: Performance of postOpt tearingSystem (simulation): time 4.458e-06/0.2806, allocations: 0 / 428 MB, free: 12.18 MB / 302.1 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 3.582e-05/0.2806, allocations: 15.98 kB / 428 MB, free: 12.16 MB / 302.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 4.077e-06/0.2806, allocations: 4 kB / 428 MB, free: 12.16 MB / 302.1 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 1.503e-06/0.2807, allocations: 0 / 428 MB, free: 12.16 MB / 302.1 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.001675/0.2823, allocations: 0.9566 MB / 428.9 MB, free: 11.18 MB / 302.1 MB Notification: Performance of postOpt removeConstants (simulation): time 0.0002076/0.2825, allocations: 208.2 kB / 429.1 MB, free: 10.96 MB / 302.1 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 7.257e-05/0.2826, allocations: 7.984 kB / 429.1 MB, free: 10.95 MB / 302.1 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0004498/0.2831, allocations: 104 kB / 429.2 MB, free: 10.85 MB / 302.1 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0002229/0.2833, allocations: 115.8 kB / 429.4 MB, free: 10.74 MB / 302.1 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 3.474e-05/0.2834, allocations: 19.98 kB / 429.4 MB, free: 10.72 MB / 302.1 MB Notification: Performance of sorting global known variables: time 0.0005868/0.284, allocations: 0.5261 MB / 429.9 MB, free: 10.2 MB / 302.1 MB Notification: Performance of sort global known variables: time 1.91e-07/0.284, allocations: 3.938 kB / 429.9 MB, free: 10.19 MB / 302.1 MB Notification: Performance of remove unused functions: time 0.0004855/0.2845, allocations: 163.5 kB / 430.1 MB, free: 10.03 MB / 302.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.001972/0.2864, allocations: 1.542 MB / 431.6 MB, free: 8.453 MB / 302.1 MB Notification: Performance of simCode: created initialization part: time 0.001131/0.2876, allocations: 0.523 MB / 432.1 MB, free: 7.93 MB / 302.1 MB Notification: Performance of simCode: created event and clocks part: time 3.607e-06/0.2876, allocations: 4 kB / 432.1 MB, free: 7.926 MB / 302.1 MB Notification: Performance of simCode: created simulation system equations: time 0.0005397/0.2881, allocations: 279.7 kB / 432.4 MB, free: 7.652 MB / 302.1 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.000487/0.2886, allocations: 70.22 kB / 432.5 MB, free: 7.582 MB / 302.1 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.006328/0.295, allocations: 4.494 MB / 437 MB, free: 2.992 MB / 302.1 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0003378/0.2953, allocations: 0.9422 MB / 437.9 MB, free: 2.023 MB / 302.1 MB Notification: Performance of simCode: alias equations: time 0.0004524/0.2958, allocations: 184.5 kB / 438.1 MB, free: 1.84 MB / 302.1 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0002904/0.2961, allocations: 247.3 kB / 438.3 MB, free: 1.598 MB / 302.1 MB Notification: Performance of SimCode: time 2.204e-06/0.2961, allocations: 0 / 438.3 MB, free: 1.598 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..