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: "" <> buildModelFMU(Modelica.Blocks.Examples.TotalHarmonicDistortion,fileNamePrefix="Modelica_trunk_cpp_Modelica_Blocks_Examples_TotalHarmonicDistortion",fmuType="me",version="2.0",platforms={"static"}) "" <> buildModelFMU(Modelica.Blocks.Examples.TotalHarmonicDistortion,fileNamePrefix="Modelica_trunk_cpp_Modelica_Blocks_Examples_TotalHarmonicDistortion",fmuType="me",version="2.0",platforms={"static"}) Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex trunk/package.mo): time 0.0009731/0.0009731, allocations: 191.8 kB / 17.37 MB, free: 4.434 MB / 13.93 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica trunk/package.mo): time 1.248/1.248, allocations: 226.5 MB / 244.7 MB, free: 8.23 MB / 202.7 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices trunk/package.mo): time 0.0008222/0.0008223, allocations: 106.2 kB / 296.7 MB, free: 6.898 MB / 234.7 MB Notification: Performance of FrontEnd - loaded program: time 0.0002296/0.0002297, allocations: 8 kB / 356.8 MB, free: 10.82 MB / 298.7 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.2158/0.216, allocations: 51.29 MB / 408.1 MB, free: 27.7 MB / 298.7 MB Notification: Performance of NFInst.instantiate(Modelica.Blocks.Examples.TotalHarmonicDistortion): time 0.00285/0.2189, allocations: 3.149 MB / 411.3 MB, free: 24.54 MB / 298.7 MB Notification: Performance of NFInst.instExpressions: time 0.001652/0.2206, allocations: 1.233 MB / 412.5 MB, free: 23.3 MB / 298.7 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.0002144/0.2208, allocations: 15.94 kB / 412.5 MB, free: 23.29 MB / 298.7 MB Notification: Performance of NFTyping.typeComponents: time 0.0001513/0.221, allocations: 51.42 kB / 412.6 MB, free: 23.24 MB / 298.7 MB Notification: Performance of NFTyping.typeBindings: time 0.0002861/0.2213, allocations: 106.3 kB / 412.7 MB, free: 23.14 MB / 298.7 MB Notification: Performance of NFTyping.typeClassSections: time 0.0005081/0.2218, allocations: 268.4 kB / 412.9 MB, free: 22.88 MB / 298.7 MB Notification: Performance of NFFlatten.flatten: time 0.0004859/0.2223, allocations: 0.7674 MB / 413.7 MB, free: 22.11 MB / 298.7 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0004132/0.2227, allocations: 376.6 kB / 414.1 MB, free: 21.73 MB / 298.7 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0002445/0.223, allocations: 238.8 kB / 414.3 MB, free: 21.49 MB / 298.7 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0002211/0.2232, allocations: 262.5 kB / 414.6 MB, free: 21.23 MB / 298.7 MB Notification: Performance of NFPackage.collectConstants: time 6.117e-05/0.2233, allocations: 24 kB / 414.6 MB, free: 21.21 MB / 298.7 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0001082/0.2234, allocations: 43.97 kB / 414.6 MB, free: 21.17 MB / 298.7 MB Notification: Performance of NFScalarize.scalarize: time 8.662e-05/0.2235, allocations: 111.5 kB / 414.7 MB, free: 21.06 MB / 298.7 MB Notification: Performance of NFVerifyModel.verify: time 0.0001963/0.2237, allocations: 320 kB / 415.1 MB, free: 20.74 MB / 298.7 MB Notification: Performance of NFConvertDAE.convert: time 0.0004616/0.2241, allocations: 0.7688 MB / 415.8 MB, free: 19.97 MB / 298.7 MB Notification: Performance of FrontEnd - DAE generated: time 4.198e-06/0.2242, allocations: 0 / 415.8 MB, free: 19.97 MB / 298.7 MB Notification: Performance of FrontEnd: time 1.313e-06/0.2242, allocations: 0 / 415.8 MB, free: 19.97 MB / 298.7 MB Notification: Performance of Transformations before backend: time 7.915e-06/0.2242, allocations: 0 / 415.8 MB, free: 19.97 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.001415/0.2256, allocations: 0.9277 MB / 416.7 MB, free: 18.99 MB / 298.7 MB Notification: Performance of prepare preOptimizeDAE: time 4.237e-05/0.2257, allocations: 12.03 kB / 416.8 MB, free: 18.98 MB / 298.7 MB Notification: Performance of preOpt introduceOutputAliases (simulation): time 0.0001019/0.2258, allocations: 98.69 kB / 416.9 MB, free: 18.88 MB / 298.7 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0005809/0.2263, allocations: 159.8 kB / 417 MB, free: 18.72 MB / 298.7 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0008119/0.2272, allocations: 0.6393 MB / 417.7 MB, free: 18.04 MB / 298.7 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 3.581e-05/0.2272, allocations: 45.69 kB / 417.7 MB, free: 17.99 MB / 298.7 MB Notification: Performance of preOpt expandDerOperator (simulation): time 7.673e-05/0.2273, allocations: 64.38 kB / 417.8 MB, free: 17.93 MB / 298.7 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.001046/0.2284, allocations: 0.6838 MB / 418.4 MB, free: 17.23 MB / 298.7 MB Notification: Performance of preOpt findStateOrder (simulation): time 2.397e-05/0.2284, allocations: 4 kB / 418.4 MB, free: 17.22 MB / 298.7 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 5.292e-05/0.2284, allocations: 20 kB / 418.5 MB, free: 17.2 MB / 298.7 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 1.3e-05/0.2285, allocations: 19.98 kB / 418.5 MB, free: 17.18 MB / 298.7 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0009719/0.2294, allocations: 0.536 MB / 419 MB, free: 16.65 MB / 298.7 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.00239/0.2318, allocations: 1.941 MB / 421 MB, free: 14.64 MB / 298.7 MB Notification: Performance of preOpt comSubExp (simulation): time 0.0008325/0.2327, allocations: 0.5128 MB / 421.5 MB, free: 14.12 MB / 298.7 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0004053/0.2331, allocations: 238.1 kB / 421.7 MB, free: 13.88 MB / 298.7 MB Notification: Performance of preOpt evalFunc (simulation): time 4.399e-05/0.2332, allocations: 8.422 kB / 421.7 MB, free: 13.87 MB / 298.7 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0006541/0.2338, allocations: 405.2 kB / 422.1 MB, free: 13.46 MB / 298.7 MB Notification: Performance of pre-optimization done (n=53): time 2.485e-06/0.2338, allocations: 3.938 kB / 422.1 MB, free: 13.46 MB / 298.7 MB Notification: Performance of matching and sorting (n=53): time 0.001479/0.2353, allocations: 0.7872 MB / 422.9 MB, free: 12.66 MB / 298.7 MB Notification: Performance of inlineWhenForInitialization (initialization): time 4.876e-05/0.2354, allocations: 119.2 kB / 423 MB, free: 12.52 MB / 298.7 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0003953/0.2358, allocations: 474 kB / 423.5 MB, free: 12.05 MB / 298.7 MB Notification: Performance of collectPreVariables (initialization): time 4.085e-05/0.2358, allocations: 41.7 kB / 423.5 MB, free: 12 MB / 298.7 MB Notification: Performance of collectInitialEqns (initialization): time 0.0001666/0.236, allocations: 332.3 kB / 423.8 MB, free: 11.68 MB / 298.7 MB Notification: Performance of collectInitialBindings (initialization): time 9.426e-05/0.2361, allocations: 165.7 kB / 424 MB, free: 11.51 MB / 298.7 MB Notification: Performance of simplifyInitialFunctions (initialization): time 2.907e-05/0.2361, allocations: 16 kB / 424 MB, free: 11.5 MB / 298.7 MB Notification: Performance of setup shared object (initialization): time 7.669e-05/0.2362, allocations: 370.8 kB / 424.4 MB, free: 11.12 MB / 298.7 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0004123/0.2366, allocations: 213.2 kB / 424.6 MB, free: 10.91 MB / 298.7 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0004856/0.2371, allocations: 441 kB / 425 MB, free: 10.39 MB / 298.7 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.0008983/0.238, allocations: 0.6535 MB / 425.7 MB, free: 9.656 MB / 298.7 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 4.439e-06/0.2381, allocations: 0 / 425.7 MB, free: 9.656 MB / 298.7 MB Notification: Performance of matching and sorting (n=79) (initialization): time 0.00119/0.2393, allocations: 0.7208 MB / 426.4 MB, free: 8.934 MB / 298.7 MB Notification: Performance of prepare postOptimizeDAE: time 0.0001857/0.2395, allocations: 285.1 kB / 426.7 MB, free: 8.562 MB / 298.7 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.538e-05/0.2395, allocations: 8 kB / 426.7 MB, free: 8.555 MB / 298.7 MB Notification: Performance of postOpt tearingSystem (initialization): time 3.654e-05/0.2395, allocations: 11.98 kB / 426.7 MB, free: 8.543 MB / 298.7 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0005343/0.2401, allocations: 143.8 kB / 426.8 MB, free: 8.402 MB / 298.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.797e-05/0.2401, allocations: 15.92 kB / 426.9 MB, free: 8.387 MB / 298.7 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.00043/0.2405, allocations: 95.41 kB / 426.9 MB, free: 8.293 MB / 298.7 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 4.453e-05/0.2406, allocations: 35.92 kB / 427 MB, free: 8.258 MB / 298.7 MB Notification: Performance of prepare postOptimizeDAE: time 7.073e-06/0.2406, allocations: 4 kB / 427 MB, free: 8.254 MB / 298.7 MB Notification: Performance of postOpt replaceHomotopyWithSimplified (initialization): time 0.0009444/0.2415, allocations: 0.5766 MB / 427.6 MB, free: 7.68 MB / 298.7 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.33e-05/0.2416, allocations: 8 kB / 427.6 MB, free: 7.672 MB / 298.7 MB Notification: Performance of postOpt tearingSystem (initialization): time 9.728e-06/0.2416, allocations: 8 kB / 427.6 MB, free: 7.664 MB / 298.7 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0004139/0.242, allocations: 140 kB / 427.7 MB, free: 7.527 MB / 298.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.494e-05/0.242, allocations: 15.94 kB / 427.7 MB, free: 7.512 MB / 298.7 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0004034/0.2424, allocations: 75.44 kB / 427.8 MB, free: 7.438 MB / 298.7 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 4.487e-05/0.2425, allocations: 28 kB / 427.8 MB, free: 7.41 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.000521/0.243, allocations: 323.4 kB / 428.1 MB, free: 7.086 MB / 298.7 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.0001089/0.2431, allocations: 55.34 kB / 428.2 MB, free: 7.031 MB / 298.7 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.001343/0.2445, allocations: 0.6222 MB / 428.8 MB, free: 6.398 MB / 298.7 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 1.363e-05/0.2445, allocations: 11.98 kB / 428.8 MB, free: 6.387 MB / 298.7 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 1.085e-05/0.2445, allocations: 3.938 kB / 428.8 MB, free: 6.383 MB / 298.7 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 8.897e-06/0.2446, allocations: 0 / 428.8 MB, free: 6.383 MB / 298.7 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0007591/0.2453, allocations: 0.6419 MB / 429.5 MB, free: 5.691 MB / 298.7 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 4.658e-06/0.2453, allocations: 4 kB / 429.5 MB, free: 5.688 MB / 298.7 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0004102/0.2457, allocations: 99.81 kB / 429.6 MB, free: 5.59 MB / 298.7 MB Notification: Performance of postOpt tearingSystem (simulation): time 7.314e-06/0.2458, allocations: 4 kB / 429.6 MB, free: 5.586 MB / 298.7 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 4.571e-05/0.2458, allocations: 19.98 kB / 429.6 MB, free: 5.566 MB / 298.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 3.266e-06/0.2458, allocations: 0 / 429.6 MB, free: 5.566 MB / 298.7 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 2.324e-06/0.2458, allocations: 7.938 kB / 429.6 MB, free: 5.559 MB / 298.7 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.001557/0.2474, allocations: 0.9332 MB / 430.5 MB, free: 4.609 MB / 298.7 MB Notification: Performance of postOpt removeConstants (simulation): time 9.925e-05/0.2475, allocations: 132.3 kB / 430.7 MB, free: 4.461 MB / 298.7 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 8.185e-05/0.2476, allocations: 16.06 kB / 430.7 MB, free: 4.445 MB / 298.7 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0003252/0.2479, allocations: 55.95 kB / 430.7 MB, free: 4.391 MB / 298.7 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.000119/0.2481, allocations: 48.44 kB / 430.8 MB, free: 4.34 MB / 298.7 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 3.454e-05/0.2481, allocations: 19.98 kB / 430.8 MB, free: 4.32 MB / 298.7 MB Notification: Performance of sorting global known variables: time 0.0002948/0.2484, allocations: 318.9 kB / 431.1 MB, free: 4.012 MB / 298.7 MB Notification: Performance of sort global known variables: time 1.5e-07/0.2484, allocations: 4 kB / 431.1 MB, free: 4.008 MB / 298.7 MB Notification: Performance of remove unused functions: time 0.0007027/0.2491, allocations: 243 kB / 431.4 MB, free: 3.77 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.001751/0.2509, allocations: 1.506 MB / 432.9 MB, free: 2.238 MB / 298.7 MB Notification: Performance of simCode: created initialization part: time 0.001512/0.2524, allocations: 0.8672 MB / 433.7 MB, free: 1.375 MB / 298.7 MB Notification: Performance of simCode: created event and clocks part: time 3.958e-06/0.2524, allocations: 0 / 433.7 MB, free: 1.375 MB / 298.7 MB Notification: Performance of simCode: created simulation system equations: time 0.0004782/0.2529, allocations: 300.2 kB / 434 MB, free: 1.082 MB / 298.7 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0004895/0.2534, allocations: 89.84 kB / 434.1 MB, free: 0.9883 MB / 298.7 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.006175/0.2596, allocations: 3.77 MB / 437.9 MB, free: 13.07 MB / 314.7 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0005353/0.2602, allocations: 0.9079 MB / 438.8 MB, free: 12.13 MB / 314.7 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0004019/0.2606, allocations: 255.3 kB / 439 MB, free: 11.88 MB / 314.7 MB Notification: Performance of SimCode: time 6.61e-07/0.2606, allocations: 0 / 439 MB, free: 11.88 MB / 314.7 MB Notification: Performance of buildModelFMU: Generate C++ for platform static: time 3.161/3.422, allocations: 9.416 MB / 448.5 MB, free: 2.453 MB / 314.7 MB (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 & /home/hudson/saved_omc/OMSimulator/install/linux/bin/OMSimulator -r=Modelica_trunk_cpp_Modelica.Blocks.Examples.TotalHarmonicDistortion_res.mat --tempDir=temp_Modelica_trunk_cpp_Modelica_Blocks_Examples_TotalHarmonicDistortion_fmu --startTime=0 --stopTime=0.1 --timeout=50 --tolerance=1e-06 Modelica_trunk_cpp_Modelica_Blocks_Examples_TotalHarmonicDistortion.fmu > Modelica_trunk_cpp_Modelica.Blocks.Examples.TotalHarmonicDistortion.pipe 2>&1)