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.001486/0.001486, allocations: 193.5 kB / 17.05 MB, free: 5.102 MB / 13.93 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica trunk/package.mo): time 1.39/1.39, allocations: 226.6 MB / 244.3 MB, free: 8.309 MB / 202.7 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices trunk/package.mo): time 0.0008009/0.0008008, allocations: 104.2 kB / 296.4 MB, free: 7.004 MB / 234.7 MB Notification: Performance of FrontEnd - loaded program: time 0.0002168/0.0002168, allocations: 8 kB / 356.2 MB, free: 11.21 MB / 298.7 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.2074/0.2076, allocations: 51.3 MB / 407.5 MB, free: 27.82 MB / 298.7 MB Notification: Performance of NFInst.instantiate(Modelica.Blocks.Examples.TotalHarmonicDistortion): time 0.002614/0.2103, allocations: 3.141 MB / 410.6 MB, free: 24.67 MB / 298.7 MB Notification: Performance of NFInst.instExpressions: time 0.001465/0.2118, allocations: 1.243 MB / 411.9 MB, free: 23.42 MB / 298.7 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.0002259/0.212, allocations: 16.44 kB / 411.9 MB, free: 23.41 MB / 298.7 MB Notification: Performance of NFTyping.typeComponents: time 0.0001495/0.2122, allocations: 47.44 kB / 411.9 MB, free: 23.36 MB / 298.7 MB Notification: Performance of NFTyping.typeBindings: time 0.0002821/0.2125, allocations: 106.2 kB / 412 MB, free: 23.26 MB / 298.7 MB Notification: Performance of NFTyping.typeClassSections: time 0.0004676/0.213, allocations: 257.8 kB / 412.3 MB, free: 23.01 MB / 298.7 MB Notification: Performance of NFFlatten.flatten: time 0.000456/0.2134, allocations: 0.7719 MB / 413.1 MB, free: 22.23 MB / 298.7 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0003423/0.2138, allocations: 281.8 kB / 413.3 MB, free: 21.95 MB / 298.7 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0002506/0.214, allocations: 238.8 kB / 413.6 MB, free: 21.71 MB / 298.7 MB Notification: Performance of NFSimplifyModel.simplify: time 0.000242/0.2143, allocations: 262.6 kB / 413.8 MB, free: 21.46 MB / 298.7 MB Notification: Performance of NFPackage.collectConstants: time 6.124e-05/0.2144, allocations: 31.94 kB / 413.9 MB, free: 21.43 MB / 298.7 MB Notification: Performance of NFFlatten.collectFunctions: time 0.000111/0.2145, allocations: 39.98 kB / 413.9 MB, free: 21.39 MB / 298.7 MB Notification: Performance of NFScalarize.scalarize: time 8.095e-05/0.2146, allocations: 115.5 kB / 414 MB, free: 21.27 MB / 298.7 MB Notification: Performance of NFVerifyModel.verify: time 9.708e-05/0.2147, allocations: 149.3 kB / 414.2 MB, free: 21.12 MB / 298.7 MB Notification: Performance of NFConvertDAE.convert: time 0.0004999/0.2152, allocations: 0.7646 MB / 414.9 MB, free: 20.36 MB / 298.7 MB Notification: Performance of FrontEnd - DAE generated: time 5.791e-06/0.2152, allocations: 0 / 414.9 MB, free: 20.36 MB / 298.7 MB Notification: Performance of FrontEnd: time 1.744e-06/0.2152, allocations: 0 / 414.9 MB, free: 20.36 MB / 298.7 MB Notification: Performance of Transformations before backend: time 1.116e-05/0.2152, allocations: 0 / 414.9 MB, free: 20.36 MB / 298.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.001526/0.2167, allocations: 0.9431 MB / 415.9 MB, free: 19.36 MB / 298.7 MB Notification: Performance of prepare preOptimizeDAE: time 4.055e-05/0.2168, allocations: 8.031 kB / 415.9 MB, free: 19.35 MB / 298.7 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0006124/0.2174, allocations: 162.9 kB / 416 MB, free: 19.19 MB / 298.7 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0008404/0.2183, allocations: 0.6071 MB / 416.6 MB, free: 18.54 MB / 298.7 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 4.003e-05/0.2183, allocations: 49.27 kB / 416.7 MB, free: 18.49 MB / 298.7 MB Notification: Performance of preOpt expandDerOperator (simulation): time 8.045e-05/0.2184, allocations: 64 kB / 416.8 MB, free: 18.43 MB / 298.7 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.001057/0.2195, allocations: 0.6722 MB / 417.4 MB, free: 17.74 MB / 298.7 MB Notification: Performance of preOpt findStateOrder (simulation): time 2.209e-05/0.2195, allocations: 11.98 kB / 417.4 MB, free: 17.73 MB / 298.7 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 5.501e-05/0.2196, allocations: 23.94 kB / 417.5 MB, free: 17.7 MB / 298.7 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 1.141e-05/0.2196, allocations: 16 kB / 417.5 MB, free: 17.69 MB / 298.7 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.001053/0.2206, allocations: 0.5399 MB / 418 MB, free: 17.15 MB / 298.7 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.00251/0.2231, allocations: 1.941 MB / 420 MB, free: 15.13 MB / 298.7 MB Notification: Performance of preOpt comSubExp (simulation): time 0.0008758/0.224, allocations: 0.5158 MB / 420.5 MB, free: 14.61 MB / 298.7 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0004108/0.2245, allocations: 238.1 kB / 420.7 MB, free: 14.38 MB / 298.7 MB Notification: Performance of preOpt evalFunc (simulation): time 4.457e-05/0.2245, allocations: 8.422 kB / 420.7 MB, free: 14.37 MB / 298.7 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0006606/0.2252, allocations: 405.2 kB / 421.1 MB, free: 13.96 MB / 298.7 MB Notification: Performance of pre-optimization done (n=53): time 3.326e-06/0.2252, allocations: 0 / 421.1 MB, free: 13.96 MB / 298.7 MB Notification: Performance of matching and sorting (n=53): time 0.001468/0.2267, allocations: 0.7872 MB / 421.9 MB, free: 13.17 MB / 298.7 MB Notification: Performance of inlineWhenForInitialization (initialization): time 5.046e-05/0.2267, allocations: 115.2 kB / 422 MB, free: 13.03 MB / 298.7 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0004123/0.2272, allocations: 474 kB / 422.5 MB, free: 12.56 MB / 298.7 MB Notification: Performance of collectPreVariables (initialization): time 4.13e-05/0.2272, allocations: 41.7 kB / 422.5 MB, free: 12.51 MB / 298.7 MB Notification: Performance of collectInitialEqns (initialization): time 0.0001874/0.2274, allocations: 340.3 kB / 422.8 MB, free: 12.17 MB / 298.7 MB Notification: Performance of collectInitialBindings (initialization): time 0.0001057/0.2275, allocations: 157.8 kB / 423 MB, free: 12.02 MB / 298.7 MB Notification: Performance of simplifyInitialFunctions (initialization): time 2.702e-05/0.2275, allocations: 20 kB / 423 MB, free: 12 MB / 298.7 MB Notification: Performance of setup shared object (initialization): time 0.0001029/0.2277, allocations: 370.7 kB / 423.4 MB, free: 11.62 MB / 298.7 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0004651/0.2281, allocations: 221.1 kB / 423.6 MB, free: 11.41 MB / 298.7 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0005211/0.2287, allocations: 436.9 kB / 424 MB, free: 10.89 MB / 298.7 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.0004778/0.2291, allocations: 258.1 kB / 424.3 MB, free: 10.64 MB / 298.7 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 5.911e-06/0.2292, allocations: 0 / 424.3 MB, free: 10.64 MB / 298.7 MB Notification: Performance of matching and sorting (n=79) (initialization): time 0.001142/0.2303, allocations: 0.714 MB / 425 MB, free: 9.918 MB / 298.7 MB Notification: Performance of prepare postOptimizeDAE: time 0.0001393/0.2305, allocations: 296.2 kB / 425.3 MB, free: 9.539 MB / 298.7 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.27e-05/0.2305, allocations: 4 kB / 425.3 MB, free: 9.535 MB / 298.7 MB Notification: Performance of postOpt tearingSystem (initialization): time 2.797e-05/0.2305, allocations: 15.95 kB / 425.3 MB, free: 9.52 MB / 298.7 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0005052/0.231, allocations: 143.7 kB / 425.4 MB, free: 9.379 MB / 298.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.747e-05/0.231, allocations: 15.98 kB / 425.5 MB, free: 9.363 MB / 298.7 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0003937/0.2314, allocations: 87.5 kB / 425.5 MB, free: 9.277 MB / 298.7 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 3.876e-05/0.2315, allocations: 31.98 kB / 425.6 MB, free: 9.246 MB / 298.7 MB Notification: Performance of prepare postOptimizeDAE: time 6.152e-06/0.2315, allocations: 4 kB / 425.6 MB, free: 9.242 MB / 298.7 MB Notification: Performance of postOpt replaceHomotopyWithSimplified (initialization): time 0.0008957/0.2324, allocations: 0.5881 MB / 426.2 MB, free: 8.656 MB / 298.7 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 5.24e-06/0.2324, allocations: 4 kB / 426.2 MB, free: 8.652 MB / 298.7 MB Notification: Performance of postOpt tearingSystem (initialization): time 1.072e-05/0.2324, allocations: 16 kB / 426.2 MB, free: 8.637 MB / 298.7 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0004113/0.2329, allocations: 127.8 kB / 426.3 MB, free: 8.512 MB / 298.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 9.678e-06/0.2329, allocations: 15.94 kB / 426.3 MB, free: 8.496 MB / 298.7 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0003191/0.2332, allocations: 75.72 kB / 426.4 MB, free: 8.422 MB / 298.7 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 3.279e-05/0.2332, allocations: 32 kB / 426.4 MB, free: 8.391 MB / 298.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.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.0003316/0.2336, allocations: 311.5 kB / 426.7 MB, free: 8.078 MB / 298.7 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 6.827e-05/0.2337, allocations: 63.28 kB / 426.8 MB, free: 8.016 MB / 298.7 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.001095/0.2348, allocations: 0.6299 MB / 427.4 MB, free: 7.387 MB / 298.7 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 6.061e-06/0.2348, allocations: 4 kB / 427.4 MB, free: 7.383 MB / 298.7 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 5.56e-06/0.2348, allocations: 0 / 427.4 MB, free: 7.383 MB / 298.7 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 6.892e-06/0.2348, allocations: 3.984 kB / 427.4 MB, free: 7.379 MB / 298.7 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0005271/0.2353, allocations: 0.6419 MB / 428.1 MB, free: 6.684 MB / 298.7 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 2.234e-06/0.2353, allocations: 0 / 428.1 MB, free: 6.684 MB / 298.7 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0004059/0.2358, allocations: 111.8 kB / 428.2 MB, free: 6.574 MB / 298.7 MB Notification: Performance of postOpt tearingSystem (simulation): time 3.877e-06/0.2358, allocations: 3.984 kB / 428.2 MB, free: 6.57 MB / 298.7 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 3.722e-05/0.2358, allocations: 15.98 kB / 428.2 MB, free: 6.555 MB / 298.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 3.307e-06/0.2358, allocations: 4 kB / 428.2 MB, free: 6.551 MB / 298.7 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 1.323e-06/0.2358, allocations: 0 / 428.2 MB, free: 6.551 MB / 298.7 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.001464/0.2373, allocations: 0.9255 MB / 429.1 MB, free: 5.609 MB / 298.7 MB Notification: Performance of postOpt removeConstants (simulation): time 7.025e-05/0.2374, allocations: 132.4 kB / 429.3 MB, free: 5.461 MB / 298.7 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 7.423e-05/0.2375, allocations: 23.94 kB / 429.3 MB, free: 5.438 MB / 298.7 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.000311/0.2378, allocations: 51.97 kB / 429.3 MB, free: 5.387 MB / 298.7 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 9.61e-05/0.2379, allocations: 44.48 kB / 429.4 MB, free: 5.344 MB / 298.7 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 3.156e-05/0.2379, allocations: 19.98 kB / 429.4 MB, free: 5.324 MB / 298.7 MB Notification: Performance of sorting global known variables: time 0.0002693/0.2382, allocations: 326.9 kB / 429.7 MB, free: 5.008 MB / 298.7 MB Notification: Performance of sort global known variables: time 1.3e-07/0.2382, allocations: 0 / 429.7 MB, free: 5.008 MB / 298.7 MB Notification: Performance of remove unused functions: time 0.0006116/0.2388, allocations: 247 kB / 430 MB, free: 4.766 MB / 298.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: 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.0001307/0.239, allocations: 128.8 kB / 430.1 MB, free: 4.633 MB / 298.7 MB Notification: Performance of simCode: created initialization part: time 0.00138/0.2403, allocations: 0.8725 MB / 431 MB, free: 3.762 MB / 298.7 MB Notification: Performance of simCode: created event and clocks part: time 3.897e-06/0.2404, allocations: 4 kB / 431 MB, free: 3.758 MB / 298.7 MB Notification: Performance of simCode: created simulation system equations: time 0.0004621/0.2408, allocations: 291.3 kB / 431.2 MB, free: 3.477 MB / 298.7 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.000428/0.2413, allocations: 91.61 kB / 431.3 MB, free: 3.387 MB / 298.7 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.001651/0.2429, allocations: 1.454 MB / 432.8 MB, free: 1.898 MB / 298.7 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0002583/0.2432, allocations: 0.904 MB / 433.7 MB, free: 0.9648 MB / 298.7 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0001508/0.2433, allocations: 59.41 kB / 433.8 MB, free: 0.9062 MB / 298.7 MB Notification: Performance of SimCode: time 2.31e-07/0.2434, allocations: 0 / 433.8 MB, free: 0.9062 MB / 298.7 MB Notification: Performance of Templates: time 0.00988/0.2532, allocations: 8.02 MB / 441.8 MB, free: 8.898 MB / 314.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/jenkins/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