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: "" <> buildModelFMU(Modelica.Blocks.Examples.TotalHarmonicDistortion,fileNamePrefix="Modelica_3_2_3_cpp_Modelica_Blocks_Examples_TotalHarmonicDistortion",fmuType="me",version="2.0",platforms={"static"}) "" <> buildModelFMU(Modelica.Blocks.Examples.TotalHarmonicDistortion,fileNamePrefix="Modelica_3_2_3_cpp_Modelica_Blocks_Examples_TotalHarmonicDistortion",fmuType="me",version="2.0",platforms={"static"}) Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 3.2.3+maint.om/package.mo): time 0.0009409/0.0009409, allocations: 175.6 kB / 16.72 MB, free: 5.082 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.329/1.329, allocations: 205.4 MB / 222.9 MB, free: 9.031 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.0007458/0.0007455, allocations: 90.31 kB / 271.2 MB, free: 8.254 MB / 218.7 MB Notification: Performance of FrontEnd - loaded program: time 0.000331/0.0003313, allocations: 8 kB / 327.6 MB, free: 15.8 MB / 282.7 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.2289/0.2292, allocations: 47.58 MB / 375.2 MB, free: 45.43 MB / 298.7 MB Notification: Performance of NFInst.instantiate(Modelica.Blocks.Examples.TotalHarmonicDistortion): time 0.002919/0.2322, allocations: 3.035 MB / 378.2 MB, free: 43.05 MB / 298.7 MB Notification: Performance of NFInst.instExpressions: time 0.001559/0.2337, allocations: 1.186 MB / 379.4 MB, free: 42.09 MB / 298.7 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.000217/0.234, allocations: 13 kB / 379.4 MB, free: 42.09 MB / 298.7 MB Notification: Performance of NFTyping.typeComponents: time 0.0001431/0.2341, allocations: 53.39 kB / 379.5 MB, free: 42.04 MB / 298.7 MB Notification: Performance of NFTyping.typeBindings: time 0.0002585/0.2344, allocations: 102.2 kB / 379.6 MB, free: 41.95 MB / 298.7 MB Notification: Performance of NFTyping.typeClassSections: time 0.0004613/0.2349, allocations: 253.4 kB / 379.8 MB, free: 41.76 MB / 298.7 MB Notification: Performance of NFFlatten.flatten: time 0.0005891/0.2355, allocations: 0.7383 MB / 380.6 MB, free: 41.3 MB / 298.7 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0004559/0.2359, allocations: 359.8 kB / 380.9 MB, free: 41.08 MB / 298.7 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0002586/0.2362, allocations: 213.1 kB / 381.1 MB, free: 40.96 MB / 298.7 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0002594/0.2365, allocations: 250.5 kB / 381.4 MB, free: 40.79 MB / 298.7 MB Notification: Performance of NFPackage.collectConstants: time 6.806e-05/0.2365, allocations: 22.62 kB / 381.4 MB, free: 40.79 MB / 298.7 MB Notification: Performance of NFFlatten.collectFunctions: time 7.008e-05/0.2366, allocations: 30.06 kB / 381.4 MB, free: 40.78 MB / 298.7 MB Notification: Performance of NFScalarize.scalarize: time 8.883e-05/0.2367, allocations: 106.1 kB / 381.5 MB, free: 40.7 MB / 298.7 MB Notification: Performance of NFVerifyModel.verify: time 0.0001957/0.2369, allocations: 307.7 kB / 381.8 MB, free: 40.46 MB / 298.7 MB Notification: Performance of NFConvertDAE.convert: time 0.0004804/0.2374, allocations: 0.7158 MB / 382.5 MB, free: 39.91 MB / 298.7 MB Notification: Performance of FrontEnd - DAE generated: time 5.21e-06/0.2374, allocations: 0 / 382.5 MB, free: 39.91 MB / 298.7 MB Notification: Performance of FrontEnd: time 1.743e-06/0.2374, allocations: 1.438 kB / 382.5 MB, free: 39.91 MB / 298.7 MB Notification: Performance of Transformations before backend: time 8.265e-06/0.2374, allocations: 0 / 382.5 MB, free: 39.91 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: 135 * Number of variables: 135 Notification: Performance of Generate backend data structure: time 0.001459/0.2389, allocations: 0.8881 MB / 383.4 MB, free: 39.19 MB / 298.7 MB Notification: Performance of prepare preOptimizeDAE: time 3.918e-05/0.239, allocations: 12.47 kB / 383.4 MB, free: 39.18 MB / 298.7 MB Notification: Performance of preOpt introduceOutputAliases (simulation): time 9.821e-05/0.2391, allocations: 93.73 kB / 383.5 MB, free: 39.1 MB / 298.7 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0001175/0.2392, allocations: 84.25 kB / 383.6 MB, free: 39.06 MB / 298.7 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0008358/0.24, allocations: 0.6079 MB / 384.2 MB, free: 38.55 MB / 298.7 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 4.016e-05/0.2401, allocations: 46.75 kB / 384.3 MB, free: 38.53 MB / 298.7 MB Notification: Performance of preOpt expandDerOperator (simulation): time 8.74e-05/0.2402, allocations: 62.94 kB / 384.3 MB, free: 38.5 MB / 298.7 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.001117/0.2413, allocations: 0.6585 MB / 385 MB, free: 38.1 MB / 298.7 MB Notification: Performance of preOpt findStateOrder (simulation): time 2.248e-05/0.2413, allocations: 1 kB / 385 MB, free: 38.1 MB / 298.7 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 5.321e-05/0.2414, allocations: 29.16 kB / 385 MB, free: 38.08 MB / 298.7 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 1.53e-05/0.2414, allocations: 13.16 kB / 385 MB, free: 38.08 MB / 298.7 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.001076/0.2425, allocations: 0.5179 MB / 385.5 MB, free: 37.84 MB / 298.7 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.002459/0.245, allocations: 1.9 MB / 387.4 MB, free: 36.23 MB / 298.7 MB Notification: Performance of preOpt comSubExp (simulation): time 0.0008276/0.2458, allocations: 0.51 MB / 387.9 MB, free: 35.71 MB / 298.7 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0004001/0.2462, allocations: 234.1 kB / 388.2 MB, free: 35.48 MB / 298.7 MB Notification: Performance of preOpt evalFunc (simulation): time 4.173e-05/0.2463, allocations: 12.42 kB / 388.2 MB, free: 35.47 MB / 298.7 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0006529/0.2469, allocations: 409 kB / 388.6 MB, free: 35.06 MB / 298.7 MB Notification: Performance of pre-optimization done (n=53): time 2.635e-06/0.2469, allocations: 0 / 388.6 MB, free: 35.06 MB / 298.7 MB Notification: Performance of matching and sorting (n=53): time 0.00142/0.2484, allocations: 0.7834 MB / 389.4 MB, free: 34.27 MB / 298.7 MB Notification: Performance of inlineWhenForInitialization (initialization): time 5.083e-05/0.2484, allocations: 115.2 kB / 389.5 MB, free: 34.13 MB / 298.7 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0003654/0.2488, allocations: 449.9 kB / 389.9 MB, free: 33.68 MB / 298.7 MB Notification: Performance of collectPreVariables (initialization): time 4.05e-05/0.2488, allocations: 45.69 kB / 390 MB, free: 33.63 MB / 298.7 MB Notification: Performance of collectInitialEqns (initialization): time 0.0001511/0.249, allocations: 312.4 kB / 390.3 MB, free: 33.32 MB / 298.7 MB Notification: Performance of collectInitialBindings (initialization): time 9.221e-05/0.2491, allocations: 161.7 kB / 390.4 MB, free: 33.16 MB / 298.7 MB Notification: Performance of simplifyInitialFunctions (initialization): time 2.737e-05/0.2491, allocations: 11.94 kB / 390.4 MB, free: 33.14 MB / 298.7 MB Notification: Performance of setup shared object (initialization): time 8.478e-05/0.2492, allocations: 378.7 kB / 390.8 MB, free: 32.77 MB / 298.7 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0004063/0.2496, allocations: 221.1 kB / 391 MB, free: 32.55 MB / 298.7 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0004723/0.2501, allocations: 433 kB / 391.5 MB, free: 32.03 MB / 298.7 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.0008643/0.251, allocations: 0.6546 MB / 392.1 MB, free: 31.29 MB / 298.7 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 3.928e-06/0.251, allocations: 4 kB / 392.1 MB, free: 31.29 MB / 298.7 MB Notification: Performance of matching and sorting (n=79) (initialization): time 0.001114/0.2521, allocations: 0.7065 MB / 392.8 MB, free: 30.58 MB / 298.7 MB Notification: Performance of prepare postOptimizeDAE: time 9.383e-05/0.2522, allocations: 285 kB / 393.1 MB, free: 30.21 MB / 298.7 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 9.558e-06/0.2522, allocations: 8 kB / 393.1 MB, free: 30.2 MB / 298.7 MB Notification: Performance of postOpt tearingSystem (initialization): time 1.891e-05/0.2523, allocations: 11.94 kB / 393.1 MB, free: 30.19 MB / 298.7 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0004904/0.2528, allocations: 147.7 kB / 393.3 MB, free: 30.04 MB / 298.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.415e-05/0.2528, allocations: 15.98 kB / 393.3 MB, free: 30.03 MB / 298.7 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0003755/0.2532, allocations: 87.44 kB / 393.4 MB, free: 29.94 MB / 298.7 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 3.729e-05/0.2532, allocations: 35.98 kB / 393.4 MB, free: 29.91 MB / 298.7 MB Notification: Performance of prepare postOptimizeDAE: time 6.201e-06/0.2532, allocations: 6.969 kB / 393.4 MB, free: 29.9 MB / 298.7 MB Notification: Performance of postOpt replaceHomotopyWithSimplified (initialization): time 0.0008301/0.2541, allocations: 0.5792 MB / 394 MB, free: 29.32 MB / 298.7 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 5.51e-06/0.2541, allocations: 4 kB / 394 MB, free: 29.32 MB / 298.7 MB Notification: Performance of postOpt tearingSystem (initialization): time 7.545e-06/0.2541, allocations: 12 kB / 394 MB, free: 29.31 MB / 298.7 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0003909/0.2545, allocations: 131.7 kB / 394.1 MB, free: 29.18 MB / 298.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 8.917e-06/0.2545, allocations: 20.19 kB / 394.1 MB, free: 29.16 MB / 298.7 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0003093/0.2548, allocations: 67.56 kB / 394.2 MB, free: 29.09 MB / 298.7 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 3.33e-05/0.2549, allocations: 32 kB / 394.2 MB, free: 29.06 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,thdRMS.harmonic.mean1.y,$PRE.thdRMS.harmonic.mean2.y,thdRMS.harmonic.mean2.y,$PRE.thdRMS.rootMeanSquare.mean.y,thdRMS.rootMeanSquare.mean.y,thdRMS.greaterThreshold.y,thdRMS.valid,thdRMS.pythagoras.valid,$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.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.0002705/0.2551, allocations: 311.9 kB / 394.5 MB, free: 28.75 MB / 298.7 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 7.642e-05/0.2552, allocations: 59.34 kB / 394.6 MB, free: 28.69 MB / 298.7 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.001091/0.2563, allocations: 0.6219 MB / 395.2 MB, free: 28.06 MB / 298.7 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 5.921e-06/0.2563, allocations: 8 kB / 395.2 MB, free: 28.05 MB / 298.7 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 6.102e-06/0.2563, allocations: 3.984 kB / 395.2 MB, free: 28.05 MB / 298.7 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 5.881e-06/0.2563, allocations: 0 / 395.2 MB, free: 28.05 MB / 298.7 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0004955/0.2568, allocations: 0.6302 MB / 395.9 MB, free: 27.37 MB / 298.7 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 2.454e-06/0.2569, allocations: 3.938 kB / 395.9 MB, free: 27.37 MB / 298.7 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0004005/0.2573, allocations: 99.88 kB / 396 MB, free: 27.27 MB / 298.7 MB Notification: Performance of postOpt tearingSystem (simulation): time 3.136e-06/0.2573, allocations: 0 / 396 MB, free: 27.27 MB / 298.7 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 3.643e-05/0.2573, allocations: 19.98 kB / 396 MB, free: 27.25 MB / 298.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 3.166e-06/0.2573, allocations: 4 kB / 396 MB, free: 27.25 MB / 298.7 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 1.152e-06/0.2573, allocations: 0 / 396 MB, free: 27.25 MB / 298.7 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.001451/0.2588, allocations: 0.9293 MB / 396.9 MB, free: 26.3 MB / 298.7 MB Notification: Performance of postOpt removeConstants (simulation): time 6.732e-05/0.2589, allocations: 144.3 kB / 397.1 MB, free: 26.14 MB / 298.7 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 7.154e-05/0.2589, allocations: 12 kB / 397.1 MB, free: 26.12 MB / 298.7 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0003374/0.2593, allocations: 51.95 kB / 397.1 MB, free: 26.07 MB / 298.7 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0001146/0.2594, allocations: 52.44 kB / 397.2 MB, free: 26.02 MB / 298.7 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 3.548e-05/0.2595, allocations: 19.98 kB / 397.2 MB, free: 26 MB / 298.7 MB Notification: Performance of sorting global known variables: time 0.0002454/0.2597, allocations: 310.9 kB / 397.5 MB, free: 25.7 MB / 298.7 MB Notification: Performance of sort global known variables: time 1.1e-07/0.2597, allocations: 0 / 397.5 MB, free: 25.7 MB / 298.7 MB Notification: Performance of remove unused functions: time 0.0006156/0.2603, allocations: 239.1 kB / 397.7 MB, free: 25.47 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,thd1.harmonic.mean2.y,thd1.rootMeanSquare.mean.y,thd1.greaterThreshold.y,thd1.valid,thd1.pythagoras.valid,thdRMS.harmonic.mean1.y,thdRMS.harmonic.mean2.y,thdRMS.rootMeanSquare.mean.y,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.001659/0.262, allocations: 1.496 MB / 399.2 MB, free: 23.95 MB / 298.7 MB Notification: Performance of simCode: created initialization part: time 0.001373/0.2634, allocations: 0.8751 MB / 400.1 MB, free: 23.07 MB / 298.7 MB Notification: Performance of simCode: created event and clocks part: time 2.966e-06/0.2634, allocations: 0 / 400.1 MB, free: 23.07 MB / 298.7 MB Notification: Performance of simCode: created simulation system equations: time 0.0004595/0.2639, allocations: 296.2 kB / 400.4 MB, free: 22.79 MB / 298.7 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0004377/0.2643, allocations: 91.53 kB / 400.5 MB, free: 22.7 MB / 298.7 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.004558/0.2689, allocations: 3.644 MB / 404.1 MB, free: 18.91 MB / 298.7 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0002638/0.2692, allocations: 0.8961 MB / 405 MB, free: 17.99 MB / 298.7 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0002921/0.2695, allocations: 235.3 kB / 405.3 MB, free: 17.77 MB / 298.7 MB Notification: Performance of SimCode: time 5.81e-07/0.2695, allocations: 4 kB / 405.3 MB, free: 17.76 MB / 298.7 MB Notification: Performance of buildModelFMU: Generate C++ for platform static: time 3.003/3.273, allocations: 8.985 MB / 414.2 MB, free: 8.766 MB / 298.7 MB (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 & /home/hudson/saved_omc/OMSimulator/install/linux/bin/OMSimulator -r=Modelica_3.2.3_cpp_Modelica.Blocks.Examples.TotalHarmonicDistortion_res.mat --tempDir=temp_Modelica_3_2_3_cpp_Modelica_Blocks_Examples_TotalHarmonicDistortion_fmu --startTime=0 --stopTime=0.1 --timeout=50 --tolerance=1e-06 Modelica_3_2_3_cpp_Modelica_Blocks_Examples_TotalHarmonicDistortion.fmu > Modelica_3.2.3_cpp_Modelica.Blocks.Examples.TotalHarmonicDistortion.pipe 2>&1)