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.005469/0.005469, allocations: 97.62 kB / 15.73 MB, free: 6.047 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.001177/0.001177, allocations: 200 kB / 16.68 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.495/1.495, allocations: 205.1 MB / 222.6 MB, free: 4.555 MB / 174.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaByExample 0.6.0/package.mo): time 0.04438/0.04438, allocations: 8.125 MB / 278 MB, free: 13.09 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.001599/0.001599, allocations: 68.53 kB / 386.2 MB, free: 9.535 MB / 286.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.2876/0.2892, 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.003302/0.2926, allocations: 1.984 MB / 436.5 MB, free: 6.082 MB / 318.1 MB Notification: Performance of NFInst.instExpressions: time 0.0009204/0.2935, allocations: 0.6073 MB / 437.1 MB, free: 5.645 MB / 318.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 8.54e-05/0.2936, allocations: 7.438 kB / 437.1 MB, free: 5.641 MB / 318.1 MB Notification: Performance of NFTyping.typeComponents: time 6.987e-05/0.2937, allocations: 27.52 kB / 437.1 MB, free: 5.625 MB / 318.1 MB Notification: Performance of NFTyping.typeBindings: time 0.0001307/0.2939, allocations: 42.23 kB / 437.2 MB, free: 5.594 MB / 318.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.0002225/0.2941, allocations: 70.38 kB / 437.2 MB, free: 5.551 MB / 318.1 MB Notification: Performance of NFFlatten.flatten: time 0.0002527/0.2944, allocations: 226.3 kB / 437.5 MB, free: 5.438 MB / 318.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0001885/0.2946, allocations: 96.05 kB / 437.6 MB, free: 5.391 MB / 318.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0001494/0.2947, allocations: 86.2 kB / 437.6 MB, free: 5.352 MB / 318.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0001353/0.2949, allocations: 96.16 kB / 437.7 MB, free: 5.301 MB / 318.1 MB Notification: Performance of NFPackage.collectConstants: time 3.949e-05/0.2949, allocations: 21.31 kB / 437.8 MB, free: 5.301 MB / 318.1 MB Notification: Performance of NFFlatten.collectFunctions: time 3.768e-05/0.295, allocations: 20.41 kB / 437.8 MB, free: 5.301 MB / 318.1 MB Notification: Performance of NFScalarize.scalarize: time 4.887e-05/0.295, allocations: 49.05 kB / 437.8 MB, free: 5.266 MB / 318.1 MB Notification: Performance of NFVerifyModel.verify: time 0.0001141/0.2951, allocations: 98.06 kB / 437.9 MB, free: 5.211 MB / 318.1 MB Notification: Performance of NFConvertDAE.convert: time 0.0003529/0.2955, allocations: 233.8 kB / 438.1 MB, free: 5.121 MB / 318.1 MB Notification: Performance of FrontEnd - DAE generated: time 6.312e-06/0.2955, allocations: 3.938 kB / 438.1 MB, free: 5.117 MB / 318.1 MB Notification: Performance of FrontEnd: time 1.633e-06/0.2955, allocations: 0 / 438.1 MB, free: 5.117 MB / 318.1 MB Notification: Performance of Transformations before backend: time 1.545e-05/0.2955, allocations: 0 / 438.1 MB, free: 5.117 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.0008839/0.2964, allocations: 0.5065 MB / 438.7 MB, free: 4.645 MB / 318.1 MB Notification: Performance of prepare preOptimizeDAE: time 6.072e-05/0.2965, allocations: 13.39 kB / 438.7 MB, free: 4.641 MB / 318.1 MB Notification: Performance of preOpt introduceOutputAliases (simulation): time 7.47e-05/0.2966, allocations: 50.27 kB / 438.7 MB, free: 4.594 MB / 318.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 6.302e-05/0.2966, allocations: 26.98 kB / 438.7 MB, free: 4.578 MB / 318.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0001583/0.2968, allocations: 180.6 kB / 438.9 MB, free: 4.371 MB / 318.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 2.847e-05/0.2968, allocations: 16.94 kB / 438.9 MB, free: 4.363 MB / 318.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 5.332e-05/0.2969, allocations: 28.25 kB / 439 MB, free: 4.352 MB / 318.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0003844/0.2973, allocations: 187.6 kB / 439.1 MB, free: 4.258 MB / 318.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 1.794e-05/0.2973, allocations: 4 kB / 439.1 MB, free: 4.254 MB / 318.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 2.137e-05/0.2973, allocations: 6.281 kB / 439.2 MB, free: 4.25 MB / 318.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 1.046e-05/0.2974, allocations: 8.984 kB / 439.2 MB, free: 4.246 MB / 318.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0002405/0.2976, allocations: 117.8 kB / 439.3 MB, free: 4.207 MB / 318.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.001194/0.2988, allocations: 0.7135 MB / 440 MB, free: 3.684 MB / 318.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.0003455/0.2992, allocations: 246.3 kB / 440.2 MB, free: 3.512 MB / 318.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0002234/0.2994, allocations: 111.2 kB / 440.3 MB, free: 3.469 MB / 318.1 MB Notification: Performance of preOpt evalFunc (simulation): time 1.84e-05/0.2994, allocations: 1.5 kB / 440.3 MB, free: 3.469 MB / 318.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0003079/0.2997, allocations: 183.8 kB / 440.5 MB, free: 3.324 MB / 318.1 MB Notification: Performance of pre-optimization done (n=22): time 1.783e-06/0.2998, allocations: 1.031 kB / 440.5 MB, free: 3.324 MB / 318.1 MB Notification: Performance of matching and sorting (n=25): time 0.001151/0.3009, allocations: 0.8103 MB / 441.3 MB, free: 2.73 MB / 318.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 5.995e-05/0.301, allocations: 134.4 kB / 441.5 MB, free: 2.574 MB / 318.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0001003/0.3011, allocations: 132.8 kB / 441.6 MB, free: 2.461 MB / 318.1 MB Notification: Performance of collectPreVariables (initialization): time 2.265e-05/0.3011, allocations: 31.83 kB / 441.6 MB, free: 2.426 MB / 318.1 MB Notification: Performance of collectInitialEqns (initialization): time 6.872e-05/0.3012, allocations: 137.3 kB / 441.8 MB, free: 2.305 MB / 318.1 MB Notification: Performance of collectInitialBindings (initialization): time 5.92e-05/0.3013, allocations: 89.31 kB / 441.8 MB, free: 2.234 MB / 318.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 9.543e-05/0.3014, allocations: 55.67 kB / 441.9 MB, free: 2.199 MB / 318.1 MB Notification: Performance of setup shared object (initialization): time 6.098e-05/0.3014, allocations: 331.2 kB / 442.2 MB, free: 1.875 MB / 318.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0001215/0.3016, allocations: 60.83 kB / 442.3 MB, free: 1.852 MB / 318.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0001436/0.3017, allocations: 134.2 kB / 442.4 MB, free: 1.746 MB / 318.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.0003252/0.302, allocations: 264.6 kB / 442.7 MB, free: 1.535 MB / 318.1 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 2.725e-06/0.3021, allocations: 5.062 kB / 442.7 MB, free: 1.531 MB / 318.1 MB Notification: Performance of matching and sorting (n=39) (initialization): time 0.0004495/0.3025, allocations: 292.6 kB / 443 MB, free: 1.379 MB / 318.1 MB Notification: Performance of prepare postOptimizeDAE: time 3.398e-05/0.3026, allocations: 37.97 kB / 443 MB, free: 1.344 MB / 318.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 8.055e-06/0.3026, allocations: 2.375 kB / 443 MB, free: 1.344 MB / 318.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 2.001e-05/0.3026, allocations: 3.719 kB / 443 MB, free: 1.344 MB / 318.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0002304/0.3028, allocations: 61.61 kB / 443.1 MB, free: 1.336 MB / 318.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.207e-05/0.3028, allocations: 8.766 kB / 443.1 MB, free: 1.332 MB / 318.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0001062/0.303, allocations: 17.7 kB / 443.1 MB, free: 1.32 MB / 318.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 2.079e-05/0.303, allocations: 14.44 kB / 443.1 MB, free: 1.316 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.0001774/0.3032, allocations: 172 kB / 443.3 MB, free: 1.152 MB / 318.1 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 3.418e-05/0.3032, allocations: 17.78 kB / 443.3 MB, free: 1.145 MB / 318.1 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 4.779e-05/0.3033, allocations: 19.72 kB / 443.3 MB, free: 1.129 MB / 318.1 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 3.487e-06/0.3033, allocations: 2.375 kB / 443.3 MB, free: 1.129 MB / 318.1 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 7.364e-06/0.3033, allocations: 1.219 kB / 443.3 MB, free: 1.129 MB / 318.1 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 4.649e-06/0.3033, allocations: 5.312 kB / 443.3 MB, free: 1.125 MB / 318.1 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0008392/0.3041, allocations: 0.701 MB / 444 MB, free: 0.625 MB / 318.1 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 2.114e-06/0.3042, allocations: 0 / 444 MB, free: 0.625 MB / 318.1 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0001886/0.3044, allocations: 43.27 kB / 444.1 MB, free: 0.6211 MB / 318.1 MB Notification: Performance of postOpt tearingSystem (simulation): time 4.96e-06/0.3044, allocations: 1.375 kB / 444.1 MB, free: 0.6211 MB / 318.1 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 2.253e-05/0.3044, allocations: 12.64 kB / 444.1 MB, free: 0.6172 MB / 318.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 3.457e-06/0.3044, allocations: 5.438 kB / 444.1 MB, free: 0.6133 MB / 318.1 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 2.305e-06/0.3044, allocations: 5.312 kB / 444.1 MB, free: 0.6094 MB / 318.1 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.0004799/0.3049, allocations: 460 kB / 444.5 MB, free: 324 kB / 318.1 MB Notification: Performance of postOpt removeConstants (simulation): time 3.031e-05/0.3049, allocations: 89.75 kB / 444.6 MB, free: 220 kB / 318.1 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 3.562e-05/0.305, allocations: 10.06 kB / 444.6 MB, free: 216 kB / 318.1 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0001126/0.3051, allocations: 10.77 kB / 444.6 MB, free: 212 kB / 318.1 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 4.668e-05/0.3052, allocations: 19.52 kB / 444.7 MB, free: 204 kB / 318.1 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 2.421e-05/0.3052, allocations: 12.12 kB / 444.7 MB, free: 200 kB / 318.1 MB Notification: Performance of sorting global known variables: time 4.521e-05/0.3052, allocations: 100.1 kB / 444.8 MB, free: 116 kB / 318.1 MB Notification: Performance of sort global known variables: time 1.5e-07/0.3052, allocations: 0 / 444.8 MB, free: 116 kB / 318.1 MB Notification: Performance of remove unused functions: time 0.0003224/0.3056, allocations: 53.81 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.0008421/0.3064, allocations: 1.008 MB / 445.8 MB, free: 15.27 MB / 334.1 MB Notification: Performance of simCode: created initialization part: time 0.000374/0.3068, allocations: 257.5 kB / 446.1 MB, free: 15.14 MB / 334.1 MB Notification: Performance of simCode: created event and clocks part: time 2.224e-06/0.3068, allocations: 1.219 kB / 446.1 MB, free: 15.14 MB / 334.1 MB Notification: Performance of simCode: created simulation system equations: time 0.0002027/0.307, allocations: 192.4 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.0002664/0.3073, allocations: 28.02 kB / 446.3 MB, free: 15 MB / 334.1 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.002946/0.3103, allocations: 2.405 MB / 448.7 MB, free: 13.07 MB / 334.1 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0003678/0.3107, allocations: 0.732 MB / 449.4 MB, free: 12.37 MB / 334.1 MB Notification: Performance of simCode: alias equations: time 6.995e-05/0.3107, allocations: 15.55 kB / 449.5 MB, free: 12.37 MB / 334.1 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 9.921e-05/0.3108, allocations: 53.53 kB / 449.5 MB, free: 12.34 MB / 334.1 MB Notification: Performance of SimCode: time 1.062e-06/0.3108, allocations: 0 / 449.5 MB, free: 12.34 MB / 334.1 MB Notification: Performance of buildModelFMU: Generate the FMI files: time 0.02566/0.3365, allocations: 3.522 MB / 453 MB, free: 11.15 MB / 334.1 MB Notification: Performance of buildModelFMU: Generate platform static: time 7.95/8.287, allocations: 13.33 kB / 453 MB, free: 11.14 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)