Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries --ompython_omhome=/usr ModelicaByExample_ModelicaByExample.Components.SpeedMeasurement.Examples.PlantWithSampleHold.conf.json loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 4.0.0+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/ModelicaByExample 0.6.0/package.mo", uses=false) Using package ModelicaByExample with version 0.5.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaByExample 0.6.0/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 4.0.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo) Using package ModelicaServices with version 4.0.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo) Running command: "" <> buildModelFMU(ModelicaByExample.Components.SpeedMeasurement.Examples.PlantWithSampleHold,fileNamePrefix="ModelicaByExample_ModelicaByExample_Components_SpeedMeasurement_Examples_PlantWithSampleHold",fmuType="me",version="2.0",platforms={"static"}) "" <> buildModelFMU(ModelicaByExample.Components.SpeedMeasurement.Examples.PlantWithSampleHold,fileNamePrefix="ModelicaByExample_ModelicaByExample_Components_SpeedMeasurement_Examples_PlantWithSampleHold",fmuType="me",version="2.0",platforms={"static"}) Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.005505/0.005505, allocations: 100.9 kB / 15.73 MB, free: 6.055 MB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo): time 0.001868/0.001868, allocations: 192.4 kB / 16.67 MB, free: 5.969 MB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 3.2.3+maint.om/package.mo): time 1.395/1.395, allocations: 205.1 MB / 222.6 MB, free: 4.484 MB / 174.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaByExample 0.6.0/package.mo): time 0.04942/0.04942, allocations: 8.115 MB / 278 MB, free: 13.05 MB / 238.1 MB Notification: Modelica requested package Complex of version 3.2.3. Complex 4.0.0 is used instead which states that it is fully compatible without conversion script needed. Notification: Modelica requested package ModelicaServices of version 3.2.3. ModelicaServices 4.0.0 is used instead which states that it is fully compatible without conversion script needed. Notification: ModelicaByExample requested package Modelica of version 3.2.2. Modelica 3.2.3 is used instead which states that it is fully compatible without conversion script needed. Notification: Performance of FrontEnd - loaded program: time 0.002115/0.002115, allocations: 75.89 kB / 386.2 MB, free: 9.52 MB / 286.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.2599/0.262, allocations: 48.3 MB / 434.5 MB, free: 7.461 MB / 318.1 MB Notification: Performance of NFInst.instantiate(ModelicaByExample.Components.SpeedMeasurement.Examples.PlantWithSampleHold): time 0.002758/0.2648, allocations: 1.949 MB / 436.5 MB, free: 6.098 MB / 318.1 MB Notification: Performance of NFInst.instExpressions: time 0.0004102/0.2653, allocations: 232.2 kB / 436.7 MB, free: 5.934 MB / 318.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 7.809e-05/0.2653, allocations: 3.281 kB / 436.7 MB, free: 5.934 MB / 318.1 MB Notification: Performance of NFTyping.typeComponents: time 5.911e-05/0.2654, allocations: 30.11 kB / 436.7 MB, free: 5.914 MB / 318.1 MB Notification: Performance of NFTyping.typeBindings: time 9.111e-05/0.2655, allocations: 46.55 kB / 436.8 MB, free: 5.879 MB / 318.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.0002011/0.2657, allocations: 51.33 kB / 436.8 MB, free: 5.848 MB / 318.1 MB Notification: Performance of NFFlatten.flatten: time 0.0001795/0.2659, allocations: 193.9 kB / 437 MB, free: 5.75 MB / 318.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0001879/0.2661, allocations: 94.94 kB / 437.1 MB, free: 5.703 MB / 318.1 MB Notification: Performance of NFEvalConstants.evaluate: time 7.637e-05/0.2662, allocations: 67.73 kB / 437.2 MB, free: 5.672 MB / 318.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0001107/0.2663, allocations: 77.66 kB / 437.2 MB, free: 5.633 MB / 318.1 MB Notification: Performance of NFPackage.collectConstants: time 2.893e-05/0.2663, allocations: 17.75 kB / 437.2 MB, free: 5.633 MB / 318.1 MB Notification: Performance of NFFlatten.collectFunctions: time 3.325e-05/0.2664, allocations: 18.78 kB / 437.3 MB, free: 5.633 MB / 318.1 MB Notification: Performance of NFScalarize.scalarize: time 4.068e-05/0.2664, allocations: 47.84 kB / 437.3 MB, free: 5.598 MB / 318.1 MB Notification: Performance of NFVerifyModel.verify: time 0.0001247/0.2665, allocations: 88.55 kB / 437.4 MB, free: 5.547 MB / 318.1 MB Notification: Performance of NFConvertDAE.convert: time 0.0002503/0.2668, allocations: 205.5 kB / 437.6 MB, free: 5.469 MB / 318.1 MB Notification: Performance of FrontEnd - DAE generated: time 3.967e-06/0.2668, allocations: 4 kB / 437.6 MB, free: 5.465 MB / 318.1 MB Notification: Performance of FrontEnd: time 2.084e-06/0.2668, allocations: 0.75 kB / 437.6 MB, free: 5.465 MB / 318.1 MB Notification: Performance of Transformations before backend: time 1.064e-05/0.2668, allocations: 0.75 kB / 437.6 MB, free: 5.465 MB / 318.1 MB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 46 * Number of variables: 46 Notification: Performance of Generate backend data structure: time 0.0005612/0.2674, allocations: 463.8 kB / 438.1 MB, free: 5.035 MB / 318.1 MB Notification: Performance of prepare preOptimizeDAE: time 4.465e-05/0.2674, allocations: 14 kB / 438.1 MB, free: 5.031 MB / 318.1 MB Notification: Performance of preOpt introduceOutputAliases (simulation): time 5.405e-05/0.2675, allocations: 53.84 kB / 438.1 MB, free: 4.98 MB / 318.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 4.919e-05/0.2676, allocations: 21.8 kB / 438.1 MB, free: 4.969 MB / 318.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 8.69e-05/0.2677, allocations: 179 kB / 438.3 MB, free: 4.762 MB / 318.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 2.386e-05/0.2677, allocations: 15.62 kB / 438.3 MB, free: 4.754 MB / 318.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 4.805e-05/0.2677, allocations: 26.77 kB / 438.4 MB, free: 4.742 MB / 318.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0003414/0.2681, allocations: 174.7 kB / 438.5 MB, free: 4.652 MB / 318.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 2.064e-05/0.2681, allocations: 5.641 kB / 438.5 MB, free: 4.648 MB / 318.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 1.99e-05/0.2681, allocations: 9.156 kB / 438.5 MB, free: 4.641 MB / 318.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 1.008e-05/0.2682, allocations: 5.188 kB / 438.6 MB, free: 4.641 MB / 318.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0001946/0.2684, allocations: 106.3 kB / 438.7 MB, free: 4.605 MB / 318.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.0009236/0.2693, allocations: 0.6964 MB / 439.4 MB, free: 4.07 MB / 318.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.0003113/0.2696, allocations: 233.3 kB / 439.6 MB, free: 3.902 MB / 318.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0001889/0.2698, allocations: 92.58 kB / 439.7 MB, free: 3.867 MB / 318.1 MB Notification: Performance of preOpt evalFunc (simulation): time 1.725e-05/0.2698, allocations: 10.17 kB / 439.7 MB, free: 3.859 MB / 318.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0002034/0.27, allocations: 96.08 kB / 439.8 MB, free: 3.789 MB / 318.1 MB Notification: Performance of pre-optimization done (n=16): time 1.653e-06/0.2701, allocations: 1.25 kB / 439.8 MB, free: 3.789 MB / 318.1 MB Notification: Performance of matching and sorting (n=18): time 0.0007445/0.2708, allocations: 0.5094 MB / 440.3 MB, free: 3.406 MB / 318.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 2.707e-05/0.2708, allocations: 53.62 kB / 440.3 MB, free: 3.344 MB / 318.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 7.2e-05/0.2709, allocations: 129.8 kB / 440.5 MB, free: 3.227 MB / 318.1 MB Notification: Performance of collectPreVariables (initialization): time 1.262e-05/0.2709, allocations: 32.22 kB / 440.5 MB, free: 3.191 MB / 318.1 MB Notification: Performance of collectInitialEqns (initialization): time 4.568e-05/0.271, allocations: 138.4 kB / 440.6 MB, free: 3.066 MB / 318.1 MB Notification: Performance of collectInitialBindings (initialization): time 3.537e-05/0.271, allocations: 65 kB / 440.7 MB, free: 3.016 MB / 318.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 5.662e-05/0.2711, allocations: 44.39 kB / 440.7 MB, free: 2.984 MB / 318.1 MB Notification: Performance of setup shared object (initialization): time 4.268e-05/0.2711, allocations: 322.9 kB / 441.1 MB, free: 2.668 MB / 318.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 7.749e-05/0.2712, allocations: 48.88 kB / 441.1 MB, free: 2.648 MB / 318.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 9.992e-05/0.2713, allocations: 113.1 kB / 441.2 MB, free: 2.555 MB / 318.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.0001647/0.2715, allocations: 163.9 kB / 441.4 MB, free: 2.434 MB / 318.1 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 2.435e-06/0.2715, allocations: 5 kB / 441.4 MB, free: 2.43 MB / 318.1 MB Notification: Performance of matching and sorting (n=29) (initialization): time 0.0002576/0.2718, allocations: 203.1 kB / 441.6 MB, free: 2.328 MB / 318.1 MB Notification: Performance of prepare postOptimizeDAE: time 1.347e-05/0.2718, allocations: 6.203 kB / 441.6 MB, free: 2.328 MB / 318.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 6.012e-06/0.2718, allocations: 2.031 kB / 441.6 MB, free: 2.328 MB / 318.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 1.584e-05/0.2718, allocations: 3.531 kB / 441.6 MB, free: 2.328 MB / 318.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0001874/0.272, allocations: 53.42 kB / 441.6 MB, free: 2.32 MB / 318.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.052e-05/0.272, allocations: 8.156 kB / 441.6 MB, free: 2.316 MB / 318.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 6.371e-05/0.2721, allocations: 6.969 kB / 441.7 MB, free: 2.312 MB / 318.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 1.881e-05/0.2721, allocations: 7.5 kB / 441.7 MB, free: 2.312 MB / 318.1 MB Notification: Model statistics after passing the back-end for initialization: * Number of independent subsystems: 8 * Number of states: 0 () * Number of discrete variables: 3 ($whenCondition1,sampleHold.w,$PRE.sampleHold.w) * Number of discrete states: 0 () * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for initialization (29): * Single equations (assignments): 29 * Array equations: 0 * Algorithm blocks: 0 * Record equations: 0 * When equations: 0 * If-equations: 0 * Equation systems (not torn): 0 * Torn equation systems: 0 * Mixed (continuous/discrete) equation systems: 0 Notification: Performance of prepare postOptimizeDAE: time 8.375e-05/0.2722, allocations: 142.8 kB / 441.8 MB, free: 2.172 MB / 318.1 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 2.503e-05/0.2722, allocations: 21.78 kB / 441.8 MB, free: 2.156 MB / 318.1 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 4.234e-05/0.2723, allocations: 16 kB / 441.8 MB, free: 2.145 MB / 318.1 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 3.527e-06/0.2723, allocations: 1.844 kB / 441.8 MB, free: 2.145 MB / 318.1 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 5.19e-06/0.2723, allocations: 0.5625 kB / 441.8 MB, free: 2.145 MB / 318.1 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 4.048e-06/0.2723, allocations: 1.297 kB / 441.8 MB, free: 2.145 MB / 318.1 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0006318/0.273, allocations: 0.5115 MB / 442.4 MB, free: 1.742 MB / 318.1 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 2.494e-06/0.273, allocations: 1 kB / 442.4 MB, free: 1.742 MB / 318.1 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0001921/0.2732, allocations: 38.7 kB / 442.4 MB, free: 1.738 MB / 318.1 MB Notification: Performance of postOpt tearingSystem (simulation): time 5.109e-06/0.2732, allocations: 1 kB / 442.4 MB, free: 1.738 MB / 318.1 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 1.727e-05/0.2732, allocations: 6.609 kB / 442.4 MB, free: 1.734 MB / 318.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 2.585e-06/0.2732, allocations: 1 kB / 442.4 MB, free: 1.734 MB / 318.1 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 1.323e-06/0.2732, allocations: 0.5312 kB / 442.4 MB, free: 1.734 MB / 318.1 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.0003887/0.2736, allocations: 312.2 kB / 442.7 MB, free: 1.527 MB / 318.1 MB Notification: Performance of postOpt removeConstants (simulation): time 2.733e-05/0.2736, allocations: 84.47 kB / 442.8 MB, free: 1.43 MB / 318.1 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 2.463e-05/0.2737, allocations: 5.781 kB / 442.8 MB, free: 1.426 MB / 318.1 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 7.33e-05/0.2738, allocations: 4.562 kB / 442.8 MB, free: 1.422 MB / 318.1 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 5.404e-05/0.2738, allocations: 16.44 kB / 442.8 MB, free: 1.414 MB / 318.1 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 1.68e-05/0.2738, allocations: 6.281 kB / 442.8 MB, free: 1.414 MB / 318.1 MB Notification: Performance of sorting global known variables: time 5.416e-05/0.2739, allocations: 92.88 kB / 442.9 MB, free: 1.336 MB / 318.1 MB Notification: Performance of sort global known variables: time 1e-07/0.2739, allocations: 0 / 442.9 MB, free: 1.336 MB / 318.1 MB Notification: Performance of remove unused functions: time 0.0003085/0.2742, allocations: 45.59 kB / 443 MB, free: 1.324 MB / 318.1 MB Notification: Model statistics after passing the back-end for simulation: * Number of independent subsystems: 1 * Number of states: 4 (inertia2.flange_a.phi,inertia2.w,inertia1.w,sampleHold.flange.phi) * Number of discrete variables: 2 ($whenCondition1,sampleHold.w) * Number of discrete states: 0 () * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for simulation (18): * Single equations (assignments): 17 * Array equations: 0 * Algorithm blocks: 0 * Record equations: 0 * When equations: 1 * If-equations: 0 * Equation systems (not torn): 0 * Torn equation systems: 0 * Mixed (continuous/discrete) equation systems: 0 Notification: Performance of Backend phase and start with SimCode phase: time 0.000459/0.2747, allocations: 0.8304 MB / 443.8 MB, free: 0.5938 MB / 318.1 MB Notification: Performance of simCode: created initialization part: time 0.0002495/0.2749, allocations: 138.7 kB / 443.9 MB, free: 0.5469 MB / 318.1 MB Notification: Performance of simCode: created event and clocks part: time 2.555e-06/0.275, allocations: 4.375 kB / 443.9 MB, free: 0.543 MB / 318.1 MB Notification: Performance of simCode: created simulation system equations: time 0.0001102/0.2751, allocations: 64.22 kB / 444 MB, free: 0.5195 MB / 318.1 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.000265/0.2753, allocations: 11.25 kB / 444 MB, free: 0.5117 MB / 318.1 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.002531/0.2779, allocations: 2.084 MB / 446.1 MB, free: 14.79 MB / 334.1 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.00037/0.2783, allocations: 0.7194 MB / 446.8 MB, free: 14.09 MB / 334.1 MB Notification: Performance of simCode: alias equations: time 5.256e-05/0.2783, allocations: 18.42 kB / 446.8 MB, free: 14.09 MB / 334.1 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 8.207e-05/0.2784, allocations: 48.23 kB / 446.9 MB, free: 14.05 MB / 334.1 MB Notification: Performance of SimCode: time 2.5e-07/0.2784, allocations: 0 / 446.9 MB, free: 14.05 MB / 334.1 MB Notification: Performance of buildModelFMU: Generate the FMI files: time 0.02408/0.3025, allocations: 2.77 MB / 449.6 MB, free: 13.41 MB / 334.1 MB Notification: Performance of buildModelFMU: Generate platform static: time 7.912/8.214, allocations: 9.172 kB / 449.6 MB, free: 13.41 MB / 334.1 MB (rm -f ModelicaByExample_ModelicaByExample.Components.SpeedMeasurement.Examples.PlantWithSampleHold.pipe ; mkfifo ModelicaByExample_ModelicaByExample.Components.SpeedMeasurement.Examples.PlantWithSampleHold.pipe ; head -c 1048576 < ModelicaByExample_ModelicaByExample.Components.SpeedMeasurement.Examples.PlantWithSampleHold.pipe >> ../files/ModelicaByExample_ModelicaByExample.Components.SpeedMeasurement.Examples.PlantWithSampleHold.sim & python3 -m fmpy simulate --output-file ModelicaByExample_ModelicaByExample.Components.SpeedMeasurement.Examples.PlantWithSampleHold_res.csv --start-time 0 --stop-time 10 --timeout 50 --relative-tolerance 1e-06 --interface-type ModelExchange --solver CVode --output-interval 0.004 ModelicaByExample_ModelicaByExample_Components_SpeedMeasurement_Examples_PlantWithSampleHold.fmu > ModelicaByExample_ModelicaByExample.Components.SpeedMeasurement.Examples.PlantWithSampleHold.pipe 2>&1)