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.008087/0.008088, allocations: 99.5 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.002517/0.002517, allocations: 191.9 kB / 16.67 MB, free: 5.973 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.48/1.48, allocations: 205.1 MB / 222.6 MB, free: 4.52 MB / 174.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaByExample 0.6.0/package.mo): time 0.05189/0.05189, allocations: 8.12 MB / 278 MB, free: 13.07 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.002416/0.002416, allocations: 71.89 kB / 386.2 MB, free: 9.512 MB / 286.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.2682/0.2706, allocations: 48.29 MB / 434.5 MB, free: 7.469 MB / 318.1 MB Notification: Performance of NFInst.instantiate(ModelicaByExample.Components.SpeedMeasurement.Examples.PlantWithPulseCounter): time 0.002695/0.2734, allocations: 1.985 MB / 436.5 MB, free: 6.082 MB / 318.1 MB Notification: Performance of NFInst.instExpressions: time 0.000834/0.2742, allocations: 0.6116 MB / 437.1 MB, free: 5.641 MB / 318.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 7.093e-05/0.2743, allocations: 3.031 kB / 437.1 MB, free: 5.641 MB / 318.1 MB Notification: Performance of NFTyping.typeComponents: time 6.058e-05/0.2744, allocations: 26.55 kB / 437.1 MB, free: 5.625 MB / 318.1 MB Notification: Performance of NFTyping.typeBindings: time 0.0001263/0.2745, allocations: 47.41 kB / 437.2 MB, free: 5.59 MB / 318.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.0002044/0.2747, allocations: 69.16 kB / 437.2 MB, free: 5.547 MB / 318.1 MB Notification: Performance of NFFlatten.flatten: time 0.0002324/0.275, allocations: 220.2 kB / 437.5 MB, free: 5.441 MB / 318.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0001919/0.2752, allocations: 100.1 kB / 437.6 MB, free: 5.391 MB / 318.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0001451/0.2753, allocations: 88.58 kB / 437.6 MB, free: 5.348 MB / 318.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0001285/0.2755, allocations: 91.86 kB / 437.7 MB, free: 5.301 MB / 318.1 MB Notification: Performance of NFPackage.collectConstants: time 4.093e-05/0.2755, allocations: 21.41 kB / 437.7 MB, free: 5.301 MB / 318.1 MB Notification: Performance of NFFlatten.collectFunctions: time 4.194e-05/0.2756, allocations: 21.47 kB / 437.8 MB, free: 5.301 MB / 318.1 MB Notification: Performance of NFScalarize.scalarize: time 4.396e-05/0.2756, allocations: 44.89 kB / 437.8 MB, free: 5.27 MB / 318.1 MB Notification: Performance of NFVerifyModel.verify: time 9.703e-05/0.2757, allocations: 101.3 kB / 437.9 MB, free: 5.211 MB / 318.1 MB Notification: Performance of NFConvertDAE.convert: time 0.0002751/0.276, allocations: 228.7 kB / 438.1 MB, free: 5.125 MB / 318.1 MB Notification: Performance of FrontEnd - DAE generated: time 5.159e-06/0.276, allocations: 1.641 kB / 438.1 MB, free: 5.125 MB / 318.1 MB Notification: Performance of FrontEnd: time 1.393e-06/0.276, allocations: 4 kB / 438.1 MB, free: 5.121 MB / 318.1 MB Notification: Performance of Transformations before backend: time 7.133e-06/0.276, allocations: 0 / 438.1 MB, free: 5.121 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.0006205/0.2767, allocations: 0.5015 MB / 438.6 MB, free: 4.652 MB / 318.1 MB Notification: Performance of prepare preOptimizeDAE: time 3.797e-05/0.2767, allocations: 17.64 kB / 438.7 MB, free: 4.645 MB / 318.1 MB Notification: Performance of preOpt introduceOutputAliases (simulation): time 5.179e-05/0.2768, allocations: 55.61 kB / 438.7 MB, free: 4.594 MB / 318.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 4.696e-05/0.2768, allocations: 23.14 kB / 438.7 MB, free: 4.582 MB / 318.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0001035/0.2769, allocations: 188 kB / 438.9 MB, free: 4.367 MB / 318.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 2.177e-05/0.277, allocations: 21.55 kB / 438.9 MB, free: 4.355 MB / 318.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 3.979e-05/0.277, allocations: 27.14 kB / 439 MB, free: 4.344 MB / 318.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0003026/0.2773, allocations: 187.2 kB / 439.2 MB, free: 4.25 MB / 318.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 1.642e-05/0.2773, allocations: 1.734 kB / 439.2 MB, free: 4.25 MB / 318.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 1.845e-05/0.2774, allocations: 6.281 kB / 439.2 MB, free: 4.246 MB / 318.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 7.494e-06/0.2774, allocations: 4.625 kB / 439.2 MB, free: 4.246 MB / 318.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0002105/0.2776, allocations: 116.9 kB / 439.3 MB, free: 4.207 MB / 318.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.000989/0.2786, allocations: 0.7133 MB / 440 MB, free: 3.684 MB / 318.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.0003195/0.2789, allocations: 255.2 kB / 440.2 MB, free: 3.504 MB / 318.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0002113/0.2791, allocations: 110.9 kB / 440.3 MB, free: 3.461 MB / 318.1 MB Notification: Performance of preOpt evalFunc (simulation): time 1.202e-05/0.2792, allocations: 2.125 kB / 440.4 MB, free: 3.461 MB / 318.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0002771/0.2794, allocations: 179.4 kB / 440.5 MB, free: 3.32 MB / 318.1 MB Notification: Performance of pre-optimization done (n=22): time 1.303e-06/0.2794, allocations: 1.156 kB / 440.5 MB, free: 3.32 MB / 318.1 MB Notification: Performance of matching and sorting (n=25): time 0.001107/0.2806, allocations: 0.8035 MB / 441.3 MB, free: 2.727 MB / 318.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 4.828e-05/0.2806, allocations: 144.1 kB / 441.5 MB, free: 2.562 MB / 318.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 9.144e-05/0.2807, allocations: 129.4 kB / 441.6 MB, free: 2.453 MB / 318.1 MB Notification: Performance of collectPreVariables (initialization): time 1.878e-05/0.2807, allocations: 33.12 kB / 441.6 MB, free: 2.418 MB / 318.1 MB Notification: Performance of collectInitialEqns (initialization): time 5.667e-05/0.2808, allocations: 139.6 kB / 441.8 MB, free: 2.293 MB / 318.1 MB Notification: Performance of collectInitialBindings (initialization): time 5.205e-05/0.2809, allocations: 87.88 kB / 441.9 MB, free: 2.227 MB / 318.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 8.033e-05/0.2809, allocations: 54.06 kB / 441.9 MB, free: 2.191 MB / 318.1 MB Notification: Performance of setup shared object (initialization): time 4.776e-05/0.281, allocations: 327.9 kB / 442.2 MB, free: 1.871 MB / 318.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0001201/0.2811, allocations: 59.88 kB / 442.3 MB, free: 1.848 MB / 318.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0001421/0.2813, allocations: 144.9 kB / 442.4 MB, free: 1.734 MB / 318.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.0003133/0.2816, allocations: 259.6 kB / 442.7 MB, free: 1.527 MB / 318.1 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 2.073e-06/0.2816, allocations: 0.5 kB / 442.7 MB, free: 1.527 MB / 318.1 MB Notification: Performance of matching and sorting (n=39) (initialization): time 0.0003996/0.282, allocations: 292.9 kB / 443 MB, free: 1.375 MB / 318.1 MB Notification: Performance of prepare postOptimizeDAE: time 2.748e-05/0.282, allocations: 36.39 kB / 443 MB, free: 1.34 MB / 318.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 5.761e-06/0.2821, allocations: 6.875 kB / 443 MB, free: 1.336 MB / 318.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 1.637e-05/0.2821, allocations: 4.062 kB / 443 MB, free: 1.336 MB / 318.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0002149/0.2823, allocations: 62.86 kB / 443.1 MB, free: 1.328 MB / 318.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 9.478e-06/0.2823, allocations: 8.062 kB / 443.1 MB, free: 1.324 MB / 318.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 9.857e-05/0.2824, allocations: 16.11 kB / 443.1 MB, free: 1.312 MB / 318.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 1.992e-05/0.2825, allocations: 14.28 kB / 443.1 MB, free: 1.309 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.0001378/0.2826, allocations: 173.5 kB / 443.3 MB, free: 1.145 MB / 318.1 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 2.711e-05/0.2826, allocations: 16.83 kB / 443.3 MB, free: 1.137 MB / 318.1 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 3.733e-05/0.2827, allocations: 21.31 kB / 443.3 MB, free: 1.121 MB / 318.1 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 3.577e-06/0.2827, allocations: 5.641 kB / 443.3 MB, free: 1.117 MB / 318.1 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 5.611e-06/0.2827, allocations: 1.469 kB / 443.3 MB, free: 1.117 MB / 318.1 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 3.246e-06/0.2827, allocations: 0 / 443.3 MB, free: 1.117 MB / 318.1 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0007485/0.2834, allocations: 0.7013 MB / 444 MB, free: 0.6172 MB / 318.1 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 2.675e-06/0.2835, allocations: 1.094 kB / 444 MB, free: 0.6172 MB / 318.1 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0001875/0.2837, allocations: 41.7 kB / 444.1 MB, free: 0.6133 MB / 318.1 MB Notification: Performance of postOpt tearingSystem (simulation): time 4.298e-06/0.2837, allocations: 2.219 kB / 444.1 MB, free: 0.6133 MB / 318.1 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 1.924e-05/0.2837, allocations: 13.31 kB / 444.1 MB, free: 0.6055 MB / 318.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 2.976e-06/0.2837, allocations: 2.188 kB / 444.1 MB, free: 0.6055 MB / 318.1 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 1.703e-06/0.2837, allocations: 1.281 kB / 444.1 MB, free: 0.6055 MB / 318.1 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.0004561/0.2842, allocations: 462 kB / 444.5 MB, free: 320 kB / 318.1 MB Notification: Performance of postOpt removeConstants (simulation): time 2.512e-05/0.2842, allocations: 89.98 kB / 444.6 MB, free: 216 kB / 318.1 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 3.42e-05/0.2842, allocations: 10.06 kB / 444.6 MB, free: 212 kB / 318.1 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0001104/0.2844, allocations: 10.16 kB / 444.6 MB, free: 208 kB / 318.1 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 4.538e-05/0.2844, allocations: 20.11 kB / 444.7 MB, free: 200 kB / 318.1 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 2.231e-05/0.2844, allocations: 16.25 kB / 444.7 MB, free: 192 kB / 318.1 MB Notification: Performance of sorting global known variables: time 4.31e-05/0.2845, allocations: 103.7 kB / 444.8 MB, free: 108 kB / 318.1 MB Notification: Performance of sort global known variables: time 1e-07/0.2845, allocations: 0 / 444.8 MB, free: 108 kB / 318.1 MB Notification: Performance of remove unused functions: time 0.0002962/0.2848, allocations: 54.75 kB / 444.8 MB, free: 100 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.0009046/0.2857, allocations: 1.004 MB / 445.8 MB, free: 15.27 MB / 334.1 MB Notification: Performance of simCode: created initialization part: time 0.0003808/0.2861, allocations: 258.8 kB / 446.1 MB, free: 15.13 MB / 334.1 MB Notification: Performance of simCode: created event and clocks part: time 1.814e-06/0.2861, allocations: 0 / 446.1 MB, free: 15.13 MB / 334.1 MB Notification: Performance of simCode: created simulation system equations: time 0.0002051/0.2863, allocations: 192.3 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.0002614/0.2866, allocations: 20.17 kB / 446.3 MB, free: 15 MB / 334.1 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.002806/0.2894, allocations: 2.409 MB / 448.7 MB, free: 13.07 MB / 334.1 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.000411/0.2898, allocations: 0.7321 MB / 449.4 MB, free: 12.37 MB / 334.1 MB Notification: Performance of simCode: alias equations: time 5.596e-05/0.2899, allocations: 15.05 kB / 449.5 MB, free: 12.37 MB / 334.1 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 9.03e-05/0.29, allocations: 58.5 kB / 449.5 MB, free: 12.33 MB / 334.1 MB Notification: Performance of SimCode: time 2.5e-07/0.29, allocations: 5.5 kB / 449.5 MB, free: 12.32 MB / 334.1 MB Notification: Performance of buildModelFMU: Generate the FMI files: time 0.02817/0.3182, allocations: 3.506 MB / 453 MB, free: 11.14 MB / 334.1 MB Notification: Performance of buildModelFMU: Generate platform static: time 8.129/8.447, allocations: 15.64 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 & /home/hudson/saved_omc/OMSimulator/install/bin/OMSimulator --tempDir=temp_ModelicaByExample_ModelicaByExample_Components_SpeedMeasurement_Examples_PlantWithPulseCounter_fmu --startTime=0 --stopTime=10 --timeout=50 --tolerance=1e-06 ModelicaByExample_ModelicaByExample_Components_SpeedMeasurement_Examples_PlantWithPulseCounter.fmu > ModelicaByExample_ModelicaByExample.Components.SpeedMeasurement.Examples.PlantWithPulseCounter.pipe 2>&1)