Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries/ --ompython_omhome=/usr Modelica_trunk_cpp_Modelica.Blocks.Examples.TotalHarmonicDistortion.conf.json 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) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices trunk/package.mo", uses=false) Using package ModelicaServices with version trunk (/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices trunk/package.mo) 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) 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_trunk_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_trunk_cpp_Modelica.Blocks.Examples.TotalHarmonicDistortion") Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex trunk/package.mo): time 0.0009624/0.0009624, allocations: 199.3 kB / 18.06 MB, free: 3.523 MB / 13.93 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica trunk/package.mo): time 1.297/1.297, allocations: 226.5 MB / 245.4 MB, free: 8.227 MB / 202.7 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices trunk/package.mo): time 0.0007443/0.0007442, allocations: 100.5 kB / 297.4 MB, free: 6.926 MB / 234.7 MB Notification: Performance of FrontEnd - loaded program: time 0.0002151/0.0002153, allocations: 8 kB / 357.4 MB, free: 10.99 MB / 298.7 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.1943/0.1946, allocations: 51.29 MB / 408.7 MB, free: 27.73 MB / 298.7 MB Notification: Performance of FrontEnd - scodeFlatten: time 0.08823/0.2828, allocations: 81.76 MB / 490.4 MB, free: 9.863 MB / 362.7 MB Notification: Performance of FrontEnd - mkProgramGraph: time 0.0001672/0.2831, allocations: 71.97 kB / 490.5 MB, free: 9.793 MB / 362.7 MB Notification: Performance of FrontEnd - DAE generated: time 0.02758/0.3106, allocations: 10.8 MB / 0.4895 GB, free: 14.96 MB / 378.7 MB Notification: Performance of FrontEnd: time 2.294e-06/0.3107, allocations: 0 / 0.4895 GB, free: 14.96 MB / 378.7 MB Notification: Performance of Transformations before backend: time 3.546e-05/0.3107, allocations: 20 kB / 0.4896 GB, free: 14.95 MB / 378.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.00155/0.3123, allocations: 0.9516 MB / 0.4905 GB, free: 13.94 MB / 378.7 MB Notification: Performance of prepare preOptimizeDAE: time 3.473e-05/0.3123, allocations: 12.03 kB / 0.4905 GB, free: 13.93 MB / 378.7 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0006156/0.3129, allocations: 163.8 kB / 0.4907 GB, free: 13.77 MB / 378.7 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0007163/0.3137, allocations: 0.5458 MB / 0.4912 GB, free: 13.18 MB / 378.7 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 8.055e-05/0.3138, allocations: 49.69 kB / 0.4912 GB, free: 13.13 MB / 378.7 MB Notification: Performance of preOpt expandDerOperator (simulation): time 9.807e-05/0.3139, allocations: 68.28 kB / 0.4913 GB, free: 13.06 MB / 378.7 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.001206/0.3151, allocations: 0.6805 MB / 0.492 GB, free: 12.36 MB / 378.7 MB Notification: Performance of preOpt findStateOrder (simulation): time 2.329e-05/0.3151, allocations: 4.188 kB / 0.492 GB, free: 12.36 MB / 378.7 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 6.211e-05/0.3152, allocations: 27.92 kB / 0.492 GB, free: 12.33 MB / 378.7 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 1.232e-05/0.3152, allocations: 19.94 kB / 0.492 GB, free: 12.31 MB / 378.7 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.001113/0.3163, allocations: 0.5517 MB / 0.4926 GB, free: 11.76 MB / 378.7 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.002982/0.3193, allocations: 2.019 MB / 0.4945 GB, free: 9.672 MB / 378.7 MB Notification: Performance of preOpt comSubExp (simulation): time 0.0009273/0.3203, allocations: 0.5243 MB / 0.495 GB, free: 9.141 MB / 378.7 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0004524/0.3207, allocations: 238.1 kB / 0.4953 GB, free: 8.906 MB / 378.7 MB Notification: Performance of preOpt evalFunc (simulation): time 4.55e-05/0.3208, allocations: 8.422 kB / 0.4953 GB, free: 8.898 MB / 378.7 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0007241/0.3215, allocations: 421.1 kB / 0.4957 GB, free: 8.477 MB / 378.7 MB Notification: Performance of pre-optimization done (n=53): time 2.975e-06/0.3215, allocations: 0 / 0.4957 GB, free: 8.477 MB / 378.7 MB Notification: Performance of matching and sorting (n=53): time 0.001653/0.3232, allocations: 0.799 MB / 0.4965 GB, free: 7.668 MB / 378.7 MB Notification: Performance of inlineWhenForInitialization (initialization): time 6.784e-05/0.3233, allocations: 115.2 kB / 0.4966 GB, free: 7.531 MB / 378.7 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0005389/0.3238, allocations: 0.494 MB / 0.497 GB, free: 7.027 MB / 378.7 MB Notification: Performance of collectPreVariables (initialization): time 5.239e-05/0.3239, allocations: 37.7 kB / 0.4971 GB, free: 6.984 MB / 378.7 MB Notification: Performance of collectInitialEqns (initialization): time 0.0002244/0.3241, allocations: 328.4 kB / 0.4974 GB, free: 6.656 MB / 378.7 MB Notification: Performance of collectInitialBindings (initialization): time 0.0001263/0.3242, allocations: 165.7 kB / 0.4976 GB, free: 6.492 MB / 378.7 MB Notification: Performance of simplifyInitialFunctions (initialization): time 3.177e-05/0.3243, allocations: 12 kB / 0.4976 GB, free: 6.48 MB / 378.7 MB Notification: Performance of setup shared object (initialization): time 0.0001393/0.3244, allocations: 366.8 kB / 0.4979 GB, free: 6.113 MB / 378.7 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0004836/0.3249, allocations: 229.2 kB / 0.4981 GB, free: 5.887 MB / 378.7 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0005904/0.3255, allocations: 457 kB / 0.4986 GB, free: 5.352 MB / 378.7 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.001048/0.3266, allocations: 0.6668 MB / 0.4992 GB, free: 4.598 MB / 378.7 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 4.128e-06/0.3266, allocations: 4 kB / 0.4992 GB, free: 4.594 MB / 378.7 MB Notification: Performance of matching and sorting (n=79) (initialization): time 0.00132/0.3279, allocations: 0.7367 MB / 0.4999 GB, free: 3.855 MB / 378.7 MB Notification: Performance of prepare postOptimizeDAE: time 0.0001484/0.3281, allocations: 277.2 kB / 0.5002 GB, free: 3.492 MB / 378.7 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.332e-05/0.3281, allocations: 15.94 kB / 0.5002 GB, free: 3.477 MB / 378.7 MB Notification: Performance of postOpt tearingSystem (initialization): time 1.933e-05/0.3281, allocations: 8 kB / 0.5002 GB, free: 3.469 MB / 378.7 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0005191/0.3286, allocations: 143.8 kB / 0.5004 GB, free: 3.328 MB / 378.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.683e-05/0.3287, allocations: 15.94 kB / 0.5004 GB, free: 3.312 MB / 378.7 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0004256/0.3291, allocations: 95.48 kB / 0.5005 GB, free: 3.219 MB / 378.7 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 4.256e-05/0.3292, allocations: 24 kB / 0.5005 GB, free: 3.195 MB / 378.7 MB Notification: Performance of prepare postOptimizeDAE: time 6.291e-06/0.3292, allocations: 7.938 kB / 0.5005 GB, free: 3.188 MB / 378.7 MB Notification: Performance of postOpt replaceHomotopyWithSimplified (initialization): time 0.001014/0.3302, allocations: 0.6039 MB / 0.5011 GB, free: 2.586 MB / 378.7 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 7.805e-06/0.3302, allocations: 11.94 kB / 0.5011 GB, free: 2.574 MB / 378.7 MB Notification: Performance of postOpt tearingSystem (initialization): time 8.025e-06/0.3302, allocations: 8 kB / 0.5011 GB, free: 2.566 MB / 378.7 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0004187/0.3306, allocations: 131.8 kB / 0.5012 GB, free: 2.438 MB / 378.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.209e-05/0.3307, allocations: 15.92 kB / 0.5013 GB, free: 2.422 MB / 378.7 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0003401/0.331, allocations: 79.53 kB / 0.5013 GB, free: 2.344 MB / 378.7 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 3.81e-05/0.3311, allocations: 28 kB / 0.5014 GB, free: 2.316 MB / 378.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 () * 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.0003833/0.3314, allocations: 319.5 kB / 0.5017 GB, free: 1.996 MB / 378.7 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 8.173e-05/0.3315, allocations: 55.34 kB / 0.5017 GB, free: 1.941 MB / 378.7 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.001265/0.3328, allocations: 0.627 MB / 0.5023 GB, free: 1.305 MB / 378.7 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 7.565e-06/0.3328, allocations: 4 kB / 0.5023 GB, free: 1.301 MB / 378.7 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 5.25e-06/0.3328, allocations: 0 / 0.5023 GB, free: 1.301 MB / 378.7 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 8.786e-06/0.3329, allocations: 7.984 kB / 0.5023 GB, free: 1.293 MB / 378.7 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.000707/0.3336, allocations: 0.6535 MB / 0.503 GB, free: 0.5898 MB / 378.7 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 2.314e-06/0.3336, allocations: 0 / 0.503 GB, free: 0.5898 MB / 378.7 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0004427/0.334, allocations: 103.9 kB / 0.5031 GB, free: 500 kB / 378.7 MB Notification: Performance of postOpt tearingSystem (simulation): time 4.027e-06/0.334, allocations: 0 / 0.5031 GB, free: 500 kB / 378.7 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 4.449e-05/0.3341, allocations: 15.98 kB / 0.5031 GB, free: 484 kB / 378.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 4.569e-06/0.3341, allocations: 4 kB / 0.5031 GB, free: 480 kB / 378.7 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 1.352e-06/0.3341, allocations: 0 / 0.5031 GB, free: 480 kB / 378.7 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.1589/0.493, allocations: 0.9305 MB / 0.504 GB, free: 92.69 MB / 378.7 MB Notification: Performance of postOpt removeConstants (simulation): time 0.00018/0.4932, allocations: 135.9 kB / 0.5041 GB, free: 92.6 MB / 378.7 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 0.0001041/0.4933, allocations: 17.62 kB / 0.5041 GB, free: 92.6 MB / 378.7 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0003597/0.4937, allocations: 52.56 kB / 0.5042 GB, free: 92.6 MB / 378.7 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0001408/0.4938, allocations: 45.55 kB / 0.5042 GB, free: 92.6 MB / 378.7 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 4.559e-05/0.4939, allocations: 20.23 kB / 0.5043 GB, free: 92.6 MB / 378.7 MB Notification: Performance of sorting global known variables: time 0.0004513/0.4943, allocations: 338.6 kB / 0.5046 GB, free: 92.51 MB / 378.7 MB Notification: Performance of sort global known variables: time 1.2e-07/0.4943, allocations: 0 / 0.5046 GB, free: 92.51 MB / 378.7 MB Notification: Performance of remove unused functions: time 0.0008729/0.4952, allocations: 253.7 kB / 0.5048 GB, free: 92.51 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) * 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.000198/0.4954, allocations: 142.2 kB / 0.505 GB, free: 92.42 MB / 378.7 MB Notification: Performance of simCode: created initialization part: time 0.001762/0.4972, allocations: 0.9007 MB / 0.5058 GB, free: 92.42 MB / 378.7 MB Notification: Performance of simCode: created event and clocks part: time 5.3e-06/0.4972, allocations: 1.969 kB / 0.5058 GB, free: 92.42 MB / 378.7 MB Notification: Performance of simCode: created simulation system equations: time 0.0005538/0.4978, allocations: 295.6 kB / 0.5061 GB, free: 92.42 MB / 378.7 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0004713/0.4983, allocations: 80.3 kB / 0.5062 GB, free: 92.42 MB / 378.7 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.002105/0.5004, allocations: 1.422 MB / 0.5076 GB, free: 91.71 MB / 378.7 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0004169/0.5008, allocations: 0.9055 MB / 0.5085 GB, free: 91 MB / 378.7 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0002134/0.501, allocations: 59.7 kB / 0.5085 GB, free: 91 MB / 378.7 MB Notification: Performance of SimCode: time 3.3e-07/0.501, allocations: 0.5 kB / 0.5085 GB, free: 91 MB / 378.7 MB Notification: Performance of Templates: time 0.009225/0.5103, allocations: 7.895 MB / 0.5162 GB, free: 90.48 MB / 378.7 MB make -j1 -f Modelica_trunk_cpp_Modelica.Blocks.Examples.TotalHarmonicDistortion.makefile (rm -f Modelica_trunk_cpp_Modelica.Blocks.Examples.TotalHarmonicDistortion.pipe ; mkfifo Modelica_trunk_cpp_Modelica.Blocks.Examples.TotalHarmonicDistortion.pipe ; head -c 1048576 < Modelica_trunk_cpp_Modelica.Blocks.Examples.TotalHarmonicDistortion.pipe >> ../files/Modelica_trunk_cpp_Modelica.Blocks.Examples.TotalHarmonicDistortion.sim & ./Modelica_trunk_cpp_Modelica.Blocks.Examples.TotalHarmonicDistortion --alarm=480 -emit_protected > Modelica_trunk_cpp_Modelica.Blocks.Examples.TotalHarmonicDistortion.pipe 2>&1) diffSimulationResults("Modelica_trunk_cpp_Modelica.Blocks.Examples.TotalHarmonicDistortion_res.mat","/var/lib/jenkins1/ws/OpenModelicaLibraryTestingWork/Reference-modelica.org/ReferenceResults/MAP-LIB_ReferenceResults/v4.0.0/Modelica/Blocks/Examples/TotalHarmonicDistortion/TotalHarmonicDistortion.csv","../files/Modelica_trunk_cpp_Modelica.Blocks.Examples.TotalHarmonicDistortion.diff",relTol=0.003,relTolDiffMinMax=0.003,rangeDelta=0.001) Reference file matches