Running command: "" <> buildModelFMU(Modelica.Blocks.Examples.TotalHarmonicDistortion,fileNamePrefix="Modelica_trunk_cpp_Modelica_Blocks_Examples_TotalHarmonicDistortion",fmuType="me",version="2.0",platforms={"static"}) Notification: Performance of loadModel(Modelica): time 2.205/2.205, allocations: 225.8 MB / 239.3 MB, free: 11.19 MB / 202.7 MB Notification: Performance of FrontEnd - loaded program: time 3.749e-05/3.758e-05, allocations: 4 kB / 292.2 MB, free: 8.738 MB / 234.7 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.1123/0.1124, allocations: 50.41 MB / 342.6 MB, free: 6.305 MB / 282.7 MB Notification: Performance of FrontEnd - scodeFlatten: time 0.4845/0.5969, allocations: 81.18 MB / 423.8 MB, free: 12.96 MB / 346.7 MB Notification: Performance of FrontEnd - mkProgramGraph: time 0.000239/0.5972, allocations: 66.75 kB / 423.9 MB, free: 12.93 MB / 346.7 MB Notification: Performance of FrontEnd - DAE generated: time 0.04618/0.6434, allocations: 10.43 MB / 434.3 MB, free: 4.16 MB / 346.7 MB Notification: Performance of FrontEnd: time 1.883e-06/0.6434, allocations: 4 kB / 434.3 MB, free: 4.156 MB / 346.7 MB Notification: Performance of Transformations before backend: time 6.067e-05/0.6435, allocations: 23.98 kB / 434.3 MB, free: 4.133 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: 141 * Number of variables: 141 Notification: Performance of Generate backend data structure: time 0.002441/0.6459, allocations: 0.8407 MB / 435.2 MB, free: 3.281 MB / 346.7 MB Notification: Performance of prepare preOptimizeDAE: time 5.176e-05/0.646, allocations: 16.03 kB / 435.2 MB, free: 3.266 MB / 346.7 MB Notification: Performance of preOpt introduceOutputAliases (simulation): time 0.0002025/0.6462, allocations: 96.69 kB / 435.3 MB, free: 3.195 MB / 346.7 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0002249/0.6465, allocations: 83.06 kB / 435.4 MB, free: 3.113 MB / 346.7 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.001144/0.6476, allocations: 0.521 MB / 435.9 MB, free: 2.664 MB / 346.7 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 6.322e-05/0.6477, allocations: 42.81 kB / 435.9 MB, free: 2.637 MB / 346.7 MB Notification: Performance of preOpt expandDerOperator (simulation): time 0.0001559/0.6479, allocations: 73.52 kB / 436 MB, free: 2.586 MB / 346.7 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.001523/0.6494, allocations: 0.5984 MB / 436.6 MB, free: 2.176 MB / 346.7 MB Notification: Performance of preOpt findStateOrder (simulation): time 3.254e-05/0.6495, allocations: 7.875 kB / 436.6 MB, free: 2.168 MB / 346.7 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 0.0001019/0.6496, allocations: 30.05 kB / 436.6 MB, free: 2.156 MB / 346.7 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 2.095e-05/0.6496, allocations: 12 kB / 436.6 MB, free: 2.145 MB / 346.7 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.001173/0.6508, allocations: 412.8 kB / 437 MB, free: 1.898 MB / 346.7 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.004956/0.6558, allocations: 1.987 MB / 439 MB, free: 384 kB / 346.7 MB Notification: Performance of preOpt comSubExp (simulation): time 0.001091/0.6569, allocations: 412.4 kB / 439.4 MB, free: 124 kB / 346.7 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0004449/0.6573, allocations: 169.7 kB / 439.6 MB, free: 24 kB / 346.7 MB Notification: Performance of preOpt evalFunc (simulation): time 6.461e-05/0.6574, allocations: 15.55 kB / 439.6 MB, free: 12 kB / 346.7 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0008614/0.6583, allocations: 343.8 kB / 439.9 MB, free: 15.75 MB / 362.7 MB Notification: Performance of pre-optimization done (n=53): time 3.055e-06/0.6583, allocations: 0 / 439.9 MB, free: 15.75 MB / 362.7 MB Notification: Performance of matching and sorting (n=53): time 0.001311/0.6596, allocations: 467.4 kB / 440.4 MB, free: 15.41 MB / 362.7 MB Notification: Performance of inlineWhenForInitialization (initialization): time 0.0001015/0.6598, allocations: 118.9 kB / 440.5 MB, free: 15.27 MB / 362.7 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0007154/0.6605, allocations: 392 kB / 440.9 MB, free: 14.98 MB / 362.7 MB Notification: Performance of collectPreVariables (initialization): time 8.26e-05/0.6606, allocations: 39.58 kB / 440.9 MB, free: 14.94 MB / 362.7 MB Notification: Performance of collectInitialEqns (initialization): time 0.0003198/0.6609, allocations: 361.2 kB / 441.3 MB, free: 14.66 MB / 362.7 MB Notification: Performance of collectInitialBindings (initialization): time 0.0002013/0.6611, allocations: 165.5 kB / 441.5 MB, free: 14.52 MB / 362.7 MB Notification: Performance of simplifyInitialFunctions (initialization): time 4.91e-05/0.6612, allocations: 9.5 kB / 441.5 MB, free: 14.52 MB / 362.7 MB Notification: Performance of setup shared object (initialization): time 0.000149/0.6614, allocations: 340.6 kB / 441.8 MB, free: 14.19 MB / 362.7 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0004443/0.6618, allocations: 156.8 kB / 441.9 MB, free: 14.1 MB / 362.7 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0006415/0.6625, allocations: 385.2 kB / 442.3 MB, free: 13.71 MB / 362.7 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.0005406/0.663, allocations: 195.8 kB / 442.5 MB, free: 13.58 MB / 362.7 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 9.478e-06/0.663, allocations: 4 kB / 442.5 MB, free: 13.58 MB / 362.7 MB Notification: Performance of matching and sorting (n=79) (initialization): time 0.001413/0.6645, allocations: 0.5424 MB / 443.1 MB, free: 13.17 MB / 362.7 MB Notification: Performance of prepare postOptimizeDAE: time 0.001134/0.6656, allocations: 2.531 MB / 445.6 MB, free: 10.49 MB / 362.7 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.694e-05/0.6657, allocations: 4 kB / 445.6 MB, free: 10.49 MB / 362.7 MB Notification: Performance of postOpt tearingSystem (initialization): time 3.355e-05/0.6657, allocations: 12 kB / 445.6 MB, free: 10.48 MB / 362.7 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.001108/0.6668, allocations: 142.5 kB / 445.7 MB, free: 10.34 MB / 362.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 3.31e-05/0.6669, allocations: 23.88 kB / 445.8 MB, free: 10.32 MB / 362.7 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0008336/0.6677, allocations: 82.5 kB / 445.9 MB, free: 10.25 MB / 362.7 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 6.983e-05/0.6678, allocations: 30.98 kB / 445.9 MB, free: 10.22 MB / 362.7 MB Notification: Performance of prepare postOptimizeDAE: time 1.251e-05/0.6678, allocations: 11.69 kB / 445.9 MB, free: 10.21 MB / 362.7 MB Notification: Performance of postOpt replaceHomotopyWithSimplified (initialization): time 0.00128/0.6691, allocations: 0.4915 MB / 446.4 MB, free: 9.863 MB / 362.7 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.215e-05/0.6691, allocations: 8 kB / 446.4 MB, free: 9.855 MB / 362.7 MB Notification: Performance of postOpt tearingSystem (initialization): time 1.703e-05/0.6692, allocations: 8 kB / 446.4 MB, free: 9.848 MB / 362.7 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0009037/0.6701, allocations: 139.6 kB / 446.5 MB, free: 9.719 MB / 362.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 2.218e-05/0.6701, allocations: 15.92 kB / 446.6 MB, free: 9.703 MB / 362.7 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0005461/0.6707, allocations: 74.2 kB / 446.6 MB, free: 9.641 MB / 362.7 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 6.017e-05/0.6707, allocations: 26.3 kB / 446.7 MB, free: 9.617 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_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 () * 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.000271/0.671, allocations: 160.8 kB / 446.8 MB, free: 9.477 MB / 362.7 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.0001658/0.6712, allocations: 63.28 kB / 446.9 MB, free: 9.414 MB / 362.7 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.001396/0.6726, allocations: 493.8 kB / 447.4 MB, free: 9.086 MB / 362.7 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 9.358e-06/0.6726, allocations: 4 kB / 447.4 MB, free: 9.082 MB / 362.7 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 6.482e-06/0.6727, allocations: 4 kB / 447.4 MB, free: 9.078 MB / 362.7 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 8.346e-06/0.6727, allocations: 4 kB / 447.4 MB, free: 9.074 MB / 362.7 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.001042/0.6737, allocations: 0.6409 MB / 448 MB, free: 8.559 MB / 362.7 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 3.938e-06/0.6737, allocations: 0 / 448 MB, free: 8.559 MB / 362.7 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0008847/0.6746, allocations: 99.67 kB / 448.1 MB, free: 8.465 MB / 362.7 MB Notification: Performance of postOpt tearingSystem (simulation): time 7.715e-06/0.6747, allocations: 0 / 448.1 MB, free: 8.465 MB / 362.7 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 6.397e-05/0.6747, allocations: 19.06 kB / 448.1 MB, free: 8.453 MB / 362.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 4.799e-06/0.6748, allocations: 8 kB / 448.1 MB, free: 8.445 MB / 362.7 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 2.144e-06/0.6748, allocations: 0 / 448.1 MB, free: 8.445 MB / 362.7 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.001814/0.6766, allocations: 0.7451 MB / 448.9 MB, free: 7.938 MB / 362.7 MB Notification: Performance of postOpt removeConstants (simulation): time 0.0001536/0.6768, allocations: 131.3 kB / 449 MB, free: 7.793 MB / 362.7 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 0.0001522/0.6769, allocations: 13.62 kB / 449 MB, free: 7.789 MB / 362.7 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0006491/0.6776, allocations: 58.84 kB / 449.1 MB, free: 7.738 MB / 362.7 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0001542/0.6778, allocations: 43 kB / 449.1 MB, free: 7.703 MB / 362.7 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 6.444e-05/0.6778, allocations: 18.86 kB / 449.1 MB, free: 7.688 MB / 362.7 MB Notification: Performance of sorting global known variables: time 0.000508/0.6784, allocations: 299.2 kB / 449.4 MB, free: 7.465 MB / 362.7 MB Notification: Performance of sort global known variables: time 5.81e-07/0.6784, allocations: 0 / 449.4 MB, free: 7.465 MB / 362.7 MB Notification: Performance of remove unused functions: time 0.001215/0.6796, allocations: 256.3 kB / 449.7 MB, free: 7.242 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_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) * 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.002294/0.6819, allocations: 1.32 MB / 451 MB, free: 6 MB / 362.7 MB Notification: Performance of simCode: created initialization part: time 0.001905/0.6838, allocations: 0.6898 MB / 451.7 MB, free: 5.312 MB / 362.7 MB Notification: Performance of simCode: created event and clocks part: time 5.661e-06/0.6839, allocations: 0 / 451.7 MB, free: 5.312 MB / 362.7 MB Notification: Performance of simCode: created simulation system equations: time 0.0005988/0.6845, allocations: 229.5 kB / 451.9 MB, free: 5.09 MB / 362.7 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0006438/0.6851, allocations: 72.2 kB / 452 MB, free: 5.02 MB / 362.7 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.003089/0.6882, allocations: 1.006 MB / 453 MB, free: 3.965 MB / 362.7 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.000647/0.6889, allocations: 0.9114 MB / 453.9 MB, free: 3.02 MB / 362.7 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0006059/0.6895, allocations: 247.3 kB / 454.1 MB, free: 2.777 MB / 362.7 MB Notification: Performance of SimCode: time 9.42e-07/0.6895, allocations: 0 / 454.1 MB, free: 2.777 MB / 362.7 MB Notification: Performance of buildModelFMU: Generate C++ for platform static: time 2.551/3.24, allocations: 10.06 MB / 464.2 MB, free: 8.738 MB / 378.7 MB