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.001176/0.001176, allocations: 108 kB / 15.61 MB, free: 152 kB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo): time 0.001473/0.001473, allocations: 195.2 kB / 16.53 MB, free: 6.664 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.541/1.541, allocations: 205.1 MB / 222.4 MB, free: 4.598 MB / 174.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/IndustrialControlSystems 1.1.0-master/package.mo): time 0.05856/0.05856, allocations: 10.74 MB / 280.5 MB, free: 10.5 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.001455/0.001455, allocations: 71.89 kB / 340.7 MB, free: 23.22 MB / 254.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.1178/0.1193, allocations: 49 MB / 389.7 MB, free: 6.152 MB / 286.1 MB Notification: Performance of NFInst.instantiate(IndustrialControlSystems.Logical.Counter.Examples.countZeroCrossing): time 0.004972/0.1243, allocations: 2.155 MB / 391.8 MB, free: 3.977 MB / 286.1 MB Notification: Performance of NFInst.instExpressions: time 0.003084/0.1274, allocations: 1.236 MB / 393.1 MB, free: 2.73 MB / 286.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.0004599/0.1279, allocations: 3.938 kB / 393.1 MB, free: 2.727 MB / 286.1 MB Notification: Performance of NFTyping.typeComponents: time 0.001251/0.1292, allocations: 275.2 kB / 393.3 MB, free: 2.457 MB / 286.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.0008214/0.1301, allocations: 191.2 kB / 393.5 MB, free: 2.27 MB / 286.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.001351/0.1314, allocations: 331.2 kB / 393.8 MB, free: 1.945 MB / 286.1 MB Notification: Performance of NFFlatten.flatten: time 0.0006932/0.1321, allocations: 379 kB / 394.2 MB, free: 1.574 MB / 286.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0002466/0.1324, allocations: 65.14 kB / 394.3 MB, free: 1.512 MB / 286.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0003855/0.1328, allocations: 155.4 kB / 394.4 MB, free: 1.359 MB / 286.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0003414/0.1331, allocations: 151.3 kB / 394.6 MB, free: 1.211 MB / 286.1 MB Notification: Performance of NFPackage.collectConstants: time 9.122e-05/0.1332, allocations: 24 kB / 394.6 MB, free: 1.188 MB / 286.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0003354/0.1336, allocations: 119.9 kB / 394.7 MB, free: 1.07 MB / 286.1 MB Notification: Performance of NFScalarize.scalarize: time 0.0001435/0.1337, allocations: 87.61 kB / 394.8 MB, free: 0.9844 MB / 286.1 MB Notification: Performance of NFVerifyModel.verify: time 0.0001821/0.1339, allocations: 131.2 kB / 394.9 MB, free: 0.8555 MB / 286.1 MB Notification: Performance of NFConvertDAE.convert: time 0.0006155/0.1345, allocations: 383.1 kB / 395.3 MB, free: 492 kB / 286.1 MB Notification: Performance of FrontEnd - DAE generated: time 7.935e-06/0.1346, allocations: 0 / 395.3 MB, free: 492 kB / 286.1 MB Notification: Performance of FrontEnd: time 1.773e-06/0.1346, allocations: 3.938 kB / 395.3 MB, free: 488 kB / 286.1 MB Notification: Performance of Transformations before backend: time 1.802e-05/0.1346, allocations: 4 kB / 395.3 MB, free: 484 kB / 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.001453/0.1361, allocations: 0.6807 MB / 396 MB, free: 15.73 MB / 302.1 MB Notification: Performance of prepare preOptimizeDAE: time 5.475e-05/0.1361, allocations: 11.89 kB / 396 MB, free: 15.72 MB / 302.1 MB Notification: Performance of preOpt introduceOutputAliases (simulation): time 7.782e-05/0.1362, allocations: 50.73 kB / 396 MB, free: 15.66 MB / 302.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0001156/0.1363, allocations: 40.47 kB / 396.1 MB, free: 15.62 MB / 302.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0004998/0.1368, allocations: 335.9 kB / 396.4 MB, free: 15.25 MB / 302.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 3.31e-05/0.1369, allocations: 16.12 kB / 396.4 MB, free: 15.24 MB / 302.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 3.087e-05/0.1369, allocations: 12 kB / 396.4 MB, free: 15.23 MB / 302.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0004755/0.1374, allocations: 196.1 kB / 396.6 MB, free: 15.02 MB / 302.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 1.411e-05/0.1374, allocations: 0 / 396.6 MB, free: 15.02 MB / 302.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 2.718e-05/0.1375, allocations: 4 kB / 396.6 MB, free: 15.02 MB / 302.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 1.082e-05/0.1375, allocations: 11.97 kB / 396.7 MB, free: 15 MB / 302.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0002889/0.1378, allocations: 91.95 kB / 396.7 MB, free: 14.91 MB / 302.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.001073/0.1389, allocations: 0.5274 MB / 397.3 MB, free: 14.34 MB / 302.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.0005393/0.1394, allocations: 166.6 kB / 397.4 MB, free: 14.16 MB / 302.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0001731/0.1396, allocations: 68.97 kB / 397.5 MB, free: 14.09 MB / 302.1 MB Notification: Performance of preOpt evalFunc (simulation): time 3.327e-05/0.1396, allocations: 4 kB / 397.5 MB, free: 14.09 MB / 302.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.000373/0.14, allocations: 172.9 kB / 397.7 MB, free: 13.9 MB / 302.1 MB Notification: Performance of pre-optimization done (n=21): time 4.228e-06/0.14, allocations: 0 / 397.7 MB, free: 13.9 MB / 302.1 MB Notification: Performance of matching and sorting (n=21): time 0.0007855/0.1408, allocations: 317.6 kB / 398 MB, free: 13.59 MB / 302.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 9.964e-05/0.1409, allocations: 140.5 kB / 398.1 MB, free: 13.42 MB / 302.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.000462/0.1414, allocations: 381.6 kB / 398.5 MB, free: 13.04 MB / 302.1 MB Notification: Performance of collectPreVariables (initialization): time 3.805e-05/0.1415, allocations: 37.69 kB / 398.5 MB, free: 13 MB / 302.1 MB Notification: Performance of collectInitialEqns (initialization): time 0.000151/0.1416, allocations: 168.4 kB / 398.7 MB, free: 12.83 MB / 302.1 MB Notification: Performance of collectInitialBindings (initialization): time 6.525e-05/0.1417, allocations: 51.3 kB / 398.7 MB, free: 12.78 MB / 302.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 9.811e-05/0.1418, allocations: 57.69 kB / 398.8 MB, free: 12.71 MB / 302.1 MB Notification: Performance of setup shared object (initialization): time 0.0001485/0.142, allocations: 342.8 kB / 399.1 MB, free: 12.37 MB / 302.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0001444/0.1421, allocations: 60.17 kB / 399.2 MB, free: 12.31 MB / 302.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0002856/0.1424, allocations: 179.3 kB / 399.4 MB, free: 12.08 MB / 302.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.000427/0.1428, allocations: 250.8 kB / 399.6 MB, free: 11.8 MB / 302.1 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 4.779e-06/0.1428, allocations: 0 / 399.6 MB, free: 11.8 MB / 302.1 MB Notification: Performance of matching and sorting (n=31) (initialization): time 0.0005618/0.1434, allocations: 277.1 kB / 399.9 MB, free: 11.52 MB / 302.1 MB Notification: Performance of prepare postOptimizeDAE: time 2.294e-05/0.1434, allocations: 11.94 kB / 399.9 MB, free: 11.51 MB / 302.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.022e-05/0.1435, allocations: 0 / 399.9 MB, free: 11.51 MB / 302.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 2.579e-05/0.1435, allocations: 8 kB / 399.9 MB, free: 11.5 MB / 302.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0001454/0.1436, allocations: 39.91 kB / 399.9 MB, free: 11.46 MB / 302.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.215e-05/0.1437, allocations: 4 kB / 399.9 MB, free: 11.46 MB / 302.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0001778/0.1439, allocations: 32.02 kB / 400 MB, free: 11.43 MB / 302.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 2.294e-05/0.1439, allocations: 16 kB / 400 MB, free: 11.41 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.0002812/0.1442, allocations: 177.2 kB / 400.2 MB, free: 11.23 MB / 302.1 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 6.372e-05/0.1442, allocations: 35.61 kB / 400.2 MB, free: 11.19 MB / 302.1 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 9.316e-05/0.1443, allocations: 39.28 kB / 400.2 MB, free: 11.14 MB / 302.1 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 5.771e-06/0.1444, allocations: 4 kB / 400.2 MB, free: 11.14 MB / 302.1 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 7.204e-06/0.1444, allocations: 0 / 400.2 MB, free: 11.14 MB / 302.1 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 6.311e-06/0.1444, allocations: 0 / 400.2 MB, free: 11.14 MB / 302.1 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0004075/0.1448, allocations: 317.3 kB / 400.6 MB, free: 10.78 MB / 302.1 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 4.398e-06/0.1448, allocations: 0 / 400.6 MB, free: 10.78 MB / 302.1 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 7.246e-05/0.1449, allocations: 15.92 kB / 400.6 MB, free: 10.77 MB / 302.1 MB Notification: Performance of postOpt tearingSystem (simulation): time 2.825e-06/0.1449, allocations: 4 kB / 400.6 MB, free: 10.76 MB / 302.1 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 1.824e-05/0.1449, allocations: 0 / 400.6 MB, free: 10.76 MB / 302.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 6.442e-06/0.1449, allocations: 8 kB / 400.6 MB, free: 10.75 MB / 302.1 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 1.734e-06/0.145, allocations: 0 / 400.6 MB, free: 10.75 MB / 302.1 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.0005315/0.1455, allocations: 292.5 kB / 400.9 MB, free: 10.45 MB / 302.1 MB Notification: Performance of postOpt removeConstants (simulation): time 0.000107/0.1456, allocations: 108.7 kB / 401 MB, free: 10.32 MB / 302.1 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 6.369e-05/0.1457, allocations: 15.92 kB / 401 MB, free: 10.31 MB / 302.1 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0001425/0.1458, allocations: 15.98 kB / 401 MB, free: 10.29 MB / 302.1 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 9.577e-05/0.1459, allocations: 11.98 kB / 401 MB, free: 10.28 MB / 302.1 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 3.342e-05/0.146, allocations: 15.98 kB / 401 MB, free: 10.27 MB / 302.1 MB Notification: Performance of sorting global known variables: time 0.0003578/0.1463, allocations: 279.1 kB / 401.3 MB, free: 9.996 MB / 302.1 MB Notification: Performance of sort global known variables: time 4.41e-07/0.1464, allocations: 0 / 401.3 MB, free: 9.996 MB / 302.1 MB Notification: Performance of remove unused functions: time 0.0004928/0.1469, allocations: 79.98 kB / 401.4 MB, free: 9.918 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.002339/0.1492, allocations: 1.175 MB / 402.6 MB, free: 8.816 MB / 302.1 MB Notification: Performance of simCode: created initialization part: time 0.000579/0.1498, allocations: 199.2 kB / 402.8 MB, free: 8.625 MB / 302.1 MB Notification: Performance of simCode: created event and clocks part: time 2.846e-06/0.1498, allocations: 0 / 402.8 MB, free: 8.625 MB / 302.1 MB Notification: Performance of simCode: created simulation system equations: time 0.0002094/0.15, allocations: 88.58 kB / 402.8 MB, free: 8.539 MB / 302.1 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0004849/0.1505, allocations: 89.12 kB / 402.9 MB, free: 8.445 MB / 302.1 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.004356/0.1549, allocations: 3.014 MB / 405.9 MB, free: 5.285 MB / 302.1 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0003569/0.1553, allocations: 0.7675 MB / 406.7 MB, free: 4.492 MB / 302.1 MB Notification: Performance of simCode: alias equations: time 0.0001807/0.1555, allocations: 50.94 kB / 406.8 MB, free: 4.445 MB / 302.1 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0001727/0.1556, allocations: 99.39 kB / 406.9 MB, free: 4.348 MB / 302.1 MB Notification: Performance of SimCode: time 7.22e-07/0.1556, allocations: 0 / 406.9 MB, free: 4.348 MB / 302.1 MB Notification: Performance of buildModelFMU: Generate the FMI files: time 0.02769/0.1833, allocations: 7.738 MB / 414.6 MB, free: 12.61 MB / 318.1 MB Notification: Performance of buildModelFMU: Generate platform static: time 7.849/8.032, allocations: 8.375 kB / 414.6 MB, free: 12.6 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)