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.00283/0.00283, allocations: 181.5 kB / 17.41 MB, free: 4.406 MB / 13.93 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 3.2.3+maint.om/package.mo): time 3.533/3.533, allocations: 205.4 MB / 223.6 MB, free: 9.016 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.001314/0.001314, allocations: 97.36 kB / 271.9 MB, free: 8.254 MB / 218.7 MB Notification: Performance of FrontEnd - loaded program: time 0.0006266/0.000627, allocations: 11.94 kB / 328.1 MB, free: 15.96 MB / 282.7 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.7517/0.7524, allocations: 47.58 MB / 375.7 MB, free: 45.43 MB / 298.7 MB Notification: Performance of FrontEnd - scodeFlatten: time 0.2109/0.9634, allocations: 79.74 MB / 455.4 MB, free: 0.8945 MB / 330.7 MB Notification: Performance of FrontEnd - mkProgramGraph: time 0.0004559/0.964, allocations: 75.97 kB / 455.5 MB, free: 0.8203 MB / 330.7 MB Notification: Performance of FrontEnd - DAE generated: time 0.04755/1.012, allocations: 10.24 MB / 465.8 MB, free: 6.543 MB / 346.7 MB Notification: Performance of FrontEnd: time 4.829e-06/1.012, allocations: 0 / 465.8 MB, free: 6.543 MB / 346.7 MB Notification: Performance of Transformations before backend: time 0.0001291/1.012, allocations: 24.16 kB / 465.8 MB, free: 6.52 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.003901/1.016, allocations: 0.9138 MB / 466.7 MB, free: 5.543 MB / 346.7 MB Notification: Performance of prepare preOptimizeDAE: time 8.592e-05/1.016, allocations: 16.02 kB / 466.7 MB, free: 5.527 MB / 346.7 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0005979/1.016, allocations: 80 kB / 466.8 MB, free: 5.449 MB / 346.7 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.002/1.018, allocations: 0.534 MB / 467.3 MB, free: 4.875 MB / 346.7 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 0.0001038/1.019, allocations: 53.67 kB / 467.4 MB, free: 4.824 MB / 346.7 MB Notification: Performance of preOpt expandDerOperator (simulation): time 0.000277/1.019, allocations: 60.38 kB / 467.4 MB, free: 4.766 MB / 346.7 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.003186/1.022, allocations: 0.6643 MB / 468.1 MB, free: 4.082 MB / 346.7 MB Notification: Performance of preOpt findStateOrder (simulation): time 5.729e-05/1.022, allocations: 192 / 468.1 MB, free: 4.082 MB / 346.7 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 0.0001468/1.022, allocations: 27.94 kB / 468.1 MB, free: 4.055 MB / 346.7 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 2.442e-05/1.022, allocations: 16 kB / 468.2 MB, free: 4.039 MB / 346.7 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.002196/1.025, allocations: 0.531 MB / 468.7 MB, free: 3.508 MB / 346.7 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.006392/1.031, allocations: 1.955 MB / 470.6 MB, free: 1.488 MB / 346.7 MB Notification: Performance of preOpt comSubExp (simulation): time 0.002054/1.033, allocations: 0.5247 MB / 471.2 MB, free: 0.957 MB / 346.7 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0008454/1.034, allocations: 238.1 kB / 471.4 MB, free: 0.7227 MB / 346.7 MB Notification: Performance of preOpt evalFunc (simulation): time 8.47e-05/1.034, allocations: 16.42 kB / 471.4 MB, free: 0.707 MB / 346.7 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.001285/1.035, allocations: 417.5 kB / 471.8 MB, free: 296 kB / 346.7 MB Notification: Performance of pre-optimization done (n=53): time 5.611e-06/1.035, allocations: 0 / 471.8 MB, free: 296 kB / 346.7 MB Notification: Performance of matching and sorting (n=53): time 0.003272/1.039, allocations: 0.7913 MB / 472.6 MB, free: 15.49 MB / 362.7 MB Notification: Performance of inlineWhenForInitialization (initialization): time 0.0001696/1.039, allocations: 115.2 kB / 472.7 MB, free: 15.35 MB / 362.7 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.001439/1.04, allocations: 461.8 kB / 473.2 MB, free: 14.89 MB / 362.7 MB Notification: Performance of collectPreVariables (initialization): time 0.000146/1.041, allocations: 49.62 kB / 473.2 MB, free: 14.84 MB / 362.7 MB Notification: Performance of collectInitialEqns (initialization): time 0.0005069/1.041, allocations: 312.4 kB / 473.5 MB, free: 14.52 MB / 362.7 MB Notification: Performance of collectInitialBindings (initialization): time 0.0003219/1.041, allocations: 157.8 kB / 473.7 MB, free: 14.37 MB / 362.7 MB Notification: Performance of simplifyInitialFunctions (initialization): time 6.552e-05/1.041, allocations: 15.94 kB / 473.7 MB, free: 14.35 MB / 362.7 MB Notification: Performance of setup shared object (initialization): time 0.0003334/1.042, allocations: 374.7 kB / 474.1 MB, free: 13.98 MB / 362.7 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0008505/1.043, allocations: 229.1 kB / 474.3 MB, free: 13.75 MB / 362.7 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.001102/1.044, allocations: 445 kB / 474.7 MB, free: 13.22 MB / 362.7 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.00195/1.046, allocations: 0.67 MB / 475.4 MB, free: 12.47 MB / 362.7 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 1.173e-05/1.046, allocations: 4 kB / 475.4 MB, free: 12.46 MB / 362.7 MB Notification: Performance of matching and sorting (n=79) (initialization): time 0.002539/1.048, allocations: 0.7205 MB / 476.1 MB, free: 11.74 MB / 362.7 MB Notification: Performance of prepare postOptimizeDAE: time 0.0003199/1.049, allocations: 280.4 kB / 476.4 MB, free: 11.38 MB / 362.7 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 2.236e-05/1.049, allocations: 8 kB / 476.4 MB, free: 11.37 MB / 362.7 MB Notification: Performance of postOpt tearingSystem (initialization): time 4.313e-05/1.049, allocations: 8 kB / 476.4 MB, free: 11.36 MB / 362.7 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0009284/1.05, allocations: 155.7 kB / 476.6 MB, free: 11.21 MB / 362.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 3.736e-05/1.05, allocations: 12 kB / 476.6 MB, free: 11.2 MB / 362.7 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0009123/1.051, allocations: 91.42 kB / 476.7 MB, free: 11.11 MB / 362.7 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 0.0001012/1.051, allocations: 31.94 kB / 476.7 MB, free: 11.07 MB / 362.7 MB Notification: Performance of prepare postOptimizeDAE: time 1.752e-05/1.051, allocations: 4 kB / 476.7 MB, free: 11.07 MB / 362.7 MB Notification: Performance of postOpt replaceHomotopyWithSimplified (initialization): time 0.00192/1.053, allocations: 0.591 MB / 477.3 MB, free: 10.48 MB / 362.7 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 3.085e-05/1.053, allocations: 11.98 kB / 477.3 MB, free: 10.47 MB / 362.7 MB Notification: Performance of postOpt tearingSystem (initialization): time 2.444e-05/1.053, allocations: 8 kB / 477.3 MB, free: 10.46 MB / 362.7 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0007839/1.054, allocations: 132 kB / 477.4 MB, free: 10.33 MB / 362.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 2.346e-05/1.054, allocations: 15.98 kB / 477.4 MB, free: 10.32 MB / 362.7 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0007802/1.055, allocations: 71.61 kB / 477.5 MB, free: 10.25 MB / 362.7 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 9.733e-05/1.055, allocations: 27.98 kB / 477.5 MB, free: 10.22 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.0008295/1.055, allocations: 323 kB / 477.9 MB, free: 9.895 MB / 362.7 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.0002842/1.056, allocations: 59.25 kB / 477.9 MB, free: 9.836 MB / 362.7 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.002258/1.058, allocations: 0.6152 MB / 478.5 MB, free: 9.219 MB / 362.7 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 1.631e-05/1.058, allocations: 8 kB / 478.5 MB, free: 9.211 MB / 362.7 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 1.034e-05/1.058, allocations: 3.938 kB / 478.5 MB, free: 9.207 MB / 362.7 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 1.118e-05/1.058, allocations: 0 / 478.5 MB, free: 9.207 MB / 362.7 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.001462/1.06, allocations: 0.6341 MB / 479.2 MB, free: 8.523 MB / 362.7 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 1.496e-05/1.06, allocations: 3.984 kB / 479.2 MB, free: 8.52 MB / 362.7 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0007424/1.06, allocations: 99.88 kB / 479.3 MB, free: 8.422 MB / 362.7 MB Notification: Performance of postOpt tearingSystem (simulation): time 1.604e-05/1.06, allocations: 4 kB / 479.3 MB, free: 8.418 MB / 362.7 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 8.271e-05/1.061, allocations: 11.98 kB / 479.3 MB, free: 8.406 MB / 362.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 9.899e-06/1.061, allocations: 4 kB / 479.3 MB, free: 8.402 MB / 362.7 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 5.24e-06/1.061, allocations: 3.984 kB / 479.3 MB, free: 8.398 MB / 362.7 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.003402/1.064, allocations: 0.9414 MB / 480.2 MB, free: 7.434 MB / 362.7 MB Notification: Performance of postOpt removeConstants (simulation): time 0.0003402/1.064, allocations: 128.4 kB / 480.4 MB, free: 7.289 MB / 362.7 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 0.0002071/1.065, allocations: 19.98 kB / 480.4 MB, free: 7.27 MB / 362.7 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0005647/1.065, allocations: 51.91 kB / 480.4 MB, free: 7.219 MB / 362.7 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0002278/1.065, allocations: 52.25 kB / 480.5 MB, free: 7.168 MB / 362.7 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 8.919e-05/1.066, allocations: 23.97 kB / 480.5 MB, free: 7.145 MB / 362.7 MB Notification: Performance of sorting global known variables: time 0.0009563/1.067, allocations: 314.9 kB / 480.8 MB, free: 6.84 MB / 362.7 MB Notification: Performance of sort global known variables: time 5.41e-07/1.067, allocations: 0 / 480.8 MB, free: 6.84 MB / 362.7 MB Notification: Performance of remove unused functions: time 0.00183/1.068, allocations: 243.1 kB / 481.1 MB, free: 6.602 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.0004048/1.069, allocations: 143.4 kB / 481.2 MB, free: 6.449 MB / 362.7 MB Notification: Performance of simCode: created initialization part: time 0.005661/1.074, allocations: 0.8852 MB / 482.1 MB, free: 5.566 MB / 362.7 MB Notification: Performance of simCode: created event and clocks part: time 1.112e-05/1.075, allocations: 0 / 482.1 MB, free: 5.566 MB / 362.7 MB Notification: Performance of simCode: created simulation system equations: time 0.001071/1.076, allocations: 295.5 kB / 482.4 MB, free: 5.277 MB / 362.7 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.001235/1.077, allocations: 84.28 kB / 482.5 MB, free: 5.199 MB / 362.7 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.004114/1.081, allocations: 1.384 MB / 483.8 MB, free: 3.781 MB / 362.7 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0009793/1.082, allocations: 0.896 MB / 484.7 MB, free: 2.855 MB / 362.7 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0003986/1.083, allocations: 51.42 kB / 484.8 MB, free: 2.805 MB / 362.7 MB Notification: Performance of SimCode: time 2.214e-06/1.083, allocations: 0 / 484.8 MB, free: 2.805 MB / 362.7 MB Notification: Performance of Templates: time 0.02417/1.107, allocations: 7.586 MB / 492.4 MB, free: 11.22 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