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.005031/0.005031, allocations: 101.6 kB / 15.73 MB, free: 6.031 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.001207/0.001207, allocations: 195 kB / 16.67 MB, free: 5.969 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.433/1.433, allocations: 205.1 MB / 222.5 MB, free: 4.402 MB / 174.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/IndustrialControlSystems 1.1.0-master/package.mo): time 0.05797/0.05797, allocations: 10.75 MB / 280.7 MB, free: 10.28 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.001479/0.001479, allocations: 63.91 kB / 390.3 MB, free: 5.52 MB / 286.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.3147/0.3162, allocations: 49.03 MB / 439.4 MB, free: 5.07 MB / 318.1 MB Notification: Performance of NFInst.instantiate(IndustrialControlSystems.Logical.Counter.Examples.countZeroCrossing): time 0.003688/0.3199, allocations: 2.147 MB / 441.5 MB, free: 3.574 MB / 318.1 MB Notification: Performance of NFInst.instExpressions: time 0.001931/0.3219, allocations: 1.242 MB / 442.7 MB, free: 2.723 MB / 318.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.0001449/0.322, allocations: 3.031 kB / 442.8 MB, free: 2.723 MB / 318.1 MB Notification: Performance of NFTyping.typeComponents: time 0.0008551/0.3229, allocations: 272.5 kB / 443 MB, free: 2.637 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.0004721/0.3234, allocations: 191.1 kB / 443.2 MB, free: 2.551 MB / 318.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.0008579/0.3243, allocations: 329.2 kB / 443.5 MB, free: 2.379 MB / 318.1 MB Notification: Performance of NFFlatten.flatten: time 0.0004261/0.3247, allocations: 381.7 kB / 443.9 MB, free: 2.211 MB / 318.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0001571/0.3249, allocations: 78.7 kB / 444 MB, free: 2.172 MB / 318.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0002454/0.3251, allocations: 159.6 kB / 444.1 MB, free: 2.102 MB / 318.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0001816/0.3253, allocations: 154.4 kB / 444.3 MB, free: 2.031 MB / 318.1 MB Notification: Performance of NFPackage.collectConstants: time 4.407e-05/0.3254, allocations: 20.28 kB / 444.3 MB, free: 2.031 MB / 318.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.000262/0.3256, allocations: 129.6 kB / 444.4 MB, free: 2 MB / 318.1 MB Notification: Performance of NFScalarize.scalarize: time 0.0001098/0.3257, allocations: 78.19 kB / 444.5 MB, free: 1.961 MB / 318.1 MB Notification: Performance of NFVerifyModel.verify: time 0.0001569/0.3259, allocations: 132.1 kB / 444.6 MB, free: 1.867 MB / 318.1 MB Notification: Performance of NFConvertDAE.convert: time 0.0005549/0.3265, allocations: 401.3 kB / 445 MB, free: 1.699 MB / 318.1 MB Notification: Performance of FrontEnd - DAE generated: time 5.069e-06/0.3265, allocations: 4.797 kB / 445 MB, free: 1.695 MB / 318.1 MB Notification: Performance of FrontEnd: time 1.282e-06/0.3265, allocations: 4 kB / 445 MB, free: 1.691 MB / 318.1 MB Notification: Performance of Transformations before backend: time 1.029e-05/0.3265, allocations: 0 / 445 MB, free: 1.691 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.001046/0.3276, allocations: 0.6754 MB / 445.7 MB, free: 1.105 MB / 318.1 MB Notification: Performance of prepare preOptimizeDAE: time 4.664e-05/0.3276, allocations: 13.52 kB / 445.7 MB, free: 1.102 MB / 318.1 MB Notification: Performance of preOpt introduceOutputAliases (simulation): time 4.687e-05/0.3277, allocations: 48.17 kB / 445.8 MB, free: 1.055 MB / 318.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 7.937e-05/0.3277, allocations: 37.27 kB / 445.8 MB, free: 1.035 MB / 318.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0003754/0.3281, allocations: 330 kB / 446.1 MB, free: 0.7539 MB / 318.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 2.166e-05/0.3282, allocations: 14.67 kB / 446.1 MB, free: 0.7461 MB / 318.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 3.195e-05/0.3282, allocations: 15.34 kB / 446.2 MB, free: 0.7422 MB / 318.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0003819/0.3286, allocations: 191.4 kB / 446.3 MB, free: 0.6406 MB / 318.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 1.104e-05/0.3286, allocations: 0 / 446.3 MB, free: 0.6406 MB / 318.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 2.461e-05/0.3286, allocations: 7.484 kB / 446.4 MB, free: 0.6367 MB / 318.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 9.358e-06/0.3287, allocations: 3.156 kB / 446.4 MB, free: 0.6367 MB / 318.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0002428/0.3289, allocations: 95.33 kB / 446.4 MB, free: 0.6055 MB / 318.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.0007542/0.3297, allocations: 0.5251 MB / 447 MB, free: 232 kB / 318.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.0004923/0.3302, allocations: 177.2 kB / 447.1 MB, free: 148 kB / 318.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0001567/0.3303, allocations: 66.94 kB / 447.2 MB, free: 120 kB / 318.1 MB Notification: Performance of preOpt evalFunc (simulation): time 2.895e-05/0.3304, allocations: 2.969 kB / 447.2 MB, free: 120 kB / 318.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0003333/0.3307, allocations: 183.4 kB / 447.4 MB, free: 8 kB / 318.1 MB Notification: Performance of pre-optimization done (n=21): time 1.593e-06/0.3307, allocations: 0.9375 kB / 447.4 MB, free: 8 kB / 318.1 MB Notification: Performance of matching and sorting (n=21): time 0.000755/0.3315, allocations: 312.2 kB / 447.7 MB, free: 15.88 MB / 334.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 8.431e-05/0.3316, allocations: 137 kB / 447.8 MB, free: 15.72 MB / 334.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0004377/0.332, allocations: 388.2 kB / 448.2 MB, free: 15.48 MB / 334.1 MB Notification: Performance of collectPreVariables (initialization): time 3.067e-05/0.3321, allocations: 33.45 kB / 448.2 MB, free: 15.45 MB / 334.1 MB Notification: Performance of collectInitialEqns (initialization): time 0.0001273/0.3322, allocations: 167.4 kB / 448.4 MB, free: 15.29 MB / 334.1 MB Notification: Performance of collectInitialBindings (initialization): time 5.532e-05/0.3323, allocations: 56.02 kB / 448.5 MB, free: 15.25 MB / 334.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 7.901e-05/0.3324, allocations: 58.31 kB / 448.5 MB, free: 15.21 MB / 334.1 MB Notification: Performance of setup shared object (initialization): time 0.0001439/0.3325, allocations: 343.3 kB / 448.9 MB, free: 14.87 MB / 334.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0001442/0.3327, allocations: 52.03 kB / 448.9 MB, free: 14.85 MB / 334.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0002326/0.3329, allocations: 175.8 kB / 449.1 MB, free: 14.66 MB / 334.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.0004034/0.3333, allocations: 263 kB / 449.3 MB, free: 14.46 MB / 334.1 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 3.246e-06/0.3333, allocations: 0 / 449.3 MB, free: 14.46 MB / 334.1 MB Notification: Performance of matching and sorting (n=31) (initialization): time 0.00052/0.3338, allocations: 266.7 kB / 449.6 MB, free: 14.31 MB / 334.1 MB Notification: Performance of prepare postOptimizeDAE: time 1.665e-05/0.3339, allocations: 7.469 kB / 449.6 MB, free: 14.31 MB / 334.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 7.734e-06/0.3339, allocations: 2.25 kB / 449.6 MB, free: 14.31 MB / 334.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 1.735e-05/0.3339, allocations: 4.844 kB / 449.6 MB, free: 14.31 MB / 334.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0001518/0.3341, allocations: 45.53 kB / 449.7 MB, free: 14.29 MB / 334.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.093e-05/0.3341, allocations: 4.719 kB / 449.7 MB, free: 14.29 MB / 334.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0001707/0.3343, allocations: 31.58 kB / 449.7 MB, free: 14.27 MB / 334.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 2.127e-05/0.3343, allocations: 13.28 kB / 449.7 MB, free: 14.27 MB / 334.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.0002342/0.3345, allocations: 184.9 kB / 449.9 MB, free: 14.11 MB / 334.1 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 5.5e-05/0.3346, allocations: 37.06 kB / 449.9 MB, free: 14.09 MB / 334.1 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 6.714e-05/0.3347, allocations: 33.09 kB / 450 MB, free: 14.07 MB / 334.1 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 3.236e-06/0.3347, allocations: 1.875 kB / 450 MB, free: 14.07 MB / 334.1 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 5.28e-06/0.3347, allocations: 0 / 450 MB, free: 14.07 MB / 334.1 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 4.268e-06/0.3347, allocations: 1.875 kB / 450 MB, free: 14.07 MB / 334.1 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0003173/0.335, allocations: 321.4 kB / 450.3 MB, free: 13.76 MB / 334.1 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 1.603e-06/0.335, allocations: 0 / 450.3 MB, free: 13.76 MB / 334.1 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 7.463e-05/0.3351, allocations: 14.42 kB / 450.3 MB, free: 13.76 MB / 334.1 MB Notification: Performance of postOpt tearingSystem (simulation): time 2.545e-06/0.3351, allocations: 4 kB / 450.3 MB, free: 13.75 MB / 334.1 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 1.592e-05/0.3351, allocations: 3.062 kB / 450.3 MB, free: 13.75 MB / 334.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 2.364e-06/0.3352, allocations: 1.688 kB / 450.3 MB, free: 13.75 MB / 334.1 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 1.182e-06/0.3352, allocations: 0 / 450.3 MB, free: 13.75 MB / 334.1 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.0005106/0.3357, allocations: 294.2 kB / 450.6 MB, free: 13.58 MB / 334.1 MB Notification: Performance of postOpt removeConstants (simulation): time 7.934e-05/0.3358, allocations: 117.5 kB / 450.7 MB, free: 13.45 MB / 334.1 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 5.517e-05/0.3358, allocations: 15.98 kB / 450.7 MB, free: 13.44 MB / 334.1 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0001423/0.336, allocations: 15.89 kB / 450.7 MB, free: 13.43 MB / 334.1 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 6.85e-05/0.3361, allocations: 16.95 kB / 450.7 MB, free: 13.43 MB / 334.1 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 2.485e-05/0.3361, allocations: 14.2 kB / 450.8 MB, free: 13.42 MB / 334.1 MB Notification: Performance of sorting global known variables: time 0.0002659/0.3364, allocations: 270.5 kB / 451 MB, free: 13.25 MB / 334.1 MB Notification: Performance of sort global known variables: time 1.31e-07/0.3364, allocations: 0 / 451 MB, free: 13.25 MB / 334.1 MB Notification: Performance of remove unused functions: time 0.0004096/0.3368, allocations: 79.11 kB / 451.1 MB, free: 13.23 MB / 334.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.001763/0.3386, allocations: 1.155 MB / 452.3 MB, free: 12.34 MB / 334.1 MB Notification: Performance of simCode: created initialization part: time 0.0004739/0.339, allocations: 179.2 kB / 452.4 MB, free: 12.27 MB / 334.1 MB Notification: Performance of simCode: created event and clocks part: time 3.116e-06/0.3391, allocations: 8.062 kB / 452.4 MB, free: 12.26 MB / 334.1 MB Notification: Performance of simCode: created simulation system equations: time 0.0002158/0.3393, allocations: 94.47 kB / 452.5 MB, free: 12.22 MB / 334.1 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.000476/0.3398, allocations: 82.62 kB / 452.6 MB, free: 12.18 MB / 334.1 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.004134/0.3439, allocations: 2.978 MB / 455.6 MB, free: 9.996 MB / 334.1 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0003328/0.3443, allocations: 0.7726 MB / 456.4 MB, free: 9.258 MB / 334.1 MB Notification: Performance of simCode: alias equations: time 0.0001559/0.3444, allocations: 52.41 kB / 456.4 MB, free: 9.23 MB / 334.1 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0001564/0.3446, allocations: 103.5 kB / 456.5 MB, free: 9.152 MB / 334.1 MB Notification: Performance of SimCode: time 5.71e-07/0.3446, allocations: 0 / 456.5 MB, free: 9.152 MB / 334.1 MB Notification: Performance of buildModelFMU: Generate the FMI files: time 0.02576/0.3704, allocations: 7.997 MB / 464.5 MB, free: 3.406 MB / 334.1 MB Notification: Performance of buildModelFMU: Generate platform static: time 8.477/8.847, allocations: 8.062 kB / 464.5 MB, free: 3.398 MB / 334.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)