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: translateModel(Modelica.Blocks.Examples.TotalHarmonicDistortion,tolerance=1e-06,outputFormat="mat",numberOfIntervals=2000,variableFilter="time|thd1.harmonic.mean1.x|thd1.harmonic.mean2.x|thd1.rootMeanSquare.mean.x|thdRMS.harmonic.mean1.x|thdRMS.harmonic.mean2.x|thdRMS.rootMeanSquare.mean.x",fileNamePrefix="Modelica_3.2.3_cpp_Modelica.Blocks.Examples.TotalHarmonicDistortion") translateModel(Modelica.Blocks.Examples.TotalHarmonicDistortion,tolerance=1e-06,outputFormat="mat",numberOfIntervals=2000,variableFilter="time|thd1.harmonic.mean1.x|thd1.harmonic.mean2.x|thd1.rootMeanSquare.mean.x|thdRMS.harmonic.mean1.x|thdRMS.harmonic.mean2.x|thdRMS.rootMeanSquare.mean.x",fileNamePrefix="Modelica_3.2.3_cpp_Modelica.Blocks.Examples.TotalHarmonicDistortion") Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 3.2.3+maint.om/package.mo): time 0.00144/0.00144, allocations: 186 kB / 16.4 MB, free: 5.746 MB / 13.93 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 3.2.3+maint.om/package.mo): time 1.818/1.818, allocations: 205.4 MB / 222.5 MB, free: 9.125 MB / 186.7 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 3.2.3+maint.om/package.mo): time 0.001072/0.001072, allocations: 93.98 kB / 270.9 MB, free: 8.375 MB / 218.7 MB Notification: Performance of FrontEnd - loaded program: time 0.0003725/0.0003725, allocations: 8 kB / 327 MB, free: 216 kB / 266.7 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.3119/0.3122, allocations: 47.56 MB / 374.5 MB, free: 45.45 MB / 298.7 MB Notification: Performance of FrontEnd - scodeFlatten: time 0.1214/0.4337, allocations: 79.69 MB / 454.2 MB, free: 1.098 MB / 330.7 MB Notification: Performance of FrontEnd - mkProgramGraph: time 0.0002189/0.4339, allocations: 75.95 kB / 454.3 MB, free: 1.023 MB / 330.7 MB Notification: Performance of FrontEnd - DAE generated: time 0.04468/0.4786, allocations: 10.25 MB / 464.5 MB, free: 6.738 MB / 346.7 MB Notification: Performance of FrontEnd: time 2.435e-06/0.4787, allocations: 0 / 464.5 MB, free: 6.738 MB / 346.7 MB Notification: Performance of Transformations before backend: time 5.799e-05/0.4787, allocations: 24.09 kB / 464.6 MB, free: 6.715 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: 135 * Number of variables: 135 Notification: Performance of Generate backend data structure: time 0.002658/0.4814, allocations: 0.9174 MB / 465.5 MB, free: 5.738 MB / 346.7 MB Notification: Performance of prepare preOptimizeDAE: time 4.606e-05/0.4815, allocations: 8.031 kB / 465.5 MB, free: 5.73 MB / 346.7 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0002629/0.4818, allocations: 83.02 kB / 465.6 MB, free: 5.648 MB / 346.7 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.001197/0.483, allocations: 0.5216 MB / 466.1 MB, free: 5.086 MB / 346.7 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 6.823e-05/0.4831, allocations: 49.31 kB / 466.1 MB, free: 5.035 MB / 346.7 MB Notification: Performance of preOpt expandDerOperator (simulation): time 0.0001563/0.4832, allocations: 60 kB / 466.2 MB, free: 4.977 MB / 346.7 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.002063/0.4853, allocations: 0.6559 MB / 466.8 MB, free: 4.305 MB / 346.7 MB Notification: Performance of preOpt findStateOrder (simulation): time 3.908e-05/0.4854, allocations: 7.906 kB / 466.9 MB, free: 4.297 MB / 346.7 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 0.0001042/0.4855, allocations: 27.98 kB / 466.9 MB, free: 4.27 MB / 346.7 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 1.924e-05/0.4855, allocations: 12 kB / 466.9 MB, free: 4.258 MB / 346.7 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.002076/0.4876, allocations: 0.5387 MB / 467.4 MB, free: 3.719 MB / 346.7 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.005024/0.4927, allocations: 1.94 MB / 469.4 MB, free: 1.715 MB / 346.7 MB Notification: Performance of preOpt comSubExp (simulation): time 0.001857/0.4946, allocations: 0.5289 MB / 469.9 MB, free: 1.176 MB / 346.7 MB Notification: Performance of preOpt evalFunc (simulation): time 6.408e-05/0.4947, allocations: 8.422 kB / 469.9 MB, free: 1.168 MB / 346.7 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.001276/0.496, allocations: 416.5 kB / 470.3 MB, free: 0.75 MB / 346.7 MB Notification: Performance of pre-optimization done (n=53): time 5.651e-06/0.496, allocations: 3.984 kB / 470.3 MB, free: 0.7461 MB / 346.7 MB Notification: Performance of matching and sorting (n=53): time 0.003006/0.499, allocations: 0.8029 MB / 471.1 MB, free: 15.94 MB / 362.7 MB Notification: Performance of inlineWhenForInitialization (initialization): time 8.175e-05/0.4991, allocations: 115.2 kB / 471.2 MB, free: 15.8 MB / 362.7 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0007778/0.4999, allocations: 405.1 kB / 471.6 MB, free: 15.4 MB / 362.7 MB Notification: Performance of collectPreVariables (initialization): time 0.0001108/0.5, allocations: 41.7 kB / 471.7 MB, free: 15.35 MB / 362.7 MB Notification: Performance of collectInitialEqns (initialization): time 0.0002927/0.5003, allocations: 346.9 kB / 472 MB, free: 15.01 MB / 362.7 MB Notification: Performance of collectInitialBindings (initialization): time 0.0001972/0.5006, allocations: 161.7 kB / 472.2 MB, free: 14.85 MB / 362.7 MB Notification: Performance of simplifyInitialFunctions (initialization): time 6.08e-05/0.5006, allocations: 16 kB / 472.2 MB, free: 14.84 MB / 362.7 MB Notification: Performance of setup shared object (initialization): time 0.0001259/0.5008, allocations: 330.8 kB / 472.5 MB, free: 14.5 MB / 362.7 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0008945/0.5017, allocations: 233.2 kB / 472.7 MB, free: 14.28 MB / 362.7 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.00105/0.5027, allocations: 441 kB / 473.2 MB, free: 13.75 MB / 362.7 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.00098/0.5037, allocations: 274.1 kB / 473.4 MB, free: 13.49 MB / 362.7 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 1.044e-05/0.5038, allocations: 4 kB / 473.4 MB, free: 13.48 MB / 362.7 MB Notification: Performance of matching and sorting (n=79) (initialization): time 0.002278/0.5061, allocations: 0.6988 MB / 474.1 MB, free: 12.78 MB / 362.7 MB Notification: Performance of prepare postOptimizeDAE: time 0.0009347/0.507, allocations: 2.524 MB / 476.7 MB, free: 10.06 MB / 362.7 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 2.05e-05/0.5071, allocations: 11.95 kB / 476.7 MB, free: 10.05 MB / 362.7 MB Notification: Performance of postOpt tearingSystem (initialization): time 3.198e-05/0.5071, allocations: 8 kB / 476.7 MB, free: 10.04 MB / 362.7 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.00112/0.5082, allocations: 147.8 kB / 476.8 MB, free: 9.895 MB / 362.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 2.406e-05/0.5083, allocations: 15.94 kB / 476.8 MB, free: 9.879 MB / 362.7 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0007926/0.5091, allocations: 95.48 kB / 476.9 MB, free: 9.785 MB / 362.7 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 6.348e-05/0.5092, allocations: 24 kB / 477 MB, free: 9.762 MB / 362.7 MB Notification: Performance of prepare postOptimizeDAE: time 1.587e-05/0.5092, allocations: 6.5 kB / 477 MB, free: 9.758 MB / 362.7 MB Notification: Performance of postOpt replaceHomotopyWithSimplified (initialization): time 0.001817/0.511, allocations: 0.5932 MB / 477.6 MB, free: 9.164 MB / 362.7 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.335e-05/0.511, allocations: 8 kB / 477.6 MB, free: 9.156 MB / 362.7 MB Notification: Performance of postOpt tearingSystem (initialization): time 2.015e-05/0.5111, allocations: 12 kB / 477.6 MB, free: 9.145 MB / 362.7 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0008959/0.512, allocations: 136 kB / 477.7 MB, free: 9.012 MB / 362.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 2.39e-05/0.512, allocations: 19.92 kB / 477.7 MB, free: 8.992 MB / 362.7 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0005287/0.5126, allocations: 71.52 kB / 477.8 MB, free: 8.922 MB / 362.7 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 6.854e-05/0.5126, allocations: 35.98 kB / 477.8 MB, free: 8.887 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,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 () * 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.0005655/0.5132, allocations: 311.1 kB / 478.1 MB, free: 8.574 MB / 362.7 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.0001826/0.5134, allocations: 59.34 kB / 478.2 MB, free: 8.516 MB / 362.7 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.002219/0.5156, allocations: 0.6113 MB / 478.8 MB, free: 7.898 MB / 362.7 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 1.356e-05/0.5157, allocations: 7.984 kB / 478.8 MB, free: 7.891 MB / 362.7 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 6.482e-06/0.5157, allocations: 0 / 478.8 MB, free: 7.891 MB / 362.7 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 8.406e-06/0.5157, allocations: 0 / 478.8 MB, free: 7.891 MB / 362.7 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.001062/0.5168, allocations: 0.638 MB / 479.5 MB, free: 7.203 MB / 362.7 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 6.903e-06/0.5168, allocations: 3.953 kB / 479.5 MB, free: 7.199 MB / 362.7 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0008521/0.5177, allocations: 99.86 kB / 479.6 MB, free: 7.102 MB / 362.7 MB Notification: Performance of postOpt tearingSystem (simulation): time 7.865e-06/0.5177, allocations: 0 / 479.6 MB, free: 7.102 MB / 362.7 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 6.427e-05/0.5178, allocations: 15.98 kB / 479.6 MB, free: 7.086 MB / 362.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 7.514e-06/0.5178, allocations: 4 kB / 479.6 MB, free: 7.082 MB / 362.7 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 3.567e-06/0.5178, allocations: 7.938 kB / 479.6 MB, free: 7.074 MB / 362.7 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.003181/0.521, allocations: 0.9259 MB / 480.5 MB, free: 6.121 MB / 362.7 MB Notification: Performance of postOpt removeConstants (simulation): time 0.0001994/0.5212, allocations: 136.3 kB / 480.6 MB, free: 5.969 MB / 362.7 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 0.0001455/0.5214, allocations: 16.06 kB / 480.7 MB, free: 5.953 MB / 362.7 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0006289/0.522, allocations: 55.95 kB / 480.7 MB, free: 5.898 MB / 362.7 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.000159/0.5222, allocations: 40.36 kB / 480.8 MB, free: 5.859 MB / 362.7 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 6.433e-05/0.5223, allocations: 23.98 kB / 480.8 MB, free: 5.836 MB / 362.7 MB Notification: Performance of sorting global known variables: time 0.0005814/0.5229, allocations: 314.9 kB / 481.1 MB, free: 5.531 MB / 362.7 MB Notification: Performance of sort global known variables: time 5.31e-07/0.5229, allocations: 3.938 kB / 481.1 MB, free: 5.527 MB / 362.7 MB Notification: Performance of remove unused functions: time 0.001156/0.524, allocations: 251.1 kB / 481.3 MB, free: 5.281 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,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) * Number of clocked states: 0 () * 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.0002433/0.5243, allocations: 139.4 kB / 481.5 MB, free: 5.137 MB / 362.7 MB Notification: Performance of simCode: created initialization part: time 0.002999/0.5273, allocations: 0.8804 MB / 482.3 MB, free: 4.262 MB / 362.7 MB Notification: Performance of simCode: created event and clocks part: time 9.638e-06/0.5273, allocations: 4 kB / 482.4 MB, free: 4.258 MB / 362.7 MB Notification: Performance of simCode: created simulation system equations: time 0.001034/0.5284, allocations: 299.4 kB / 482.6 MB, free: 3.969 MB / 362.7 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0006363/0.529, allocations: 68.31 kB / 482.7 MB, free: 3.906 MB / 362.7 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.003205/0.5323, allocations: 1.372 MB / 484.1 MB, free: 2.492 MB / 362.7 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0005596/0.5329, allocations: 0.9115 MB / 485 MB, free: 1.551 MB / 362.7 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0003666/0.5333, allocations: 55.36 kB / 485 MB, free: 1.496 MB / 362.7 MB Notification: Performance of SimCode: time 1.142e-06/0.5333, allocations: 0 / 485 MB, free: 1.496 MB / 362.7 MB Notification: Performance of Templates: time 0.01707/0.5504, allocations: 7.459 MB / 492.5 MB, free: 10.04 MB / 378.7 MB make -j1 -f Modelica_3.2.3_cpp_Modelica.Blocks.Examples.TotalHarmonicDistortion.makefile (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 & ./Modelica_3.2.3_cpp_Modelica.Blocks.Examples.TotalHarmonicDistortion --alarm=480 -emit_protected > Modelica_3.2.3_cpp_Modelica.Blocks.Examples.TotalHarmonicDistortion.pipe 2>&1) diffSimulationResults("Modelica_3.2.3_cpp_Modelica.Blocks.Examples.TotalHarmonicDistortion_res.mat","/var/lib/jenkins1/ws/OpenModelicaLibraryTestingWork/Reference-modelica.org/ReferenceResults/MAP-LIB_ReferenceResults/v3.2.3+build.4/Modelica/Blocks/Examples/TotalHarmonicDistortion/TotalHarmonicDistortion.csv","../files/Modelica_3.2.3_cpp_Modelica.Blocks.Examples.TotalHarmonicDistortion.diff",relTol=0.003,relTolDiffMinMax=0.003,rangeDelta=0.001) Reference file matches