Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries/ --ompython_omhome=/usr BLDC_BLDC.Examples.DemoEncoder.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.DemoEncoder,fileNamePrefix="BLDC_BLDC_Examples_DemoEncoder",fmuType="me",version="2.0",platforms={"static"}) "" <> buildModelFMU(BLDC.Examples.DemoEncoder,fileNamePrefix="BLDC_BLDC_Examples_DemoEncoder",fmuType="me",version="2.0",platforms={"static"}) [: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.01225/0.01225, allocations: 2.542 MB / 9.824 MB, free: 444 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.0009503/0.0009502, allocations: 184 kB / 10.97 MB, free: 1.914 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.212/1.212, allocations: 221.4 MB / 233.4 MB, free: 4.148 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.0009104/0.0009104, allocations: 106.9 kB / 284.8 MB, free: 1.016 MB / 234.7 MB Notification: Performance of FrontEnd - loaded program: time 0.1622/0.1631, allocations: 57.11 MB / 341.9 MB, free: 6.441 MB / 234.7 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.09573/0.2589, allocations: 51 MB / 392.9 MB, free: 3.387 MB / 282.7 MB Notification: Performance of FrontEnd - scodeFlatten: time 0.2619/0.5209, allocations: 84.65 MB / 477.6 MB, free: 4.43 MB / 346.7 MB Notification: Performance of FrontEnd - mkProgramGraph: time 0.0002323/0.5211, allocations: 63.97 kB / 477.7 MB, free: 4.367 MB / 346.7 MB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 238 * Number of variables: 238 Notification: Performance of Generate backend data structure: time 0.05859/0.5797, allocations: 19.98 MB / 497.6 MB, free: 252 kB / 362.7 MB Notification: Performance of prepare preOptimizeDAE: time 4.058e-05/0.5798, allocations: 8 kB / 497.6 MB, free: 244 kB / 362.7 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0009413/0.5808, allocations: 194.4 kB / 497.8 MB, free: 48 kB / 362.7 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.00607/0.5868, allocations: 2.206 MB / 0.4883 GB, free: 13.79 MB / 378.7 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 6.357e-05/0.5869, allocations: 35.98 kB / 0.4884 GB, free: 13.76 MB / 378.7 MB Notification: Performance of preOpt expandDerOperator (simulation): time 0.0002491/0.5872, allocations: 64 kB / 0.4884 GB, free: 13.7 MB / 378.7 MB Notification: Performance of preOpt removeEqualFunctionCalls (simulation): time 0.001746/0.5889, allocations: 0.8356 MB / 0.4892 GB, free: 12.86 MB / 378.7 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.001914/0.5909, allocations: 1.093 MB / 0.4903 GB, free: 11.73 MB / 378.7 MB Notification: Performance of preOpt findStateOrder (simulation): time 4.081e-05/0.5909, allocations: 11.89 kB / 0.4903 GB, free: 11.72 MB / 378.7 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 0.0001154/0.5911, allocations: 27.95 kB / 0.4903 GB, free: 11.69 MB / 378.7 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 6.565e-05/0.5911, allocations: 45.92 kB / 0.4904 GB, free: 11.65 MB / 378.7 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.005415/0.5966, allocations: 3.126 MB / 0.4934 GB, free: 8.445 MB / 378.7 MB Notification: Performance of preOpt comSubExp (simulation): time 0.001113/0.5977, allocations: 0.7646 MB / 0.4942 GB, free: 7.68 MB / 378.7 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0006892/0.5984, allocations: 0.5029 MB / 0.4947 GB, free: 7.176 MB / 378.7 MB Notification: Performance of preOpt evalFunc (simulation): time 0.0001859/0.5986, allocations: 178.8 kB / 0.4948 GB, free: 6.961 MB / 378.7 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.001193/0.5998, allocations: 0.8371 MB / 0.4957 GB, free: 6.074 MB / 378.7 MB Notification: Performance of pre-optimization done (n=112): time 3.908e-06/0.5998, allocations: 0 / 0.4957 GB, free: 6.074 MB / 378.7 MB Notification: Performance of matching and sorting (n=113): time 0.003908/0.6037, allocations: 1.941 MB / 0.4976 GB, free: 4.082 MB / 378.7 MB Notification: Performance of inlineWhenForInitialization (initialization): time 0.0001818/0.6039, allocations: 331.5 kB / 0.4979 GB, free: 3.691 MB / 378.7 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.000947/0.6049, allocations: 0.5934 MB / 0.4984 GB, free: 3.094 MB / 378.7 MB Notification: Performance of collectPreVariables (initialization): time 0.0001165/0.605, allocations: 53.69 kB / 0.4985 GB, free: 3.035 MB / 378.7 MB Notification: Performance of collectInitialEqns (initialization): time 0.0003272/0.6053, allocations: 399.8 kB / 0.4989 GB, free: 2.637 MB / 378.7 MB Notification: Performance of collectInitialBindings (initialization): time 0.0002669/0.6056, allocations: 300 kB / 0.4992 GB, free: 2.34 MB / 378.7 MB Notification: Performance of simplifyInitialFunctions (initialization): time 4.615e-05/0.6057, allocations: 4 kB / 0.4992 GB, free: 2.336 MB / 378.7 MB Notification: Performance of setup shared object (initialization): time 0.0002035/0.6059, allocations: 422.6 kB / 0.4996 GB, free: 1.914 MB / 378.7 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0005384/0.6064, allocations: 339.9 kB / 0.4999 GB, free: 1.582 MB / 378.7 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0007552/0.6072, allocations: 0.7531 MB / 0.5006 GB, free: 0.6445 MB / 378.7 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.0006962/0.6079, allocations: 414.6 kB / 0.501 GB, free: 240 kB / 378.7 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 6.472e-06/0.6079, allocations: 4 kB / 0.501 GB, free: 236 kB / 378.7 MB Notification: Performance of matching and sorting (n=196) (initialization): time 0.001758/0.6097, allocations: 1.124 MB / 0.5021 GB, free: 15.1 MB / 394.7 MB Notification: Performance of prepare postOptimizeDAE: time 1.422e-05/0.6097, allocations: 10.69 kB / 0.5021 GB, free: 15.09 MB / 394.7 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.724e-05/0.6097, allocations: 12 kB / 0.5022 GB, free: 15.08 MB / 394.7 MB Notification: Performance of postOpt tearingSystem (initialization): time 3.431e-05/0.6098, allocations: 24 kB / 0.5022 GB, free: 15.06 MB / 394.7 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0008062/0.6106, allocations: 227.5 kB / 0.5024 GB, free: 14.84 MB / 394.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 2.147e-05/0.6106, allocations: 32 kB / 0.5024 GB, free: 14.8 MB / 394.7 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0007795/0.6114, allocations: 83.83 kB / 0.5025 GB, free: 14.72 MB / 394.7 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 9.04e-05/0.6115, allocations: 60 kB / 0.5026 GB, free: 14.66 MB / 394.7 MB Notification: Model statistics after passing the back-end for initialization: * Number of independent subsystems: 58 * Number of states: 0 () * Number of discrete variables: 111 ($PRE.encoderTimeAndCount.t2,encoderTimeAndCount.t2,$PRE.encoderTimeAndCount.t1,encoderTimeAndCount.t1,$PRE.encoderTimeAndCount.firstEdge,encoderTimeAndCount.firstEdge,$PRE.encoderTimeAndCount.count,encoderTimeAndCount.count,$PRE.encoderPulseCount.count,encoderPulseCount.count,$PRE.hallTimeSpan.t0,hallTimeSpan.t0,$PRE.hallTimeSpan.firstEdge,hallTimeSpan.firstEdge,$PRE.encoderPulseCount.firstTrigger,encoderPulseCount.firstTrigger,$PRE.encoderTimeSpan.firstEdge,encoderTimeSpan.firstEdge,$PRE.encoderTimeSpan.t0,encoderTimeSpan.t0,$PRE.encoderTimeAndCount.firstTrigger,encoderTimeAndCount.firstTrigger,$whenCondition1,$PRE.refFrequency.T_start,refFrequency.T_start,$PRE.refFrequency.count,refFrequency.count,$PRE.encoderTimeAndCount.w,encoderTimeAndCount.w,$PRE.encoderTimeSpan.w,encoderTimeSpan.w,$PRE.encoderPulseCount.w,encoderPulseCount.w,$whenCondition12,$whenCondition11,$whenCondition10,$whenCondition9,$whenCondition8,$whenCondition17,$whenCondition16,$whenCondition15,$whenCondition14,$whenCondition13,$whenCondition7,$whenCondition6,$whenCondition5,$whenCondition4,$whenCondition3,$whenCondition2,$whenCondition21,$whenCondition20,$whenCondition19,$whenCondition18,$whenCondition22,$whenCondition26,$whenCondition25,$whenCondition24,$whenCondition23,$whenCondition27,encoderTimeAndCount.sampleTrigger,$PRE.encoderTimeAndCount.A,encoderTimeAndCount.A,$PRE.encoderTimeAndCount.B,encoderTimeAndCount.B,$PRE.encoderTimeAndCount.notA,encoderTimeAndCount.notA,$PRE.encoderTimeAndCount.notB,encoderTimeAndCount.notB,$PRE.encoderTimeSpan.A,encoderTimeSpan.A,$PRE.encoderTimeSpan.B,encoderTimeSpan.B,$PRE.encoderTimeSpan.notA,encoderTimeSpan.notA,$PRE.encoderTimeSpan.notB,encoderTimeSpan.notB,encoderPulseCount.sampleTrigger,encoderPulseCount.u[1],$PRE.encoderPulseCount.A,encoderPulseCount.A,$PRE.encoderPulseCount.B,encoderPulseCount.B,$PRE.encoderPulseCount.notA,encoderPulseCount.notA,$PRE.encoderPulseCount.notB,encoderPulseCount.notB,$PRE.hallTimeSpan.uC[1],hallTimeSpan.uC[1],$PRE.hallTimeSpan.uC[2],hallTimeSpan.uC[2],$PRE.hallTimeSpan.uC[3],hallTimeSpan.uC[3],$PRE.hallTimeSpan.uC[4],hallTimeSpan.uC[4],$PRE.hallTimeSpan.uC[5],hallTimeSpan.uC[5],$PRE.hallTimeSpan.notC[1],hallTimeSpan.notC[1],$PRE.hallTimeSpan.notC[2],hallTimeSpan.notC[2],$PRE.hallTimeSpan.notC[3],hallTimeSpan.notC[3],$PRE.hallTimeSpan.notC[4],hallTimeSpan.notC[4],$PRE.hallTimeSpan.notC[5],hallTimeSpan.notC[5],$PRE.hallTimeSpan.w,hallTimeSpan.w,unwrapAngle.integralController.local_reset,sinCosEvaluation.integralController.local_reset,f2pos.local_reset) * Number of discrete states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for initialization (187): * Single equations (assignments): 184 * Array equations: 0 * Algorithm blocks: 3 * Record equations: 0 * 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.0004283/0.6119, allocations: 278.1 kB / 0.5028 GB, free: 14.37 MB / 394.7 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.0002174/0.6122, allocations: 102.8 kB / 0.5029 GB, free: 14.27 MB / 394.7 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.001816/0.614, allocations: 1.013 MB / 0.5039 GB, free: 13.24 MB / 394.7 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 1.224e-05/0.614, allocations: 15.92 kB / 0.5039 GB, free: 13.23 MB / 394.7 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 5.821e-06/0.614, allocations: 0 / 0.5039 GB, free: 13.23 MB / 394.7 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 1.215e-05/0.614, allocations: 3.984 kB / 0.5039 GB, free: 13.22 MB / 394.7 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.00349/0.6175, allocations: 2.124 MB / 0.506 GB, free: 11.05 MB / 394.7 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 4.018e-06/0.6176, allocations: 0 / 0.506 GB, free: 11.05 MB / 394.7 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0005673/0.6181, allocations: 115.8 kB / 0.5061 GB, free: 10.93 MB / 394.7 MB Notification: Performance of postOpt tearingSystem (simulation): time 1.156e-05/0.6182, allocations: 4 kB / 0.5061 GB, free: 10.93 MB / 394.7 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 0.0001019/0.6183, allocations: 43.88 kB / 0.5062 GB, free: 10.89 MB / 394.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 5.28e-06/0.6183, allocations: 7.938 kB / 0.5062 GB, free: 10.88 MB / 394.7 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 2.375e-06/0.6183, allocations: 0 / 0.5062 GB, free: 10.88 MB / 394.7 MB Notification: Performance of postOpt detectJacobianSparsePattern (simulation): time 0.002496/0.6208, allocations: 1.7 MB / 0.5078 GB, free: 9.156 MB / 394.7 MB Notification: Performance of postOpt generateSymbolicLinearization (simulation): time 0.00337/0.6242, allocations: 2.691 MB / 0.5105 GB, free: 6.434 MB / 394.7 MB Notification: Performance of postOpt removeConstants (simulation): time 0.00049/0.6247, allocations: 295.7 kB / 0.5107 GB, free: 6.125 MB / 394.7 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 0.0002522/0.6249, allocations: 51.97 kB / 0.5108 GB, free: 6.074 MB / 394.7 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0007919/0.6257, allocations: 99.91 kB / 0.5109 GB, free: 5.977 MB / 394.7 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0002283/0.626, allocations: 116.5 kB / 0.511 GB, free: 5.863 MB / 394.7 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 0.0002512/0.6262, allocations: 175.7 kB / 0.5112 GB, free: 5.691 MB / 394.7 MB Notification: Performance of sort global known variables: time 0.0005488/0.6268, allocations: 435.1 kB / 0.5116 GB, free: 5.27 MB / 394.7 MB Notification: Performance of remove unused functions: time 0.001458/0.6283, allocations: 232 kB / 0.5118 GB, free: 5.043 MB / 394.7 MB Notification: Model statistics after passing the back-end for simulation: * Number of independent subsystems: 2 * Number of states: 7 (speedSensor.flange.phi,sinCosEvaluation.integralController.y,encoderTimeAndCount.phi,encoderTimeSpan.phi,encoderPulseCount.phi,unwrapAngle.integralController.y,hallTimeSpan.phi) * Number of discrete variables: 69 (encoderPulseCount.sampleTrigger,encoderTimeAndCount.sampleTrigger,$whenCondition12,$whenCondition11,$whenCondition10,$whenCondition9,$whenCondition8,$whenCondition17,$whenCondition16,$whenCondition15,$whenCondition14,$whenCondition13,$whenCondition7,$whenCondition6,$whenCondition5,$whenCondition4,$whenCondition3,$whenCondition2,$whenCondition1,$whenCondition21,$whenCondition20,$whenCondition19,$whenCondition18,$whenCondition22,$whenCondition26,$whenCondition25,$whenCondition24,$whenCondition23,$whenCondition27,refFrequency.T_start,refFrequency.count,encoderTimeAndCount.firstTrigger,encoderTimeAndCount.w,encoderTimeAndCount.A,encoderTimeAndCount.B,encoderTimeAndCount.notA,encoderTimeAndCount.notB,encoderTimeAndCount.count,encoderTimeAndCount.firstEdge,encoderTimeAndCount.t1,encoderTimeAndCount.t2,encoderTimeSpan.w,encoderTimeSpan.A,encoderTimeSpan.B,encoderTimeSpan.notA,encoderTimeSpan.notB,encoderTimeSpan.firstEdge,encoderTimeSpan.t0,encoderPulseCount.firstTrigger,encoderPulseCount.u[1],encoderPulseCount.w,encoderPulseCount.A,encoderPulseCount.B,encoderPulseCount.notA,encoderPulseCount.notB,encoderPulseCount.count,hallTimeSpan.uC[1],hallTimeSpan.uC[2],hallTimeSpan.uC[3],hallTimeSpan.uC[4],hallTimeSpan.uC[5],hallTimeSpan.w,hallTimeSpan.notC[1],hallTimeSpan.notC[2],hallTimeSpan.notC[3],hallTimeSpan.notC[4],hallTimeSpan.notC[5],hallTimeSpan.firstEdge,hallTimeSpan.t0) * Number of discrete states: 44 (refFrequency.count,encoderTimeSpan.notA,encoderTimeSpan.A,encoderTimeSpan.notB,encoderTimeSpan.B,encoderTimeAndCount.w,$whenCondition27,encoderTimeAndCount.t2,encoderTimeAndCount.t1,encoderTimeAndCount.firstEdge,encoderTimeAndCount.count,$whenCondition26,$whenCondition25,$whenCondition24,$whenCondition23,encoderTimeAndCount.A,encoderTimeAndCount.notA,encoderTimeAndCount.B,encoderTimeAndCount.notB,encoderPulseCount.w,$whenCondition22,encoderPulseCount.count,$whenCondition21,$whenCondition20,$whenCondition19,$whenCondition18,encoderPulseCount.A,encoderPulseCount.notA,encoderPulseCount.B,encoderPulseCount.notB,hallTimeSpan.notC[1],hallTimeSpan.uC[1],hallTimeSpan.notC[2],hallTimeSpan.uC[2],hallTimeSpan.notC[3],hallTimeSpan.uC[3],hallTimeSpan.notC[4],hallTimeSpan.uC[4],hallTimeSpan.notC[5],hallTimeSpan.uC[5],hallTimeSpan.t0,hallTimeSpan.firstEdge,encoderTimeSpan.t0,encoderTimeSpan.firstEdge) * Top-level inputs: 0 Notification: Strong component statistics for simulation (98): * Single equations (assignments): 86 * Array equations: 0 * Algorithm blocks: 2 * Record equations: 0 * When equations: 10 * 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.0003395/0.6286, allocations: 210.3 kB / 0.512 GB, free: 4.836 MB / 394.7 MB Notification: Performance of simCode: created initialization part: time 0.001603/0.6302, allocations: 1.144 MB / 0.5131 GB, free: 3.68 MB / 394.7 MB Notification: Performance of simCode: created event and clocks part: time 3.537e-06/0.6302, allocations: 0 / 0.5131 GB, free: 3.68 MB / 394.7 MB Notification: Performance of simCode: created simulation system equations: time 0.0009685/0.6312, allocations: 0.8812 MB / 0.514 GB, free: 2.781 MB / 394.7 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.000634/0.6318, allocations: 98.86 kB / 0.5141 GB, free: 2.688 MB / 394.7 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.003479/0.6353, allocations: 1.822 MB / 0.5158 GB, free: 0.8281 MB / 394.7 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0009543/0.6363, allocations: 1.232 MB / 0.5171 GB, free: 15.57 MB / 410.7 MB Notification: Performance of SimCode: time 3.016e-06/0.6363, allocations: 0 / 0.5171 GB, free: 15.57 MB / 410.7 MB (rm -f BLDC_BLDC.Examples.DemoEncoder.pipe ; mkfifo BLDC_BLDC.Examples.DemoEncoder.pipe ; head -c 1048576 < BLDC_BLDC.Examples.DemoEncoder.pipe >> ../files/BLDC_BLDC.Examples.DemoEncoder.sim & /home/hudson/saved_omc/OMSimulator/install/linux/bin/OMSimulator --tempDir=temp_BLDC_BLDC_Examples_DemoEncoder_fmu --startTime=0 --stopTime=3 --timeout=50 --tolerance=1e-06 BLDC_BLDC_Examples_DemoEncoder.fmu > BLDC_BLDC.Examples.DemoEncoder.pipe 2>&1)