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.001024/0.001024, allocations: 86.72 kB / 15.06 MB, free: 1.09 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.001195/0.001195, allocations: 168.7 kB / 15.95 MB, free: 204 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.445/1.445, allocations: 223.2 MB / 240 MB, free: 5.402 MB / 190.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/BLDC 1.9.0/package.mo): time 0.1384/0.1384, allocations: 2.582 MB / 293.6 MB, free: 4.152 MB / 238.1 MB Notification: Performance of FrontEnd - loaded program: time 0.0004102/0.0004103, allocations: 16 kB / 355.3 MB, free: 4.781 MB / 286.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.1004/0.1009, allocations: 51.01 MB / 406.3 MB, free: 1.723 MB / 334.1 MB Notification: Performance of NFInst.instantiate(BLDC.Examples.DemoElectronicCommutator): time 0.0033/0.1042, allocations: 2.531 MB / 408.8 MB, free: 15.18 MB / 350.1 MB Notification: Performance of NFInst.instExpressions: time 0.002016/0.1063, allocations: 1.224 MB / 410 MB, free: 13.95 MB / 350.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.0001993/0.1065, allocations: 8 kB / 410 MB, free: 13.95 MB / 350.1 MB Notification: Performance of NFTyping.typeComponents: time 0.000273/0.1068, allocations: 71.44 kB / 410.1 MB, free: 13.88 MB / 350.1 MB Notification: Performance of NFTyping.typeBindings: time 0.0009432/0.1077, allocations: 354.6 kB / 410.4 MB, free: 13.53 MB / 350.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.0002697/0.108, allocations: 123.8 kB / 410.6 MB, free: 13.41 MB / 350.1 MB Notification: Performance of NFFlatten.flatten: time 0.001018/0.109, allocations: 0.7719 MB / 411.3 MB, free: 12.63 MB / 350.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0004141/0.1094, allocations: 294.9 kB / 411.6 MB, free: 12.34 MB / 350.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0002386/0.1097, allocations: 191.1 kB / 411.8 MB, free: 12.15 MB / 350.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0003898/0.1101, allocations: 294.8 kB / 412.1 MB, free: 11.86 MB / 350.1 MB Notification: Performance of NFPackage.collectConstants: time 4.868e-05/0.1102, allocations: 16 kB / 412.1 MB, free: 11.85 MB / 350.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0002097/0.1104, allocations: 99.88 kB / 412.2 MB, free: 11.75 MB / 350.1 MB Notification: Performance of NFScalarize.scalarize: time 0.0001846/0.1106, allocations: 179.3 kB / 412.4 MB, free: 11.57 MB / 350.1 MB Notification: Performance of NFVerifyModel.verify: time 0.0001101/0.1107, allocations: 137.3 kB / 412.5 MB, free: 11.43 MB / 350.1 MB Notification: Performance of NFConvertDAE.convert: time 0.0006125/0.1113, allocations: 0.6122 MB / 413.1 MB, free: 10.82 MB / 350.1 MB Notification: Performance of FrontEnd - DAE generated: time 4.469e-06/0.1113, allocations: 3.938 kB / 413.1 MB, free: 10.82 MB / 350.1 MB Notification: Performance of FrontEnd: time 1.382e-06/0.1113, allocations: 0 / 413.1 MB, free: 10.82 MB / 350.1 MB Notification: Performance of Transformations before backend: time 8.355e-06/0.1113, allocations: 0 / 413.1 MB, free: 10.82 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.002664/0.114, allocations: 1.13 MB / 414.3 MB, free: 9.633 MB / 350.1 MB Notification: Performance of prepare preOptimizeDAE: time 4.609e-05/0.1141, allocations: 12.03 kB / 414.3 MB, free: 9.621 MB / 350.1 MB Notification: Performance of preOpt introduceOutputAliases (simulation): time 0.0001268/0.1142, allocations: 98.52 kB / 414.4 MB, free: 9.516 MB / 350.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0001921/0.1144, allocations: 86.95 kB / 414.5 MB, free: 9.43 MB / 350.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0009335/0.1153, allocations: 0.606 MB / 415.1 MB, free: 8.781 MB / 350.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 3.955e-05/0.1154, allocations: 37.31 kB / 415.1 MB, free: 8.746 MB / 350.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 7.552e-05/0.1155, allocations: 51.94 kB / 415.2 MB, free: 8.695 MB / 350.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0013/0.1168, allocations: 0.7222 MB / 415.9 MB, free: 7.953 MB / 350.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 2.049e-05/0.1168, allocations: 7.859 kB / 415.9 MB, free: 7.945 MB / 350.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 5.454e-05/0.1169, allocations: 28 kB / 415.9 MB, free: 7.918 MB / 350.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 5.423e-05/0.1169, allocations: 37.3 kB / 415.9 MB, free: 7.879 MB / 350.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.001436/0.1184, allocations: 0.6179 MB / 416.6 MB, free: 7.262 MB / 350.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.003602/0.122, allocations: 2.273 MB / 418.8 MB, free: 4.918 MB / 350.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.001496/0.1235, allocations: 0.5494 MB / 419.4 MB, free: 4.355 MB / 350.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0006063/0.1241, allocations: 256.7 kB / 419.6 MB, free: 4.102 MB / 350.1 MB Notification: Performance of preOpt evalFunc (simulation): time 0.0001957/0.1243, allocations: 178.2 kB / 419.8 MB, free: 3.891 MB / 350.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 3.218e-05/0.1244, allocations: 38.5 kB / 419.8 MB, free: 3.844 MB / 350.1 MB Notification: Performance of pre-optimization done (n=44): time 1.933e-06/0.1244, allocations: 0 / 419.8 MB, free: 3.844 MB / 350.1 MB Notification: Performance of matching and sorting (n=44): time 0.001894/0.1263, allocations: 0.7237 MB / 420.6 MB, free: 3.113 MB / 350.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 4.536e-05/0.1263, allocations: 59.41 kB / 420.6 MB, free: 3.043 MB / 350.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0009791/0.1273, allocations: 0.7294 MB / 421.4 MB, free: 2.305 MB / 350.1 MB Notification: Performance of collectPreVariables (initialization): time 4.342e-05/0.1274, allocations: 37.7 kB / 421.4 MB, free: 2.262 MB / 350.1 MB Notification: Performance of collectInitialEqns (initialization): time 0.0002409/0.1276, allocations: 319.9 kB / 421.7 MB, free: 1.945 MB / 350.1 MB Notification: Performance of collectInitialBindings (initialization): time 0.0001346/0.1278, allocations: 138.1 kB / 421.8 MB, free: 1.809 MB / 350.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 2.997e-05/0.1278, allocations: 8 kB / 421.9 MB, free: 1.801 MB / 350.1 MB Notification: Performance of setup shared object (initialization): time 0.0001723/0.128, allocations: 374.7 kB / 422.2 MB, free: 1.426 MB / 350.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0005833/0.1286, allocations: 221 kB / 422.4 MB, free: 1.211 MB / 350.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0006492/0.1292, allocations: 347.1 kB / 422.8 MB, free: 0.8242 MB / 350.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.0005593/0.1298, allocations: 213.1 kB / 423 MB, free: 0.6133 MB / 350.1 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 5.21e-06/0.1298, allocations: 8 kB / 423 MB, free: 0.6055 MB / 350.1 MB Notification: Performance of matching and sorting (n=60) (initialization): time 0.2026/0.3324, allocations: 0.6059 MB / 423.6 MB, free: 47.22 MB / 350.1 MB Notification: Performance of prepare postOptimizeDAE: time 2.742e-05/0.3325, allocations: 3.75 kB / 423.6 MB, free: 47.22 MB / 350.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.657e-05/0.3325, allocations: 4.844 kB / 423.6 MB, free: 47.22 MB / 350.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 2.498e-05/0.3325, allocations: 7.906 kB / 423.6 MB, free: 47.22 MB / 350.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0004432/0.333, allocations: 84.8 kB / 423.7 MB, free: 47.22 MB / 350.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.67e-05/0.333, allocations: 7.969 kB / 423.7 MB, free: 47.22 MB / 350.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0006543/0.3337, allocations: 124.4 kB / 423.8 MB, free: 47.22 MB / 350.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 5.521e-05/0.3337, allocations: 26.59 kB / 423.8 MB, free: 47.22 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.0003946/0.3341, allocations: 263.2 kB / 424.1 MB, free: 47.11 MB / 350.1 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.0001626/0.3343, allocations: 66.7 kB / 424.2 MB, free: 47.11 MB / 350.1 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.001517/0.3358, allocations: 0.621 MB / 424.8 MB, free: 47.06 MB / 350.1 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 9.598e-06/0.3359, allocations: 4.469 kB / 424.8 MB, free: 47.06 MB / 350.1 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 4.959e-06/0.3359, allocations: 6.906 kB / 424.8 MB, free: 47.06 MB / 350.1 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 8.736e-06/0.3359, allocations: 2.062 kB / 424.8 MB, free: 47.06 MB / 350.1 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.002082/0.338, allocations: 1.362 MB / 426.2 MB, free: 46.76 MB / 350.1 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 3.186e-06/0.338, allocations: 0 / 426.2 MB, free: 46.76 MB / 350.1 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0002283/0.3382, allocations: 67.33 kB / 426.2 MB, free: 46.76 MB / 350.1 MB Notification: Performance of postOpt tearingSystem (simulation): time 4.378e-06/0.3382, allocations: 3.125 kB / 426.2 MB, free: 46.76 MB / 350.1 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 3.485e-05/0.3383, allocations: 13.81 kB / 426.2 MB, free: 46.76 MB / 350.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 2.665e-06/0.3383, allocations: 0 / 426.2 MB, free: 46.76 MB / 350.1 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 2.194e-06/0.3383, allocations: 7.844 kB / 426.3 MB, free: 46.76 MB / 350.1 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.001787/0.3401, allocations: 0.9494 MB / 427.2 MB, free: 46.61 MB / 350.1 MB Notification: Performance of postOpt removeConstants (simulation): time 0.0002018/0.3403, allocations: 210.3 kB / 427.4 MB, free: 46.48 MB / 350.1 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 7.435e-05/0.3404, allocations: 6.188 kB / 427.4 MB, free: 46.48 MB / 350.1 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.000471/0.3409, allocations: 104.4 kB / 427.5 MB, free: 46.48 MB / 350.1 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0002389/0.3411, allocations: 126 kB / 427.6 MB, free: 46.48 MB / 350.1 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 3.603e-05/0.3412, allocations: 16.3 kB / 427.7 MB, free: 46.48 MB / 350.1 MB Notification: Performance of sorting global known variables: time 0.0006782/0.3418, allocations: 0.5265 MB / 428.2 MB, free: 46.4 MB / 350.1 MB Notification: Performance of sort global known variables: time 1.1e-07/0.3418, allocations: 0 / 428.2 MB, free: 46.4 MB / 350.1 MB Notification: Performance of remove unused functions: time 0.0005358/0.3424, allocations: 148.8 kB / 428.3 MB, free: 46.39 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.002261/0.3447, allocations: 1.548 MB / 429.9 MB, free: 45.68 MB / 350.1 MB Notification: Performance of simCode: created initialization part: time 0.001189/0.3459, allocations: 0.5301 MB / 430.4 MB, free: 45.67 MB / 350.1 MB Notification: Performance of simCode: created event and clocks part: time 3.146e-06/0.3459, allocations: 3.344 kB / 430.4 MB, free: 45.67 MB / 350.1 MB Notification: Performance of simCode: created simulation system equations: time 0.0005579/0.3464, allocations: 285.6 kB / 430.7 MB, free: 45.66 MB / 350.1 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0005158/0.347, allocations: 64.41 kB / 430.8 MB, free: 45.66 MB / 350.1 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.006697/0.3537, allocations: 4.488 MB / 435.2 MB, free: 43.97 MB / 350.1 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0003606/0.3541, allocations: 0.951 MB / 436.2 MB, free: 43.23 MB / 350.1 MB Notification: Performance of simCode: alias equations: time 0.000463/0.3545, allocations: 187.9 kB / 436.4 MB, free: 43.21 MB / 350.1 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0002953/0.3548, allocations: 239.3 kB / 436.6 MB, free: 43.04 MB / 350.1 MB Notification: Performance of SimCode: time 6.72e-07/0.3548, allocations: 0 / 436.6 MB, free: 43.04 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..