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.001148/0.001148, allocations: 103.4 kB / 15.33 MB, free: 0.5078 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.002002/0.002002, allocations: 194.3 kB / 16.26 MB, free: 6.617 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.601/1.601, allocations: 205.1 MB / 222.1 MB, free: 4.707 MB / 174.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/IndustrialControlSystems 1.1.0-master/package.mo): time 0.05739/0.05739, allocations: 10.74 MB / 280.2 MB, free: 10.68 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.001403/0.001403, allocations: 63.91 kB / 340.1 MB, free: 23.58 MB / 254.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.1256/0.127, allocations: 49.02 MB / 389.2 MB, free: 6.5 MB / 286.1 MB Notification: Performance of NFInst.instantiate(IndustrialControlSystems.Logical.Counter.Examples.countZeroCrossing): time 0.004188/0.1312, allocations: 2.197 MB / 391.4 MB, free: 4.285 MB / 286.1 MB Notification: Performance of NFInst.instExpressions: time 0.002339/0.1336, allocations: 1.225 MB / 392.6 MB, free: 3.051 MB / 286.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.0001658/0.1338, allocations: 3.938 kB / 392.6 MB, free: 3.047 MB / 286.1 MB Notification: Performance of NFTyping.typeComponents: time 0.0009114/0.1348, allocations: 255.4 kB / 392.8 MB, free: 2.797 MB / 286.1 MB Notification: Performance of NFTyping.typeBindings: time 0.0005436/0.1353, allocations: 179.4 kB / 393 MB, free: 2.621 MB / 286.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.0008835/0.1362, allocations: 303.5 kB / 393.3 MB, free: 2.324 MB / 286.1 MB Notification: Performance of NFFlatten.flatten: time 0.0004157/0.1366, allocations: 383 kB / 393.7 MB, free: 1.949 MB / 286.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0001731/0.1368, allocations: 65.12 kB / 393.7 MB, free: 1.887 MB / 286.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0002347/0.1371, allocations: 155.3 kB / 393.9 MB, free: 1.734 MB / 286.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0001792/0.1372, allocations: 155.3 kB / 394.1 MB, free: 1.582 MB / 286.1 MB Notification: Performance of NFPackage.collectConstants: time 4.188e-05/0.1373, allocations: 24 kB / 394.1 MB, free: 1.559 MB / 286.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0002327/0.1375, allocations: 123.8 kB / 394.2 MB, free: 1.438 MB / 286.1 MB Notification: Performance of NFScalarize.scalarize: time 9.909e-05/0.1376, allocations: 79.69 kB / 394.3 MB, free: 1.359 MB / 286.1 MB Notification: Performance of NFVerifyModel.verify: time 0.0001423/0.1378, allocations: 135.1 kB / 394.4 MB, free: 1.227 MB / 286.1 MB Notification: Performance of NFConvertDAE.convert: time 0.0004823/0.1383, allocations: 395.1 kB / 394.8 MB, free: 0.8398 MB / 286.1 MB Notification: Performance of FrontEnd - DAE generated: time 5.481e-06/0.1383, allocations: 0 / 394.8 MB, free: 0.8398 MB / 286.1 MB Notification: Performance of FrontEnd: time 1.653e-06/0.1383, allocations: 0 / 394.8 MB, free: 0.8398 MB / 286.1 MB Notification: Performance of Transformations before backend: time 6.402e-06/0.1383, allocations: 0 / 394.8 MB, free: 0.8398 MB / 286.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.001219/0.1395, allocations: 0.6768 MB / 395.5 MB, free: 104 kB / 286.1 MB Notification: Performance of prepare preOptimizeDAE: time 5.814e-05/0.1396, allocations: 15.89 kB / 395.5 MB, free: 88 kB / 286.1 MB Notification: Performance of preOpt introduceOutputAliases (simulation): time 6.525e-05/0.1397, allocations: 50.67 kB / 395.5 MB, free: 28 kB / 286.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0001083/0.1398, allocations: 40.64 kB / 395.6 MB, free: 15.98 MB / 302.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0004664/0.1403, allocations: 335.9 kB / 395.9 MB, free: 15.62 MB / 302.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 2.428e-05/0.1403, allocations: 12.12 kB / 395.9 MB, free: 15.61 MB / 302.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 2.689e-05/0.1403, allocations: 12 kB / 395.9 MB, free: 15.59 MB / 302.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0004227/0.1408, allocations: 200.1 kB / 396.1 MB, free: 15.38 MB / 302.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 1.278e-05/0.1408, allocations: 3.984 kB / 396.1 MB, free: 15.38 MB / 302.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 2.469e-05/0.1408, allocations: 4 kB / 396.1 MB, free: 15.38 MB / 302.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 7.925e-06/0.1408, allocations: 8 kB / 396.1 MB, free: 15.37 MB / 302.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0002481/0.1411, allocations: 91.94 kB / 396.2 MB, free: 15.28 MB / 302.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.0008393/0.1419, allocations: 0.5313 MB / 396.8 MB, free: 14.7 MB / 302.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.0004678/0.1424, allocations: 162.6 kB / 396.9 MB, free: 14.53 MB / 302.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0001555/0.1426, allocations: 69 kB / 397 MB, free: 14.46 MB / 302.1 MB Notification: Performance of preOpt evalFunc (simulation): time 3.236e-05/0.1426, allocations: 4 kB / 397 MB, free: 14.45 MB / 302.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0003525/0.143, allocations: 174.1 kB / 397.2 MB, free: 14.27 MB / 302.1 MB Notification: Performance of pre-optimization done (n=21): time 1.423e-06/0.143, allocations: 0 / 397.2 MB, free: 14.27 MB / 302.1 MB Notification: Performance of matching and sorting (n=21): time 0.0007271/0.1437, allocations: 317.7 kB / 397.5 MB, free: 13.95 MB / 302.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 0.0001077/0.1439, allocations: 148.4 kB / 397.6 MB, free: 13.77 MB / 302.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0004045/0.1443, allocations: 385.6 kB / 398 MB, free: 13.39 MB / 302.1 MB Notification: Performance of collectPreVariables (initialization): time 3.927e-05/0.1443, allocations: 33.7 kB / 398 MB, free: 13.35 MB / 302.1 MB Notification: Performance of collectInitialEqns (initialization): time 0.0001258/0.1445, allocations: 164.4 kB / 398.2 MB, free: 13.18 MB / 302.1 MB Notification: Performance of collectInitialBindings (initialization): time 6.522e-05/0.1445, allocations: 55.3 kB / 398.2 MB, free: 13.13 MB / 302.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 8.036e-05/0.1446, allocations: 53.69 kB / 398.3 MB, free: 13.07 MB / 302.1 MB Notification: Performance of setup shared object (initialization): time 0.0001398/0.1448, allocations: 346.8 kB / 398.6 MB, free: 12.72 MB / 302.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0001475/0.1449, allocations: 60.17 kB / 398.7 MB, free: 12.66 MB / 302.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.000233/0.1452, allocations: 175.4 kB / 398.9 MB, free: 12.44 MB / 302.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.0004179/0.1456, allocations: 254.8 kB / 399.1 MB, free: 12.15 MB / 302.1 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 3.317e-06/0.1456, allocations: 0 / 399.1 MB, free: 12.15 MB / 302.1 MB Notification: Performance of matching and sorting (n=31) (initialization): time 0.0004831/0.1461, allocations: 269.3 kB / 399.4 MB, free: 11.88 MB / 302.1 MB Notification: Performance of prepare postOptimizeDAE: time 2.31e-05/0.1461, allocations: 11.92 kB / 399.4 MB, free: 11.87 MB / 302.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 8.395e-06/0.1461, allocations: 4 kB / 399.4 MB, free: 11.86 MB / 302.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 1.709e-05/0.1462, allocations: 4 kB / 399.4 MB, free: 11.86 MB / 302.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0001473/0.1463, allocations: 35.92 kB / 399.4 MB, free: 11.82 MB / 302.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.223e-05/0.1463, allocations: 11.94 kB / 399.4 MB, free: 11.81 MB / 302.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0001627/0.1465, allocations: 31.73 kB / 399.5 MB, free: 11.78 MB / 302.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 1.809e-05/0.1465, allocations: 8.188 kB / 399.5 MB, free: 11.77 MB / 302.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.000273/0.1468, allocations: 193.2 kB / 399.7 MB, free: 11.58 MB / 302.1 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 5.374e-05/0.1469, allocations: 31.62 kB / 399.7 MB, free: 11.55 MB / 302.1 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 9.194e-05/0.147, allocations: 35.28 kB / 399.7 MB, free: 11.5 MB / 302.1 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 2.665e-06/0.147, allocations: 0 / 399.7 MB, free: 11.5 MB / 302.1 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 7.825e-06/0.147, allocations: 0 / 399.7 MB, free: 11.5 MB / 302.1 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 5.941e-06/0.147, allocations: 8 kB / 399.7 MB, free: 11.5 MB / 302.1 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0003444/0.1474, allocations: 317.3 kB / 400 MB, free: 11.14 MB / 302.1 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 1.412e-06/0.1474, allocations: 0 / 400 MB, free: 11.14 MB / 302.1 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 6.985e-05/0.1474, allocations: 15.97 kB / 400.1 MB, free: 11.12 MB / 302.1 MB Notification: Performance of postOpt tearingSystem (simulation): time 4.028e-06/0.1475, allocations: 4 kB / 400.1 MB, free: 11.12 MB / 302.1 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 2.195e-05/0.1475, allocations: 7.984 kB / 400.1 MB, free: 11.11 MB / 302.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 2.835e-06/0.1475, allocations: 4 kB / 400.1 MB, free: 11.11 MB / 302.1 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 1.072e-06/0.1475, allocations: 0 / 400.1 MB, free: 11.11 MB / 302.1 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.0005227/0.148, allocations: 288.5 kB / 400.4 MB, free: 10.8 MB / 302.1 MB Notification: Performance of postOpt removeConstants (simulation): time 8.155e-05/0.1481, allocations: 112.7 kB / 400.5 MB, free: 10.68 MB / 302.1 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 5.406e-05/0.1482, allocations: 11.94 kB / 400.5 MB, free: 10.66 MB / 302.1 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0001375/0.1483, allocations: 11.98 kB / 400.5 MB, free: 10.65 MB / 302.1 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 6.573e-05/0.1484, allocations: 19.97 kB / 400.5 MB, free: 10.63 MB / 302.1 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 2.752e-05/0.1484, allocations: 12 kB / 400.5 MB, free: 10.62 MB / 302.1 MB Notification: Performance of sorting global known variables: time 0.0003005/0.1487, allocations: 283.2 kB / 400.8 MB, free: 10.35 MB / 302.1 MB Notification: Performance of sort global known variables: time 1.21e-07/0.1487, allocations: 0 / 400.8 MB, free: 10.35 MB / 302.1 MB Notification: Performance of remove unused functions: time 0.00036/0.1491, allocations: 79.98 kB / 400.9 MB, free: 10.27 MB / 302.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.001765/0.1509, allocations: 1.174 MB / 402.1 MB, free: 9.188 MB / 302.1 MB Notification: Performance of simCode: created initialization part: time 0.0005234/0.1514, allocations: 203.3 kB / 402.2 MB, free: 8.992 MB / 302.1 MB Notification: Performance of simCode: created event and clocks part: time 3.176e-06/0.1514, allocations: 0 / 402.2 MB, free: 8.992 MB / 302.1 MB Notification: Performance of simCode: created simulation system equations: time 0.0001929/0.1516, allocations: 87.91 kB / 402.3 MB, free: 8.906 MB / 302.1 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0004766/0.1521, allocations: 85.19 kB / 402.4 MB, free: 8.816 MB / 302.1 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.003957/0.1561, allocations: 3.069 MB / 405.5 MB, free: 5.594 MB / 302.1 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0003512/0.1565, allocations: 0.7753 MB / 406.3 MB, free: 4.793 MB / 302.1 MB Notification: Performance of simCode: alias equations: time 0.0001776/0.1567, allocations: 54.91 kB / 406.3 MB, free: 4.742 MB / 302.1 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0001492/0.1568, allocations: 99.39 kB / 406.4 MB, free: 4.648 MB / 302.1 MB Notification: Performance of SimCode: time 4.51e-07/0.1568, allocations: 4 kB / 406.4 MB, free: 4.645 MB / 302.1 MB Notification: Performance of buildModelFMU: Generate the FMI files: time 0.02084/0.1777, allocations: 7.568 MB / 414 MB, free: 13.11 MB / 318.1 MB Notification: Performance of buildModelFMU: configured platform static using cached values: time 0.0002729/0.178, allocations: 271.5 kB / 414.2 MB, free: 12.74 MB / 318.1 MB Notification: Performance of buildModelFMU: Generate platform static: time 2.123/2.301, allocations: 0 / 414.2 MB, free: 12.74 MB / 318.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 & /home/hudson/saved_omc/OMSimulator/install/bin/OMSimulator --tempDir=temp_IndustrialControlSystems_IndustrialControlSystems_Logical_Counter_Examples_countZeroCrossing_fmu --startTime=0 --stopTime=20 --timeout=50 --tolerance=1e-06 IndustrialControlSystems_IndustrialControlSystems_Logical_Counter_Examples_countZeroCrossing.fmu > IndustrialControlSystems_IndustrialControlSystems.Logical.Counter.Examples.countZeroCrossing.pipe 2>&1)