Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries/ --ompython_omhome=/usr Modelica_3.2.3_cpp_Modelica.Blocks.Examples.TotalHarmonicDistortion.conf.json loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 3.2.3+maint.om/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 3.2.3+maint.om/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 3.2.3+maint.om/package.mo", uses=false) Using package ModelicaServices with version 3.2.3 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 3.2.3+maint.om/package.mo) Using package Modelica with version 3.2.3 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 3.2.3+maint.om/package.mo) Using package Complex with version 3.2.3 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 3.2.3+maint.om/package.mo) Running command: "" <> buildModelFMU(Modelica.Blocks.Examples.TotalHarmonicDistortion,fileNamePrefix="Modelica_3_2_3_cpp_Modelica_Blocks_Examples_TotalHarmonicDistortion",fmuType="me",version="2.0",platforms={"static"}) "" <> buildModelFMU(Modelica.Blocks.Examples.TotalHarmonicDistortion,fileNamePrefix="Modelica_3_2_3_cpp_Modelica_Blocks_Examples_TotalHarmonicDistortion",fmuType="me",version="2.0",platforms={"static"}) Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 3.2.3+maint.om/package.mo): time 0.002201/0.002205, allocations: 179.2 kB / 8.363 MB, free: 0.7148 MB / 5.871 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 3.2.3+maint.om/package.mo): time 2.145/2.145, allocations: 205.3 MB / 214.1 MB, free: 14.13 MB / 187.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 3.2.3+maint.om/package.mo): time 0.001174/0.001174, allocations: 93.92 kB / 262.1 MB, free: 13.86 MB / 219.1 MB Notification: Performance of FrontEnd - loaded program: time 2.502e-05/2.503e-05, allocations: 4 kB / 314.9 MB, free: 9.051 MB / 267.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.3525/0.3526, allocations: 47.56 MB / 362.4 MB, free: 45.72 MB / 299.1 MB Notification: Performance of FrontEnd - scodeFlatten: time 0.1315/0.4841, allocations: 78.94 MB / 441.4 MB, free: 7.266 MB / 331.1 MB Notification: Performance of FrontEnd - mkProgramGraph: time 0.0002467/0.4844, allocations: 67.97 kB / 441.4 MB, free: 7.199 MB / 331.1 MB Notification: Performance of FrontEnd - DAE generated: time 0.0448/0.5293, allocations: 10.13 MB / 451.6 MB, free: 13.1 MB / 347.1 MB Notification: Performance of FrontEnd: time 1.543e-06/0.5293, allocations: 3.938 kB / 451.6 MB, free: 13.1 MB / 347.1 MB Notification: Performance of Transformations before backend: time 6.23e-05/0.5294, allocations: 24.73 kB / 451.6 MB, free: 13.07 MB / 347.1 MB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 135 * Number of variables: 135 Notification: Performance of Generate backend data structure: time 0.002479/0.5319, allocations: 0.8338 MB / 452.4 MB, free: 12.19 MB / 347.1 MB Notification: Performance of prepare preOptimizeDAE: time 5.069e-05/0.532, allocations: 12.03 kB / 452.4 MB, free: 12.18 MB / 347.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0002951/0.5323, allocations: 87.02 kB / 452.5 MB, free: 12.09 MB / 347.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.001263/0.5335, allocations: 0.5314 MB / 453.1 MB, free: 11.52 MB / 347.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 4.465e-05/0.5336, allocations: 16 kB / 453.1 MB, free: 11.5 MB / 347.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 0.0001464/0.5338, allocations: 41.58 kB / 453.1 MB, free: 11.46 MB / 347.1 MB Notification: Performance of preOpt removeEqualFunctionCalls (simulation): time 0.001213/0.535, allocations: 390.5 kB / 453.5 MB, free: 11.08 MB / 347.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.001362/0.5364, allocations: 0.5136 MB / 454 MB, free: 10.55 MB / 347.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 3.282e-05/0.5364, allocations: 7.906 kB / 454 MB, free: 10.54 MB / 347.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 8.621e-05/0.5365, allocations: 3.984 kB / 454 MB, free: 10.54 MB / 347.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 2.242e-05/0.5366, allocations: 19.95 kB / 454 MB, free: 10.52 MB / 347.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.005086/0.5417, allocations: 1.829 MB / 455.9 MB, free: 8.637 MB / 347.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.001069/0.5428, allocations: 401.3 kB / 456.3 MB, free: 8.234 MB / 347.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0004154/0.5432, allocations: 162.2 kB / 456.4 MB, free: 8.074 MB / 347.1 MB Notification: Performance of preOpt evalFunc (simulation): time 6.824e-05/0.5433, allocations: 16.41 kB / 456.4 MB, free: 8.059 MB / 347.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.00084/0.5442, allocations: 322.1 kB / 456.7 MB, free: 7.73 MB / 347.1 MB Notification: Performance of pre-optimization done (n=53): time 4.148e-06/0.5442, allocations: 0 / 456.7 MB, free: 7.73 MB / 347.1 MB Notification: Performance of matching and sorting (n=53): time 0.001282/0.5455, allocations: 443.4 kB / 457.2 MB, free: 7.293 MB / 347.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 8.362e-05/0.5456, allocations: 115.2 kB / 457.3 MB, free: 7.156 MB / 347.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0007205/0.5463, allocations: 373.1 kB / 457.7 MB, free: 6.785 MB / 347.1 MB Notification: Performance of collectPreVariables (initialization): time 9.879e-05/0.5464, allocations: 33.7 kB / 457.7 MB, free: 6.746 MB / 347.1 MB Notification: Performance of collectInitialEqns (initialization): time 0.0003248/0.5468, allocations: 346.9 kB / 458 MB, free: 6.406 MB / 347.1 MB Notification: Performance of collectInitialBindings (initialization): time 0.0002012/0.547, allocations: 155.1 kB / 458.2 MB, free: 6.254 MB / 347.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 4.261e-05/0.547, allocations: 4 kB / 458.2 MB, free: 6.25 MB / 347.1 MB Notification: Performance of setup shared object (initialization): time 0.0001495/0.5472, allocations: 338.8 kB / 458.5 MB, free: 5.91 MB / 347.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0004125/0.5476, allocations: 141.6 kB / 458.7 MB, free: 5.77 MB / 347.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0005947/0.5482, allocations: 361.9 kB / 459 MB, free: 5.324 MB / 347.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.0005034/0.5487, allocations: 191.9 kB / 459.2 MB, free: 5.141 MB / 347.1 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 1.235e-05/0.5488, allocations: 4 kB / 459.2 MB, free: 5.137 MB / 347.1 MB Notification: Performance of matching and sorting (n=79) (initialization): time 0.001401/0.5502, allocations: 0.5037 MB / 459.7 MB, free: 4.629 MB / 347.1 MB Notification: Performance of prepare postOptimizeDAE: time 0.001082/0.5513, allocations: 2.522 MB / 462.2 MB, free: 1.91 MB / 347.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 2.104e-05/0.5513, allocations: 12 kB / 462.2 MB, free: 1.898 MB / 347.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 3.716e-05/0.5514, allocations: 8 kB / 462.2 MB, free: 1.891 MB / 347.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.001117/0.5525, allocations: 151.7 kB / 462.4 MB, free: 1.742 MB / 347.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 2.483e-05/0.5526, allocations: 15.94 kB / 462.4 MB, free: 1.727 MB / 347.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0008242/0.5534, allocations: 83.39 kB / 462.5 MB, free: 1.645 MB / 347.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 7.211e-05/0.5535, allocations: 24 kB / 462.5 MB, free: 1.621 MB / 347.1 MB Notification: Performance of prepare postOptimizeDAE: time 1.434e-05/0.5535, allocations: 6.156 kB / 462.5 MB, free: 1.617 MB / 347.1 MB Notification: Performance of postOpt replaceHomotopyWithSimplified (initialization): time 0.001247/0.5548, allocations: 443.4 kB / 463 MB, free: 1.188 MB / 347.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.71e-05/0.5548, allocations: 8 kB / 463 MB, free: 1.18 MB / 347.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 2.181e-05/0.5548, allocations: 16.09 kB / 463 MB, free: 1.164 MB / 347.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0008888/0.5557, allocations: 131.7 kB / 463.1 MB, free: 1.035 MB / 347.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.837e-05/0.5558, allocations: 15.94 kB / 463.1 MB, free: 1.02 MB / 347.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0005482/0.5563, allocations: 63.5 kB / 463.2 MB, free: 0.957 MB / 347.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 6.69e-05/0.5564, allocations: 35.94 kB / 463.2 MB, free: 0.9219 MB / 347.1 MB Notification: Model statistics after passing the back-end for initialization: * Number of independent subsystems: 29 * Number of states: 0 () * Number of discrete variables: 24 ($whenCondition6,$whenCondition5,$whenCondition4,$whenCondition3,$whenCondition2,$whenCondition1,$PRE.thdRMS.harmonic.mean1.y,thdRMS.harmonic.mean1.y,$PRE.thdRMS.harmonic.mean2.y,thdRMS.harmonic.mean2.y,$PRE.thdRMS.rootMeanSquare.mean.y,thdRMS.rootMeanSquare.mean.y,thdRMS.valid,thdRMS.andValid.u1,thdRMS.andValid.u2,$PRE.thd1.harmonic.mean1.y,thd1.harmonic.mean1.y,$PRE.thd1.harmonic.mean2.y,thd1.harmonic.mean2.y,$PRE.thd1.rootMeanSquare.mean.y,thd1.rootMeanSquare.mean.y,thd1.valid,thd1.andValid.u1,thd1.andValid.u2) * Number of discrete states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for initialization (79): * Single equations (assignments): 79 * Array equations: 0 * Algorithm blocks: 0 * 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.000302/0.5567, allocations: 143 kB / 463.4 MB, free: 0.7734 MB / 347.1 MB Notification: Performance of postOpt createAliasVarsForOutputStates (simulation): time 0.001233/0.558, allocations: 439.3 kB / 463.8 MB, free: 344 kB / 347.1 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.000127/0.5581, allocations: 55.34 kB / 463.8 MB, free: 288 kB / 347.1 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.001354/0.5595, allocations: 457.8 kB / 464.3 MB, free: 15.83 MB / 363.1 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 9.388e-06/0.5595, allocations: 4 kB / 464.3 MB, free: 15.82 MB / 363.1 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 7.014e-06/0.5595, allocations: 4 kB / 464.3 MB, free: 15.82 MB / 363.1 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 8.936e-06/0.5595, allocations: 0 / 464.3 MB, free: 15.82 MB / 363.1 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.001022/0.5606, allocations: 0.5526 MB / 464.8 MB, free: 15.23 MB / 363.1 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 4.549e-06/0.5606, allocations: 0 / 464.8 MB, free: 15.23 MB / 363.1 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0008795/0.5615, allocations: 107.8 kB / 465 MB, free: 15.12 MB / 363.1 MB Notification: Performance of postOpt tearingSystem (simulation): time 1.126e-05/0.5615, allocations: 4 kB / 465 MB, free: 15.12 MB / 363.1 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 6.8e-05/0.5616, allocations: 11.98 kB / 465 MB, free: 15.11 MB / 363.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 4.739e-06/0.5616, allocations: 0 / 465 MB, free: 15.11 MB / 363.1 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 3.606e-06/0.5616, allocations: 0 / 465 MB, free: 15.11 MB / 363.1 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.001932/0.5636, allocations: 0.6995 MB / 465.7 MB, free: 14.39 MB / 363.1 MB Notification: Performance of postOpt removeConstants (simulation): time 0.0002124/0.5638, allocations: 133.5 kB / 465.8 MB, free: 14.24 MB / 363.1 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 0.0001404/0.564, allocations: 11.95 kB / 465.8 MB, free: 14.23 MB / 363.1 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0006371/0.5646, allocations: 43.95 kB / 465.9 MB, free: 14.19 MB / 363.1 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0001665/0.5648, allocations: 44.38 kB / 465.9 MB, free: 14.14 MB / 363.1 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 6.253e-05/0.5649, allocations: 23.98 kB / 465.9 MB, free: 14.12 MB / 363.1 MB Notification: Performance of sorting global known variables: time 0.0004968/0.5654, allocations: 279 kB / 466.2 MB, free: 13.85 MB / 363.1 MB Notification: Performance of sort global known variables: time 4.51e-07/0.5654, allocations: 0 / 466.2 MB, free: 13.85 MB / 363.1 MB Notification: Performance of remove unused functions: time 0.001282/0.5667, allocations: 211.1 kB / 466.4 MB, free: 13.64 MB / 363.1 MB Notification: Model statistics after passing the back-end for simulation: * Number of independent subsystems: 1 * Number of states: 6 (thd1.harmonic.mean1.x,thd1.harmonic.mean2.x,thd1.rootMeanSquare.mean.x,thdRMS.harmonic.mean1.x,thdRMS.harmonic.mean2.x,thdRMS.rootMeanSquare.mean.x) * Number of discrete variables: 18 ($whenCondition6,$whenCondition5,$whenCondition4,$whenCondition3,$whenCondition2,$whenCondition1,thd1.harmonic.mean1.y,thd1.harmonic.mean2.y,thd1.rootMeanSquare.mean.y,thd1.valid,thd1.andValid.u1,thd1.andValid.u2,thdRMS.harmonic.mean1.y,thdRMS.harmonic.mean2.y,thdRMS.rootMeanSquare.mean.y,thdRMS.valid,thdRMS.andValid.u1,thdRMS.andValid.u2) * Number of discrete states: 6 (thdRMS.rootMeanSquare.mean.x,thdRMS.harmonic.mean2.x,thdRMS.harmonic.mean1.x,thd1.rootMeanSquare.mean.x,thd1.harmonic.mean2.x,thd1.harmonic.mean1.x) * Top-level inputs: 0 Notification: Strong component statistics for simulation (53): * Single equations (assignments): 47 * Array equations: 0 * Algorithm blocks: 0 * Record equations: 0 * When equations: 6 * 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.002246/0.569, allocations: 1.272 MB / 467.7 MB, free: 12.34 MB / 363.1 MB Notification: Performance of simCode: created initialization part: time 0.001838/0.5708, allocations: 0.667 MB / 468.3 MB, free: 11.68 MB / 363.1 MB Notification: Performance of simCode: created event and clocks part: time 9.207e-06/0.5709, allocations: 1.125 kB / 468.3 MB, free: 11.68 MB / 363.1 MB Notification: Performance of simCode: created simulation system equations: time 0.000651/0.5716, allocations: 224 kB / 468.6 MB, free: 11.46 MB / 363.1 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0007489/0.5723, allocations: 62.66 kB / 468.6 MB, free: 11.4 MB / 363.1 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.003564/0.5759, allocations: 0.9468 MB / 469.6 MB, free: 10.41 MB / 363.1 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0006316/0.5766, allocations: 0.9072 MB / 470.5 MB, free: 9.469 MB / 363.1 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0006659/0.5773, allocations: 239.3 kB / 470.7 MB, free: 9.234 MB / 363.1 MB Notification: Performance of SimCode: time 1.342e-06/0.5773, allocations: 0 / 470.7 MB, free: 9.234 MB / 363.1 MB Notification: Performance of buildModelFMU: Generate C++ for platform static: time 2.771/3.348, allocations: 9.991 MB / 480.7 MB, free: 15.27 MB / 379.1 MB (rm -f Modelica_3.2.3_cpp_Modelica.Blocks.Examples.TotalHarmonicDistortion.pipe ; mkfifo Modelica_3.2.3_cpp_Modelica.Blocks.Examples.TotalHarmonicDistortion.pipe ; head -c 1048576 < Modelica_3.2.3_cpp_Modelica.Blocks.Examples.TotalHarmonicDistortion.pipe >> ../files/Modelica_3.2.3_cpp_Modelica.Blocks.Examples.TotalHarmonicDistortion.sim & /home/hudson/saved_omc/OMSimulator/install/linux/bin/OMSimulator -r=Modelica_3.2.3_cpp_Modelica.Blocks.Examples.TotalHarmonicDistortion_res.mat --tempDir=temp_Modelica_3_2_3_cpp_Modelica_Blocks_Examples_TotalHarmonicDistortion_fmu --startTime=0 --stopTime=0.1 --timeout=50 --tolerance=1e-06 Modelica_3_2_3_cpp_Modelica_Blocks_Examples_TotalHarmonicDistortion.fmu > Modelica_3.2.3_cpp_Modelica.Blocks.Examples.TotalHarmonicDistortion.pipe 2>&1)