Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries --ompython_omhome=/usr IndustrialControlSystems_IndustrialControlSystems.Logical.Counter.Examples.countZeroCrossing.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/IndustrialControlSystems 1.1.0-master/package.mo", uses=false) Using package IndustrialControlSystems with version 1.1.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/IndustrialControlSystems 1.1.0-master/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(IndustrialControlSystems.Logical.Counter.Examples.countZeroCrossing,fileNamePrefix="IndustrialControlSystems_IndustrialControlSystems_Logical_Counter_Examples_countZeroCrossing",fmuType="me",version="2.0",platforms={"static"}) "" <> buildModelFMU(IndustrialControlSystems.Logical.Counter.Examples.countZeroCrossing,fileNamePrefix="IndustrialControlSystems_IndustrialControlSystems_Logical_Counter_Examples_countZeroCrossing",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.01011/0.01011, allocations: 96.73 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.002169/0.002169, allocations: 194.8 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.509/1.509, allocations: 205.1 MB / 222.6 MB, free: 4.523 MB / 174.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/IndustrialControlSystems 1.1.0-master/package.mo): time 0.06489/0.06489, allocations: 10.75 MB / 280.7 MB, free: 10.41 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: Performance of FrontEnd - loaded program: time 0.003035/0.003035, allocations: 71.89 kB / 390.3 MB, free: 5.527 MB / 286.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.3146/0.3177, allocations: 49.02 MB / 439.4 MB, free: 5.078 MB / 318.1 MB Notification: Performance of NFInst.instantiate(IndustrialControlSystems.Logical.Counter.Examples.countZeroCrossing): time 0.00344/0.3211, allocations: 2.154 MB / 441.5 MB, free: 3.574 MB / 318.1 MB Notification: Performance of NFInst.instExpressions: time 0.001882/0.323, allocations: 1.246 MB / 442.8 MB, free: 2.723 MB / 318.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.0001409/0.3231, allocations: 2.562 kB / 442.8 MB, free: 2.723 MB / 318.1 MB Notification: Performance of NFTyping.typeComponents: time 0.000732/0.3239, allocations: 265.4 kB / 443 MB, free: 2.645 MB / 318.1 MB [/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 3.2.3+maint.om/Utilities/Strings.mo:139:3-175:14:writable] Warning: Pure function 'Modelica.Utilities.Strings.isEmpty' contains a call to impure function 'Modelica.Utilities.Strings.Advanced.skipWhiteSpace'. Notification: Performance of NFTyping.typeBindings: time 0.0004298/0.3243, allocations: 197.4 kB / 443.2 MB, free: 2.555 MB / 318.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.0007849/0.3251, allocations: 328.3 kB / 443.5 MB, free: 2.383 MB / 318.1 MB Notification: Performance of NFFlatten.flatten: time 0.0003989/0.3255, allocations: 373.2 kB / 443.9 MB, free: 2.215 MB / 318.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.000128/0.3256, allocations: 47.27 kB / 444 MB, free: 2.191 MB / 318.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0002481/0.3259, allocations: 162.8 kB / 444.1 MB, free: 2.117 MB / 318.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0001849/0.326, allocations: 154.8 kB / 444.3 MB, free: 2.047 MB / 318.1 MB Notification: Performance of NFPackage.collectConstants: time 4.324e-05/0.3261, allocations: 20.28 kB / 444.3 MB, free: 2.047 MB / 318.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0002574/0.3263, allocations: 129.6 kB / 444.4 MB, free: 2.016 MB / 318.1 MB Notification: Performance of NFScalarize.scalarize: time 0.0001062/0.3264, allocations: 81.41 kB / 444.5 MB, free: 1.973 MB / 318.1 MB Notification: Performance of NFVerifyModel.verify: time 0.0001121/0.3266, allocations: 131.8 kB / 444.6 MB, free: 1.879 MB / 318.1 MB Notification: Performance of NFConvertDAE.convert: time 0.0004931/0.327, allocations: 395.7 kB / 445 MB, free: 1.723 MB / 318.1 MB Notification: Performance of FrontEnd - DAE generated: time 4.87e-06/0.3271, allocations: 5.438 kB / 445 MB, free: 1.719 MB / 318.1 MB Notification: Performance of FrontEnd: time 1.623e-06/0.3271, allocations: 0 / 445 MB, free: 1.719 MB / 318.1 MB Notification: Performance of Transformations before backend: time 7.724e-06/0.3271, allocations: 0 / 445 MB, free: 1.719 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: 32 * Number of variables: 32 Notification: Performance of Generate backend data structure: time 0.00105/0.3281, allocations: 0.6941 MB / 445.7 MB, free: 1.113 MB / 318.1 MB Notification: Performance of prepare preOptimizeDAE: time 3.982e-05/0.3282, allocations: 13.86 kB / 445.7 MB, free: 1.109 MB / 318.1 MB Notification: Performance of preOpt introduceOutputAliases (simulation): time 4.538e-05/0.3282, allocations: 46.77 kB / 445.8 MB, free: 1.062 MB / 318.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 7.665e-05/0.3283, allocations: 42.39 kB / 445.8 MB, free: 1.039 MB / 318.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0003732/0.3286, allocations: 326.4 kB / 446.1 MB, free: 0.7617 MB / 318.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 1.79e-05/0.3287, allocations: 15.34 kB / 446.1 MB, free: 0.7539 MB / 318.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 3.435e-05/0.3287, allocations: 15.52 kB / 446.2 MB, free: 0.75 MB / 318.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0003732/0.3291, allocations: 191 kB / 446.3 MB, free: 0.6484 MB / 318.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 1.054e-05/0.3291, allocations: 0 / 446.3 MB, free: 0.6484 MB / 318.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 2.298e-05/0.3291, allocations: 6.594 kB / 446.3 MB, free: 0.6445 MB / 318.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 5.32e-06/0.3291, allocations: 7.344 kB / 446.4 MB, free: 0.6406 MB / 318.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0002401/0.3294, allocations: 92.45 kB / 446.4 MB, free: 0.6133 MB / 318.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.0007515/0.3301, allocations: 0.5246 MB / 447 MB, free: 240 kB / 318.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.0004566/0.3306, allocations: 165.2 kB / 447.1 MB, free: 164 kB / 318.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0001517/0.3307, allocations: 61.8 kB / 447.2 MB, free: 136 kB / 318.1 MB Notification: Performance of preOpt evalFunc (simulation): time 2.54e-05/0.3307, allocations: 6.812 kB / 447.2 MB, free: 132 kB / 318.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0003172/0.3311, allocations: 181.1 kB / 447.4 MB, free: 24 kB / 318.1 MB Notification: Performance of pre-optimization done (n=21): time 1.422e-06/0.3311, allocations: 0 / 447.4 MB, free: 24 kB / 318.1 MB Notification: Performance of matching and sorting (n=21): time 0.0007801/0.3318, allocations: 320.6 kB / 447.7 MB, free: 15.88 MB / 334.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 9.503e-05/0.3319, allocations: 140.6 kB / 447.8 MB, free: 15.71 MB / 334.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0004712/0.3324, allocations: 391.2 kB / 448.2 MB, free: 15.47 MB / 334.1 MB Notification: Performance of collectPreVariables (initialization): time 3.959e-05/0.3324, allocations: 42.59 kB / 448.3 MB, free: 15.43 MB / 334.1 MB Notification: Performance of collectInitialEqns (initialization): time 0.0001523/0.3326, allocations: 163.5 kB / 448.4 MB, free: 15.28 MB / 334.1 MB Notification: Performance of collectInitialBindings (initialization): time 5.858e-05/0.3327, allocations: 51.95 kB / 448.5 MB, free: 15.24 MB / 334.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 9.165e-05/0.3327, allocations: 50.95 kB / 448.5 MB, free: 15.2 MB / 334.1 MB Notification: Performance of setup shared object (initialization): time 0.0001926/0.3329, allocations: 346.6 kB / 448.8 MB, free: 14.86 MB / 334.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0001497/0.3331, allocations: 53.25 kB / 448.9 MB, free: 14.84 MB / 334.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0002712/0.3334, allocations: 179 kB / 449.1 MB, free: 14.65 MB / 334.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.0004757/0.3338, allocations: 253.3 kB / 449.3 MB, free: 14.45 MB / 334.1 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 3.827e-06/0.3338, allocations: 5.125 kB / 449.3 MB, free: 14.45 MB / 334.1 MB Notification: Performance of matching and sorting (n=31) (initialization): time 0.0005557/0.3344, allocations: 267.4 kB / 449.6 MB, free: 14.3 MB / 334.1 MB Notification: Performance of prepare postOptimizeDAE: time 2.063e-05/0.3344, allocations: 6.844 kB / 449.6 MB, free: 14.3 MB / 334.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 8.847e-06/0.3344, allocations: 2.469 kB / 449.6 MB, free: 14.3 MB / 334.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 2.61e-05/0.3344, allocations: 5.156 kB / 449.6 MB, free: 14.3 MB / 334.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.000156/0.3346, allocations: 45.44 kB / 449.6 MB, free: 14.29 MB / 334.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.034e-05/0.3346, allocations: 4.344 kB / 449.7 MB, free: 14.29 MB / 334.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0001718/0.3348, allocations: 28.34 kB / 449.7 MB, free: 14.27 MB / 334.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 1.979e-05/0.3348, allocations: 10.06 kB / 449.7 MB, free: 14.27 MB / 334.1 MB Warning: Assuming fixed start value for the following 6 variables: equal.y:DISCRETE(flow=false fixed = true ) "output" type: Boolean counter.CUd:DISCRETE(fixed = true ) type: Boolean counter.CDd:DISCRETE(fixed = true ) type: Boolean counter.Sd:DISCRETE(fixed = true ) type: Boolean counter.Q:DISCRETE(flow=false fixed = true ) "status of the counter (1: counting, 0: not counting)" type: Boolean counter.Value:DISCRETE(start = 0 fixed = true ) type: Integer Notification: Model statistics after passing the back-end for initialization: * Number of independent subsystems: 13 * Number of states: 0 () * Number of discrete variables: 26 ($PRE.equal.y,equal.y,$PRE.counter.CUd,counter.CUd,$PRE.counter.CDd,counter.CDd,$PRE.counter.Sd,counter.Sd,$PRE.counter.Q,counter.Q,$PRE.counter.Value,counter.Value,$whenCondition4,$PRE.reset.combiTimeTable.nextTimeEvent,$whenCondition3,$PRE.set.combiTimeTable.nextTimeEvent,$whenCondition2,$whenCondition1,reset.combiTimeTable.nextTimeEventScaled,$PRE.reset.combiTimeTable.nextTimeEventScaled,reset.combiTimeTable.nextTimeEvent,reset.y,set.combiTimeTable.nextTimeEventScaled,$PRE.set.combiTimeTable.nextTimeEventScaled,set.combiTimeTable.nextTimeEvent,set.y) * Number of discrete states: 0 () * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for initialization (31): * Single equations (assignments): 31 * 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 0.0003007/0.3351, allocations: 200.1 kB / 449.9 MB, free: 14.09 MB / 334.1 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 6.353e-05/0.3352, allocations: 36.39 kB / 449.9 MB, free: 14.07 MB / 334.1 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 7.596e-05/0.3352, allocations: 33.41 kB / 450 MB, free: 14.05 MB / 334.1 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 5.16e-06/0.3353, allocations: 2.781 kB / 450 MB, free: 14.05 MB / 334.1 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 6.492e-06/0.3353, allocations: 3.938 kB / 450 MB, free: 14.05 MB / 334.1 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 4.668e-06/0.3353, allocations: 0 / 450 MB, free: 14.05 MB / 334.1 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0003869/0.3356, allocations: 322.5 kB / 450.3 MB, free: 13.74 MB / 334.1 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 1.523e-06/0.3357, allocations: 0 / 450.3 MB, free: 13.74 MB / 334.1 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 6.91e-05/0.3357, allocations: 17.58 kB / 450.3 MB, free: 13.73 MB / 334.1 MB Notification: Performance of postOpt tearingSystem (simulation): time 3.567e-06/0.3357, allocations: 1.438 kB / 450.3 MB, free: 13.73 MB / 334.1 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 2.069e-05/0.3357, allocations: 6.906 kB / 450.3 MB, free: 13.73 MB / 334.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 2.454e-06/0.3357, allocations: 1.469 kB / 450.3 MB, free: 13.73 MB / 334.1 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 1.052e-06/0.3357, allocations: 0 / 450.3 MB, free: 13.73 MB / 334.1 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.0005473/0.3363, allocations: 294.9 kB / 450.6 MB, free: 13.55 MB / 334.1 MB Notification: Performance of postOpt removeConstants (simulation): time 9.95e-05/0.3364, allocations: 104.8 kB / 450.7 MB, free: 13.44 MB / 334.1 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 5.654e-05/0.3365, allocations: 13.25 kB / 450.7 MB, free: 13.43 MB / 334.1 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0001465/0.3366, allocations: 18.97 kB / 450.7 MB, free: 13.42 MB / 334.1 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 6.433e-05/0.3367, allocations: 16.27 kB / 450.7 MB, free: 13.41 MB / 334.1 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 2.853e-05/0.3367, allocations: 11.55 kB / 450.8 MB, free: 13.41 MB / 334.1 MB Notification: Performance of sorting global known variables: time 0.0003129/0.337, allocations: 274.6 kB / 451 MB, free: 13.24 MB / 334.1 MB Notification: Performance of sort global known variables: time 1.3e-07/0.337, allocations: 0 / 451 MB, free: 13.24 MB / 334.1 MB Notification: Performance of remove unused functions: time 0.0004193/0.3374, allocations: 82.31 kB / 451.1 MB, free: 13.22 MB / 334.1 MB Notification: Model statistics after passing the back-end for simulation: * Number of independent subsystems: 1 * Number of states: 0 () * Number of discrete variables: 16 ($whenCondition4,$whenCondition3,$whenCondition2,$whenCondition1,counter.Q,counter.Value,counter.CUd,counter.CDd,counter.Sd,set.y,set.combiTimeTable.nextTimeEvent,set.combiTimeTable.nextTimeEventScaled,reset.y,reset.combiTimeTable.nextTimeEvent,reset.combiTimeTable.nextTimeEventScaled,equal.y) * Number of discrete states: 8 (counter.Value,counter.Sd,counter.CUd,counter.CDd,reset.combiTimeTable.nextTimeEventScaled,set.combiTimeTable.nextTimeEventScaled,set.combiTimeTable.nextTimeEvent,reset.combiTimeTable.nextTimeEvent) * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for simulation (20): * Single equations (assignments): 11 * Array equations: 0 * Algorithm blocks: 0 * Record equations: 0 * When equations: 9 * 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.002377/0.3398, allocations: 1.163 MB / 452.3 MB, free: 12.32 MB / 334.1 MB Notification: Performance of simCode: created initialization part: time 0.0004917/0.3403, allocations: 174 kB / 452.4 MB, free: 12.25 MB / 334.1 MB Notification: Performance of simCode: created event and clocks part: time 2.755e-06/0.3403, allocations: 0 / 452.4 MB, free: 12.25 MB / 334.1 MB Notification: Performance of simCode: created simulation system equations: time 0.0002052/0.3405, allocations: 85.19 kB / 452.5 MB, free: 12.21 MB / 334.1 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0004875/0.341, allocations: 90.75 kB / 452.6 MB, free: 12.16 MB / 334.1 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.004301/0.3453, allocations: 2.99 MB / 455.6 MB, free: 9.969 MB / 334.1 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0004446/0.3457, allocations: 0.7723 MB / 456.4 MB, free: 9.23 MB / 334.1 MB Notification: Performance of simCode: alias equations: time 0.0001718/0.3459, allocations: 44.7 kB / 456.4 MB, free: 9.211 MB / 334.1 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0001697/0.3461, allocations: 103.1 kB / 456.5 MB, free: 9.133 MB / 334.1 MB Notification: Performance of SimCode: time 6.71e-07/0.3461, allocations: 0 / 456.5 MB, free: 9.133 MB / 334.1 MB Notification: Performance of buildModelFMU: Generate the FMI files: time 0.03584/0.3819, allocations: 7.884 MB / 464.4 MB, free: 3.527 MB / 334.1 MB Notification: Performance of buildModelFMU: Generate platform static: time 8.783/9.165, allocations: 7.812 kB / 464.4 MB, free: 3.52 MB / 334.1 MB (rm -f IndustrialControlSystems_IndustrialControlSystems.Logical.Counter.Examples.countZeroCrossing.pipe ; mkfifo IndustrialControlSystems_IndustrialControlSystems.Logical.Counter.Examples.countZeroCrossing.pipe ; head -c 1048576 < IndustrialControlSystems_IndustrialControlSystems.Logical.Counter.Examples.countZeroCrossing.pipe >> ../files/IndustrialControlSystems_IndustrialControlSystems.Logical.Counter.Examples.countZeroCrossing.sim & python3 -m fmpy simulate --output-file IndustrialControlSystems_IndustrialControlSystems.Logical.Counter.Examples.countZeroCrossing_res.csv --start-time 0 --stop-time 20 --timeout 50 --relative-tolerance 1e-06 --interface-type ModelExchange --solver CVode --output-interval 0.008 IndustrialControlSystems_IndustrialControlSystems_Logical_Counter_Examples_countZeroCrossing.fmu > IndustrialControlSystems_IndustrialControlSystems.Logical.Counter.Examples.countZeroCrossing.pipe 2>&1)