Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries --ompython_omhome=/usr ModelicaByExample_ModelicaByExample.Components.SpeedMeasurement.Examples.PlantWithPulseCounter.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.PlantWithPulseCounter,fileNamePrefix="ModelicaByExample_ModelicaByExample_Components_SpeedMeasurement_Examples_PlantWithPulseCounter",fmuType="me",version="2.0",platforms={"static"}) "" <> buildModelFMU(ModelicaByExample.Components.SpeedMeasurement.Examples.PlantWithPulseCounter,fileNamePrefix="ModelicaByExample_ModelicaByExample_Components_SpeedMeasurement_Examples_PlantWithPulseCounter",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.004771/0.004772, allocations: 98.16 kB / 15.73 MB, free: 6.008 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.001234/0.001234, allocations: 196.4 kB / 16.67 MB, free: 5.926 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.415/1.415, allocations: 205.1 MB / 222.6 MB, free: 4.5 MB / 174.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaByExample 0.6.0/package.mo): time 0.05007/0.05007, allocations: 8.12 MB / 278 MB, free: 13.06 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.002045/0.002045, allocations: 67.89 kB / 386.2 MB, free: 9.531 MB / 286.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.2381/0.2402, allocations: 48.3 MB / 434.5 MB, free: 7.469 MB / 318.1 MB Notification: Performance of NFInst.instantiate(ModelicaByExample.Components.SpeedMeasurement.Examples.PlantWithPulseCounter): time 0.002794/0.243, allocations: 1.978 MB / 436.5 MB, free: 6.09 MB / 318.1 MB Notification: Performance of NFInst.instExpressions: time 0.0007908/0.2438, allocations: 0.6128 MB / 437.1 MB, free: 5.648 MB / 318.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 7.407e-05/0.2439, allocations: 3.75 kB / 437.1 MB, free: 5.648 MB / 318.1 MB Notification: Performance of NFTyping.typeComponents: time 6.188e-05/0.244, allocations: 25.52 kB / 437.1 MB, free: 5.633 MB / 318.1 MB Notification: Performance of NFTyping.typeBindings: time 0.0001265/0.2441, allocations: 47.53 kB / 437.2 MB, free: 5.598 MB / 318.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.000198/0.2443, allocations: 65.86 kB / 437.2 MB, free: 5.559 MB / 318.1 MB Notification: Performance of NFFlatten.flatten: time 0.0002172/0.2445, allocations: 232.2 kB / 437.5 MB, free: 5.441 MB / 318.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0001694/0.2447, allocations: 99.59 kB / 437.6 MB, free: 5.391 MB / 318.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0001297/0.2449, allocations: 81.08 kB / 437.6 MB, free: 5.355 MB / 318.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0001228/0.245, allocations: 96 kB / 437.7 MB, free: 5.305 MB / 318.1 MB Notification: Performance of NFPackage.collectConstants: time 3.793e-05/0.245, allocations: 20.81 kB / 437.8 MB, free: 5.305 MB / 318.1 MB Notification: Performance of NFFlatten.collectFunctions: time 3.745e-05/0.2451, allocations: 20.53 kB / 437.8 MB, free: 5.305 MB / 318.1 MB Notification: Performance of NFScalarize.scalarize: time 3.945e-05/0.2451, allocations: 45.86 kB / 437.8 MB, free: 5.273 MB / 318.1 MB Notification: Performance of NFVerifyModel.verify: time 9.587e-05/0.2452, allocations: 101.6 kB / 437.9 MB, free: 5.215 MB / 318.1 MB Notification: Performance of NFConvertDAE.convert: time 0.0002591/0.2455, allocations: 232.4 kB / 438.1 MB, free: 5.125 MB / 318.1 MB Notification: Performance of FrontEnd - DAE generated: time 4.789e-06/0.2455, allocations: 2.844 kB / 438.1 MB, free: 5.125 MB / 318.1 MB Notification: Performance of FrontEnd: time 1.432e-06/0.2455, allocations: 0 / 438.1 MB, free: 5.125 MB / 318.1 MB Notification: Performance of Transformations before backend: time 5.871e-06/0.2455, allocations: 0 / 438.1 MB, free: 5.125 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: 49 * Number of variables: 49 Notification: Performance of Generate backend data structure: time 0.0005874/0.2461, allocations: 0.5018 MB / 438.7 MB, free: 4.656 MB / 318.1 MB Notification: Performance of prepare preOptimizeDAE: time 3.402e-05/0.2461, allocations: 16.55 kB / 438.7 MB, free: 4.648 MB / 318.1 MB Notification: Performance of preOpt introduceOutputAliases (simulation): time 4.124e-05/0.2462, allocations: 55.3 kB / 438.7 MB, free: 4.598 MB / 318.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 4.183e-05/0.2462, allocations: 23.11 kB / 438.7 MB, free: 4.586 MB / 318.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0001009/0.2463, allocations: 179.8 kB / 438.9 MB, free: 4.379 MB / 318.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 1.592e-05/0.2464, allocations: 21.5 kB / 438.9 MB, free: 4.367 MB / 318.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 4.122e-05/0.2464, allocations: 31.83 kB / 439 MB, free: 4.352 MB / 318.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0002861/0.2467, allocations: 186.5 kB / 439.2 MB, free: 4.258 MB / 318.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 1.727e-05/0.2467, allocations: 5.969 kB / 439.2 MB, free: 4.254 MB / 318.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 1.83e-05/0.2468, allocations: 5.375 kB / 439.2 MB, free: 4.25 MB / 318.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 6.963e-06/0.2468, allocations: 5.5 kB / 439.2 MB, free: 4.25 MB / 318.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0001889/0.247, allocations: 116.6 kB / 439.3 MB, free: 4.211 MB / 318.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.001033/0.248, allocations: 0.7137 MB / 440 MB, free: 3.688 MB / 318.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.0003434/0.2484, allocations: 237.9 kB / 440.2 MB, free: 3.523 MB / 318.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0002237/0.2486, allocations: 120 kB / 440.3 MB, free: 3.473 MB / 318.1 MB Notification: Performance of preOpt evalFunc (simulation): time 1.927e-05/0.2486, allocations: 2.406 kB / 440.3 MB, free: 3.473 MB / 318.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0002849/0.2489, allocations: 183.7 kB / 440.5 MB, free: 3.328 MB / 318.1 MB Notification: Performance of pre-optimization done (n=22): time 1.663e-06/0.2489, allocations: 0 / 440.5 MB, free: 3.328 MB / 318.1 MB Notification: Performance of matching and sorting (n=25): time 0.001175/0.2501, allocations: 0.8018 MB / 441.3 MB, free: 2.738 MB / 318.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 5.044e-05/0.2502, allocations: 140.6 kB / 441.5 MB, free: 2.578 MB / 318.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 9.857e-05/0.2503, allocations: 135.5 kB / 441.6 MB, free: 2.461 MB / 318.1 MB Notification: Performance of collectPreVariables (initialization): time 2.108e-05/0.2503, allocations: 35.34 kB / 441.6 MB, free: 2.426 MB / 318.1 MB Notification: Performance of collectInitialEqns (initialization): time 6.052e-05/0.2504, allocations: 133.7 kB / 441.8 MB, free: 2.305 MB / 318.1 MB Notification: Performance of collectInitialBindings (initialization): time 5.495e-05/0.2504, allocations: 89.05 kB / 441.9 MB, free: 2.234 MB / 318.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 8.597e-05/0.2505, allocations: 56.81 kB / 441.9 MB, free: 2.199 MB / 318.1 MB Notification: Performance of setup shared object (initialization): time 5.089e-05/0.2506, allocations: 327.7 kB / 442.2 MB, free: 1.879 MB / 318.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0001266/0.2507, allocations: 60.25 kB / 442.3 MB, free: 1.855 MB / 318.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0001427/0.2509, allocations: 139.9 kB / 442.4 MB, free: 1.746 MB / 318.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.0003202/0.2512, allocations: 259.5 kB / 442.7 MB, free: 1.539 MB / 318.1 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 1.993e-06/0.2512, allocations: 0.5938 kB / 442.7 MB, free: 1.539 MB / 318.1 MB Notification: Performance of matching and sorting (n=39) (initialization): time 0.0004361/0.2516, allocations: 299.8 kB / 443 MB, free: 1.379 MB / 318.1 MB Notification: Performance of prepare postOptimizeDAE: time 3.552e-05/0.2517, allocations: 40.38 kB / 443 MB, free: 1.344 MB / 318.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 8.386e-06/0.2517, allocations: 3.062 kB / 443 MB, free: 1.344 MB / 318.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 2.255e-05/0.2517, allocations: 2.781 kB / 443 MB, free: 1.344 MB / 318.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0002135/0.2519, allocations: 55.28 kB / 443.1 MB, free: 1.34 MB / 318.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 9.518e-06/0.2519, allocations: 4.297 kB / 443.1 MB, free: 1.34 MB / 318.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 9.631e-05/0.2521, allocations: 19.64 kB / 443.1 MB, free: 1.328 MB / 318.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 1.73e-05/0.2521, allocations: 9.312 kB / 443.1 MB, free: 1.328 MB / 318.1 MB Warning: Assuming fixed start value for the following 1 variables: pulseCounter.w:DISCRETE(flow=false fixed = true ) "Sensed speed" type: Real Notification: Model statistics after passing the back-end for initialization: * Number of independent subsystems: 9 * Number of states: 0 () * Number of discrete variables: 11 ($PRE.pulseCounter.w,pulseCounter.w,pulseCounter.count,$PRE.pulseCounter.count,pulseCounter.prev_phi,$PRE.pulseCounter.prev_phi,pulseCounter.next_phi,$PRE.pulseCounter.next_phi,$whenCondition3,$whenCondition1,$whenCondition2) * Number of discrete states: 0 () * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for initialization (37): * Single equations (assignments): 36 * Array equations: 0 * Algorithm blocks: 1 * 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 0.0001596/0.2522, allocations: 177.7 kB / 443.3 MB, free: 1.16 MB / 318.1 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 2.646e-05/0.2523, allocations: 15.98 kB / 443.3 MB, free: 1.152 MB / 318.1 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 4.299e-05/0.2523, allocations: 24.75 kB / 443.3 MB, free: 1.133 MB / 318.1 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 2.815e-06/0.2523, allocations: 1.312 kB / 443.3 MB, free: 1.133 MB / 318.1 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 5.11e-06/0.2523, allocations: 1.312 kB / 443.3 MB, free: 1.133 MB / 318.1 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 4.378e-06/0.2524, allocations: 1.406 kB / 443.3 MB, free: 1.133 MB / 318.1 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0007522/0.2531, allocations: 0.7021 MB / 444 MB, free: 0.6328 MB / 318.1 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 2.695e-06/0.2531, allocations: 1.438 kB / 444 MB, free: 0.6328 MB / 318.1 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.00018/0.2533, allocations: 40 kB / 444.1 MB, free: 0.6289 MB / 318.1 MB Notification: Performance of postOpt tearingSystem (simulation): time 3.066e-06/0.2533, allocations: 2.75 kB / 444.1 MB, free: 0.6289 MB / 318.1 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 1.969e-05/0.2533, allocations: 9.484 kB / 444.1 MB, free: 0.625 MB / 318.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 3.667e-06/0.2534, allocations: 9.875 kB / 444.1 MB, free: 0.6172 MB / 318.1 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 1.793e-06/0.2534, allocations: 1.375 kB / 444.1 MB, free: 0.6172 MB / 318.1 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.0004526/0.2538, allocations: 469.9 kB / 444.5 MB, free: 324 kB / 318.1 MB Notification: Performance of postOpt removeConstants (simulation): time 2.355e-05/0.2538, allocations: 89.89 kB / 444.6 MB, free: 220 kB / 318.1 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 3.353e-05/0.2539, allocations: 10.25 kB / 444.6 MB, free: 216 kB / 318.1 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0001077/0.254, allocations: 10.86 kB / 444.7 MB, free: 212 kB / 318.1 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 4.557e-05/0.2541, allocations: 11.42 kB / 444.7 MB, free: 212 kB / 318.1 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 2.18e-05/0.2541, allocations: 16.69 kB / 444.7 MB, free: 204 kB / 318.1 MB Notification: Performance of sorting global known variables: time 3.958e-05/0.2541, allocations: 99.5 kB / 444.8 MB, free: 120 kB / 318.1 MB Notification: Performance of sort global known variables: time 1.1e-07/0.2541, allocations: 3.938 kB / 444.8 MB, free: 116 kB / 318.1 MB Notification: Performance of remove unused functions: time 0.0002885/0.2544, allocations: 54.75 kB / 444.8 MB, free: 108 kB / 318.1 MB Notification: Model statistics after passing the back-end for simulation: * Number of independent subsystems: 3 * Number of states: 4 (inertia2.flange_a.phi,inertia2.w,inertia1.flange_a.phi,inertia1.w) * Number of discrete variables: 7 ($whenCondition2,$whenCondition1,$whenCondition3,pulseCounter.w,pulseCounter.next_phi,pulseCounter.prev_phi,pulseCounter.count) * Number of discrete states: 7 (pulseCounter.w,$whenCondition3,pulseCounter.count,pulseCounter.prev_phi,pulseCounter.next_phi,$whenCondition2,$whenCondition1) * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for simulation (19): * Single equations (assignments): 18 * Array equations: 0 * Algorithm blocks: 1 * 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 Backend phase and start with SimCode phase: time 0.001019/0.2555, allocations: 1.011 MB / 445.8 MB, free: 15.27 MB / 334.1 MB Notification: Performance of simCode: created initialization part: time 0.0004821/0.2559, allocations: 258.4 kB / 446.1 MB, free: 15.14 MB / 334.1 MB Notification: Performance of simCode: created event and clocks part: time 2.515e-06/0.256, allocations: 0 / 446.1 MB, free: 15.14 MB / 334.1 MB Notification: Performance of simCode: created simulation system equations: time 0.0002864/0.2563, allocations: 194 kB / 446.3 MB, free: 15.01 MB / 334.1 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0003069/0.2566, allocations: 15.53 kB / 446.3 MB, free: 15 MB / 334.1 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.002987/0.2596, allocations: 2.414 MB / 448.7 MB, free: 13.07 MB / 334.1 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0003817/0.26, allocations: 0.7283 MB / 449.4 MB, free: 12.38 MB / 334.1 MB Notification: Performance of simCode: alias equations: time 5.715e-05/0.26, allocations: 18.23 kB / 449.5 MB, free: 12.37 MB / 334.1 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 9.576e-05/0.2601, allocations: 57.95 kB / 449.5 MB, free: 12.33 MB / 334.1 MB Notification: Performance of SimCode: time 3.31e-07/0.2601, allocations: 1.062 kB / 449.5 MB, free: 12.33 MB / 334.1 MB Notification: Performance of buildModelFMU: Generate the FMI files: time 0.02696/0.2871, allocations: 3.497 MB / 453 MB, free: 11.15 MB / 334.1 MB Notification: Performance of buildModelFMU: Generate platform static: time 8.101/8.388, allocations: 21.5 kB / 453 MB, free: 11.13 MB / 334.1 MB (rm -f ModelicaByExample_ModelicaByExample.Components.SpeedMeasurement.Examples.PlantWithPulseCounter.pipe ; mkfifo ModelicaByExample_ModelicaByExample.Components.SpeedMeasurement.Examples.PlantWithPulseCounter.pipe ; head -c 1048576 < ModelicaByExample_ModelicaByExample.Components.SpeedMeasurement.Examples.PlantWithPulseCounter.pipe >> ../files/ModelicaByExample_ModelicaByExample.Components.SpeedMeasurement.Examples.PlantWithPulseCounter.sim & python3 -m fmpy simulate --output-file ModelicaByExample_ModelicaByExample.Components.SpeedMeasurement.Examples.PlantWithPulseCounter_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_PlantWithPulseCounter.fmu > ModelicaByExample_ModelicaByExample.Components.SpeedMeasurement.Examples.PlantWithPulseCounter.pipe 2>&1)