Running: ./testmodel.py --libraries=/var/lib/jenkins/ws/OpenModelicaLibraryTestingWork/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/OpenModelica/OMCompiler/build/lib/omlibrary/ModelicaServices 3.2.2/package.mo) Using package Complex with version 3.2.2 (/var/lib/jenkins/ws/OpenModelicaLibraryTestingWork/OpenModelica/OMCompiler/build/lib/omlibrary/Complex 3.2.2.mo) Using package Modelica with version 3.2.2 (/var/lib/jenkins/ws/OpenModelicaLibraryTestingWork/OpenModelica/OMCompiler/build/lib/omlibrary/Modelica 3.2.2/package.mo) Using package ModelicaTest with version 3.2.2 (/var/lib/jenkins/ws/OpenModelicaLibraryTestingWork/OpenModelica/OMCompiler/build/lib/omlibrary/ModelicaTest 3.2.2/package.mo) Running command: "" <> buildModelFMU(ModelicaTest.Blocks.Discrete,fileNamePrefix="ModelicaTest_3_2_2_cpp_ModelicaTest_Blocks_Discrete",fmuType="me",version="2.0",platforms={"static"}) Notification: Performance of loadModel(ModelicaTest): time 2.4/2.4, allocations: 234.9 MB / 250.5 MB, free: 9.539 MB / 202.7 MB Notification: Performance of FrontEnd - loaded program: time 0.0006108/0.0006111, allocations: 12 kB / 314.5 MB, free: 9.477 MB / 266.7 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.3823/0.383, allocations: 54.87 MB / 369.4 MB, free: 10.72 MB / 298.7 MB Notification: Performance of FrontEnd - scodeFlatten: time 0.2094/0.5924, allocations: 83.08 MB / 452.4 MB, free: 7.523 MB / 378.7 MB Notification: Performance of FrontEnd - mkProgramGraph: time 0.0003602/0.5929, allocations: 67.91 kB / 452.5 MB, free: 7.457 MB / 378.7 MB Notification: Performance of FrontEnd - DAE generated: time 0.02022/0.6131, allocations: 3.937 MB / 456.4 MB, free: 3.492 MB / 378.7 MB Notification: Performance of FrontEnd: time 2.595e-06/0.6132, allocations: 0 / 456.4 MB, free: 3.492 MB / 378.7 MB Notification: Performance of Transformations before backend: time 2.086e-05/0.6132, allocations: 4 kB / 456.4 MB, free: 3.488 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.001762/0.615, allocations: 0.5931 MB / 457 MB, free: 2.84 MB / 378.7 MB Notification: Performance of prepare preOptimizeDAE: time 5.457e-05/0.6151, allocations: 12.03 kB / 457 MB, free: 2.828 MB / 378.7 MB Notification: Performance of preOpt introduceOutputAliases (simulation): time 0.0001067/0.6152, allocations: 54.55 kB / 457.1 MB, free: 2.766 MB / 378.7 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0001007/0.6153, allocations: 35.61 kB / 457.1 MB, free: 2.73 MB / 378.7 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0004499/0.6158, allocations: 239.6 kB / 457.4 MB, free: 2.453 MB / 378.7 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 3.268e-05/0.6158, allocations: 12 kB / 457.4 MB, free: 2.441 MB / 378.7 MB Notification: Performance of preOpt expandDerOperator (simulation): time 6.781e-05/0.6159, allocations: 27.98 kB / 457.4 MB, free: 2.414 MB / 378.7 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0006912/0.6166, allocations: 221.5 kB / 457.6 MB, free: 2.191 MB / 378.7 MB Notification: Performance of preOpt findStateOrder (simulation): time 1.829e-05/0.6166, allocations: 11.91 kB / 457.6 MB, free: 2.18 MB / 378.7 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 4.119e-05/0.6167, allocations: 11.95 kB / 457.6 MB, free: 2.168 MB / 378.7 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 1.039e-05/0.6167, allocations: 8 kB / 457.7 MB, free: 2.16 MB / 378.7 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.00049/0.6172, allocations: 135.9 kB / 457.8 MB, free: 2.027 MB / 378.7 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.001627/0.6188, allocations: 0.5609 MB / 458.3 MB, free: 1.418 MB / 378.7 MB Notification: Performance of preOpt comSubExp (simulation): time 0.0008579/0.6198, allocations: 314.8 kB / 458.7 MB, free: 1.102 MB / 378.7 MB Notification: Performance of preOpt evalFunc (simulation): time 4.877e-05/0.6198, allocations: 8 kB / 458.7 MB, free: 1.094 MB / 378.7 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0006656/0.6205, allocations: 247.4 kB / 458.9 MB, free: 0.8398 MB / 378.7 MB Notification: Performance of pre-optimization done (n=43): time 3.868e-06/0.6205, allocations: 0 / 458.9 MB, free: 0.8398 MB / 378.7 MB Notification: Performance of matching and sorting (n=43): time 0.001811/0.6224, allocations: 0.5684 MB / 459.5 MB, free: 272 kB / 378.7 MB Notification: Performance of inlineWhenForInitialization (initialization): time 0.0001006/0.6225, allocations: 75.38 kB / 459.5 MB, free: 184 kB / 378.7 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0003604/0.6229, allocations: 186.9 kB / 459.7 MB, free: 15.98 MB / 394.7 MB Notification: Performance of collectPreVariables (initialization): time 7.558e-05/0.623, allocations: 45.64 kB / 459.8 MB, free: 15.94 MB / 394.7 MB Notification: Performance of collectInitialEqns (initialization): time 0.0001365/0.6231, allocations: 183.4 kB / 459.9 MB, free: 15.76 MB / 394.7 MB Notification: Performance of collectInitialBindings (initialization): time 0.000153/0.6233, allocations: 110.8 kB / 460.1 MB, free: 15.65 MB / 394.7 MB Notification: Performance of simplifyInitialFunctions (initialization): time 2.921e-05/0.6233, allocations: 12 kB / 460.1 MB, free: 15.64 MB / 394.7 MB Notification: Performance of setup shared object (initialization): time 0.0001961/0.6235, allocations: 330.8 kB / 460.4 MB, free: 15.3 MB / 394.7 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0003544/0.6239, allocations: 105.1 kB / 460.5 MB, free: 15.2 MB / 394.7 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0005096/0.6244, allocations: 285.4 kB / 460.8 MB, free: 14.84 MB / 394.7 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.0004454/0.6249, allocations: 151.8 kB / 460.9 MB, free: 14.69 MB / 394.7 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 9.237e-06/0.6249, allocations: 4 kB / 460.9 MB, free: 14.68 MB / 394.7 MB Notification: Performance of matching and sorting (n=66) (initialization): time 0.001146/0.6261, allocations: 441.3 kB / 461.4 MB, free: 14.25 MB / 394.7 MB Notification: Performance of prepare postOptimizeDAE: time 3.074e-05/0.6261, allocations: 8 kB / 461.4 MB, free: 14.24 MB / 394.7 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.579e-05/0.6261, allocations: 4 kB / 461.4 MB, free: 14.23 MB / 394.7 MB Notification: Performance of postOpt tearingSystem (initialization): time 3.418e-05/0.6262, allocations: 12 kB / 461.4 MB, free: 14.22 MB / 394.7 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.000375/0.6266, allocations: 59.84 kB / 461.4 MB, free: 14.16 MB / 394.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 2.247e-05/0.6266, allocations: 15.92 kB / 461.5 MB, free: 14.15 MB / 394.7 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0003295/0.627, allocations: 40.06 kB / 461.5 MB, free: 14.11 MB / 394.7 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 4.559e-05/0.627, allocations: 20 kB / 461.5 MB, free: 14.09 MB / 394.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 () * Number of clocked 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.0004477/0.6275, allocations: 201.6 kB / 461.7 MB, free: 13.88 MB / 394.7 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.0001011/0.6276, allocations: 35.61 kB / 461.7 MB, free: 13.85 MB / 394.7 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 9.701e-05/0.6277, allocations: 27 kB / 461.8 MB, free: 13.82 MB / 394.7 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 1.184e-05/0.6277, allocations: 7.938 kB / 461.8 MB, free: 13.81 MB / 394.7 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 8.706e-06/0.6277, allocations: 4 kB / 461.8 MB, free: 13.81 MB / 394.7 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 1.027e-05/0.6278, allocations: 7.984 kB / 461.8 MB, free: 13.8 MB / 394.7 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.002607/0.6304, allocations: 0.9361 MB / 462.7 MB, free: 12.81 MB / 394.7 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 8.426e-06/0.6304, allocations: 0 / 462.7 MB, free: 12.81 MB / 394.7 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0001433/0.6306, allocations: 15.88 kB / 462.7 MB, free: 12.79 MB / 394.7 MB Notification: Performance of postOpt tearingSystem (simulation): time 1.805e-05/0.6306, allocations: 11.97 kB / 462.8 MB, free: 12.78 MB / 394.7 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 5.209e-05/0.6307, allocations: 11.98 kB / 462.8 MB, free: 12.77 MB / 394.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 8.586e-06/0.6307, allocations: 4 kB / 462.8 MB, free: 12.77 MB / 394.7 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 4.979e-06/0.6307, allocations: 3.953 kB / 462.8 MB, free: 12.76 MB / 394.7 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.001417/0.6321, allocations: 0.5498 MB / 463.3 MB, free: 12.2 MB / 394.7 MB Notification: Performance of postOpt removeConstants (simulation): time 0.0001053/0.6323, allocations: 100.7 kB / 463.4 MB, free: 12.08 MB / 394.7 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 0.0001047/0.6324, allocations: 23.97 kB / 463.4 MB, free: 12.05 MB / 394.7 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0004155/0.6328, allocations: 35.97 kB / 463.5 MB, free: 12.02 MB / 394.7 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.000109/0.633, allocations: 27.97 kB / 463.5 MB, free: 11.99 MB / 394.7 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 5.304e-05/0.633, allocations: 19.94 kB / 463.5 MB, free: 11.97 MB / 394.7 MB Notification: Performance of sorting global known variables: time 0.0002406/0.6333, allocations: 149.5 kB / 463.7 MB, free: 11.83 MB / 394.7 MB Notification: Performance of sort global known variables: time 4.21e-07/0.6333, allocations: 0 / 463.7 MB, free: 11.83 MB / 394.7 MB Notification: Performance of remove unused functions: time 0.0006622/0.634, allocations: 75.92 kB / 463.7 MB, free: 11.75 MB / 394.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) * Number of clocked states: 0 () * 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.001848/0.6358, allocations: 1.123 MB / 464.9 MB, free: 10.61 MB / 394.7 MB Notification: Performance of simCode: created initialization part: time 0.001047/0.6369, allocations: 336.2 kB / 465.2 MB, free: 10.28 MB / 394.7 MB Notification: Performance of simCode: created event and clocks part: time 4.348e-06/0.637, allocations: 0 / 465.2 MB, free: 10.28 MB / 394.7 MB Notification: Performance of simCode: created simulation system equations: time 0.0005191/0.6375, allocations: 168.2 kB / 465.4 MB, free: 10.11 MB / 394.7 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0004934/0.638, allocations: 48.52 kB / 465.4 MB, free: 10.07 MB / 394.7 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.006058/0.6441, allocations: 5.607 MB / 471 MB, free: 4.289 MB / 394.7 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0004519/0.6446, allocations: 0.7692 MB / 471.8 MB, free: 3.488 MB / 394.7 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0002375/0.6449, allocations: 79.41 kB / 471.9 MB, free: 3.41 MB / 394.7 MB Notification: Performance of SimCode: time 1.293e-06/0.6449, allocations: 0 / 471.9 MB, free: 3.41 MB / 394.7 MB Notification: Performance of buildModelFMU: Generate C++ for platform static: time 3.179/3.823, allocations: 4.297 MB / 476.2 MB, free: 98.21 MB / 394.7 MB TODO: How the !@#!# did the simulation report success but simulation result ModelicaTest_3.2.2_cpp_ModelicaTest.Blocks.Discrete_res.mat does not exist to compare? outputFormat=mat