Running: ./testmodel.py --libraries=/var/lib/jenkins/ws/OpenModelicaLibraryTestingWork@2/OpenModelica/../OMCompiler/build/lib/omlibrary/ --ompython_omhome=/usr ModelicaTest_3.2.2_cpp_ModelicaTest.Blocks.Discrete.conf.json Using package ModelicaServices with version 3.2.2 (/var/lib/jenkins/ws/OpenModelicaLibraryTestingWork@2/OMCompiler/build/lib/omlibrary/ModelicaServices 3.2.2/package.mo) Using package Complex with version 3.2.2 (/var/lib/jenkins/ws/OpenModelicaLibraryTestingWork@2/OMCompiler/build/lib/omlibrary/Complex 3.2.2.mo) Using package Modelica with version 3.2.2 (/var/lib/jenkins/ws/OpenModelicaLibraryTestingWork@2/OMCompiler/build/lib/omlibrary/Modelica 3.2.2/package.mo) Using package ModelicaTest with version 3.2.2 (/var/lib/jenkins/ws/OpenModelicaLibraryTestingWork@2/OMCompiler/build/lib/omlibrary/ModelicaTest 3.2.2/package.mo) Running command: translateModel(ModelicaTest.Blocks.Discrete,tolerance=1e-06,outputFormat="mat",numberOfIntervals=5000,variableFilter="time|firstOrderHold.c|firstOrderHold.firstTrigger|firstOrderHold.pre_uSample|firstOrderHold.tSample|firstOrderHold.uSample|sampler.firstTrigger|sampler.y|stateSpace.firstTrigger|stateSpace.x.1.|stateSpace.x.2.|stateSpace.y.1.|transferFunction.firstTrigger|transferFunction.x.1.|transferFunction.x1|transferFunction.xext.1.|transferFunction.xext.2.|transferFunction.y|triggeredMax.y|triggeredSampler.y|unitDelay.firstTrigger|unitDelay.u|unitDelay.y|zeroOrderHold.firstTrigger|zeroOrderHold.ySample",fileNamePrefix="ModelicaTest_3.2.2_cpp_ModelicaTest.Blocks.Discrete") Notification: Performance of loadModel(ModelicaTest): time 2.253/2.253, allocations: 235.1 MB / 243 MB, free: 9.504 MB / 202.7 MB Notification: Performance of FrontEnd - loaded program: time 2.243e-05/2.25e-05, allocations: 4 kB / 303.2 MB, free: 13.21 MB / 266.7 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.2686/0.2686, allocations: 54.86 MB / 358 MB, free: 14.96 MB / 298.7 MB Notification: Performance of FrontEnd - scodeFlatten: time 0.1232/0.3919, allocations: 82.32 MB / 440.4 MB, free: 12.52 MB / 378.7 MB Notification: Performance of FrontEnd - mkProgramGraph: time 0.0002056/0.3921, allocations: 63.91 kB / 440.4 MB, free: 12.45 MB / 378.7 MB Notification: Performance of FrontEnd - DAE generated: time 0.017/0.4092, allocations: 3.894 MB / 444.3 MB, free: 8.535 MB / 378.7 MB Notification: Performance of FrontEnd: time 2.56e-06/0.4092, allocations: 0 / 444.3 MB, free: 8.535 MB / 378.7 MB Notification: Performance of Transformations before backend: time 1.875e-05/0.4092, allocations: 4 kB / 444.3 MB, free: 8.531 MB / 378.7 MB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 44 * Number of variables: 44 Notification: Performance of Generate backend data structure: time 0.00122/0.4105, allocations: 0.5707 MB / 444.9 MB, free: 7.91 MB / 378.7 MB Notification: Performance of prepare preOptimizeDAE: time 3.975e-05/0.4105, allocations: 8.031 kB / 444.9 MB, free: 7.902 MB / 378.7 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 8.818e-05/0.4106, allocations: 27.72 kB / 444.9 MB, free: 7.875 MB / 378.7 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0003748/0.411, allocations: 247.6 kB / 445.2 MB, free: 7.59 MB / 378.7 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 2.642e-05/0.4111, allocations: 4 kB / 445.2 MB, free: 7.586 MB / 378.7 MB Notification: Performance of preOpt expandDerOperator (simulation): time 5.719e-05/0.4111, allocations: 19.98 kB / 445.2 MB, free: 7.566 MB / 378.7 MB Notification: Performance of preOpt removeEqualFunctionCalls (simulation): time 0.0003369/0.4115, allocations: 112 kB / 445.3 MB, free: 7.457 MB / 378.7 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0004645/0.412, allocations: 205.4 kB / 445.5 MB, free: 7.25 MB / 378.7 MB Notification: Performance of preOpt findStateOrder (simulation): time 1.218e-05/0.412, allocations: 0 / 445.5 MB, free: 7.25 MB / 378.7 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 3.487e-05/0.412, allocations: 7.953 kB / 445.5 MB, free: 7.242 MB / 378.7 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 8.722e-06/0.412, allocations: 4 kB / 445.5 MB, free: 7.238 MB / 378.7 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.001284/0.4133, allocations: 0.528 MB / 446 MB, free: 6.672 MB / 378.7 MB Notification: Performance of preOpt comSubExp (simulation): time 0.000591/0.414, allocations: 283 kB / 446.3 MB, free: 6.387 MB / 378.7 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0002503/0.4142, allocations: 108.8 kB / 446.4 MB, free: 6.277 MB / 378.7 MB Notification: Performance of preOpt evalFunc (simulation): time 4.855e-05/0.4143, allocations: 11.98 kB / 446.4 MB, free: 6.266 MB / 378.7 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.000472/0.4148, allocations: 211.2 kB / 446.6 MB, free: 6.047 MB / 378.7 MB Notification: Performance of pre-optimization done (n=43): time 3.733e-06/0.4148, allocations: 4 kB / 446.6 MB, free: 6.043 MB / 378.7 MB Notification: Performance of matching and sorting (n=43): time 0.0009754/0.4158, allocations: 417.5 kB / 447 MB, free: 5.629 MB / 378.7 MB Notification: Performance of inlineWhenForInitialization (initialization): time 7.622e-05/0.4159, allocations: 75.38 kB / 447.1 MB, free: 5.543 MB / 378.7 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0002431/0.4161, allocations: 183 kB / 447.3 MB, free: 5.359 MB / 378.7 MB Notification: Performance of collectPreVariables (initialization): time 5.728e-05/0.4162, allocations: 37.69 kB / 447.3 MB, free: 5.316 MB / 378.7 MB Notification: Performance of collectInitialEqns (initialization): time 0.0001276/0.4163, allocations: 183.7 kB / 447.5 MB, free: 5.133 MB / 378.7 MB Notification: Performance of collectInitialBindings (initialization): time 0.0001189/0.4165, allocations: 94.86 kB / 447.6 MB, free: 5.039 MB / 378.7 MB Notification: Performance of simplifyInitialFunctions (initialization): time 2.172e-05/0.4165, allocations: 0 / 447.6 MB, free: 5.039 MB / 378.7 MB Notification: Performance of setup shared object (initialization): time 0.0001777/0.4167, allocations: 342.8 kB / 447.9 MB, free: 4.695 MB / 378.7 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.000239/0.4169, allocations: 85.05 kB / 448 MB, free: 4.613 MB / 378.7 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0003759/0.4173, allocations: 258.4 kB / 448.3 MB, free: 4.281 MB / 378.7 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.0003031/0.4177, allocations: 127.8 kB / 448.4 MB, free: 4.156 MB / 378.7 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 5.929e-06/0.4177, allocations: 0 / 448.4 MB, free: 4.156 MB / 378.7 MB Notification: Performance of matching and sorting (n=66) (initialization): time 0.0008351/0.4185, allocations: 360.9 kB / 448.8 MB, free: 3.797 MB / 378.7 MB Notification: Performance of prepare postOptimizeDAE: time 2.515e-05/0.4186, allocations: 11.98 kB / 448.8 MB, free: 3.785 MB / 378.7 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.316e-05/0.4186, allocations: 4 kB / 448.8 MB, free: 3.781 MB / 378.7 MB Notification: Performance of postOpt tearingSystem (initialization): time 3.272e-05/0.4186, allocations: 12.75 kB / 448.8 MB, free: 3.77 MB / 378.7 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0002884/0.4189, allocations: 63.84 kB / 448.8 MB, free: 3.707 MB / 378.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.746e-05/0.419, allocations: 15.94 kB / 448.9 MB, free: 3.691 MB / 378.7 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0002765/0.4193, allocations: 39.67 kB / 448.9 MB, free: 3.652 MB / 378.7 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 4.534e-05/0.4193, allocations: 24 kB / 448.9 MB, free: 3.629 MB / 378.7 MB Notification: Model statistics after passing the back-end for initialization: * Number of independent subsystems: 27 * Number of states: 0 () * Number of discrete variables: 62 ($PRE.triggeredMax.y,triggeredMax.y,$PRE.triggeredSampler.y,triggeredSampler.y,$PRE.stateSpace.firstTrigger,stateSpace.firstTrigger,$PRE.stateSpace.x[1],stateSpace.x[1],$PRE.stateSpace.x[2],stateSpace.x[2],$PRE.stateSpace.y[1],stateSpace.y[1],$PRE.transferFunction.firstTrigger,transferFunction.firstTrigger,$PRE.transferFunction.x1,transferFunction.x1,$PRE.transferFunction.xext[1],transferFunction.xext[1],$PRE.transferFunction.xext[2],transferFunction.xext[2],$PRE.transferFunction.x[1],transferFunction.x[1],$PRE.transferFunction.y,transferFunction.y,$PRE.unitDelay.firstTrigger,unitDelay.firstTrigger,$PRE.unitDelay.y,unitDelay.y,$PRE.firstOrderHold.firstTrigger,firstOrderHold.firstTrigger,$PRE.zeroOrderHold.firstTrigger,zeroOrderHold.firstTrigger,$PRE.sampler.firstTrigger,sampler.firstTrigger,$whenCondition8,$whenCondition1,sampler.sampleTrigger,$PRE.zeroOrderHold.ySample,$whenCondition2,zeroOrderHold.sampleTrigger,$whenCondition3,firstOrderHold.sampleTrigger,$whenCondition4,unitDelay.sampleTrigger,$whenCondition5,transferFunction.sampleTrigger,$whenCondition6,stateSpace.sampleTrigger,$whenCondition7,booleanPulse.y,$PRE.booleanPulse.pulsStart,booleanPulse.pulsStart,sampler.y,zeroOrderHold.ySample,$PRE.firstOrderHold.tSample,firstOrderHold.tSample,$PRE.firstOrderHold.uSample,firstOrderHold.uSample,$PRE.firstOrderHold.pre_uSample,firstOrderHold.pre_uSample,$PRE.firstOrderHold.c,firstOrderHold.c) * Number of discrete states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for initialization (66): * Single equations (assignments): 66 * Array equations: 0 * Algorithm blocks: 0 * Record equations: 0 * When equations: 0 * If-equations: 0 * Equation systems (linear and non-linear blocks): 0 * Torn equation systems: 0 * Mixed (continuous/discrete) equation systems: 0 Notification: Performance of prepare postOptimizeDAE: time 0.0002211/0.4195, allocations: 152.8 kB / 449.1 MB, free: 3.473 MB / 378.7 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 7.244e-05/0.4196, allocations: 27.67 kB / 449.1 MB, free: 3.445 MB / 378.7 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 7.619e-05/0.4197, allocations: 35.39 kB / 449.1 MB, free: 3.414 MB / 378.7 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 1.036e-05/0.4197, allocations: 4 kB / 449.1 MB, free: 3.41 MB / 378.7 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 6.14e-06/0.4198, allocations: 3.938 kB / 449.1 MB, free: 3.406 MB / 378.7 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 6.042e-06/0.4198, allocations: 0 / 449.1 MB, free: 3.406 MB / 378.7 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.00185/0.4216, allocations: 0.8622 MB / 450 MB, free: 2.5 MB / 378.7 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 4.84e-06/0.4217, allocations: 0 / 450 MB, free: 2.5 MB / 378.7 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0001096/0.4218, allocations: 15.94 kB / 450 MB, free: 2.484 MB / 378.7 MB Notification: Performance of postOpt tearingSystem (simulation): time 9.366e-06/0.4218, allocations: 3.984 kB / 450 MB, free: 2.48 MB / 378.7 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 4.141e-05/0.4219, allocations: 11.98 kB / 450 MB, free: 2.469 MB / 378.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 3.657e-06/0.4219, allocations: 0 / 450 MB, free: 2.469 MB / 378.7 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 5.389e-06/0.4219, allocations: 4 kB / 450 MB, free: 2.465 MB / 378.7 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.0009668/0.4229, allocations: 0.5149 MB / 450.6 MB, free: 1.934 MB / 378.7 MB Notification: Performance of postOpt removeConstants (simulation): time 9.93e-05/0.423, allocations: 104.8 kB / 450.7 MB, free: 1.812 MB / 378.7 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 8.159e-05/0.4231, allocations: 19.92 kB / 450.7 MB, free: 1.793 MB / 378.7 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0003426/0.4234, allocations: 23.97 kB / 450.7 MB, free: 1.77 MB / 378.7 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 8.939e-05/0.4235, allocations: 35.95 kB / 450.7 MB, free: 1.734 MB / 378.7 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 4.595e-05/0.4236, allocations: 15.98 kB / 450.8 MB, free: 1.719 MB / 378.7 MB Notification: Performance of sorting global known variables: time 0.0001748/0.4238, allocations: 141.5 kB / 450.9 MB, free: 1.582 MB / 378.7 MB Notification: Performance of sort global known variables: time 8.12e-07/0.4238, allocations: 0 / 450.9 MB, free: 1.582 MB / 378.7 MB Notification: Performance of remove unused functions: time 0.0005656/0.4244, allocations: 63.89 kB / 451 MB, free: 1.52 MB / 378.7 MB Notification: Model statistics after passing the back-end for simulation: * Number of independent subsystems: 1 * Number of states: 0 () * Number of discrete variables: 39 (booleanPulse.y,stateSpace.sampleTrigger,transferFunction.sampleTrigger,unitDelay.sampleTrigger,firstOrderHold.sampleTrigger,zeroOrderHold.sampleTrigger,sampler.sampleTrigger,$whenCondition8,$whenCondition7,$whenCondition6,$whenCondition5,$whenCondition4,$whenCondition3,$whenCondition2,$whenCondition1,sampler.firstTrigger,sampler.y,zeroOrderHold.firstTrigger,zeroOrderHold.ySample,firstOrderHold.firstTrigger,firstOrderHold.tSample,firstOrderHold.uSample,firstOrderHold.pre_uSample,firstOrderHold.c,unitDelay.firstTrigger,unitDelay.y,transferFunction.firstTrigger,transferFunction.y,transferFunction.x[1],transferFunction.x1,transferFunction.xext[1],transferFunction.xext[2],stateSpace.firstTrigger,stateSpace.y[1],stateSpace.x[1],stateSpace.x[2],triggeredSampler.y,booleanPulse.pulsStart,triggeredMax.y) * Number of discrete states: 8 (zeroOrderHold.ySample,triggeredMax.y,stateSpace.x[1],stateSpace.x[2],transferFunction.x[1],unitDelay.u,firstOrderHold.uSample,firstOrderHold.c) * Top-level inputs: 0 Notification: Strong component statistics for simulation (43): * Single equations (assignments): 19 * Array equations: 0 * Algorithm blocks: 0 * Record equations: 0 * When equations: 24 * If-equations: 0 * Equation systems (linear and non-linear blocks): 0 * Torn equation systems: 0 * Mixed (continuous/discrete) equation systems: 0 Notification: Performance of Backend phase and start with SimCode phase: time 0.0002054/0.4246, allocations: 130.5 kB / 451.1 MB, free: 1.379 MB / 378.7 MB Notification: Performance of simCode: created initialization part: time 0.0006494/0.4253, allocations: 287.8 kB / 451.4 MB, free: 1.098 MB / 378.7 MB Notification: Performance of simCode: created event and clocks part: time 8.22e-06/0.4253, allocations: 4 kB / 451.4 MB, free: 1.094 MB / 378.7 MB Notification: Performance of simCode: created simulation system equations: time 0.0003226/0.4256, allocations: 151.8 kB / 451.5 MB, free: 0.9453 MB / 378.7 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0003766/0.426, allocations: 47.06 kB / 451.6 MB, free: 0.9023 MB / 378.7 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.001243/0.4273, allocations: 408.1 kB / 452 MB, free: 492 kB / 378.7 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.000497/0.4278, allocations: 0.7689 MB / 452.7 MB, free: 15.68 MB / 394.7 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 9.305e-05/0.4279, allocations: 27.44 kB / 452.8 MB, free: 15.66 MB / 394.7 MB Notification: Performance of SimCode: time 1.7e-06/0.4279, allocations: 4 kB / 452.8 MB, free: 15.65 MB / 394.7 MB Notification: Performance of Templates: time 0.007142/0.4351, allocations: 3.327 MB / 456.1 MB, free: 12.33 MB / 394.7 MB "Error: Could not read variable _derdummy in file ModelicaTest_3.2.2_cpp_ModelicaTest.Blocks.Discrete_res.mat. Warning: Get data of variable _derdummy from file ModelicaTest_3.2.2_cpp_ModelicaTest.Blocks.Discrete_res.mat failed! Error: Could not read variable _dummy in file ModelicaTest_3.2.2_cpp_ModelicaTest.Blocks.Discrete_res.mat. Warning: Get data of variable _dummy from file ModelicaTest_3.2.2_cpp_ModelicaTest.Blocks.Discrete_res.mat failed! " Variables in the reference:time,firstOrderHold.c,firstOrderHold.firstTrigger,firstOrderHold.pre_uSample,firstOrderHold.tSample,firstOrderHold.uSample,sampler.firstTrigger,sampler.y,stateSpace.firstTrigger,stateSpace.x[1],stateSpace.x[2],stateSpace.y[1],transferFunction.firstTrigger,transferFunction.x[1],transferFunction.x1,transferFunction.xext[1],transferFunction.xext[2],transferFunction.y,triggeredMax.y,triggeredSampler.y,unitDelay.firstTrigger,unitDelay.u,unitDelay.y,zeroOrderHold.firstTrigger,zeroOrderHold.ySample Variables in the result:_D_whenCondition1,_D_whenCondition2,_D_whenCondition3,_D_whenCondition4,_D_whenCondition5,_D_whenCondition6,_D_whenCondition7,_D_whenCondition8,booleanPulse.Twidth,booleanPulse.period,booleanPulse.pulsStart,booleanPulse.startTime,booleanPulse.width,booleanPulse.y,firstOrderHold.c,firstOrderHold.firstTrigger,firstOrderHold.pre_uSample,firstOrderHold.samplePeriod,firstOrderHold.sampleTrigger,firstOrderHold.startTime,firstOrderHold.tSample,firstOrderHold.u,firstOrderHold.uSample,firstOrderHold.y,samplePeriod,sampler.firstTrigger,sampler.samplePeriod,sampler.sampleTrigger,sampler.startTime,sampler.u,sampler.y,sine.amplitude,sine.freqHz,sine.offset,sine.phase,sine.startTime,sine.y,stateSpace.A[1,1],stateSpace.A[1,2],stateSpace.A[2,1],stateSpace.A[2,2],stateSpace.B[1,1],stateSpace.B[2,1],stateSpace.C[1,1],stateSpace.C[1,2],stateSpace.D[1,1],stateSpace.firstTrigger,stateSpace.nin,stateSpace.nout,stateSpace.samplePeriod,stateSpace.sampleTrigger,stateSpace.startTime,stateSpace.u[1],stateSpace.x[1],stateSpace.x[2],stateSpace.y[1],time,transferFunction.a[1],transferFunction.a[2],transferFunction.b[1],transferFunction.firstTrigger,transferFunction.na,transferFunction.nb,transferFunction.samplePeriod,transferFunction.sampleTrigger,transferFunction.startTime,transferFunction.u,transferFunction.x1,transferFunction.x[1],transferFunction.xext[1],transferFunction.xext[2],transferFunction.y,triggeredMax.trigger,triggeredMax.u,triggeredMax.y,triggeredSampler.trigger,triggeredSampler.u,triggeredSampler.y,triggeredSampler.y_start,unitDelay.firstTrigger,unitDelay.samplePeriod,unitDelay.sampleTrigger,unitDelay.startTime,unitDelay.u,unitDelay.y,unitDelay.y_start,zeroOrderHold.firstTrigger,zeroOrderHold.samplePeriod,zeroOrderHold.sampleTrigger,zeroOrderHold.startTime,zeroOrderHold.u,zeroOrderHold.y,zeroOrderHold.ySample