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.002243/0.002244, 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.01636/0.01636, allocations: 194.3 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 3.21/3.21, allocations: 205.1 MB / 222.4 MB, free: 4.594 MB / 174.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/IndustrialControlSystems 1.1.0-master/package.mo): time 0.06314/0.06314, allocations: 10.74 MB / 280.5 MB, free: 10.49 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.001562/0.001562, allocations: 75.89 kB / 340.7 MB, free: 23.21 MB / 254.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.1101/0.1117, allocations: 49.01 MB / 389.7 MB, free: 6.137 MB / 286.1 MB Notification: Performance of NFInst.instantiate(IndustrialControlSystems.Logical.Counter.Examples.countZeroCrossing): time 0.003934/0.1156, allocations: 2.155 MB / 391.8 MB, free: 3.965 MB / 286.1 MB Notification: Performance of NFInst.instExpressions: time 0.002083/0.1177, allocations: 1.244 MB / 393.1 MB, free: 2.711 MB / 286.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.0001433/0.1179, allocations: 4 kB / 393.1 MB, free: 2.707 MB / 286.1 MB Notification: Performance of NFTyping.typeComponents: time 0.0008225/0.1187, allocations: 271.1 kB / 393.3 MB, free: 2.441 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.0004424/0.1192, allocations: 199.2 kB / 393.5 MB, free: 2.246 MB / 286.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.001049/0.1203, allocations: 315.2 kB / 393.8 MB, free: 1.938 MB / 286.1 MB Notification: Performance of NFFlatten.flatten: time 0.0005977/0.1209, allocations: 383 kB / 394.2 MB, free: 1.562 MB / 286.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0002117/0.1211, allocations: 61.16 kB / 394.3 MB, free: 1.504 MB / 286.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0003316/0.1214, allocations: 163.4 kB / 394.4 MB, free: 1.344 MB / 286.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0002757/0.1217, allocations: 147.4 kB / 394.6 MB, free: 1.199 MB / 286.1 MB Notification: Performance of NFPackage.collectConstants: time 6.336e-05/0.1218, allocations: 24 kB / 394.6 MB, free: 1.176 MB / 286.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0003288/0.1222, allocations: 123.9 kB / 394.7 MB, free: 1.055 MB / 286.1 MB Notification: Performance of NFScalarize.scalarize: time 0.00016/0.1223, allocations: 79.67 kB / 394.8 MB, free: 0.9766 MB / 286.1 MB Notification: Performance of NFVerifyModel.verify: time 0.0001883/0.1225, allocations: 135.1 kB / 394.9 MB, free: 0.8438 MB / 286.1 MB Notification: Performance of NFConvertDAE.convert: time 0.0006511/0.1232, allocations: 387.1 kB / 395.3 MB, free: 476 kB / 286.1 MB Notification: Performance of FrontEnd - DAE generated: time 5.671e-06/0.1232, allocations: 4 kB / 395.3 MB, free: 472 kB / 286.1 MB Notification: Performance of FrontEnd: time 4.057e-06/0.1232, allocations: 0 / 395.3 MB, free: 472 kB / 286.1 MB Notification: Performance of Transformations before backend: time 6.963e-06/0.1232, allocations: 0 / 395.3 MB, free: 472 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.001475/0.1247, allocations: 0.6845 MB / 396 MB, free: 15.71 MB / 302.1 MB Notification: Performance of prepare preOptimizeDAE: time 4.712e-05/0.1248, allocations: 11.89 kB / 396 MB, free: 15.7 MB / 302.1 MB Notification: Performance of preOpt introduceOutputAliases (simulation): time 7.302e-05/0.1249, allocations: 50.73 kB / 396 MB, free: 15.64 MB / 302.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0001198/0.125, allocations: 40.45 kB / 396.1 MB, free: 15.61 MB / 302.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0005521/0.1256, allocations: 327.9 kB / 396.4 MB, free: 15.25 MB / 302.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 3.624e-05/0.1256, allocations: 16.12 kB / 396.4 MB, free: 15.23 MB / 302.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 3.941e-05/0.1257, allocations: 15.98 kB / 396.4 MB, free: 15.21 MB / 302.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0005754/0.1263, allocations: 196.1 kB / 396.6 MB, free: 15.01 MB / 302.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 1.505e-05/0.1263, allocations: 0 / 396.6 MB, free: 15.01 MB / 302.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 3.415e-05/0.1263, allocations: 11.94 kB / 396.6 MB, free: 15 MB / 302.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 1.008e-05/0.1264, allocations: 3.984 kB / 396.6 MB, free: 14.99 MB / 302.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0002723/0.1266, allocations: 95.88 kB / 396.7 MB, free: 14.9 MB / 302.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.0008371/0.1275, allocations: 0.5275 MB / 397.3 MB, free: 14.32 MB / 302.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.0004936/0.128, allocations: 166.8 kB / 397.4 MB, free: 14.15 MB / 302.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.000159/0.1282, allocations: 68.77 kB / 397.5 MB, free: 14.08 MB / 302.1 MB Notification: Performance of preOpt evalFunc (simulation): time 2.704e-05/0.1282, allocations: 4 kB / 397.5 MB, free: 14.07 MB / 302.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0003523/0.1286, allocations: 173 kB / 397.7 MB, free: 13.89 MB / 302.1 MB Notification: Performance of pre-optimization done (n=21): time 1.543e-06/0.1286, allocations: 0 / 397.7 MB, free: 13.89 MB / 302.1 MB Notification: Performance of matching and sorting (n=21): time 0.0007347/0.1293, allocations: 317.6 kB / 398 MB, free: 13.57 MB / 302.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 8.522e-05/0.1294, allocations: 136.5 kB / 398.1 MB, free: 13.41 MB / 302.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0003936/0.1298, allocations: 385.6 kB / 398.5 MB, free: 13.02 MB / 302.1 MB Notification: Performance of collectPreVariables (initialization): time 3.206e-05/0.1298, allocations: 33.7 kB / 398.5 MB, free: 12.98 MB / 302.1 MB Notification: Performance of collectInitialEqns (initialization): time 0.0001235/0.13, allocations: 168.4 kB / 398.7 MB, free: 12.82 MB / 302.1 MB Notification: Performance of collectInitialBindings (initialization): time 5.548e-05/0.13, allocations: 59.28 kB / 398.7 MB, free: 12.76 MB / 302.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 7.894e-05/0.1301, allocations: 49.7 kB / 398.8 MB, free: 12.7 MB / 302.1 MB Notification: Performance of setup shared object (initialization): time 0.000284/0.1304, allocations: 346.8 kB / 399.1 MB, free: 12.36 MB / 302.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0001526/0.1306, allocations: 60.17 kB / 399.2 MB, free: 12.3 MB / 302.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0002358/0.1308, allocations: 175.4 kB / 399.4 MB, free: 12.07 MB / 302.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.0004549/0.1313, allocations: 254.8 kB / 399.6 MB, free: 11.78 MB / 302.1 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 5.11e-06/0.1313, allocations: 0 / 399.6 MB, free: 11.78 MB / 302.1 MB Notification: Performance of matching and sorting (n=31) (initialization): time 0.0005376/0.1318, allocations: 272.9 kB / 399.9 MB, free: 11.51 MB / 302.1 MB Notification: Performance of prepare postOptimizeDAE: time 2.527e-05/0.1319, allocations: 10.81 kB / 399.9 MB, free: 11.5 MB / 302.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.134e-05/0.1319, allocations: 7.938 kB / 399.9 MB, free: 11.49 MB / 302.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 1.964e-05/0.1319, allocations: 4 kB / 399.9 MB, free: 11.49 MB / 302.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0001432/0.1321, allocations: 32.27 kB / 399.9 MB, free: 11.46 MB / 302.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.277e-05/0.1321, allocations: 11.94 kB / 399.9 MB, free: 11.45 MB / 302.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0001661/0.1323, allocations: 35.73 kB / 400 MB, free: 11.41 MB / 302.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 2.731e-05/0.1323, allocations: 12 kB / 400 MB, free: 11.4 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.0002711/0.1326, allocations: 193.3 kB / 400.2 MB, free: 11.2 MB / 302.1 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 5.881e-05/0.1327, allocations: 27.62 kB / 400.2 MB, free: 11.17 MB / 302.1 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 7.414e-05/0.1327, allocations: 35.28 kB / 400.2 MB, free: 11.13 MB / 302.1 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 5.681e-06/0.1327, allocations: 4 kB / 400.2 MB, free: 11.12 MB / 302.1 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 6.563e-06/0.1328, allocations: 0 / 400.2 MB, free: 11.12 MB / 302.1 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 8.346e-06/0.1328, allocations: 3.984 kB / 400.2 MB, free: 11.12 MB / 302.1 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0003138/0.1331, allocations: 313.3 kB / 400.6 MB, free: 10.77 MB / 302.1 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 2.715e-06/0.1331, allocations: 0 / 400.6 MB, free: 10.77 MB / 302.1 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 7.159e-05/0.1332, allocations: 12 kB / 400.6 MB, free: 10.75 MB / 302.1 MB Notification: Performance of postOpt tearingSystem (simulation): time 3.707e-06/0.1332, allocations: 3.938 kB / 400.6 MB, free: 10.75 MB / 302.1 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 2.441e-05/0.1332, allocations: 15.98 kB / 400.6 MB, free: 10.73 MB / 302.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 2.144e-06/0.1332, allocations: 0 / 400.6 MB, free: 10.73 MB / 302.1 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 1.112e-06/0.1332, allocations: 0 / 400.6 MB, free: 10.73 MB / 302.1 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.0005196/0.1338, allocations: 288.5 kB / 400.9 MB, free: 10.43 MB / 302.1 MB Notification: Performance of postOpt removeConstants (simulation): time 7.456e-05/0.1339, allocations: 112.7 kB / 401 MB, free: 10.3 MB / 302.1 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 5.308e-05/0.1339, allocations: 7.938 kB / 401 MB, free: 10.3 MB / 302.1 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0001445/0.1341, allocations: 23.98 kB / 401 MB, free: 10.27 MB / 302.1 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 6.55e-05/0.1341, allocations: 19.97 kB / 401 MB, free: 10.25 MB / 302.1 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 2.201e-05/0.1342, allocations: 4 kB / 401 MB, free: 10.25 MB / 302.1 MB Notification: Performance of sorting global known variables: time 0.0003116/0.1345, allocations: 279.2 kB / 401.3 MB, free: 9.98 MB / 302.1 MB Notification: Performance of sort global known variables: time 1.4e-07/0.1345, allocations: 0 / 401.3 MB, free: 9.98 MB / 302.1 MB Notification: Performance of remove unused functions: time 0.0003671/0.1349, allocations: 75.98 kB / 401.4 MB, free: 9.906 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.001739/0.1366, allocations: 1.176 MB / 402.6 MB, free: 8.809 MB / 302.1 MB Notification: Performance of simCode: created initialization part: time 0.0004784/0.1371, allocations: 195.7 kB / 402.7 MB, free: 8.621 MB / 302.1 MB Notification: Performance of simCode: created event and clocks part: time 5.501e-06/0.1371, allocations: 4.125 kB / 402.8 MB, free: 8.617 MB / 302.1 MB Notification: Performance of simCode: created simulation system equations: time 0.0001895/0.1373, allocations: 87.91 kB / 402.8 MB, free: 8.531 MB / 302.1 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0004591/0.1378, allocations: 88.56 kB / 402.9 MB, free: 8.441 MB / 302.1 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.004467/0.1423, allocations: 3.018 MB / 405.9 MB, free: 5.277 MB / 302.1 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0004076/0.1427, allocations: 0.7714 MB / 406.7 MB, free: 4.48 MB / 302.1 MB Notification: Performance of simCode: alias equations: time 0.00016/0.1429, allocations: 50.92 kB / 406.8 MB, free: 4.434 MB / 302.1 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0001564/0.143, allocations: 103.4 kB / 406.9 MB, free: 4.332 MB / 302.1 MB Notification: Performance of SimCode: time 2.4e-07/0.143, allocations: 0 / 406.9 MB, free: 4.332 MB / 302.1 MB Notification: Performance of buildModelFMU: Generate the FMI files: time 0.03325/0.1763, allocations: 7.736 MB / 414.6 MB, free: 12.59 MB / 318.1 MB Notification: Performance of buildModelFMU: Generate platform static: time 15.02/15.2, allocations: 448 / 414.6 MB, free: 12.59 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 & 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)