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 4.0.0+maint.om/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/IndustrialControlSystems 2.0.0-master/package.mo", uses=false) Using package IndustrialControlSystems with version 2.0.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/IndustrialControlSystems 2.0.0-master/package.mo) Using package Modelica with version 4.0.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 4.0.0+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.006939/0.006939, allocations: 104.2 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.001855/0.001855, allocations: 190.2 kB / 16.67 MB, free: 5.871 MB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 4.0.0+maint.om/package.mo): time 1.386/1.386, allocations: 222.9 MB / 240.4 MB, free: 15.05 MB / 206.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/IndustrialControlSystems 2.0.0-master/package.mo): time 0.06412/0.06412, allocations: 11.22 MB / 301.7 MB, free: 4.035 MB / 238.1 MB Notification: Performance of FrontEnd - loaded program: time 0.001834/0.001834, allocations: 60.05 kB / 417.3 MB, free: 19.14 MB / 302.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.08558/0.08743, allocations: 51.99 MB / 469.3 MB, free: 15.11 MB / 350.1 MB Notification: Performance of NFInst.instantiate(IndustrialControlSystems.Logical.Counter.Examples.countZeroCrossing): time 0.003492/0.09095, allocations: 2.157 MB / 471.5 MB, free: 12.95 MB / 350.1 MB Notification: Performance of NFInst.instExpressions: time 0.002153/0.09313, allocations: 1.317 MB / 472.8 MB, free: 11.62 MB / 350.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.0001143/0.09325, allocations: 7.938 kB / 472.8 MB, free: 11.61 MB / 350.1 MB Notification: Performance of NFTyping.typeComponents: time 0.0007439/0.09402, allocations: 266.2 kB / 473.1 MB, free: 11.36 MB / 350.1 MB Notification: Performance of NFTyping.typeBindings: time 0.0004308/0.09446, allocations: 199.2 kB / 473.3 MB, free: 11.16 MB / 350.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.0008022/0.09527, allocations: 347.3 kB / 473.6 MB, free: 10.82 MB / 350.1 MB Notification: Performance of NFFlatten.flatten: time 0.0004327/0.09571, allocations: 394.9 kB / 474 MB, free: 10.44 MB / 350.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0001482/0.09587, allocations: 57.12 kB / 474 MB, free: 10.38 MB / 350.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0002361/0.09611, allocations: 167.4 kB / 474.2 MB, free: 10.21 MB / 350.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.000193/0.09632, allocations: 151.3 kB / 474.4 MB, free: 10.06 MB / 350.1 MB Notification: Performance of NFPackage.collectConstants: time 5.89e-05/0.09638, allocations: 20 kB / 474.4 MB, free: 10.04 MB / 350.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0002353/0.09663, allocations: 131.8 kB / 474.5 MB, free: 9.914 MB / 350.1 MB Notification: Performance of NFScalarize.scalarize: time 0.0001068/0.09674, allocations: 79.73 kB / 474.6 MB, free: 9.836 MB / 350.1 MB Notification: Performance of NFVerifyModel.verify: time 0.0001443/0.09689, allocations: 131.2 kB / 474.7 MB, free: 9.707 MB / 350.1 MB Notification: Performance of NFConvertDAE.convert: time 0.0004974/0.0974, allocations: 394.7 kB / 475.1 MB, free: 9.32 MB / 350.1 MB Notification: Performance of FrontEnd - DAE generated: time 3.857e-06/0.09741, allocations: 3.938 kB / 475.1 MB, free: 9.316 MB / 350.1 MB Notification: Performance of FrontEnd: time 1.613e-06/0.09742, allocations: 0 / 475.1 MB, free: 9.316 MB / 350.1 MB Notification: Performance of Transformations before backend: time 6.322e-06/0.09743, allocations: 0 / 475.1 MB, free: 9.316 MB / 350.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.001097/0.09853, allocations: 0.6958 MB / 475.8 MB, free: 8.559 MB / 350.1 MB Notification: Performance of prepare preOptimizeDAE: time 3.655e-05/0.09858, allocations: 15.89 kB / 475.8 MB, free: 8.543 MB / 350.1 MB Notification: Performance of preOpt introduceOutputAliases (simulation): time 5.226e-05/0.09863, allocations: 46.73 kB / 475.9 MB, free: 8.488 MB / 350.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 7.093e-05/0.09871, allocations: 36.7 kB / 475.9 MB, free: 8.453 MB / 350.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.000439/0.09915, allocations: 344.2 kB / 476.2 MB, free: 8.078 MB / 350.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 2.177e-05/0.09919, allocations: 20.05 kB / 476.2 MB, free: 8.059 MB / 350.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 2.914e-05/0.09923, allocations: 20 kB / 476.3 MB, free: 8.039 MB / 350.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0003816/0.09961, allocations: 196 kB / 476.5 MB, free: 7.832 MB / 350.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 9.077e-06/0.09963, allocations: 0 / 476.5 MB, free: 7.832 MB / 350.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 2.105e-05/0.09966, allocations: 4 kB / 476.5 MB, free: 7.828 MB / 350.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 7.273e-06/0.09967, allocations: 4 kB / 476.5 MB, free: 7.824 MB / 350.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.000247/0.09992, allocations: 91.94 kB / 476.6 MB, free: 7.734 MB / 350.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.0007875/0.1007, allocations: 0.5276 MB / 477.1 MB, free: 7.156 MB / 350.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.0004703/0.1012, allocations: 174.6 kB / 477.3 MB, free: 6.977 MB / 350.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0001607/0.1014, allocations: 73 kB / 477.3 MB, free: 6.902 MB / 350.1 MB Notification: Performance of preOpt evalFunc (simulation): time 2.363e-05/0.1014, allocations: 0 / 477.3 MB, free: 6.902 MB / 350.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0003356/0.1017, allocations: 173 kB / 477.5 MB, free: 6.715 MB / 350.1 MB Notification: Performance of pre-optimization done (n=21): time 1.463e-06/0.1018, allocations: 7.938 kB / 477.5 MB, free: 6.707 MB / 350.1 MB Notification: Performance of matching and sorting (n=21): time 0.0007093/0.1025, allocations: 312.3 kB / 477.8 MB, free: 6.398 MB / 350.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 9.461e-05/0.1026, allocations: 140.5 kB / 477.9 MB, free: 6.23 MB / 350.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0004359/0.103, allocations: 385.6 kB / 478.3 MB, free: 5.844 MB / 350.1 MB Notification: Performance of collectPreVariables (initialization): time 2.929e-05/0.1031, allocations: 33.7 kB / 478.4 MB, free: 5.805 MB / 350.1 MB Notification: Performance of collectInitialEqns (initialization): time 0.0001341/0.1032, allocations: 164.5 kB / 478.5 MB, free: 5.641 MB / 350.1 MB Notification: Performance of collectInitialBindings (initialization): time 5.659e-05/0.1033, allocations: 55.58 kB / 478.6 MB, free: 5.586 MB / 350.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 8.043e-05/0.1034, allocations: 61.69 kB / 478.6 MB, free: 5.52 MB / 350.1 MB Notification: Performance of setup shared object (initialization): time 0.0001683/0.1035, allocations: 350.8 kB / 479 MB, free: 5.168 MB / 350.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.000145/0.1037, allocations: 51.97 kB / 479 MB, free: 5.117 MB / 350.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0002476/0.1039, allocations: 180.2 kB / 479.2 MB, free: 4.887 MB / 350.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.0004494/0.1044, allocations: 242.9 kB / 479.4 MB, free: 4.609 MB / 350.1 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 2.885e-06/0.1044, allocations: 4 kB / 479.4 MB, free: 4.605 MB / 350.1 MB Notification: Performance of matching and sorting (n=31) (initialization): time 0.0005226/0.1049, allocations: 277 kB / 479.7 MB, free: 4.328 MB / 350.1 MB Notification: Performance of prepare postOptimizeDAE: time 1.844e-05/0.105, allocations: 11.92 kB / 479.7 MB, free: 4.316 MB / 350.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 8.516e-06/0.105, allocations: 4 kB / 479.7 MB, free: 4.312 MB / 350.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 1.893e-05/0.105, allocations: 4.188 kB / 479.7 MB, free: 4.309 MB / 350.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0001468/0.1052, allocations: 39.92 kB / 479.8 MB, free: 4.27 MB / 350.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.02e-05/0.1052, allocations: 4 kB / 479.8 MB, free: 4.266 MB / 350.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0001596/0.1053, allocations: 44.11 kB / 479.8 MB, free: 4.223 MB / 350.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 1.747e-05/0.1054, allocations: 8 kB / 479.8 MB, free: 4.215 MB / 350.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.0002358/0.1056, allocations: 185.2 kB / 480 MB, free: 4.023 MB / 350.1 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 5.457e-05/0.1057, allocations: 39.77 kB / 480 MB, free: 3.984 MB / 350.1 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 7.272e-05/0.1057, allocations: 35.28 kB / 480.1 MB, free: 3.949 MB / 350.1 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 2.585e-06/0.1058, allocations: 0 / 480.1 MB, free: 3.949 MB / 350.1 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 4.97e-06/0.1058, allocations: 0 / 480.1 MB, free: 3.949 MB / 350.1 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 4.338e-06/0.1058, allocations: 3.938 kB / 480.1 MB, free: 3.945 MB / 350.1 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0003196/0.1061, allocations: 317.3 kB / 480.4 MB, free: 3.586 MB / 350.1 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 1.252e-06/0.1061, allocations: 0 / 480.4 MB, free: 3.586 MB / 350.1 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 7.054e-05/0.1062, allocations: 19.92 kB / 480.4 MB, free: 3.566 MB / 350.1 MB Notification: Performance of postOpt tearingSystem (simulation): time 1.913e-06/0.1062, allocations: 0 / 480.4 MB, free: 3.566 MB / 350.1 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 1.884e-05/0.1062, allocations: 7.984 kB / 480.4 MB, free: 3.559 MB / 350.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 1.563e-06/0.1062, allocations: 0 / 480.4 MB, free: 3.559 MB / 350.1 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 6.22e-07/0.1062, allocations: 4 kB / 480.4 MB, free: 3.555 MB / 350.1 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.0005206/0.1068, allocations: 284.8 kB / 480.7 MB, free: 3.258 MB / 350.1 MB Notification: Performance of postOpt removeConstants (simulation): time 8.819e-05/0.1069, allocations: 116.9 kB / 480.8 MB, free: 3.125 MB / 350.1 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 4.869e-05/0.1069, allocations: 11.94 kB / 480.8 MB, free: 3.113 MB / 350.1 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0001372/0.1071, allocations: 11.98 kB / 480.8 MB, free: 3.102 MB / 350.1 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 6.461e-05/0.1071, allocations: 23.97 kB / 480.9 MB, free: 3.078 MB / 350.1 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 2.503e-05/0.1072, allocations: 12 kB / 480.9 MB, free: 3.066 MB / 350.1 MB Notification: Performance of sorting global known variables: time 0.0003012/0.1075, allocations: 275.2 kB / 481.1 MB, free: 2.797 MB / 350.1 MB Notification: Performance of sort global known variables: time 1.61e-07/0.1075, allocations: 0 / 481.1 MB, free: 2.797 MB / 350.1 MB Notification: Performance of remove unused functions: time 0.0003382/0.1078, allocations: 75.86 kB / 481.2 MB, free: 2.723 MB / 350.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.002233/0.1101, allocations: 1.178 MB / 482.4 MB, free: 1.68 MB / 350.1 MB Notification: Performance of simCode: created initialization part: time 0.000445/0.1105, allocations: 183.7 kB / 482.6 MB, free: 1.5 MB / 350.1 MB Notification: Performance of simCode: created event and clocks part: time 2.475e-06/0.1105, allocations: 0.6875 kB / 482.6 MB, free: 1.5 MB / 350.1 MB Notification: Performance of simCode: created simulation system equations: time 0.000204/0.1107, allocations: 91.91 kB / 482.7 MB, free: 1.41 MB / 350.1 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0004318/0.1112, allocations: 73.31 kB / 482.7 MB, free: 1.34 MB / 350.1 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.003789/0.115, allocations: 2.98 MB / 485.7 MB, free: 14.2 MB / 366.1 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0003879/0.1154, allocations: 0.779 MB / 486.5 MB, free: 13.4 MB / 366.1 MB Notification: Performance of simCode: alias equations: time 0.0001413/0.1155, allocations: 54.91 kB / 486.5 MB, free: 13.34 MB / 366.1 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0001552/0.1157, allocations: 103.4 kB / 486.6 MB, free: 13.24 MB / 366.1 MB Notification: Performance of SimCode: time 3.5e-07/0.1157, allocations: 0 / 486.6 MB, free: 13.24 MB / 366.1 MB Notification: Performance of buildModelFMU: Generate the FMI files: time 0.03/0.1457, allocations: 7.876 MB / 494.5 MB, free: 5.559 MB / 366.1 MB Notification: Performance of buildModelFMU: Generate platform static: time 8.276/8.422, allocations: 7.344 kB / 494.5 MB, free: 5.555 MB / 366.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)