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.005406/0.005406, allocations: 100.5 kB / 15.73 MB, free: 5.953 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.001265/0.001265, allocations: 192.8 kB / 16.67 MB, free: 5.875 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.326/1.326, allocations: 205.1 MB / 222.6 MB, free: 4.465 MB / 174.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/IndustrialControlSystems 1.1.0-master/package.mo): time 0.05828/0.05828, allocations: 10.75 MB / 280.7 MB, free: 10.38 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.001484/0.001484, allocations: 68.12 kB / 390.3 MB, free: 5.523 MB / 286.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.2446/0.2461, allocations: 49.03 MB / 439.4 MB, free: 5.062 MB / 318.1 MB Notification: Performance of NFInst.instantiate(IndustrialControlSystems.Logical.Counter.Examples.countZeroCrossing): time 0.003151/0.2493, allocations: 2.148 MB / 441.5 MB, free: 3.559 MB / 318.1 MB Notification: Performance of NFInst.instExpressions: time 0.001852/0.2512, allocations: 1.238 MB / 442.8 MB, free: 2.711 MB / 318.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.0001277/0.2513, allocations: 2.656 kB / 442.8 MB, free: 2.711 MB / 318.1 MB Notification: Performance of NFTyping.typeComponents: time 0.0007854/0.2521, allocations: 271.9 kB / 443 MB, free: 2.625 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.000451/0.2526, allocations: 193.5 kB / 443.2 MB, free: 2.539 MB / 318.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.0008478/0.2534, allocations: 324.6 kB / 443.5 MB, free: 2.371 MB / 318.1 MB Notification: Performance of NFFlatten.flatten: time 0.0004183/0.2538, allocations: 382.4 kB / 443.9 MB, free: 2.203 MB / 318.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0001541/0.254, allocations: 71.27 kB / 444 MB, free: 2.168 MB / 318.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0002172/0.2542, allocations: 160.4 kB / 444.1 MB, free: 2.098 MB / 318.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0001799/0.2544, allocations: 153.9 kB / 444.3 MB, free: 2.027 MB / 318.1 MB Notification: Performance of NFPackage.collectConstants: time 4.484e-05/0.2545, allocations: 21.41 kB / 444.3 MB, free: 2.027 MB / 318.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0002573/0.2547, allocations: 128.9 kB / 444.4 MB, free: 1.996 MB / 318.1 MB Notification: Performance of NFScalarize.scalarize: time 0.0001004/0.2548, allocations: 77.91 kB / 444.5 MB, free: 1.957 MB / 318.1 MB Notification: Performance of NFVerifyModel.verify: time 0.0001188/0.255, allocations: 136.2 kB / 444.6 MB, free: 1.859 MB / 318.1 MB Notification: Performance of NFConvertDAE.convert: time 0.000517/0.2555, allocations: 405.3 kB / 445 MB, free: 1.695 MB / 318.1 MB Notification: Performance of FrontEnd - DAE generated: time 3.727e-06/0.2555, allocations: 0 / 445 MB, free: 1.695 MB / 318.1 MB Notification: Performance of FrontEnd: time 1.373e-06/0.2555, allocations: 0 / 445 MB, free: 1.695 MB / 318.1 MB Notification: Performance of Transformations before backend: time 1.081e-05/0.2555, allocations: 1.156 kB / 445 MB, free: 1.695 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.0009857/0.2565, allocations: 0.6974 MB / 445.7 MB, free: 1.086 MB / 318.1 MB Notification: Performance of prepare preOptimizeDAE: time 3.61e-05/0.2566, allocations: 14.08 kB / 445.7 MB, free: 1.082 MB / 318.1 MB Notification: Performance of preOpt introduceOutputAliases (simulation): time 4.705e-05/0.2566, allocations: 43.73 kB / 445.8 MB, free: 1.039 MB / 318.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 7.926e-05/0.2567, allocations: 41.73 kB / 445.8 MB, free: 1.016 MB / 318.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0003716/0.2571, allocations: 326.2 kB / 446.1 MB, free: 0.7383 MB / 318.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 2.087e-05/0.2571, allocations: 14.81 kB / 446.2 MB, free: 0.7305 MB / 318.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 2.863e-05/0.2571, allocations: 15.27 kB / 446.2 MB, free: 0.7266 MB / 318.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0003804/0.2575, allocations: 195.5 kB / 446.4 MB, free: 0.6211 MB / 318.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 1.009e-05/0.2576, allocations: 0.6094 kB / 446.4 MB, free: 0.6211 MB / 318.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 2.162e-05/0.2576, allocations: 3.031 kB / 446.4 MB, free: 0.6211 MB / 318.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 6.141e-06/0.2576, allocations: 6.188 kB / 446.4 MB, free: 0.6172 MB / 318.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0002739/0.2579, allocations: 92.52 kB / 446.5 MB, free: 0.5898 MB / 318.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.0007668/0.2587, allocations: 0.5282 MB / 447 MB, free: 212 kB / 318.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.00046/0.2591, allocations: 170.6 kB / 447.2 MB, free: 136 kB / 318.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0001538/0.2593, allocations: 65.97 kB / 447.2 MB, free: 108 kB / 318.1 MB Notification: Performance of preOpt evalFunc (simulation): time 3.021e-05/0.2593, allocations: 3.438 kB / 447.2 MB, free: 108 kB / 318.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0003225/0.2597, allocations: 176.2 kB / 447.4 MB, free: 4 kB / 318.1 MB Notification: Performance of pre-optimization done (n=21): time 1.644e-06/0.2597, allocations: 0 / 447.4 MB, free: 4 kB / 318.1 MB Notification: Performance of matching and sorting (n=21): time 0.000734/0.2604, allocations: 325.6 kB / 447.7 MB, free: 15.86 MB / 334.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 7.416e-05/0.2605, allocations: 137.5 kB / 447.9 MB, free: 15.7 MB / 334.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0004013/0.2609, allocations: 386.4 kB / 448.2 MB, free: 15.46 MB / 334.1 MB Notification: Performance of collectPreVariables (initialization): time 3.001e-05/0.2609, allocations: 41.89 kB / 448.3 MB, free: 15.42 MB / 334.1 MB Notification: Performance of collectInitialEqns (initialization): time 0.0001197/0.2611, allocations: 163.9 kB / 448.4 MB, free: 15.27 MB / 334.1 MB Notification: Performance of collectInitialBindings (initialization): time 5.358e-05/0.2611, allocations: 52.39 kB / 448.5 MB, free: 15.23 MB / 334.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 7.7e-05/0.2612, allocations: 55.23 kB / 448.5 MB, free: 15.19 MB / 334.1 MB Notification: Performance of setup shared object (initialization): time 0.0001104/0.2613, allocations: 345.9 kB / 448.9 MB, free: 14.85 MB / 334.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0001363/0.2615, allocations: 53.34 kB / 448.9 MB, free: 14.82 MB / 334.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0002159/0.2617, allocations: 174.2 kB / 449.1 MB, free: 14.64 MB / 334.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.0004223/0.2621, allocations: 262.1 kB / 449.4 MB, free: 14.43 MB / 334.1 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 3.517e-06/0.2621, allocations: 5.156 kB / 449.4 MB, free: 14.43 MB / 334.1 MB Notification: Performance of matching and sorting (n=31) (initialization): time 0.0004917/0.2626, allocations: 275.8 kB / 449.6 MB, free: 14.28 MB / 334.1 MB Notification: Performance of prepare postOptimizeDAE: time 1.639e-05/0.2627, allocations: 6.719 kB / 449.6 MB, free: 14.28 MB / 334.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 8.225e-06/0.2627, allocations: 2.906 kB / 449.6 MB, free: 14.28 MB / 334.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 1.665e-05/0.2627, allocations: 4.594 kB / 449.6 MB, free: 14.28 MB / 334.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0001452/0.2629, allocations: 41.12 kB / 449.7 MB, free: 14.26 MB / 334.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 9.278e-06/0.2629, allocations: 4.688 kB / 449.7 MB, free: 14.26 MB / 334.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0001595/0.263, allocations: 28.81 kB / 449.7 MB, free: 14.25 MB / 334.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 2.1e-05/0.2631, allocations: 13.62 kB / 449.7 MB, free: 14.24 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.000221/0.2633, allocations: 188 kB / 449.9 MB, free: 14.08 MB / 334.1 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 5.336e-05/0.2634, allocations: 35.53 kB / 449.9 MB, free: 14.06 MB / 334.1 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 6.878e-05/0.2634, allocations: 33.89 kB / 450 MB, free: 14.04 MB / 334.1 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 3.727e-06/0.2634, allocations: 2.625 kB / 450 MB, free: 14.04 MB / 334.1 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 4.94e-06/0.2635, allocations: 0 / 450 MB, free: 14.04 MB / 334.1 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 4.057e-06/0.2635, allocations: 1.469 kB / 450 MB, free: 14.04 MB / 334.1 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0002832/0.2638, allocations: 325 kB / 450.3 MB, free: 13.73 MB / 334.1 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 1.503e-06/0.2638, allocations: 1.938 kB / 450.3 MB, free: 13.73 MB / 334.1 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 6.993e-05/0.2638, allocations: 16.73 kB / 450.3 MB, free: 13.72 MB / 334.1 MB Notification: Performance of postOpt tearingSystem (simulation): time 3.286e-06/0.2639, allocations: 1.406 kB / 450.3 MB, free: 13.72 MB / 334.1 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 1.908e-05/0.2639, allocations: 6.562 kB / 450.3 MB, free: 13.71 MB / 334.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 2.585e-06/0.2639, allocations: 1.531 kB / 450.3 MB, free: 13.71 MB / 334.1 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 1.062e-06/0.2639, allocations: 0 / 450.3 MB, free: 13.71 MB / 334.1 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.00049/0.2644, allocations: 299.7 kB / 450.6 MB, free: 13.54 MB / 334.1 MB Notification: Performance of postOpt removeConstants (simulation): time 7.664e-05/0.2645, allocations: 104.5 kB / 450.7 MB, free: 13.42 MB / 334.1 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 4.935e-05/0.2645, allocations: 15.06 kB / 450.7 MB, free: 13.41 MB / 334.1 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0001495/0.2647, allocations: 20.56 kB / 450.8 MB, free: 13.4 MB / 334.1 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 5.467e-05/0.2648, allocations: 11.52 kB / 450.8 MB, free: 13.39 MB / 334.1 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 2.84e-05/0.2648, allocations: 15.05 kB / 450.8 MB, free: 13.39 MB / 334.1 MB Notification: Performance of sorting global known variables: time 0.0002851/0.2651, allocations: 275.5 kB / 451.1 MB, free: 13.22 MB / 334.1 MB Notification: Performance of sort global known variables: time 1.5e-07/0.2651, allocations: 0 / 451.1 MB, free: 13.22 MB / 334.1 MB Notification: Performance of remove unused functions: time 0.0003902/0.2655, allocations: 86.31 kB / 451.1 MB, free: 13.19 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.001711/0.2672, allocations: 1.151 MB / 452.3 MB, free: 12.3 MB / 334.1 MB Notification: Performance of simCode: created initialization part: time 0.0004327/0.2676, allocations: 183.8 kB / 452.5 MB, free: 12.23 MB / 334.1 MB Notification: Performance of simCode: created event and clocks part: time 2.435e-06/0.2677, allocations: 0 / 452.5 MB, free: 12.23 MB / 334.1 MB Notification: Performance of simCode: created simulation system equations: time 0.0001871/0.2679, allocations: 90.77 kB / 452.6 MB, free: 12.19 MB / 334.1 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0004363/0.2683, allocations: 102.9 kB / 452.7 MB, free: 12.13 MB / 334.1 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.003624/0.2719, allocations: 2.985 MB / 455.6 MB, free: 9.941 MB / 334.1 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0002974/0.2723, allocations: 0.7739 MB / 456.4 MB, free: 9.203 MB / 334.1 MB Notification: Performance of simCode: alias equations: time 0.0001493/0.2724, allocations: 43.55 kB / 456.5 MB, free: 9.184 MB / 334.1 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0001442/0.2726, allocations: 103.5 kB / 456.6 MB, free: 9.105 MB / 334.1 MB Notification: Performance of SimCode: time 6.91e-07/0.2726, allocations: 0 / 456.6 MB, free: 9.105 MB / 334.1 MB Notification: Performance of buildModelFMU: Generate the FMI files: time 0.02673/0.2993, allocations: 7.874 MB / 464.4 MB, free: 3.477 MB / 334.1 MB Notification: Performance of buildModelFMU: Generate platform static: time 8.064/8.364, allocations: 0 / 464.4 MB, free: 3.477 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)