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.002194/0.002194, allocations: 181.7 kB / 13.66 MB, free: 1.664 MB / 13.93 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 3.2.3+maint.om/package.mo): time 2.128/2.128, allocations: 205.2 MB / 219.4 MB, free: 14.29 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.001095/0.001095, allocations: 90.62 kB / 267.5 MB, free: 14.11 MB / 234.7 MB Notification: Performance of FrontEnd - loaded program: time 3.398e-05/3.407e-05, allocations: 4 kB / 321.6 MB, free: 17.77 MB / 234.7 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.1034/0.1034, allocations: 47.56 MB / 369.2 MB, free: 2.137 MB / 266.7 MB Notification: Performance of FrontEnd - scodeFlatten: time 0.4263/0.5297, allocations: 79.6 MB / 448.8 MB, free: 13.62 MB / 330.7 MB Notification: Performance of FrontEnd - mkProgramGraph: time 0.0002626/0.5301, allocations: 68.78 kB / 448.8 MB, free: 13.59 MB / 330.7 MB Notification: Performance of FrontEnd - DAE generated: time 0.04742/0.5775, allocations: 10.24 MB / 459.1 MB, free: 5.016 MB / 330.7 MB Notification: Performance of FrontEnd: time 4.569e-06/0.5775, allocations: 0 / 459.1 MB, free: 5.016 MB / 330.7 MB Notification: Performance of Transformations before backend: time 6.709e-05/0.5776, allocations: 23.94 kB / 459.1 MB, free: 4.992 MB / 330.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.002596/0.5802, allocations: 0.8413 MB / 459.9 MB, free: 4.141 MB / 330.7 MB Notification: Performance of prepare preOptimizeDAE: time 5.329e-05/0.5803, allocations: 8.031 kB / 459.9 MB, free: 4.133 MB / 330.7 MB Notification: Performance of preOpt introduceOutputAliases (simulation): time 0.0002278/0.5805, allocations: 95.5 kB / 460 MB, free: 4.062 MB / 330.7 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0002639/0.5808, allocations: 87.02 kB / 460.1 MB, free: 3.977 MB / 330.7 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.001327/0.5822, allocations: 0.5109 MB / 460.6 MB, free: 3.531 MB / 330.7 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 6.663e-05/0.5823, allocations: 48.19 kB / 460.7 MB, free: 3.504 MB / 330.7 MB Notification: Performance of preOpt expandDerOperator (simulation): time 0.0001761/0.5824, allocations: 54.94 kB / 460.7 MB, free: 3.469 MB / 330.7 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.001764/0.5842, allocations: 0.5949 MB / 461.3 MB, free: 2.875 MB / 330.7 MB Notification: Performance of preOpt findStateOrder (simulation): time 4.002e-05/0.5843, allocations: 7.906 kB / 461.3 MB, free: 2.867 MB / 330.7 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 0.0001106/0.5844, allocations: 23.98 kB / 461.4 MB, free: 2.844 MB / 330.7 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 2.137e-05/0.5844, allocations: 15.95 kB / 461.4 MB, free: 2.828 MB / 330.7 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.001283/0.5857, allocations: 411.9 kB / 461.8 MB, free: 2.422 MB / 330.7 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.005501/0.5913, allocations: 1.951 MB / 463.7 MB, free: 416 kB / 330.7 MB Notification: Performance of preOpt comSubExp (simulation): time 0.001264/0.5926, allocations: 410.9 kB / 464.1 MB, free: 15.99 MB / 346.7 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0005031/0.5931, allocations: 178.1 kB / 464.3 MB, free: 15.82 MB / 346.7 MB Notification: Performance of preOpt evalFunc (simulation): time 6.635e-05/0.5932, allocations: 12.41 kB / 464.3 MB, free: 15.81 MB / 346.7 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0009389/0.5941, allocations: 345.1 kB / 464.7 MB, free: 15.46 MB / 346.7 MB Notification: Performance of pre-optimization done (n=53): time 4.288e-06/0.5942, allocations: 0 / 464.7 MB, free: 15.46 MB / 346.7 MB Notification: Performance of matching and sorting (n=53): time 0.001517/0.5957, allocations: 467.4 kB / 465.1 MB, free: 14.99 MB / 346.7 MB Notification: Performance of inlineWhenForInitialization (initialization): time 0.0001115/0.5958, allocations: 123.2 kB / 465.2 MB, free: 14.85 MB / 346.7 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0008614/0.5967, allocations: 399.8 kB / 465.6 MB, free: 14.45 MB / 346.7 MB Notification: Performance of collectPreVariables (initialization): time 0.000142/0.5969, allocations: 41.7 kB / 465.7 MB, free: 14.4 MB / 346.7 MB Notification: Performance of collectInitialEqns (initialization): time 0.0003513/0.5972, allocations: 350.9 kB / 466 MB, free: 14.05 MB / 346.7 MB Notification: Performance of collectInitialBindings (initialization): time 0.000243/0.5975, allocations: 165.6 kB / 466.2 MB, free: 13.89 MB / 346.7 MB Notification: Performance of simplifyInitialFunctions (initialization): time 5.721e-05/0.5976, allocations: 16 kB / 466.2 MB, free: 13.88 MB / 346.7 MB Notification: Performance of setup shared object (initialization): time 0.000173/0.5977, allocations: 330.8 kB / 466.5 MB, free: 13.54 MB / 346.7 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0004984/0.5982, allocations: 157.6 kB / 466.7 MB, free: 13.39 MB / 346.7 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0007007/0.599, allocations: 378.4 kB / 467 MB, free: 12.92 MB / 346.7 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.000609/0.5996, allocations: 204.1 kB / 467.2 MB, free: 12.72 MB / 346.7 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 1.138e-05/0.5996, allocations: 4 kB / 467.2 MB, free: 12.72 MB / 346.7 MB Notification: Performance of matching and sorting (n=79) (initialization): time 0.001564/0.6012, allocations: 0.5551 MB / 467.8 MB, free: 12.16 MB / 346.7 MB Notification: Performance of prepare postOptimizeDAE: time 0.001284/0.6025, allocations: 2.534 MB / 470.3 MB, free: 9.43 MB / 346.7 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 2.197e-05/0.6026, allocations: 4 kB / 470.3 MB, free: 9.426 MB / 346.7 MB Notification: Performance of postOpt tearingSystem (initialization): time 3.689e-05/0.6026, allocations: 12 kB / 470.3 MB, free: 9.414 MB / 346.7 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.001215/0.6038, allocations: 147.7 kB / 470.5 MB, free: 9.27 MB / 346.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 2.878e-05/0.6039, allocations: 19.92 kB / 470.5 MB, free: 9.25 MB / 346.7 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0008437/0.6047, allocations: 87.5 kB / 470.6 MB, free: 9.164 MB / 346.7 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 7.993e-05/0.6048, allocations: 31.98 kB / 470.6 MB, free: 9.133 MB / 346.7 MB Notification: Performance of prepare postOptimizeDAE: time 1.57e-05/0.6049, allocations: 4 kB / 470.6 MB, free: 9.129 MB / 346.7 MB Notification: Performance of postOpt replaceHomotopyWithSimplified (initialization): time 0.001422/0.6063, allocations: 0.5068 MB / 471.1 MB, free: 8.621 MB / 346.7 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.672e-05/0.6063, allocations: 11.98 kB / 471.1 MB, free: 8.609 MB / 346.7 MB Notification: Performance of postOpt tearingSystem (initialization): time 2.566e-05/0.6064, allocations: 8.812 kB / 471.1 MB, free: 8.602 MB / 346.7 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.001002/0.6074, allocations: 135.8 kB / 471.3 MB, free: 8.469 MB / 346.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 2.425e-05/0.6074, allocations: 15.92 kB / 471.3 MB, free: 8.453 MB / 346.7 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0006484/0.6081, allocations: 71.52 kB / 471.4 MB, free: 8.383 MB / 346.7 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 7.355e-05/0.6082, allocations: 31.92 kB / 471.4 MB, free: 8.352 MB / 346.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.valid,thdRMS.andValid.u1,thdRMS.andValid.u2,$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.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.0003538/0.6085, allocations: 163 kB / 471.6 MB, free: 8.184 MB / 346.7 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.0002364/0.6088, allocations: 59.33 kB / 471.6 MB, free: 8.125 MB / 346.7 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.001553/0.6104, allocations: 497.8 kB / 472.1 MB, free: 7.637 MB / 346.7 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 1.363e-05/0.6104, allocations: 8 kB / 472.1 MB, free: 7.629 MB / 346.7 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 6.823e-06/0.6104, allocations: 4 kB / 472.1 MB, free: 7.625 MB / 346.7 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 9.298e-06/0.6104, allocations: 0 / 472.1 MB, free: 7.625 MB / 346.7 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.001233/0.6117, allocations: 0.6379 MB / 472.8 MB, free: 6.938 MB / 346.7 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 4.619e-06/0.6117, allocations: 0 / 472.8 MB, free: 6.938 MB / 346.7 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0009172/0.6126, allocations: 99.86 kB / 472.8 MB, free: 6.84 MB / 346.7 MB Notification: Performance of postOpt tearingSystem (simulation): time 1.44e-05/0.6127, allocations: 4 kB / 472.9 MB, free: 6.836 MB / 346.7 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 7.362e-05/0.6128, allocations: 19.98 kB / 472.9 MB, free: 6.816 MB / 346.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 8.406e-06/0.6128, allocations: 4 kB / 472.9 MB, free: 6.812 MB / 346.7 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 1.884e-06/0.6128, allocations: 0 / 472.9 MB, free: 6.812 MB / 346.7 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.002071/0.6149, allocations: 0.7347 MB / 473.6 MB, free: 6.059 MB / 346.7 MB Notification: Performance of postOpt removeConstants (simulation): time 0.0002295/0.6151, allocations: 136.3 kB / 473.7 MB, free: 5.906 MB / 346.7 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 0.0001536/0.6153, allocations: 19.92 kB / 473.8 MB, free: 5.887 MB / 346.7 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.000683/0.616, allocations: 51.97 kB / 473.8 MB, free: 5.836 MB / 346.7 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0001848/0.6162, allocations: 44.38 kB / 473.9 MB, free: 5.789 MB / 346.7 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 7.02e-05/0.6163, allocations: 27.95 kB / 473.9 MB, free: 5.762 MB / 346.7 MB Notification: Performance of sorting global known variables: time 0.0006224/0.6169, allocations: 305.6 kB / 474.2 MB, free: 5.465 MB / 346.7 MB Notification: Performance of sort global known variables: time 4.3e-07/0.6169, allocations: 0 / 474.2 MB, free: 5.465 MB / 346.7 MB Notification: Performance of remove unused functions: time 0.001241/0.6182, allocations: 247.1 kB / 474.4 MB, free: 5.223 MB / 346.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,thd1.harmonic.mean2.y,thd1.rootMeanSquare.mean.y,thd1.valid,thd1.andValid.u1,thd1.andValid.u2,thdRMS.harmonic.mean1.y,thdRMS.harmonic.mean2.y,thdRMS.rootMeanSquare.mean.y,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.002654/0.6209, allocations: 1.319 MB / 475.7 MB, free: 3.879 MB / 346.7 MB Notification: Performance of simCode: created initialization part: time 0.002092/0.623, allocations: 0.7175 MB / 476.5 MB, free: 3.168 MB / 346.7 MB Notification: Performance of simCode: created event and clocks part: time 7.124e-06/0.623, allocations: 4.812 kB / 476.5 MB, free: 3.164 MB / 346.7 MB Notification: Performance of simCode: created simulation system equations: time 0.0006788/0.6237, allocations: 226.5 kB / 476.7 MB, free: 2.941 MB / 346.7 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0007061/0.6245, allocations: 70.05 kB / 476.8 MB, free: 2.871 MB / 346.7 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.003361/0.6278, allocations: 1.003 MB / 477.8 MB, free: 1.824 MB / 346.7 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0006762/0.6286, allocations: 0.9114 MB / 478.7 MB, free: 0.8789 MB / 346.7 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.000623/0.6292, allocations: 245.3 kB / 478.9 MB, free: 0.6406 MB / 346.7 MB Notification: Performance of SimCode: time 1.152e-06/0.6292, allocations: 0 / 478.9 MB, free: 0.6406 MB / 346.7 MB Notification: Performance of buildModelFMU: Generate C++ for platform static: time 2.609/3.239, allocations: 10.07 MB / 489 MB, free: 6.555 MB / 362.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)