Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries/ --ompython_omhome=/usr BLDC_BLDC.Examples.DemoBLDCwithPWM.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: translateModel(BLDC.Examples.DemoBLDCwithPWM,tolerance=1e-06,outputFormat="empty",numberOfIntervals=399998,variableFilter="",fileNamePrefix="BLDC_BLDC.Examples.DemoBLDCwithPWM") translateModel(BLDC.Examples.DemoBLDCwithPWM,tolerance=1e-06,outputFormat="empty",numberOfIntervals=399998,variableFilter="",fileNamePrefix="BLDC_BLDC.Examples.DemoBLDCwithPWM") [:1:1-1:32:writable] Error: Class GC_set_max_heap_size not found in scope (looking for a function or record). Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/BLDC 1.9.0/package.mo): time 0.01368/0.01368, allocations: 2.546 MB / 9.825 MB, free: 440 kB / 5.871 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo): time 0.001029/0.001029, allocations: 187.5 kB / 10.97 MB, free: 1.895 MB / 7.832 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 4.0.0+maint.om/package.mo): time 1.418/1.418, allocations: 221.4 MB / 233.4 MB, free: 4.156 MB / 186.7 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.001017/0.001017, allocations: 99.11 kB / 284.8 MB, free: 0.9805 MB / 234.7 MB Notification: Performance of FrontEnd - loaded program: time 6.302e-06/6.413e-06, allocations: 0 / 341.9 MB, free: 6.543 MB / 234.7 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.109/0.1091, allocations: 51 MB / 392.9 MB, free: 3.488 MB / 282.7 MB Notification: Performance of FrontEnd - scodeFlatten: time 0.366/0.4751, allocations: 122.2 MB / 0.503 GB, free: 14.91 MB / 394.7 MB Notification: Performance of FrontEnd - mkProgramGraph: time 0.0002572/0.4754, allocations: 71.97 kB / 0.503 GB, free: 14.84 MB / 394.7 MB Notification: Performance of FrontEnd: time 0.5936/1.069, allocations: 119.7 MB / 0.6199 GB, free: 85.48 MB / 426.7 MB Notification: Performance of Transformations before backend: time 0.0009818/1.07, allocations: 131.7 kB / 0.6201 GB, free: 85.36 MB / 426.7 MB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 1366 * Number of variables: 1366 Notification: Performance of Generate backend data structure: time 0.02588/1.096, allocations: 5.442 MB / 0.6254 GB, free: 79.87 MB / 426.7 MB Notification: Performance of prepare preOptimizeDAE: time 5.723e-05/1.096, allocations: 12.03 kB / 0.6254 GB, free: 79.86 MB / 426.7 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.007535/1.104, allocations: 0.9491 MB / 0.6263 GB, free: 78.9 MB / 426.7 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.01816/1.122, allocations: 6.146 MB / 0.6323 GB, free: 72.82 MB / 426.7 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 0.0004325/1.122, allocations: 172 kB / 0.6325 GB, free: 72.65 MB / 426.7 MB Notification: Performance of preOpt expandDerOperator (simulation): time 0.002707/1.125, allocations: 299.9 kB / 0.6328 GB, free: 72.36 MB / 426.7 MB Notification: Performance of preOpt removeEqualFunctionCalls (simulation): time 0.01545/1.14, allocations: 5.878 MB / 0.6385 GB, free: 66.47 MB / 426.7 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.02368/1.164, allocations: 6.476 MB / 0.6448 GB, free: 59.79 MB / 426.7 MB Notification: Performance of preOpt findStateOrder (simulation): time 0.0003139/1.165, allocations: 4 kB / 0.6448 GB, free: 59.79 MB / 426.7 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 0.002092/1.167, allocations: 7.906 kB / 0.6448 GB, free: 59.78 MB / 426.7 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 0.0002698/1.167, allocations: 242.2 kB / 0.6451 GB, free: 59.54 MB / 426.7 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.0523/1.219, allocations: 22.55 MB / 0.6671 GB, free: 36.63 MB / 426.7 MB Notification: Performance of preOpt comSubExp (simulation): time 0.004914/1.224, allocations: 2.474 MB / 0.6695 GB, free: 34.15 MB / 426.7 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.004097/1.228, allocations: 2.53 MB / 0.672 GB, free: 31.62 MB / 426.7 MB Notification: Performance of preOpt evalFunc (simulation): time 0.01665/1.245, allocations: 7.689 MB / 0.6795 GB, free: 23.91 MB / 426.7 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.002885/1.248, allocations: 2.027 MB / 0.6815 GB, free: 21.83 MB / 426.7 MB Notification: Performance of pre-optimization done (n=298): time 6.111e-06/1.248, allocations: 0 / 0.6815 GB, free: 21.83 MB / 426.7 MB Notification: Performance of matching and sorting (n=302): time 0.01569/1.264, allocations: 8.59 MB / 0.6899 GB, free: 13.11 MB / 426.7 MB Notification: Performance of inlineWhenForInitialization (initialization): time 8.186e-05/1.264, allocations: 240 kB / 0.6901 GB, free: 12.82 MB / 426.7 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.005753/1.27, allocations: 2.331 MB / 0.6924 GB, free: 10.48 MB / 426.7 MB Notification: Performance of collectPreVariables (initialization): time 0.0006087/1.27, allocations: 29.7 kB / 0.6924 GB, free: 10.45 MB / 426.7 MB Notification: Performance of collectInitialEqns (initialization): time 0.00208/1.272, allocations: 1.812 MB / 0.6942 GB, free: 8.621 MB / 426.7 MB Notification: Performance of collectInitialBindings (initialization): time 0.001283/1.274, allocations: 0.9123 MB / 0.6951 GB, free: 7.703 MB / 426.7 MB Notification: Performance of simplifyInitialFunctions (initialization): time 0.0004145/1.274, allocations: 0 / 0.6951 GB, free: 7.703 MB / 426.7 MB Notification: Performance of setup shared object (initialization): time 0.0002908/1.274, allocations: 436.7 kB / 0.6955 GB, free: 7.27 MB / 426.7 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.002587/1.277, allocations: 1.592 MB / 0.697 GB, free: 5.676 MB / 426.7 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.002852/1.28, allocations: 2.363 MB / 0.6993 GB, free: 2.996 MB / 426.7 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.003131/1.283, allocations: 1.879 MB / 0.7012 GB, free: 1.102 MB / 426.7 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 2.372e-05/1.283, allocations: 4 kB / 0.7012 GB, free: 1.098 MB / 426.7 MB Notification: Performance of matching and sorting (n=412) (initialization): time 0.01028/1.293, allocations: 4.93 MB / 0.706 GB, free: 12.11 MB / 442.7 MB Notification: Performance of prepare postOptimizeDAE: time 0.003691/1.297, allocations: 8.946 MB / 0.7147 GB, free: 2.453 MB / 442.7 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 5.843e-05/1.297, allocations: 20 kB / 0.7147 GB, free: 2.434 MB / 442.7 MB Notification: Performance of postOpt tearingSystem (initialization): time 0.003785/1.301, allocations: 1.444 MB / 0.7162 GB, free: 0.9805 MB / 442.7 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.002889/1.304, allocations: 0.5538 MB / 0.7167 GB, free: 436 kB / 442.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 0.2051/1.509, allocations: 14.12 MB / 0.7305 GB, free: 127.3 MB / 442.7 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.003489/1.512, allocations: 149.4 kB / 0.7306 GB, free: 127.3 MB / 442.7 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 0.000494/1.513, allocations: 134.7 kB / 0.7308 GB, free: 127.3 MB / 442.7 MB Notification: Performance of prepare postOptimizeDAE: time 8.025e-06/1.513, allocations: 3.5 kB / 0.7308 GB, free: 127.3 MB / 442.7 MB Notification: Performance of postOpt replaceHomotopyWithSimplified (initialization): time 0.006913/1.52, allocations: 4.562 MB / 0.7352 GB, free: 127.2 MB / 442.7 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 4.356e-05/1.52, allocations: 23.22 kB / 0.7352 GB, free: 127.2 MB / 442.7 MB Notification: Performance of postOpt tearingSystem (initialization): time 0.002781/1.523, allocations: 1.432 MB / 0.7366 GB, free: 127.1 MB / 442.7 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.002172/1.525, allocations: 0.5488 MB / 0.7372 GB, free: 127.1 MB / 442.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 0.01697/1.542, allocations: 14.13 MB / 0.751 GB, free: 122.3 MB / 442.7 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.003516/1.545, allocations: 138.3 kB / 0.7511 GB, free: 122.3 MB / 442.7 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 0.0006962/1.546, allocations: 122.5 kB / 0.7512 GB, free: 122.3 MB / 442.7 MB Warning: Iteration variables with default zero start attribute in torn nonlinear equation system: star.plug_p.pin[1].v:VARIABLE(flow=false unit = "V" ) "Potential at the pin" type: Real [1] Notification: Model statistics after passing the back-end for initialization: * Number of independent subsystems: 95 * Number of states: 0 () * Number of discrete variables: 57 ($PRE.pwm.zeroOrderHold.firstTrigger,pwm.zeroOrderHold.firstTrigger,$whenCondition2,pwm.zeroOrderHold.sampleTrigger,pwm.zeroOrderHold.ySample,$whenCondition1,inverter.andCondition_p[1].y,inverter.andCondition_p[2].y,inverter.andCondition_p[3].y,inverter.andCondition_p[4].y,inverter.andCondition_p[5].y,inverter.andCondition_n[1].y,inverter.andCondition_n[2].y,inverter.andCondition_n[3].y,inverter.andCondition_n[4].y,inverter.andCondition_n[5].y,inverter.transistor_p.idealGTOThyristor[1].off,inverter.transistor_p.idealGTOThyristor[2].off,inverter.transistor_p.idealGTOThyristor[3].off,inverter.transistor_p.idealGTOThyristor[4].off,inverter.transistor_p.idealGTOThyristor[5].off,inverter.diode_p.idealDiode[1].off,inverter.diode_p.idealDiode[2].off,inverter.diode_p.idealDiode[3].off,inverter.diode_p.idealDiode[4].off,inverter.diode_p.idealDiode[5].off,inverter.transistor_n.idealGTOThyristor[1].off,inverter.transistor_n.idealGTOThyristor[2].off,inverter.transistor_n.idealGTOThyristor[3].off,inverter.transistor_n.idealGTOThyristor[4].off,inverter.transistor_n.idealGTOThyristor[5].off,inverter.diode_n.idealDiode[1].off,inverter.diode_n.idealDiode[2].off,inverter.diode_n.idealDiode[3].off,inverter.diode_n.idealDiode[4].off,inverter.diode_n.idealDiode[5].off,electronicCommutator.uC[1],electronicCommutator.uC[2],electronicCommutator.uC[3],electronicCommutator.uC[4],electronicCommutator.uC[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],electronicCommutator.pwm,$PRE.pwm.zeroOrderHold.ySample,$PRE.pwm.triangle.T_start,pwm.triangle.T_start,$PRE.pwm.triangle.count,pwm.triangle.count) * Number of discrete states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for initialization (320): * Single equations (assignments): 314 * Array equations: 0 * Algorithm blocks: 1 * Record equations: 0 * When equations: 0 * If-equations: 0 * Equation systems (linear and non-linear blocks): 1 * Torn equation systems: 4 * Mixed (continuous/discrete) equation systems: 0 Notification: Equation system details: * Constant Jacobian: 0 * Linear Jacobian (size,density): 1 {(2,100.0%)} * Non-linear Jacobian: 0 * Without analytic Jacobian: 0 Notification: Torn system details for strict tearing set: * Linear torn systems: 1 {(1,100.0%) 1} * Non-linear torn systems: 3 {13 49,4 11,4 11} Notification: Performance of prepare postOptimizeDAE: time 0.001222/1.547, allocations: 238.1 kB / 0.7514 GB, free: 122.2 MB / 442.7 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.0008902/1.548, allocations: 334.1 kB / 0.7518 GB, free: 122.2 MB / 442.7 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.008415/1.557, allocations: 4.681 MB / 0.7563 GB, free: 122 MB / 442.7 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 2.98e-05/1.557, allocations: 31.47 kB / 0.7564 GB, free: 122 MB / 442.7 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 1.785e-05/1.557, allocations: 0 / 0.7564 GB, free: 122 MB / 442.7 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 2.924e-05/1.557, allocations: 16.36 kB / 0.7564 GB, free: 122 MB / 442.7 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.01876/1.576, allocations: 9.604 MB / 0.7658 GB, free: 118.8 MB / 442.7 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 1.094e-05/1.576, allocations: 0 / 0.7658 GB, free: 118.8 MB / 442.7 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.001468/1.577, allocations: 321.2 kB / 0.7661 GB, free: 118.8 MB / 442.7 MB Notification: Performance of postOpt tearingSystem (simulation): time 0.003769/1.581, allocations: 1.674 MB / 0.7677 GB, free: 118.3 MB / 442.7 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 0.0003492/1.581, allocations: 18.61 kB / 0.7677 GB, free: 118.3 MB / 442.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 0.02238/1.604, allocations: 15.91 MB / 0.7833 GB, free: 109.6 MB / 442.7 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 8.907e-06/1.604, allocations: 2.438 kB / 0.7833 GB, free: 109.6 MB / 442.7 MB Notification: Performance of postOpt detectJacobianSparsePattern (simulation): time 0.01185/1.616, allocations: 7.404 MB / 0.7905 GB, free: 106.2 MB / 442.7 MB Notification: Performance of postOpt removeConstants (simulation): time 0.00261/1.618, allocations: 0.7941 MB / 0.7913 GB, free: 105.8 MB / 442.7 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 0.001521/1.62, allocations: 13.31 kB / 0.7913 GB, free: 105.8 MB / 442.7 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.002767/1.623, allocations: 127.7 kB / 0.7914 GB, free: 105.8 MB / 442.7 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0008244/1.623, allocations: 285.3 kB / 0.7917 GB, free: 105.7 MB / 442.7 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 0.0003875/1.624, allocations: 76.69 kB / 0.7917 GB, free: 105.7 MB / 442.7 MB Notification: Performance of sort global known variables: time 0.005046/1.629, allocations: 1.723 MB / 0.7934 GB, free: 105 MB / 442.7 MB Notification: Performance of remove unused functions: time 0.01114/1.64, allocations: 1.744 MB / 0.7951 GB, free: 105 MB / 442.7 MB Notification: Model statistics after passing the back-end for simulation: * Number of independent subsystems: 9 * Number of states: 4 (smpm.inertiaRotor.w,smpm.stator.core.Phi.re,smpm.stator.core.Phi.im,loadInertia.phi) * Number of discrete variables: 53 (pwm.zeroOrderHold.sampleTrigger,$whenCondition2,$whenCondition1,inverter.andCondition_p[1].y,inverter.andCondition_p[2].y,inverter.andCondition_p[3].y,inverter.andCondition_p[4].y,inverter.andCondition_p[5].y,inverter.andCondition_n[1].y,inverter.andCondition_n[2].y,inverter.andCondition_n[3].y,inverter.andCondition_n[4].y,inverter.andCondition_n[5].y,inverter.transistor_p.idealGTOThyristor[1].off,inverter.transistor_p.idealGTOThyristor[2].off,inverter.transistor_p.idealGTOThyristor[3].off,inverter.transistor_p.idealGTOThyristor[4].off,inverter.transistor_p.idealGTOThyristor[5].off,inverter.diode_p.idealDiode[1].off,inverter.diode_p.idealDiode[2].off,inverter.diode_p.idealDiode[3].off,inverter.diode_p.idealDiode[4].off,inverter.diode_p.idealDiode[5].off,inverter.transistor_n.idealGTOThyristor[1].off,inverter.transistor_n.idealGTOThyristor[2].off,inverter.transistor_n.idealGTOThyristor[3].off,inverter.transistor_n.idealGTOThyristor[4].off,inverter.transistor_n.idealGTOThyristor[5].off,inverter.diode_n.idealDiode[1].off,inverter.diode_n.idealDiode[2].off,inverter.diode_n.idealDiode[3].off,inverter.diode_n.idealDiode[4].off,inverter.diode_n.idealDiode[5].off,electronicCommutator.uC[1],electronicCommutator.uC[2],electronicCommutator.uC[3],electronicCommutator.uC[4],electronicCommutator.uC[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],electronicCommutator.pwm,pwm.zeroOrderHold.firstTrigger,pwm.zeroOrderHold.ySample,pwm.triangle.T_start,pwm.triangle.count) * Number of discrete states: 2 (pwm.triangle.count,pwm.zeroOrderHold.ySample) * Top-level inputs: 0 Notification: Strong component statistics for simulation (183): * Single equations (assignments): 176 * Array equations: 0 * Algorithm blocks: 0 * Record equations: 0 * When equations: 4 * If-equations: 0 * Equation systems (linear and non-linear blocks): 0 * Torn equation systems: 3 * Mixed (continuous/discrete) equation systems: 0 Notification: Torn system details for strict tearing set: * Linear torn systems: 2 {(1,100.0%) 1,(2,100.0%) 8} * Non-linear torn systems: 1 {21 91} Notification: Performance of Backend phase and start with SimCode phase: time 0.001282/1.641, allocations: 0.5046 MB / 0.7956 GB, free: 104.8 MB / 442.7 MB Notification: Performance of simCode: created initialization part: time 0.01383/1.655, allocations: 7.894 MB / 0.8033 GB, free: 99.8 MB / 442.7 MB Notification: Performance of simCode: created event and clocks part: time 7.193e-06/1.655, allocations: 0 / 0.8033 GB, free: 99.8 MB / 442.7 MB Notification: Performance of simCode: created simulation system equations: time 0.005217/1.661, allocations: 3.1 MB / 0.8064 GB, free: 97.06 MB / 442.7 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.005205/1.666, allocations: 0.7832 MB / 0.8071 GB, free: 96.48 MB / 442.7 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.02615/1.692, allocations: 8.651 MB / 0.8156 GB, free: 88.98 MB / 442.7 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.007124/1.699, allocations: 3.834 MB / 0.8193 GB, free: 86.09 MB / 442.7 MB Notification: Performance of SimCode: time 1.503e-06/1.699, allocations: 0 / 0.8193 GB, free: 86.09 MB / 442.7 MB Notification: Performance of Templates: time 0.1473/1.846, allocations: 88.57 MB / 0.9058 GB, free: 7.848 MB / 442.7 MB make -j1 -f BLDC_BLDC.Examples.DemoBLDCwithPWM.makefile (rm -f BLDC_BLDC.Examples.DemoBLDCwithPWM.pipe ; mkfifo BLDC_BLDC.Examples.DemoBLDCwithPWM.pipe ; head -c 1048576 < BLDC_BLDC.Examples.DemoBLDCwithPWM.pipe >> ../files/BLDC_BLDC.Examples.DemoBLDCwithPWM.sim & ./BLDC_BLDC.Examples.DemoBLDCwithPWM -abortSlowSimulation -alarm=480 -lv LOG_STATS > BLDC_BLDC.Examples.DemoBLDCwithPWM.pipe 2>&1)