Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries/ --ompython_omhome=/usr Modelica_trunk_Modelica.Blocks.Examples.TotalHarmonicDistortion.conf.json loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices trunk/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex trunk/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica trunk/package.mo", uses=false) Using package Modelica with version trunk (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica trunk/package.mo) Using package Complex with version trunk (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex trunk/package.mo) Using package ModelicaServices with version trunk (/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices trunk/package.mo) Running command: "" <> buildModelFMU(Modelica.Blocks.Examples.TotalHarmonicDistortion,fileNamePrefix="Modelica_trunk_Modelica_Blocks_Examples_TotalHarmonicDistortion",fmuType="me",version="2.0",platforms={"static"}) "" <> buildModelFMU(Modelica.Blocks.Examples.TotalHarmonicDistortion,fileNamePrefix="Modelica_trunk_Modelica_Blocks_Examples_TotalHarmonicDistortion",fmuType="me",version="2.0",platforms={"static"}) Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices trunk/package.mo): time 0.000945/0.0009451, allocations: 92.95 kB / 16.98 MB, free: 5.938 MB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex trunk/package.mo): time 0.0009809/0.0009809, allocations: 204.8 kB / 17.89 MB, free: 5.586 MB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica trunk/package.mo): time 1.439/1.439, allocations: 227.3 MB / 245.9 MB, free: 10.29 MB / 206.1 MB Notification: Performance of FrontEnd - loaded program: time 0.0002487/0.0002495, allocations: 8 kB / 306.7 MB, free: 1.27 MB / 238.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.1114/0.1117, allocations: 51.51 MB / 358.2 MB, free: 13.77 MB / 302.1 MB Notification: Performance of NFInst.instantiate(Modelica.Blocks.Examples.TotalHarmonicDistortion): time 0.004113/0.1158, allocations: 3.092 MB / 361.3 MB, free: 10.66 MB / 302.1 MB Notification: Performance of NFInst.instExpressions: time 0.002474/0.1183, allocations: 1.243 MB / 362.5 MB, free: 9.414 MB / 302.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.0002923/0.1187, allocations: 11.94 kB / 362.5 MB, free: 9.402 MB / 302.1 MB Notification: Performance of NFTyping.typeComponents: time 0.0002024/0.1189, allocations: 51.48 kB / 362.6 MB, free: 9.352 MB / 302.1 MB Notification: Performance of NFTyping.typeBindings: time 0.0003704/0.1193, allocations: 123.6 kB / 362.7 MB, free: 9.23 MB / 302.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.0006471/0.1199, allocations: 259.5 kB / 363 MB, free: 8.977 MB / 302.1 MB Notification: Performance of NFFlatten.flatten: time 0.0005767/0.1205, allocations: 0.4951 MB / 363.5 MB, free: 8.48 MB / 302.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0004273/0.1209, allocations: 284.8 kB / 363.7 MB, free: 8.191 MB / 302.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0003236/0.1213, allocations: 234.9 kB / 364 MB, free: 7.961 MB / 302.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0003006/0.1216, allocations: 258.6 kB / 364.2 MB, free: 7.707 MB / 302.1 MB Notification: Performance of NFPackage.collectConstants: time 5.77e-05/0.1216, allocations: 27.94 kB / 364.3 MB, free: 7.68 MB / 302.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0001142/0.1218, allocations: 39.98 kB / 364.3 MB, free: 7.641 MB / 302.1 MB Notification: Performance of NFScalarize.scalarize: time 0.0001148/0.1219, allocations: 119.4 kB / 364.4 MB, free: 7.523 MB / 302.1 MB Notification: Performance of NFVerifyModel.verify: time 0.0001299/0.122, allocations: 149.3 kB / 364.6 MB, free: 7.371 MB / 302.1 MB Notification: Performance of NFConvertDAE.convert: time 0.0007325/0.1228, allocations: 0.7562 MB / 365.3 MB, free: 6.613 MB / 302.1 MB Notification: Performance of FrontEnd - DAE generated: time 3.387e-06/0.1228, allocations: 0 / 365.3 MB, free: 6.613 MB / 302.1 MB Notification: Performance of FrontEnd: time 2.004e-06/0.1228, allocations: 0 / 365.3 MB, free: 6.613 MB / 302.1 MB Notification: Performance of Transformations before backend: time 1.429e-05/0.1228, allocations: 8 kB / 365.3 MB, free: 6.605 MB / 302.1 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.001762/0.1246, allocations: 0.9353 MB / 366.3 MB, free: 5.613 MB / 302.1 MB Notification: Performance of prepare preOptimizeDAE: time 4.038e-05/0.1246, allocations: 8.031 kB / 366.3 MB, free: 5.605 MB / 302.1 MB Notification: Performance of preOpt introduceOutputAliases (simulation): time 0.0001315/0.1248, allocations: 106.4 kB / 366.4 MB, free: 5.492 MB / 302.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0006492/0.1254, allocations: 158.9 kB / 366.5 MB, free: 5.336 MB / 302.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.001006/0.1264, allocations: 0.611 MB / 367.1 MB, free: 4.688 MB / 302.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 4.732e-05/0.1265, allocations: 49.27 kB / 367.2 MB, free: 4.637 MB / 302.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 9.899e-05/0.1266, allocations: 68 kB / 367.2 MB, free: 4.57 MB / 302.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.00124/0.1278, allocations: 0.6644 MB / 367.9 MB, free: 3.887 MB / 302.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 2.373e-05/0.1279, allocations: 3.906 kB / 367.9 MB, free: 3.883 MB / 302.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 6.522e-05/0.128, allocations: 31.98 kB / 367.9 MB, free: 3.852 MB / 302.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 1.482e-05/0.128, allocations: 12 kB / 368 MB, free: 3.84 MB / 302.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.001156/0.1291, allocations: 0.5283 MB / 368.5 MB, free: 3.312 MB / 302.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.003142/0.1323, allocations: 1.944 MB / 370.4 MB, free: 1.297 MB / 302.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.001093/0.1334, allocations: 0.5347 MB / 371 MB, free: 0.7539 MB / 302.1 MB Notification: Performance of preOpt evalFunc (simulation): time 4.602e-05/0.1335, allocations: 12.42 kB / 371 MB, free: 0.7422 MB / 302.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0007611/0.1342, allocations: 405.1 kB / 371.4 MB, free: 344 kB / 302.1 MB Notification: Performance of pre-optimization done (n=53): time 2.254e-06/0.1342, allocations: 0 / 371.4 MB, free: 344 kB / 302.1 MB Notification: Performance of matching and sorting (n=53): time 0.2366/0.3709, allocations: 0.7777 MB / 372.1 MB, free: 18.68 MB / 302.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 9.204e-05/0.371, allocations: 115.7 kB / 372.3 MB, free: 18.55 MB / 302.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0007593/0.3718, allocations: 470.1 kB / 372.7 MB, free: 18.44 MB / 302.1 MB Notification: Performance of collectPreVariables (initialization): time 5.615e-05/0.3719, allocations: 43.34 kB / 372.8 MB, free: 18.41 MB / 302.1 MB Notification: Performance of collectInitialEqns (initialization): time 0.0003097/0.3722, allocations: 336.5 kB / 373.1 MB, free: 18.31 MB / 302.1 MB Notification: Performance of collectInitialBindings (initialization): time 0.0001444/0.3723, allocations: 164.2 kB / 373.3 MB, free: 18.22 MB / 302.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 3.087e-05/0.3724, allocations: 12.34 kB / 373.3 MB, free: 18.22 MB / 302.1 MB Notification: Performance of setup shared object (initialization): time 0.0001447/0.3725, allocations: 377.8 kB / 373.6 MB, free: 17.91 MB / 302.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.000549/0.3731, allocations: 219.1 kB / 373.8 MB, free: 17.9 MB / 302.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0007191/0.3738, allocations: 435.5 kB / 374.3 MB, free: 17.66 MB / 302.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.0006698/0.3745, allocations: 258.2 kB / 374.5 MB, free: 17.66 MB / 302.1 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 1.363e-05/0.3745, allocations: 2.156 kB / 374.5 MB, free: 17.66 MB / 302.1 MB Notification: Performance of matching and sorting (n=79) (initialization): time 0.001779/0.3763, allocations: 0.7114 MB / 375.2 MB, free: 17.55 MB / 302.1 MB Notification: Performance of prepare postOptimizeDAE: time 0.0008193/0.3771, allocations: 2.53 MB / 377.8 MB, free: 14.9 MB / 302.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 2.155e-05/0.3772, allocations: 5.906 kB / 377.8 MB, free: 14.9 MB / 302.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 3.668e-05/0.3772, allocations: 11.75 kB / 377.8 MB, free: 14.9 MB / 302.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.000653/0.3779, allocations: 153 kB / 377.9 MB, free: 14.89 MB / 302.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 2.387e-05/0.3779, allocations: 11.02 kB / 377.9 MB, free: 14.89 MB / 302.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0004935/0.3784, allocations: 92.23 kB / 378 MB, free: 14.86 MB / 302.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 6.78e-05/0.3785, allocations: 33.89 kB / 378.1 MB, free: 14.86 MB / 302.1 MB Notification: Performance of prepare postOptimizeDAE: time 9.648e-06/0.3785, allocations: 4.125 kB / 378.1 MB, free: 14.86 MB / 302.1 MB Notification: Performance of postOpt replaceHomotopyWithSimplified (initialization): time 0.001141/0.3796, allocations: 0.5752 MB / 378.6 MB, free: 14.8 MB / 302.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.065e-05/0.3797, allocations: 6.875 kB / 378.7 MB, free: 14.8 MB / 302.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 1.684e-05/0.3797, allocations: 12.12 kB / 378.7 MB, free: 14.8 MB / 302.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0004586/0.3801, allocations: 128 kB / 378.8 MB, free: 14.79 MB / 302.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 2.285e-05/0.3802, allocations: 24.67 kB / 378.8 MB, free: 14.78 MB / 302.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0003711/0.3806, allocations: 74.91 kB / 378.9 MB, free: 14.75 MB / 302.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 4.783e-05/0.3806, allocations: 26.66 kB / 378.9 MB, free: 14.75 MB / 302.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_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.greaterThreshold.y,thdRMS.valid,thdRMS.pythagoras.valid,$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.greaterThreshold.y,thd1.valid,thd1.pythagoras.valid) * Number of discrete states: 0 () * Number of clocked 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.0004734/0.3811, allocations: 320.8 kB / 379.2 MB, free: 14.54 MB / 302.1 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.0001011/0.3812, allocations: 62.52 kB / 379.3 MB, free: 14.51 MB / 302.1 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.001774/0.383, allocations: 0.6266 MB / 379.9 MB, free: 14.29 MB / 302.1 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 1.588e-05/0.383, allocations: 5.25 kB / 379.9 MB, free: 14.29 MB / 302.1 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 1.24e-05/0.383, allocations: 3.953 kB / 379.9 MB, free: 14.28 MB / 302.1 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 1.327e-05/0.3831, allocations: 3.906 kB / 379.9 MB, free: 14.28 MB / 302.1 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.001161/0.3842, allocations: 0.6443 MB / 380.6 MB, free: 13.91 MB / 302.1 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 4.629e-06/0.3842, allocations: 0.75 kB / 380.6 MB, free: 13.91 MB / 302.1 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0004924/0.3847, allocations: 104.4 kB / 380.7 MB, free: 13.89 MB / 302.1 MB Notification: Performance of postOpt tearingSystem (simulation): time 8.587e-06/0.3848, allocations: 2.062 kB / 380.7 MB, free: 13.89 MB / 302.1 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 5.869e-05/0.3848, allocations: 17 kB / 380.7 MB, free: 13.88 MB / 302.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 4.609e-06/0.3848, allocations: 1.25 kB / 380.7 MB, free: 13.88 MB / 302.1 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 6.662e-06/0.3848, allocations: 3 kB / 380.7 MB, free: 13.88 MB / 302.1 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.002226/0.3871, allocations: 0.9378 MB / 381.6 MB, free: 13.49 MB / 302.1 MB Notification: Performance of postOpt removeConstants (simulation): time 0.0001341/0.3872, allocations: 130.8 kB / 381.8 MB, free: 13.36 MB / 302.1 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 9.623e-05/0.3873, allocations: 18.17 kB / 381.8 MB, free: 13.35 MB / 302.1 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0003528/0.3877, allocations: 52.11 kB / 381.8 MB, free: 13.34 MB / 302.1 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0001504/0.3878, allocations: 45.81 kB / 381.9 MB, free: 13.33 MB / 302.1 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 5.023e-05/0.3879, allocations: 21.39 kB / 381.9 MB, free: 13.33 MB / 302.1 MB Notification: Performance of sorting global known variables: time 0.0004556/0.3884, allocations: 329.7 kB / 382.2 MB, free: 13.17 MB / 302.1 MB Notification: Performance of sort global known variables: time 1.1e-07/0.3884, allocations: 0 / 382.2 MB, free: 13.17 MB / 302.1 MB Notification: Performance of remove unused functions: time 0.00099/0.3894, allocations: 253.8 kB / 382.5 MB, free: 13.09 MB / 302.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: 20 ($cse1,$cse2,$whenCondition6,$whenCondition5,$whenCondition4,$whenCondition3,$whenCondition2,$whenCondition1,thd1.harmonic.mean1.y_last,thd1.harmonic.mean2.y_last,thd1.rootMeanSquare.mean.y_last,thd1.greaterThreshold.y,thd1.valid,thd1.pythagoras.valid,thdRMS.harmonic.mean1.y_last,thdRMS.harmonic.mean2.y_last,thdRMS.rootMeanSquare.mean.y_last,thdRMS.greaterThreshold.y,thdRMS.valid,thdRMS.pythagoras.valid) * 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) * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for simulation (55): * Single equations (assignments): 49 * 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.002089/0.3915, allocations: 1.502 MB / 384 MB, free: 12.16 MB / 302.1 MB Notification: Performance of simCode: created initialization part: time 0.002025/0.3935, allocations: 0.8633 MB / 384.8 MB, free: 11.9 MB / 302.1 MB Notification: Performance of simCode: created event and clocks part: time 3.046e-06/0.3935, allocations: 1.094 kB / 384.8 MB, free: 11.9 MB / 302.1 MB Notification: Performance of simCode: created simulation system equations: time 0.0006294/0.3942, allocations: 291.7 kB / 385.1 MB, free: 11.81 MB / 302.1 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0004332/0.3946, allocations: 75.31 kB / 385.2 MB, free: 11.78 MB / 302.1 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.003806/0.3984, allocations: 6.117 MB / 391.3 MB, free: 6.199 MB / 302.1 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0005565/0.399, allocations: 0.923 MB / 392.2 MB, free: 5.477 MB / 302.1 MB Notification: Performance of simCode: alias equations: time 0.0005101/0.3995, allocations: 113.1 kB / 392.3 MB, free: 5.453 MB / 302.1 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.000348/0.3999, allocations: 250.9 kB / 392.6 MB, free: 5.273 MB / 302.1 MB Notification: Performance of SimCode: time 3e-07/0.3999, allocations: 0 / 392.6 MB, free: 5.273 MB / 302.1 MB Notification: Performance of buildModelFMU: Generate the FMI files: time 0.02777/0.4277, allocations: 10.77 MB / 403.4 MB, free: 0.8438 MB / 302.1 MB Notification: Performance of buildModelFMU: configured platform static using cached values: time 0.0001941/0.4279, allocations: 172.5 kB / 403.5 MB, free: 0.6094 MB / 302.1 MB Notification: Performance of buildModelFMU: Generate platform static: time 2.172/2.6, allocations: 0 / 403.5 MB, free: 0.6094 MB / 302.1 MB (rm -f Modelica_trunk_Modelica.Blocks.Examples.TotalHarmonicDistortion.pipe ; mkfifo Modelica_trunk_Modelica.Blocks.Examples.TotalHarmonicDistortion.pipe ; head -c 1048576 < Modelica_trunk_Modelica.Blocks.Examples.TotalHarmonicDistortion.pipe >> ../files/Modelica_trunk_Modelica.Blocks.Examples.TotalHarmonicDistortion.sim & /home/hudson/saved_omc/OMSimulator/install/linux/bin/OMSimulator -r=Modelica_trunk_Modelica.Blocks.Examples.TotalHarmonicDistortion_res.mat --tempDir=temp_Modelica_trunk_Modelica_Blocks_Examples_TotalHarmonicDistortion_fmu --startTime=0 --stopTime=0.1 --timeout=50 --tolerance=1e-06 Modelica_trunk_Modelica_Blocks_Examples_TotalHarmonicDistortion.fmu > Modelica_trunk_Modelica.Blocks.Examples.TotalHarmonicDistortion.pipe 2>&1) TODO: How the !@#!# did the simulation report success but simulation result Modelica_trunk_Modelica.Blocks.Examples.TotalHarmonicDistortion_res.mat does not exist to compare? outputFormat=mat