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"}) [: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/Complex 4.0.0+maint.om/package.mo): time 0.000984/0.000984, allocations: 184.5 kB / 8.138 MB, free: 2.223 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.147/1.147, allocations: 221.4 MB / 229.9 MB, free: 3.059 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.000971/0.000971, allocations: 98.17 kB / 280.8 MB, free: 1.266 MB / 218.7 MB Notification: Performance of FrontEnd - loaded program: time 0.09487/0.09589, allocations: 55.82 MB / 336.6 MB, free: 9.426 MB / 282.7 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.1944/0.2903, allocations: 50.39 MB / 387 MB, free: 37.98 MB / 298.7 MB Notification: Performance of FrontEnd - scodeFlatten: time 0.08091/0.3713, allocations: 80.18 MB / 467.2 MB, free: 6.602 MB / 346.7 MB Notification: Performance of FrontEnd - mkProgramGraph: time 0.0002117/0.3715, allocations: 67.91 kB / 467.2 MB, free: 6.535 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.03066/0.4022, allocations: 10.99 MB / 478.2 MB, free: 11.5 MB / 362.7 MB Notification: Performance of prepare preOptimizeDAE: time 3.966e-05/0.4022, allocations: 8 kB / 478.2 MB, free: 11.5 MB / 362.7 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0002565/0.4025, allocations: 79.06 kB / 478.3 MB, free: 11.42 MB / 362.7 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0008752/0.4034, allocations: 0.5213 MB / 478.8 MB, free: 10.85 MB / 362.7 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 3.381e-05/0.4034, allocations: 27.98 kB / 478.9 MB, free: 10.82 MB / 362.7 MB Notification: Performance of preOpt expandDerOperator (simulation): time 9.397e-05/0.4035, allocations: 36 kB / 478.9 MB, free: 10.79 MB / 362.7 MB Notification: Performance of preOpt removeEqualFunctionCalls (simulation): time 0.0007808/0.4043, allocations: 402.5 kB / 479.3 MB, free: 10.4 MB / 362.7 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0008857/0.4052, allocations: 0.5332 MB / 479.8 MB, free: 9.844 MB / 362.7 MB Notification: Performance of preOpt findStateOrder (simulation): time 2.676e-05/0.4053, allocations: 11.89 kB / 479.8 MB, free: 9.832 MB / 362.7 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 5.309e-05/0.4053, allocations: 0 / 479.8 MB, free: 9.832 MB / 362.7 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 1.566e-05/0.4053, allocations: 14.44 kB / 479.9 MB, free: 9.82 MB / 362.7 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.002852/0.4082, allocations: 1.852 MB / 481.7 MB, free: 7.914 MB / 362.7 MB Notification: Performance of preOpt comSubExp (simulation): time 0.0006486/0.4089, allocations: 371.2 kB / 482.1 MB, free: 7.543 MB / 362.7 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0002661/0.4091, allocations: 170.2 kB / 482.2 MB, free: 7.375 MB / 362.7 MB Notification: Performance of preOpt evalFunc (simulation): time 4.005e-05/0.4092, allocations: 4.438 kB / 482.2 MB, free: 7.371 MB / 362.7 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0004467/0.4096, allocations: 280.4 kB / 482.5 MB, free: 7.086 MB / 362.7 MB Notification: Performance of pre-optimization done (n=53): time 2.304e-06/0.4097, allocations: 0 / 482.5 MB, free: 7.086 MB / 362.7 MB Notification: Performance of matching and sorting (n=53): time 0.0007497/0.4104, allocations: 422.5 kB / 482.9 MB, free: 6.668 MB / 362.7 MB Notification: Performance of inlineWhenForInitialization (initialization): time 6.192e-05/0.4105, allocations: 115.2 kB / 483 MB, free: 6.531 MB / 362.7 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0004017/0.4109, allocations: 369 kB / 483.4 MB, free: 6.168 MB / 362.7 MB Notification: Performance of collectPreVariables (initialization): time 4.778e-05/0.411, allocations: 25.7 kB / 483.4 MB, free: 6.137 MB / 362.7 MB Notification: Performance of collectInitialEqns (initialization): time 0.0001555/0.4111, allocations: 256.3 kB / 483.7 MB, free: 5.883 MB / 362.7 MB Notification: Performance of collectInitialBindings (initialization): time 0.0001192/0.4112, allocations: 157.8 kB / 483.8 MB, free: 5.727 MB / 362.7 MB Notification: Performance of simplifyInitialFunctions (initialization): time 2.555e-05/0.4113, allocations: 0 / 483.8 MB, free: 5.727 MB / 362.7 MB Notification: Performance of setup shared object (initialization): time 0.0001246/0.4114, allocations: 366.7 kB / 484.2 MB, free: 5.359 MB / 362.7 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0002596/0.4117, allocations: 149.3 kB / 484.3 MB, free: 5.215 MB / 362.7 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0003711/0.412, allocations: 363.8 kB / 484.7 MB, free: 4.762 MB / 362.7 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.0003109/0.4124, allocations: 190.8 kB / 484.9 MB, free: 4.578 MB / 362.7 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 4.618e-06/0.4124, allocations: 4 kB / 484.9 MB, free: 4.574 MB / 362.7 MB Notification: Performance of matching and sorting (n=79) (initialization): time 0.0008235/0.4132, allocations: 0.5234 MB / 485.4 MB, free: 4.047 MB / 362.7 MB Notification: Performance of prepare postOptimizeDAE: time 0.0007816/0.414, allocations: 2.524 MB / 487.9 MB, free: 1.324 MB / 362.7 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.068e-05/0.414, allocations: 4 kB / 487.9 MB, free: 1.32 MB / 362.7 MB Notification: Performance of postOpt tearingSystem (initialization): time 2.384e-05/0.414, allocations: 12 kB / 487.9 MB, free: 1.309 MB / 362.7 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0006066/0.4147, allocations: 155.7 kB / 488.1 MB, free: 1.156 MB / 362.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.937e-05/0.4147, allocations: 15.91 kB / 488.1 MB, free: 1.145 MB / 362.7 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.000464/0.4152, allocations: 75.56 kB / 488.2 MB, free: 1.07 MB / 362.7 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 5.027e-05/0.4152, allocations: 36.64 kB / 488.2 MB, free: 1.035 MB / 362.7 MB Notification: Performance of prepare postOptimizeDAE: time 9.919e-06/0.4152, allocations: 4 kB / 488.2 MB, free: 1.031 MB / 362.7 MB Notification: Performance of postOpt replaceHomotopyWithSimplified (initialization): time 0.0007262/0.416, allocations: 453.6 kB / 488.7 MB, free: 0.5938 MB / 362.7 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.03e-05/0.416, allocations: 8 kB / 488.7 MB, free: 0.5859 MB / 362.7 MB Notification: Performance of postOpt tearingSystem (initialization): time 1.263e-05/0.416, allocations: 8 kB / 488.7 MB, free: 0.5781 MB / 362.7 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.000499/0.4165, allocations: 136.1 kB / 488.8 MB, free: 456 kB / 362.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.984e-05/0.4165, allocations: 15.94 kB / 488.8 MB, free: 440 kB / 362.7 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0004014/0.417, allocations: 71.44 kB / 488.9 MB, free: 368 kB / 362.7 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 4.455e-05/0.417, allocations: 25.03 kB / 488.9 MB, free: 344 kB / 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.0001666/0.4172, allocations: 147.3 kB / 489.1 MB, free: 192 kB / 362.7 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 8.741e-05/0.4173, allocations: 55.34 kB / 489.1 MB, free: 136 kB / 362.7 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.0008654/0.4181, allocations: 444.8 kB / 489.6 MB, free: 15.69 MB / 378.7 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 1.022e-05/0.4182, allocations: 11.98 kB / 489.6 MB, free: 15.68 MB / 378.7 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 5.08e-06/0.4182, allocations: 0 / 489.6 MB, free: 15.68 MB / 378.7 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 7.424e-06/0.4182, allocations: 0 / 489.6 MB, free: 15.68 MB / 378.7 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0006563/0.4189, allocations: 0.5564 MB / 490.1 MB, free: 15.09 MB / 378.7 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 2.965e-06/0.4189, allocations: 0 / 490.1 MB, free: 15.09 MB / 378.7 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0004894/0.4194, allocations: 103.9 kB / 490.2 MB, free: 14.98 MB / 378.7 MB Notification: Performance of postOpt tearingSystem (simulation): time 8.947e-06/0.4194, allocations: 4 kB / 490.2 MB, free: 14.98 MB / 378.7 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 4.399e-05/0.4194, allocations: 19.92 kB / 490.2 MB, free: 14.96 MB / 378.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 3.347e-06/0.4194, allocations: 3.938 kB / 490.3 MB, free: 14.96 MB / 378.7 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 2.224e-06/0.4195, allocations: 0 / 490.3 MB, free: 14.96 MB / 378.7 MB Notification: Performance of postOpt detectJacobianSparsePattern (simulation): time 0.001045/0.4205, allocations: 0.6909 MB / 490.9 MB, free: 14.24 MB / 378.7 MB Notification: Performance of postOpt generateSymbolicLinearization (simulation): time 0.001448/0.422, allocations: 1.307 MB / 492.2 MB, free: 12.92 MB / 378.7 MB Notification: Performance of postOpt removeConstants (simulation): time 0.0001192/0.4221, allocations: 128.4 kB / 492.4 MB, free: 12.77 MB / 378.7 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 0.0001018/0.4222, allocations: 11.94 kB / 492.4 MB, free: 12.76 MB / 378.7 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0003739/0.4226, allocations: 51.95 kB / 492.4 MB, free: 12.71 MB / 378.7 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 9.98e-05/0.4227, allocations: 40.38 kB / 492.5 MB, free: 12.67 MB / 378.7 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 4.081e-05/0.4227, allocations: 15.98 kB / 492.5 MB, free: 12.66 MB / 378.7 MB Notification: Performance of sort global known variables: time 0.0002928/0.423, allocations: 279.2 kB / 492.8 MB, free: 12.39 MB / 378.7 MB Notification: Performance of remove unused functions: time 0.001888/0.4249, allocations: 223 kB / 493 MB, free: 12.17 MB / 378.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.0002144/0.4252, allocations: 128.9 kB / 493.1 MB, free: 12.03 MB / 378.7 MB Notification: Performance of simCode: created initialization part: time 0.001153/0.4263, allocations: 0.6823 MB / 493.8 MB, free: 11.35 MB / 378.7 MB Notification: Performance of simCode: created event and clocks part: time 2.474e-06/0.4263, allocations: 8.062 kB / 493.8 MB, free: 11.34 MB / 378.7 MB Notification: Performance of simCode: created simulation system equations: time 0.0003269/0.4267, allocations: 213.6 kB / 494 MB, free: 11.13 MB / 378.7 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.000373/0.4271, allocations: 62.09 kB / 494.1 MB, free: 11.07 MB / 378.7 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.001905/0.429, allocations: 0.8312 MB / 494.9 MB, free: 10.21 MB / 378.7 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0006878/0.4297, allocations: 0.9811 MB / 495.9 MB, free: 9.195 MB / 378.7 MB Notification: Performance of SimCode: time 4.61e-07/0.4297, allocations: 3.938 kB / 495.9 MB, free: 9.191 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