Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries/ --ompython_omhome=/usr Modelica_trunk_Modelica.Mechanics.MultiBody.Examples.Rotational3DEffects.GyroscopicEffects.conf.json loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices trunk/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex trunk/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica trunk/package.mo", uses=false) Using package Modelica with version trunk (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica trunk/package.mo) Using package Complex with version trunk (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex trunk/package.mo) Using package ModelicaServices with version trunk (/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices trunk/package.mo) Running command: "" <> buildModelFMU(Modelica.Mechanics.MultiBody.Examples.Rotational3DEffects.GyroscopicEffects,fileNamePrefix="Modelica_trunk_Modelica_Mechanics_MultiBody_Examples_Rotational3DEffects_GyroscopicEffects",fmuType="me",version="2.0",platforms={"static"}) "" <> buildModelFMU(Modelica.Mechanics.MultiBody.Examples.Rotational3DEffects.GyroscopicEffects,fileNamePrefix="Modelica_trunk_Modelica_Mechanics_MultiBody_Examples_Rotational3DEffects_GyroscopicEffects",fmuType="me",version="2.0",platforms={"static"}) Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices trunk/package.mo): time 0.00145/0.00145, allocations: 101.1 kB / 16.99 MB, free: 5.938 MB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex trunk/package.mo): time 0.001735/0.001735, allocations: 204.4 kB / 17.89 MB, free: 5.586 MB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica trunk/package.mo): time 1.373/1.373, allocations: 227.3 MB / 245.9 MB, free: 10.32 MB / 206.1 MB Notification: Performance of FrontEnd - loaded program: time 0.0002374/0.0002374, allocations: 4 kB / 306.7 MB, free: 1.277 MB / 238.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.1198/0.1201, allocations: 51.49 MB / 358.2 MB, free: 13.78 MB / 302.1 MB Notification: Performance of NFInst.instantiate(Modelica.Mechanics.MultiBody.Examples.Rotational3DEffects.GyroscopicEffects): time 0.294/0.4141, allocations: 80.89 MB / 439.1 MB, free: 10.46 MB / 350.1 MB Notification: Performance of NFInst.instExpressions: time 0.0495/0.4637, allocations: 18.56 MB / 457.7 MB, free: 7.852 MB / 366.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.02029/0.484, allocations: 426.9 kB / 458.1 MB, free: 7.434 MB / 366.1 MB Notification: Performance of NFTyping.typeComponents: time 0.01525/0.4993, allocations: 4.086 MB / 462.2 MB, free: 3.328 MB / 366.1 MB Notification: Performance of NFTyping.typeBindings: time 0.04304/0.5424, allocations: 11.71 MB / 473.9 MB, free: 7.59 MB / 382.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.006415/0.5488, allocations: 1.26 MB / 475.1 MB, free: 6.328 MB / 382.1 MB Notification: Performance of NFFlatten.flatten: time 0.402/0.9508, allocations: 96.43 MB / 0.5582 GB, free: 70.98 MB / 446.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.01137/0.9622, allocations: 7.758 MB / 0.5657 GB, free: 69.07 MB / 446.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.005261/0.9676, allocations: 2.061 MB / 0.5678 GB, free: 67.73 MB / 446.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.005095/0.9727, allocations: 2.652 MB / 0.5703 GB, free: 65.86 MB / 446.1 MB Notification: Performance of NFPackage.collectConstants: time 0.00143/0.9741, allocations: 240 kB / 0.5706 GB, free: 65.63 MB / 446.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.003807/0.978, allocations: 1.338 MB / 0.5719 GB, free: 64.54 MB / 446.1 MB Notification: Performance of NFScalarize.scalarize: time 0.003402/0.9814, allocations: 3.081 MB / 0.5749 GB, free: 62.29 MB / 446.1 MB Notification: Performance of NFVerifyModel.verify: time 0.002421/0.9838, allocations: 1.455 MB / 0.5763 GB, free: 61.77 MB / 446.1 MB Notification: Performance of NFConvertDAE.convert: time 0.009505/0.9933, allocations: 9.769 MB / 0.5859 GB, free: 53.29 MB / 446.1 MB Notification: Performance of FrontEnd - DAE generated: time 4.258e-06/0.9934, allocations: 0 / 0.5859 GB, free: 53.29 MB / 446.1 MB Notification: Performance of FrontEnd: time 2.675e-06/0.9934, allocations: 0 / 0.5859 GB, free: 53.29 MB / 446.1 MB Notification: Performance of Transformations before backend: time 0.000369/0.9938, allocations: 0 / 0.5859 GB, free: 53.29 MB / 446.1 MB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 2276 * Number of variables: 2276 Notification: Performance of Generate backend data structure: time 0.02577/1.02, allocations: 8.548 MB / 0.5942 GB, free: 45.38 MB / 446.1 MB Notification: Performance of prepare preOptimizeDAE: time 4.851e-05/1.02, allocations: 16.02 kB / 0.5942 GB, free: 45.36 MB / 446.1 MB Notification: Performance of preOpt introduceOutputAliases (simulation): time 0.003438/1.023, allocations: 1.075 MB / 0.5953 GB, free: 44.72 MB / 446.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.09026/1.113, allocations: 20.34 MB / 0.6151 GB, free: 25.74 MB / 446.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.01789/1.131, allocations: 7.347 MB / 0.6223 GB, free: 20.29 MB / 446.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 0.0003099/1.132, allocations: 378 kB / 0.6227 GB, free: 20.09 MB / 446.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 0.002798/1.134, allocations: 0.682 MB / 0.6233 GB, free: 19.62 MB / 446.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.03227/1.167, allocations: 17.11 MB / 0.64 GB, free: 5.965 MB / 446.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 0.0002773/1.167, allocations: 94.02 kB / 0.6401 GB, free: 5.914 MB / 446.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 0.00076/1.168, allocations: 249.6 kB / 0.6404 GB, free: 5.836 MB / 446.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 0.003675/1.171, allocations: 2.766 MB / 0.6431 GB, free: 3.566 MB / 446.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.03122/1.203, allocations: 14.68 MB / 0.6574 GB, free: 8.938 MB / 462.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.5105/1.713, allocations: 67.41 MB / 0.7232 GB, free: 180.8 MB / 0.4982 GB Notification: Performance of preOpt comSubExp (simulation): time 0.03598/1.749, allocations: 9.083 MB / 0.7321 GB, free: 180.1 MB / 0.4982 GB Notification: Performance of preOpt evalFunc (simulation): time 0.001656/1.751, allocations: 1.044 MB / 0.7331 GB, free: 179.2 MB / 0.4982 GB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 5.918e-05/1.751, allocations: 57.34 kB / 0.7332 GB, free: 179.2 MB / 0.4982 GB Notification: Performance of pre-optimization done (n=268): time 9.347e-06/1.751, allocations: 1.969 kB / 0.7332 GB, free: 179.2 MB / 0.4982 GB Notification: Performance of matching and sorting (n=348): time 0.1582/1.909, allocations: 54.83 MB / 0.7867 GB, free: 150.7 MB / 0.4982 GB Notification: Performance of inlineWhenForInitialization (initialization): time 0.001744/1.911, allocations: 3.26 MB / 0.7899 GB, free: 147.1 MB / 0.4982 GB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.01031/1.921, allocations: 8.17 MB / 0.7979 GB, free: 139 MB / 0.4982 GB Notification: Performance of collectPreVariables (initialization): time 0.001268/1.923, allocations: 79.11 kB / 0.798 GB, free: 138.9 MB / 0.4982 GB Notification: Performance of collectInitialEqns (initialization): time 0.002942/1.926, allocations: 5.13 MB / 0.803 GB, free: 133.8 MB / 0.4982 GB Notification: Performance of collectInitialBindings (initialization): time 0.002078/1.928, allocations: 1.327 MB / 0.8043 GB, free: 132.5 MB / 0.4982 GB Notification: Performance of simplifyInitialFunctions (initialization): time 0.000528/1.928, allocations: 183.9 kB / 0.8044 GB, free: 132.3 MB / 0.4982 GB Notification: Performance of setup shared object (initialization): time 0.0003771/1.929, allocations: 0.7128 MB / 0.8051 GB, free: 131.6 MB / 0.4982 GB Notification: Performance of preBalanceInitialSystem (initialization): time 0.005653/1.934, allocations: 5.039 MB / 0.8101 GB, free: 126.6 MB / 0.4982 GB Notification: Performance of partitionIndependentBlocks (initialization): time 0.007643/1.942, allocations: 10.28 MB / 0.8201 GB, free: 114 MB / 0.4982 GB Notification: Performance of analyzeInitialSystem (initialization): time 0.008749/1.951, allocations: 7.025 MB / 0.827 GB, free: 107.1 MB / 0.4982 GB Notification: Performance of solveInitialSystemEqSystem (initialization): time 0.0001196/1.951, allocations: 52 kB / 0.827 GB, free: 107 MB / 0.4982 GB Notification: Performance of matching and sorting (n=1242) (initialization): time 0.06802/2.019, allocations: 33.1 MB / 0.8593 GB, free: 73.95 MB / 0.4982 GB Notification: Performance of prepare postOptimizeDAE: time 0.0002116/2.019, allocations: 84.94 kB / 0.8594 GB, free: 73.87 MB / 0.4982 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 0.04767/2.067, allocations: 22.11 MB / 0.881 GB, free: 51.71 MB / 0.4982 GB Notification: Performance of postOpt tearingSystem (initialization): time 0.04466/2.112, allocations: 17.26 MB / 0.8979 GB, free: 34.41 MB / 0.4982 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.007987/2.12, allocations: 2.257 MB / 0.9001 GB, free: 32.15 MB / 0.4982 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 0.2597/2.379, allocations: 37.03 MB / 0.9362 GB, free: 163.2 MB / 0.4982 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.00951/2.389, allocations: 0.7707 MB / 0.937 GB, free: 163.1 MB / 0.4982 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 0.001966/2.391, allocations: 0.5948 MB / 0.9376 GB, free: 163 MB / 0.4982 GB Notification: Model statistics after passing the back-end for initialization: * Number of independent subsystems: 833 * Number of states: 0 () * Number of discrete variables: 63 (rotor1D.cylinderColor[3],rotor1D.cylinderColor[2],rotor1D.cylinderColor[1],bodyCylinder4.color[3],bodyCylinder4.color[2],bodyCylinder4.color[1],bodyCylinder4.body.sphereColor[3],bodyCylinder4.body.sphereColor[2],bodyCylinder4.body.sphereColor[1],fixedTranslation1.color[3],fixedTranslation1.color[2],fixedTranslation1.color[1],fixedRotation2.color[3],fixedRotation2.color[2],fixedRotation2.color[1],bodyCylinder3.color[3],bodyCylinder3.color[2],bodyCylinder3.color[1],bodyCylinder3.body.sphereColor[3],bodyCylinder3.body.sphereColor[2],bodyCylinder3.body.sphereColor[1],spherical2.sphereColor[3],spherical2.sphereColor[2],spherical2.sphereColor[1],fixed.color[3],fixed.color[2],fixed.color[1],bodyCylinder2.color[3],bodyCylinder2.color[2],bodyCylinder2.color[1],bodyCylinder2.body.sphereColor[3],bodyCylinder2.body.sphereColor[2],bodyCylinder2.body.sphereColor[1],fixedTranslation.color[3],fixedTranslation.color[2],fixedTranslation.color[1],revolute.cylinderColor[3],revolute.cylinderColor[2],revolute.cylinderColor[1],fixedRotation1.color[3],fixedRotation1.color[2],fixedRotation1.color[1],bodyCylinder1.color[3],bodyCylinder1.color[2],bodyCylinder1.color[1],bodyCylinder1.body.sphereColor[3],bodyCylinder1.body.sphereColor[2],bodyCylinder1.body.sphereColor[1],spherical1.sphereColor[3],spherical1.sphereColor[2],spherical1.sphereColor[1],world.gravityArrowColor[3],world.gravityArrowColor[2],world.gravityArrowColor[1],world.axisColor_x[3],world.axisColor_x[2],world.axisColor_x[1],world.groundColor[3],world.groundColor[2],world.groundColor[1],world.gravitySphereColor[3],world.gravitySphereColor[2],world.gravitySphereColor[1]) * Number of discrete states: 0 () * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for initialization (1076): * Single equations (assignments): 1059 * Array equations: 11 * Algorithm blocks: 0 * Record equations: 0 * When equations: 0 * If-equations: 0 * Equation systems (linear and non-linear blocks): 2 * Torn equation systems: 4 * Mixed (continuous/discrete) equation systems: 0 Notification: Equation system details: * Constant Jacobian: 0 * Linear Jacobian (size,density): 2 {(4,100.0%),(4,100.0%)} * Non-linear Jacobian: 0 * Without analytic Jacobian: 0 Notification: Torn system details for strict tearing set: * Linear torn systems: 2 {(4,100.0%) 41,(3,100.0%) 38} * Non-linear torn systems: 2 {4 9,4 9} Notification: Performance of prepare postOptimizeDAE: time 0.006296/2.397, allocations: 3.414 MB / 0.9409 GB, free: 161.7 MB / 0.4982 GB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.00143/2.399, allocations: 0.673 MB / 0.9415 GB, free: 161.7 MB / 0.4982 GB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.01788/2.417, allocations: 11.33 MB / 0.9526 GB, free: 158 MB / 0.4982 GB Notification: Performance of postOpt inlineArrayEqn (simulation): time 0.01611/2.433, allocations: 10.01 MB / 0.9624 GB, free: 154.8 MB / 0.4982 GB Notification: Performance of postOpt constantLinearSystem (simulation): time 6.575e-05/2.433, allocations: 18.41 kB / 0.9624 GB, free: 154.8 MB / 0.4982 GB Notification: Performance of postOpt simplifysemiLinear (simulation): time 9.348e-05/2.433, allocations: 13.73 kB / 0.9624 GB, free: 154.8 MB / 0.4982 GB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.04288/2.476, allocations: 25.53 MB / 0.9873 GB, free: 136.8 MB / 0.4982 GB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 3.59e-05/2.476, allocations: 0 / 0.9873 GB, free: 136.8 MB / 0.4982 GB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.003621/2.48, allocations: 0.7487 MB / 0.9881 GB, free: 136 MB / 0.4982 GB Notification: Performance of postOpt tearingSystem (simulation): time 0.012/2.492, allocations: 4.125 MB / 0.9921 GB, free: 132 MB / 0.4982 GB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 0.00104/2.493, allocations: 135.8 kB / 0.9922 GB, free: 131.8 MB / 0.4982 GB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 0.02444/2.517, allocations: 24.39 MB / 1.016 GB, free: 107 MB / 0.4982 GB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 0.001473/2.519, allocations: 2.994 MB / 1.019 GB, free: 103.7 MB / 0.4982 GB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.02586/2.545, allocations: 17.66 MB / 1.036 GB, free: 86.25 MB / 0.4982 GB Notification: Performance of postOpt removeConstants (simulation): time 0.002804/2.547, allocations: 0.7462 MB / 1.037 GB, free: 85.48 MB / 0.4982 GB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 0.002996/2.55, allocations: 85.06 kB / 1.037 GB, free: 85.4 MB / 0.4982 GB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.005412/2.556, allocations: 323.5 kB / 1.037 GB, free: 85.08 MB / 0.4982 GB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.001512/2.557, allocations: 300.5 kB / 1.038 GB, free: 84.79 MB / 0.4982 GB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 0.001196/2.559, allocations: 136.9 kB / 1.038 GB, free: 84.66 MB / 0.4982 GB Notification: Performance of sorting global known variables: time 0.008237/2.567, allocations: 5.305 MB / 1.043 GB, free: 79.39 MB / 0.4982 GB Notification: Performance of sort global known variables: time 3.81e-07/2.567, allocations: 0 / 1.043 GB, free: 79.39 MB / 0.4982 GB Notification: Performance of remove unused functions: time 0.01122/2.578, allocations: 2.175 MB / 1.045 GB, free: 77.23 MB / 0.4982 GB Notification: Model statistics after passing the back-end for simulation: * Number of independent subsystems: 13 * Number of states: 16 ($STATESET2.x[3],$STATESET2.x[2],$STATESET2.x[1],bodyCylinder1.body.w_a[1],bodyCylinder1.body.w_a[2],bodyCylinder1.body.w_a[3],revolute.phi,revolute.w,$STATESET1.x[3],$STATESET1.x[2],$STATESET1.x[1],rotor1D.phi,rotor1D.w,rotor1D.rotorWith3DEffects.w_a[1],rotor1D.rotorWith3DEffects.w_a[2],rotor1D.rotorWith3DEffects.w_a[3]) * Number of discrete variables: 0 () * Number of discrete states: 0 () * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for simulation (244): * Single equations (assignments): 234 * Array equations: 3 * Algorithm blocks: 0 * Record equations: 0 * When equations: 0 * If-equations: 0 * Equation systems (linear and non-linear blocks): 4 * Torn equation systems: 3 * Mixed (continuous/discrete) equation systems: 0 Notification: Equation system details: * Constant Jacobian: 0 * Linear Jacobian (size,density): 2 {(4,100.0%),(4,100.0%)} * Non-linear Jacobian: 2 {4,4} * Without analytic Jacobian: 0 Notification: Torn system details for strict tearing set: * Linear torn systems: 3 {(5,100.0%) 34,(3,100.0%) 33,(1,100.0%) 1} * Non-linear torn systems: 0 Notification: Performance of Backend phase and start with SimCode phase: time 0.027/2.605, allocations: 18.84 MB / 1.063 GB, free: 58.24 MB / 0.4982 GB Notification: Performance of simCode: created initialization part: time 0.01728/2.622, allocations: 12.92 MB / 1.076 GB, free: 45.32 MB / 0.4982 GB Notification: Performance of simCode: created event and clocks part: time 8.666e-06/2.622, allocations: 0 / 1.076 GB, free: 45.32 MB / 0.4982 GB Notification: Performance of simCode: created simulation system equations: time 0.007536/2.63, allocations: 5.596 MB / 1.082 GB, free: 39.62 MB / 0.4982 GB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.006318/2.636, allocations: 0.954 MB / 1.082 GB, free: 38.69 MB / 0.4982 GB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.2684/2.905, allocations: 164.9 MB / 1.244 GB, free: 44.57 MB / 0.4982 GB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.01045/2.915, allocations: 5.492 MB / 1.249 GB, free: 43.66 MB / 0.4982 GB Notification: Performance of simCode: alias equations: time 0.009932/2.925, allocations: 3.216 MB / 1.252 GB, free: 43.38 MB / 0.4982 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.006529/2.932, allocations: 3.803 MB / 1.256 GB, free: 43.15 MB / 0.4982 GB Notification: Performance of SimCode: time 9.72e-07/2.932, allocations: 0 / 1.256 GB, free: 43.15 MB / 0.4982 GB Notification: Performance of buildModelFMU: Generate the FMI files: time 1.615/4.547, allocations: 183.5 MB / 1.435 GB, free: 83.42 MB / 0.4982 GB Notification: Performance of buildModelFMU: configured platform static using cached values: time 0.0001519/4.547, allocations: 239.5 kB / 1.435 GB, free: 83.16 MB / 0.4982 GB Notification: Performance of buildModelFMU: Generate platform static: time 7.273/11.82, allocations: 8 kB / 1.435 GB, free: 83.15 MB / 0.4982 GB (rm -f Modelica_trunk_Modelica.Mechanics.MultiBody.Examples.Rotational3DEffects.GyroscopicEffects.pipe ; mkfifo Modelica_trunk_Modelica.Mechanics.MultiBody.Examples.Rotational3DEffects.GyroscopicEffects.pipe ; head -c 1048576 < Modelica_trunk_Modelica.Mechanics.MultiBody.Examples.Rotational3DEffects.GyroscopicEffects.pipe >> ../files/Modelica_trunk_Modelica.Mechanics.MultiBody.Examples.Rotational3DEffects.GyroscopicEffects.sim & /home/hudson/saved_omc/OMSimulator/install/linux/bin/OMSimulator -r=Modelica_trunk_Modelica.Mechanics.MultiBody.Examples.Rotational3DEffects.GyroscopicEffects_res.mat --tempDir=temp_Modelica_trunk_Modelica_Mechanics_MultiBody_Examples_Rotational3DEffects_GyroscopicEffects_fmu --startTime=0 --stopTime=5 --timeout=50 --tolerance=1e-08 Modelica_trunk_Modelica_Mechanics_MultiBody_Examples_Rotational3DEffects_GyroscopicEffects.fmu > Modelica_trunk_Modelica.Mechanics.MultiBody.Examples.Rotational3DEffects.GyroscopicEffects.pipe 2>&1) TODO: How the !@#!# did the simulation report success but simulation result Modelica_trunk_Modelica.Mechanics.MultiBody.Examples.Rotational3DEffects.GyroscopicEffects_res.mat does not exist to compare? outputFormat=mat