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: translateModel(IndustrialControlSystems.Logical.Counter.Examples.countZeroCrossing,tolerance=1e-06,outputFormat="empty",numberOfIntervals=5000,variableFilter="",fileNamePrefix="IndustrialControlSystems_IndustrialControlSystems.Logical.Counter.Examples.countZeroCrossing") translateModel(IndustrialControlSystems.Logical.Counter.Examples.countZeroCrossing,tolerance=1e-06,outputFormat="empty",numberOfIntervals=5000,variableFilter="",fileNamePrefix="IndustrialControlSystems_IndustrialControlSystems.Logical.Counter.Examples.countZeroCrossing") Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.001836/0.001837, allocations: 104.3 kB / 16.35 MB, free: 5.875 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.002033/0.002033, allocations: 191.8 kB / 17.29 MB, free: 5.516 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.568/1.568, allocations: 205.1 MB / 223.2 MB, free: 12.12 MB / 190.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/IndustrialControlSystems 1.1.0-master/package.mo): time 0.05913/0.05913, allocations: 10.74 MB / 281.3 MB, free: 1.285 MB / 222.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.001699/0.001699, allocations: 60.12 kB / 342 MB, free: 4.438 MB / 286.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.2608/0.2625, allocations: 49.01 MB / 391 MB, free: 49.92 MB / 318.1 MB Notification: Performance of NFInst.instantiate(IndustrialControlSystems.Logical.Counter.Examples.countZeroCrossing): time 0.00469/0.2673, allocations: 2.15 MB / 393.1 MB, free: 48.44 MB / 318.1 MB Notification: Performance of NFInst.instExpressions: time 0.002517/0.2698, allocations: 1.244 MB / 394.4 MB, free: 47.59 MB / 318.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.0003659/0.2702, allocations: 6.656 kB / 394.4 MB, free: 47.58 MB / 318.1 MB Notification: Performance of NFTyping.typeComponents: time 0.0009656/0.2712, allocations: 271.8 kB / 394.7 MB, free: 47.5 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.0007783/0.272, allocations: 196 kB / 394.8 MB, free: 47.41 MB / 318.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.001206/0.2732, allocations: 318.3 kB / 395.2 MB, free: 47.26 MB / 318.1 MB Notification: Performance of NFFlatten.flatten: time 0.0007655/0.274, allocations: 389.7 kB / 395.5 MB, free: 47.08 MB / 318.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0002305/0.2743, allocations: 70.38 kB / 395.6 MB, free: 47.05 MB / 318.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0004742/0.2747, allocations: 162.3 kB / 395.8 MB, free: 46.98 MB / 318.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0003435/0.2751, allocations: 150.7 kB / 395.9 MB, free: 46.91 MB / 318.1 MB Notification: Performance of NFPackage.collectConstants: time 7.636e-05/0.2752, allocations: 20.62 kB / 395.9 MB, free: 46.91 MB / 318.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0003608/0.2755, allocations: 129.6 kB / 396.1 MB, free: 46.88 MB / 318.1 MB Notification: Performance of NFScalarize.scalarize: time 0.0001467/0.2757, allocations: 82.39 kB / 396.1 MB, free: 46.84 MB / 318.1 MB Notification: Performance of NFVerifyModel.verify: time 0.0001806/0.2759, allocations: 128.2 kB / 396.3 MB, free: 46.75 MB / 318.1 MB Notification: Performance of NFConvertDAE.convert: time 0.0007682/0.2767, allocations: 405.9 kB / 396.7 MB, free: 46.58 MB / 318.1 MB Notification: Performance of FrontEnd - DAE generated: time 6.212e-06/0.2767, allocations: 0.5625 kB / 396.7 MB, free: 46.58 MB / 318.1 MB Notification: Performance of FrontEnd: time 2.013e-06/0.2767, allocations: 1.344 kB / 396.7 MB, free: 46.58 MB / 318.1 MB Notification: Performance of Transformations before backend: time 2.31e-05/0.2767, allocations: 0 / 396.7 MB, free: 46.58 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.001299/0.278, allocations: 0.6899 MB / 397.4 MB, free: 45.98 MB / 318.1 MB Notification: Performance of prepare preOptimizeDAE: time 4.275e-05/0.2781, allocations: 13.27 kB / 397.4 MB, free: 45.97 MB / 318.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 8.729e-05/0.2782, allocations: 34.58 kB / 397.4 MB, free: 45.96 MB / 318.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0004089/0.2786, allocations: 330.5 kB / 397.7 MB, free: 45.68 MB / 318.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 2.183e-05/0.2786, allocations: 10.59 kB / 397.7 MB, free: 45.68 MB / 318.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 3.246e-05/0.2787, allocations: 14.36 kB / 397.7 MB, free: 45.67 MB / 318.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0004102/0.2791, allocations: 203.6 kB / 397.9 MB, free: 45.56 MB / 318.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 1.073e-05/0.2791, allocations: 0 / 397.9 MB, free: 45.56 MB / 318.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 2.308e-05/0.2791, allocations: 7.703 kB / 398 MB, free: 45.55 MB / 318.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 9.458e-06/0.2791, allocations: 4.297 kB / 398 MB, free: 45.55 MB / 318.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0002555/0.2794, allocations: 91.2 kB / 398 MB, free: 45.53 MB / 318.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.0008444/0.2803, allocations: 0.5237 MB / 398.6 MB, free: 45.15 MB / 318.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.0005024/0.2808, allocations: 165.8 kB / 398.7 MB, free: 45.08 MB / 318.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0001703/0.281, allocations: 75.66 kB / 398.8 MB, free: 45.04 MB / 318.1 MB Notification: Performance of preOpt evalFunc (simulation): time 3.643e-05/0.281, allocations: 1.656 kB / 398.8 MB, free: 45.04 MB / 318.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0004407/0.2814, allocations: 172.3 kB / 399 MB, free: 44.95 MB / 318.1 MB Notification: Performance of pre-optimization done (n=21): time 1.673e-06/0.2815, allocations: 0 / 399 MB, free: 44.95 MB / 318.1 MB Notification: Performance of matching and sorting (n=21): time 0.0007659/0.2822, allocations: 319.2 kB / 399.3 MB, free: 44.81 MB / 318.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 7.564e-05/0.2823, allocations: 145 kB / 399.4 MB, free: 44.64 MB / 318.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0003582/0.2827, allocations: 384.2 kB / 399.8 MB, free: 44.41 MB / 318.1 MB Notification: Performance of collectPreVariables (initialization): time 2.616e-05/0.2827, allocations: 33.67 kB / 399.8 MB, free: 44.38 MB / 318.1 MB Notification: Performance of collectInitialEqns (initialization): time 0.0001023/0.2828, allocations: 167.1 kB / 400 MB, free: 44.22 MB / 318.1 MB Notification: Performance of collectInitialBindings (initialization): time 4.572e-05/0.2829, allocations: 52.47 kB / 400.1 MB, free: 44.18 MB / 318.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 7.951e-05/0.283, allocations: 53.42 kB / 400.1 MB, free: 44.14 MB / 318.1 MB Notification: Performance of setup shared object (initialization): time 8.173e-05/0.2831, allocations: 351.6 kB / 400.4 MB, free: 43.8 MB / 318.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0001353/0.2832, allocations: 53.58 kB / 400.5 MB, free: 43.77 MB / 318.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0002224/0.2834, allocations: 174.5 kB / 400.7 MB, free: 43.59 MB / 318.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.0004006/0.2838, allocations: 250.6 kB / 400.9 MB, free: 43.39 MB / 318.1 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 2.745e-06/0.2838, allocations: 3.938 kB / 400.9 MB, free: 43.39 MB / 318.1 MB Notification: Performance of matching and sorting (n=31) (initialization): time 0.000478/0.2843, allocations: 276.1 kB / 401.2 MB, free: 43.24 MB / 318.1 MB Notification: Performance of prepare postOptimizeDAE: time 1.856e-05/0.2844, allocations: 6.719 kB / 401.2 MB, free: 43.24 MB / 318.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 9.878e-06/0.2844, allocations: 3.062 kB / 401.2 MB, free: 43.24 MB / 318.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 2.436e-05/0.2844, allocations: 3.781 kB / 401.2 MB, free: 43.24 MB / 318.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0001441/0.2846, allocations: 38.23 kB / 401.2 MB, free: 43.23 MB / 318.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.085e-05/0.2846, allocations: 7.625 kB / 401.2 MB, free: 43.22 MB / 318.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0001642/0.2847, allocations: 32.27 kB / 401.3 MB, free: 43.2 MB / 318.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 2.38e-05/0.2848, allocations: 14.59 kB / 401.3 MB, free: 43.2 MB / 318.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.0002314/0.285, allocations: 180.4 kB / 401.5 MB, free: 43.04 MB / 318.1 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 6.616e-05/0.2851, allocations: 39.95 kB / 401.5 MB, free: 43.02 MB / 318.1 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 8.562e-05/0.2852, allocations: 41.81 kB / 401.5 MB, free: 42.98 MB / 318.1 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 6.532e-06/0.2852, allocations: 2.219 kB / 401.6 MB, free: 42.98 MB / 318.1 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 6.312e-06/0.2852, allocations: 0 / 401.6 MB, free: 42.98 MB / 318.1 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 5.4e-06/0.2852, allocations: 5.234 kB / 401.6 MB, free: 42.98 MB / 318.1 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0003482/0.2856, allocations: 321.9 kB / 401.9 MB, free: 42.67 MB / 318.1 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 2.575e-06/0.2856, allocations: 4 kB / 401.9 MB, free: 42.66 MB / 318.1 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 6.952e-05/0.2857, allocations: 9.75 kB / 401.9 MB, free: 42.66 MB / 318.1 MB Notification: Performance of postOpt tearingSystem (simulation): time 3.106e-06/0.2857, allocations: 1.281 kB / 401.9 MB, free: 42.66 MB / 318.1 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 2.416e-05/0.2857, allocations: 10.61 kB / 401.9 MB, free: 42.66 MB / 318.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 1.673e-06/0.2857, allocations: 5.281 kB / 401.9 MB, free: 42.65 MB / 318.1 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 9.41e-07/0.2857, allocations: 0 / 401.9 MB, free: 42.65 MB / 318.1 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.000532/0.2863, allocations: 290.2 kB / 402.2 MB, free: 42.48 MB / 318.1 MB Notification: Performance of postOpt removeConstants (simulation): time 8.555e-05/0.2864, allocations: 109.2 kB / 402.3 MB, free: 42.37 MB / 318.1 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 4.907e-05/0.2864, allocations: 6.344 kB / 402.3 MB, free: 42.36 MB / 318.1 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0001375/0.2866, allocations: 18.2 kB / 402.3 MB, free: 42.36 MB / 318.1 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 6.98e-05/0.2866, allocations: 18.84 kB / 402.3 MB, free: 42.34 MB / 318.1 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 2.943e-05/0.2867, allocations: 11.06 kB / 402.3 MB, free: 42.34 MB / 318.1 MB Notification: Performance of sorting global known variables: time 0.0003064/0.287, allocations: 278.9 kB / 402.6 MB, free: 42.17 MB / 318.1 MB Notification: Performance of sort global known variables: time 1.11e-07/0.287, allocations: 1.5 kB / 402.6 MB, free: 42.17 MB / 318.1 MB Notification: Performance of remove unused functions: time 0.0004363/0.2874, allocations: 77.27 kB / 402.7 MB, free: 42.15 MB / 318.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.00108/0.2885, allocations: 441 kB / 403.1 MB, free: 41.96 MB / 318.1 MB Notification: Performance of simCode: created initialization part: time 0.0004583/0.289, allocations: 186.2 kB / 403.3 MB, free: 41.88 MB / 318.1 MB Notification: Performance of simCode: created event and clocks part: time 4.258e-06/0.289, allocations: 1.25 kB / 403.3 MB, free: 41.88 MB / 318.1 MB Notification: Performance of simCode: created simulation system equations: time 0.0001921/0.2892, allocations: 97.41 kB / 403.4 MB, free: 41.83 MB / 318.1 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0004594/0.2897, allocations: 92.5 kB / 403.5 MB, free: 41.78 MB / 318.1 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.0008452/0.2905, allocations: 497 kB / 404 MB, free: 41.46 MB / 318.1 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0002264/0.2908, allocations: 0.7733 MB / 404.8 MB, free: 40.72 MB / 318.1 MB Notification: Performance of simCode: alias equations: time 0.0001443/0.2909, allocations: 51.7 kB / 404.8 MB, free: 40.7 MB / 318.1 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 7.077e-05/0.291, allocations: 31.31 kB / 404.8 MB, free: 40.69 MB / 318.1 MB Notification: Performance of SimCode: time 2.41e-07/0.291, allocations: 0 / 404.8 MB, free: 40.69 MB / 318.1 MB Notification: Performance of Templates: time 0.00958/0.3006, allocations: 4.476 MB / 409.3 MB, free: 37.98 MB / 318.1 MB make -j1 -f IndustrialControlSystems_IndustrialControlSystems.Logical.Counter.Examples.countZeroCrossing.makefile (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 & ./IndustrialControlSystems_IndustrialControlSystems.Logical.Counter.Examples.countZeroCrossing -abortSlowSimulation -alarm=480 -s cvode -lv LOG_STATS > IndustrialControlSystems_IndustrialControlSystems.Logical.Counter.Examples.countZeroCrossing.pipe 2>&1)