Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries/ --ompython_omhome=/usr Modelica_4.0.0_Modelica.Blocks.Examples.TotalHarmonicDistortion.conf.json 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) Running command: "" <> buildModelFMU(Modelica.Blocks.Examples.TotalHarmonicDistortion,fileNamePrefix="Modelica_4_0_0_Modelica_Blocks_Examples_TotalHarmonicDistortion",fmuType="me",version="2.0",platforms={"static"}) "" <> buildModelFMU(Modelica.Blocks.Examples.TotalHarmonicDistortion,fileNamePrefix="Modelica_4_0_0_Modelica_Blocks_Examples_TotalHarmonicDistortion",fmuType="me",version="2.0",platforms={"static"}) Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo): time 0.0009589/0.000959, allocations: 176.4 kB / 8.346 MB, free: 0.7266 MB / 5.871 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 4.0.0+maint.om/package.mo): time 1.437/1.437, allocations: 221.5 MB / 230.3 MB, free: 7.508 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.0008369/0.0008369, allocations: 96.38 kB / 281.2 MB, free: 5.266 MB / 234.7 MB Notification: Performance of FrontEnd - loaded program: time 2.236e-05/2.238e-05, allocations: 4 kB / 337.1 MB, free: 9.934 MB / 234.7 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.1006/0.1006, allocations: 50.42 MB / 387.5 MB, free: 7.465 MB / 282.7 MB Notification: Performance of FrontEnd - scodeFlatten: time 0.3127/0.4133, allocations: 80.26 MB / 467.8 MB, free: 14.52 MB / 346.7 MB Notification: Performance of FrontEnd - mkProgramGraph: time 0.0002131/0.4136, allocations: 63.97 kB / 467.9 MB, free: 14.46 MB / 346.7 MB Notification: Performance of FrontEnd - DAE generated: time 0.0301/0.4437, allocations: 10.39 MB / 478.3 MB, free: 4.047 MB / 346.7 MB Notification: Performance of FrontEnd: time 1.713e-06/0.4437, allocations: 0 / 478.3 MB, free: 4.047 MB / 346.7 MB Notification: Performance of Transformations before backend: time 5.41e-05/0.4438, allocations: 16 kB / 478.3 MB, free: 4.031 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: 141 * Number of variables: 141 Notification: Performance of Generate backend data structure: time 0.00157/0.4454, allocations: 0.8439 MB / 479.1 MB, free: 3.137 MB / 346.7 MB Notification: Performance of prepare preOptimizeDAE: time 4.451e-05/0.4454, allocations: 8.031 kB / 479.1 MB, free: 3.129 MB / 346.7 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0001605/0.4456, allocations: 83.06 kB / 479.2 MB, free: 3.047 MB / 346.7 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0008273/0.4464, allocations: 0.5237 MB / 479.7 MB, free: 2.477 MB / 346.7 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 3.572e-05/0.4465, allocations: 31.89 kB / 479.8 MB, free: 2.445 MB / 346.7 MB Notification: Performance of preOpt expandDerOperator (simulation): time 9.337e-05/0.4466, allocations: 43.91 kB / 479.8 MB, free: 2.402 MB / 346.7 MB Notification: Performance of preOpt removeEqualFunctionCalls (simulation): time 0.0007274/0.4473, allocations: 398.5 kB / 480.2 MB, free: 2.016 MB / 346.7 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0008718/0.4482, allocations: 0.5331 MB / 480.7 MB, free: 1.465 MB / 346.7 MB Notification: Performance of preOpt findStateOrder (simulation): time 2.043e-05/0.4482, allocations: 0 / 480.7 MB, free: 1.465 MB / 346.7 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 4.908e-05/0.4483, allocations: 4 kB / 480.7 MB, free: 1.461 MB / 346.7 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 1.18e-05/0.4483, allocations: 12 kB / 480.7 MB, free: 1.449 MB / 346.7 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.002905/0.4512, allocations: 1.876 MB / 482.6 MB, free: 15.52 MB / 362.7 MB Notification: Performance of preOpt comSubExp (simulation): time 0.0007018/0.4519, allocations: 412.4 kB / 483 MB, free: 15.11 MB / 362.7 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0002601/0.4522, allocations: 162.2 kB / 483.2 MB, free: 14.95 MB / 362.7 MB Notification: Performance of preOpt evalFunc (simulation): time 4.711e-05/0.4522, allocations: 12.42 kB / 483.2 MB, free: 14.93 MB / 362.7 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0005186/0.4528, allocations: 328.3 kB / 483.5 MB, free: 14.6 MB / 362.7 MB Notification: Performance of pre-optimization done (n=53): time 2.154e-06/0.4528, allocations: 0 / 483.5 MB, free: 14.6 MB / 362.7 MB Notification: Performance of matching and sorting (n=53): time 0.0007696/0.4535, allocations: 435.5 kB / 483.9 MB, free: 14.17 MB / 362.7 MB Notification: Performance of inlineWhenForInitialization (initialization): time 7.158e-05/0.4536, allocations: 119.2 kB / 484.1 MB, free: 14.03 MB / 362.7 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.000465/0.4541, allocations: 373.1 kB / 484.4 MB, free: 13.66 MB / 362.7 MB Notification: Performance of collectPreVariables (initialization): time 5.488e-05/0.4542, allocations: 29.7 kB / 484.4 MB, free: 13.62 MB / 362.7 MB Notification: Performance of collectInitialEqns (initialization): time 0.0002253/0.4544, allocations: 312.3 kB / 484.8 MB, free: 13.31 MB / 362.7 MB Notification: Performance of collectInitialBindings (initialization): time 0.0001453/0.4546, allocations: 161.7 kB / 484.9 MB, free: 13.15 MB / 362.7 MB Notification: Performance of simplifyInitialFunctions (initialization): time 2.7e-05/0.4546, allocations: 0.75 kB / 484.9 MB, free: 13.15 MB / 362.7 MB Notification: Performance of setup shared object (initialization): time 0.0001548/0.4548, allocations: 366.7 kB / 485.3 MB, free: 12.79 MB / 362.7 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0002559/0.455, allocations: 149.5 kB / 485.4 MB, free: 12.64 MB / 362.7 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0003949/0.4554, allocations: 364.8 kB / 485.8 MB, free: 12.19 MB / 362.7 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.0003003/0.4557, allocations: 185.5 kB / 486 MB, free: 12.01 MB / 362.7 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 3.778e-06/0.4557, allocations: 0 / 486 MB, free: 12.01 MB / 362.7 MB Notification: Performance of matching and sorting (n=79) (initialization): time 0.0008557/0.4566, allocations: 0.535 MB / 486.5 MB, free: 11.47 MB / 362.7 MB Notification: Performance of prepare postOptimizeDAE: time 0.0009733/0.4576, allocations: 2.519 MB / 489 MB, free: 8.754 MB / 362.7 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.36e-05/0.4576, allocations: 11.94 kB / 489 MB, free: 8.742 MB / 362.7 MB Notification: Performance of postOpt tearingSystem (initialization): time 2.365e-05/0.4576, allocations: 8 kB / 489 MB, free: 8.734 MB / 362.7 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0005637/0.4582, allocations: 155.7 kB / 489.2 MB, free: 8.582 MB / 362.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.519e-05/0.4582, allocations: 19.88 kB / 489.2 MB, free: 8.562 MB / 362.7 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0004525/0.4587, allocations: 75.55 kB / 489.3 MB, free: 8.488 MB / 362.7 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 4.853e-05/0.4588, allocations: 31.95 kB / 489.3 MB, free: 8.457 MB / 362.7 MB Notification: Performance of prepare postOptimizeDAE: time 1.412e-05/0.4588, allocations: 4 kB / 489.3 MB, free: 8.453 MB / 362.7 MB Notification: Performance of postOpt replaceHomotopyWithSimplified (initialization): time 0.0007325/0.4595, allocations: 437.1 kB / 489.7 MB, free: 8.027 MB / 362.7 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 9.668e-06/0.4595, allocations: 8 kB / 489.7 MB, free: 8.02 MB / 362.7 MB Notification: Performance of postOpt tearingSystem (initialization): time 1.259e-05/0.4596, allocations: 15.95 kB / 489.8 MB, free: 8.004 MB / 362.7 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0004615/0.46, allocations: 132.3 kB / 489.9 MB, free: 7.875 MB / 362.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.48e-05/0.4601, allocations: 23.92 kB / 489.9 MB, free: 7.852 MB / 362.7 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0003557/0.4604, allocations: 63.5 kB / 490 MB, free: 7.789 MB / 362.7 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 4.237e-05/0.4605, allocations: 28 kB / 490 MB, free: 7.762 MB / 362.7 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_last,thdRMS.harmonic.mean1.y_last,$PRE.thdRMS.harmonic.mean2.y_last,thdRMS.harmonic.mean2.y_last,$PRE.thdRMS.rootMeanSquare.mean.y_last,thdRMS.rootMeanSquare.mean.y_last,thdRMS.valid,thdRMS.andValid.u1,thdRMS.andValid.u2,$PRE.thd1.harmonic.mean1.y_last,thd1.harmonic.mean1.y_last,$PRE.thd1.harmonic.mean2.y_last,thd1.harmonic.mean2.y_last,$PRE.thd1.rootMeanSquare.mean.y_last,thd1.rootMeanSquare.mean.y_last,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.0001787/0.4606, allocations: 140.4 kB / 490.1 MB, free: 7.621 MB / 362.7 MB Notification: Performance of postOpt createAliasVarsForOutputStates (simulation): time 0.0006882/0.4613, allocations: 435.4 kB / 490.6 MB, free: 7.191 MB / 362.7 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 7.824e-05/0.4614, allocations: 59.39 kB / 490.6 MB, free: 7.133 MB / 362.7 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.0008799/0.4623, allocations: 457.7 kB / 491.1 MB, free: 6.676 MB / 362.7 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 8.045e-06/0.4623, allocations: 8 kB / 491.1 MB, free: 6.668 MB / 362.7 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 5.06e-06/0.4623, allocations: 0 / 491.1 MB, free: 6.668 MB / 362.7 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 6.623e-06/0.4624, allocations: 0 / 491.1 MB, free: 6.668 MB / 362.7 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0006752/0.463, allocations: 0.5565 MB / 491.6 MB, free: 6.074 MB / 362.7 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 2.244e-06/0.4631, allocations: 0 / 491.6 MB, free: 6.074 MB / 362.7 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0004492/0.4635, allocations: 99.86 kB / 491.7 MB, free: 5.977 MB / 362.7 MB Notification: Performance of postOpt tearingSystem (simulation): time 7.333e-06/0.4635, allocations: 3.984 kB / 491.7 MB, free: 5.973 MB / 362.7 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 4.312e-05/0.4636, allocations: 11.98 kB / 491.7 MB, free: 5.961 MB / 362.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 8.216e-06/0.4636, allocations: 11.95 kB / 491.8 MB, free: 5.949 MB / 362.7 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 5.671e-06/0.4636, allocations: 0 / 491.8 MB, free: 5.949 MB / 362.7 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.001088/0.4647, allocations: 0.6994 MB / 492.5 MB, free: 5.227 MB / 362.7 MB Notification: Performance of postOpt removeConstants (simulation): time 0.0001336/0.4648, allocations: 132.4 kB / 492.6 MB, free: 5.078 MB / 362.7 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 8.643e-05/0.4649, allocations: 8 kB / 492.6 MB, free: 5.07 MB / 362.7 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0003397/0.4653, allocations: 43.95 kB / 492.6 MB, free: 5.027 MB / 362.7 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0001211/0.4654, allocations: 48.33 kB / 492.7 MB, free: 4.98 MB / 362.7 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 4.205e-05/0.4655, allocations: 19.98 kB / 492.7 MB, free: 4.961 MB / 362.7 MB Notification: Performance of sorting global known variables: time 0.0003316/0.4658, allocations: 279 kB / 493 MB, free: 4.691 MB / 362.7 MB Notification: Performance of sort global known variables: time 1.51e-07/0.4658, allocations: 0 / 493 MB, free: 4.691 MB / 362.7 MB Notification: Performance of remove unused functions: time 0.0009063/0.4667, allocations: 219.1 kB / 493.2 MB, free: 4.477 MB / 362.7 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_last,thd1.harmonic.mean2.y_last,thd1.rootMeanSquare.mean.y_last,thd1.valid,thd1.andValid.u1,thd1.andValid.u2,thdRMS.harmonic.mean1.y_last,thdRMS.harmonic.mean2.y_last,thdRMS.rootMeanSquare.mean.y_last,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.001393/0.4681, allocations: 1.268 MB / 494.5 MB, free: 3.18 MB / 362.7 MB Notification: Performance of simCode: created initialization part: time 0.0012/0.4693, allocations: 0.6748 MB / 495.1 MB, free: 2.508 MB / 362.7 MB Notification: Performance of simCode: created event and clocks part: time 3.677e-06/0.4694, allocations: 3.938 kB / 495.1 MB, free: 2.504 MB / 362.7 MB Notification: Performance of simCode: created simulation system equations: time 0.0003281/0.4697, allocations: 213.5 kB / 495.3 MB, free: 2.297 MB / 362.7 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0004654/0.4702, allocations: 65.55 kB / 495.4 MB, free: 2.238 MB / 362.7 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.002261/0.4724, allocations: 0.9299 MB / 496.3 MB, free: 1.266 MB / 362.7 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0007202/0.4732, allocations: 0.9119 MB / 497.2 MB, free: 332 kB / 362.7 MB Notification: Performance of simCode: alias equations: time 0.000617/0.4738, allocations: 122.4 kB / 497.4 MB, free: 204 kB / 362.7 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0003668/0.4742, allocations: 235.4 kB / 497.6 MB, free: 15.96 MB / 378.7 MB Notification: Performance of SimCode: time 1.313e-06/0.4742, allocations: 0 / 497.6 MB, free: 15.96 MB / 378.7 MB Notification: Performance of buildModelFMU: Generate the FMI files: time 0.03177/0.506, allocations: 10.39 MB / 0.4961 GB, free: 5.613 MB / 378.7 MB Notification: Performance of buildModelFMU: configured platform static using cached values: time 0.0001656/0.5062, allocations: 138 kB / 0.4962 GB, free: 5.422 MB / 378.7 MB Notification: Performance of buildModelFMU: Generate platform static: time 2.154/2.66, allocations: 0 / 0.4962 GB, free: 5.422 MB / 378.7 MB (rm -f Modelica_4.0.0_Modelica.Blocks.Examples.TotalHarmonicDistortion.pipe ; mkfifo Modelica_4.0.0_Modelica.Blocks.Examples.TotalHarmonicDistortion.pipe ; head -c 1048576 < Modelica_4.0.0_Modelica.Blocks.Examples.TotalHarmonicDistortion.pipe >> ../files/Modelica_4.0.0_Modelica.Blocks.Examples.TotalHarmonicDistortion.sim & /home/hudson/saved_omc/OMSimulator/install/linux/bin/OMSimulator -r=Modelica_4.0.0_Modelica.Blocks.Examples.TotalHarmonicDistortion_res.mat --tempDir=temp_Modelica_4_0_0_Modelica_Blocks_Examples_TotalHarmonicDistortion_fmu --startTime=0 --stopTime=0.1 --timeout=50 --tolerance=1e-06 Modelica_4_0_0_Modelica_Blocks_Examples_TotalHarmonicDistortion.fmu > Modelica_4.0.0_Modelica.Blocks.Examples.TotalHarmonicDistortion.pipe 2>&1) TODO: How the !@#!# did the simulation report success but simulation result Modelica_4.0.0_Modelica.Blocks.Examples.TotalHarmonicDistortion_res.mat does not exist to compare? outputFormat=mat