Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries/ --ompython_omhome=/usr Modelica_4.0.0_Modelica.Electrical.Analog.Examples.CauerLowPassSC.conf.json 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 4.0.0+maint.om/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo", uses=false) Using package ModelicaServices with version 4.0.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo) Using package Modelica with version 4.0.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 4.0.0+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) Running command: "" <> buildModelFMU(Modelica.Electrical.Analog.Examples.CauerLowPassSC,fileNamePrefix="Modelica_4_0_0_Modelica_Electrical_Analog_Examples_CauerLowPassSC",fmuType="me",version="2.0",platforms={"static"}) "" <> buildModelFMU(Modelica.Electrical.Analog.Examples.CauerLowPassSC,fileNamePrefix="Modelica_4_0_0_Modelica_Electrical_Analog_Examples_CauerLowPassSC",fmuType="me",version="2.0",platforms={"static"}) Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo): time 0.001381/0.001381, allocations: 177.1 kB / 8.35 MB, free: 0.7266 MB / 5.871 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 4.0.0+maint.om/package.mo): time 1.385/1.385, allocations: 221.5 MB / 230.3 MB, free: 7.594 MB / 186.7 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.0009618/0.000962, allocations: 91.73 kB / 281.2 MB, free: 5.336 MB / 234.7 MB Notification: Performance of FrontEnd - loaded program: time 2.007e-05/2.011e-05, allocations: 4 kB / 337.1 MB, free: 9.941 MB / 234.7 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.08259/0.08263, allocations: 50.42 MB / 387.6 MB, free: 7.48 MB / 282.7 MB Notification: Performance of FrontEnd - scodeFlatten: time 0.3226/0.4053, allocations: 81.88 MB / 469.4 MB, free: 12.84 MB / 346.7 MB Notification: Performance of FrontEnd - mkProgramGraph: time 0.0002137/0.4056, allocations: 77.7 kB / 469.5 MB, free: 12.77 MB / 346.7 MB [/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 4.0.0+maint.om/Electrical/Analog/Examples/Utilities/SwitchedCapacitor.mo:41:3-41:79:writable] Warning: connect(p, p) connects the same connector instance! The connect equation will be ignored. Notification: Performance of FrontEnd - DAE generated: time 0.1031/0.5086, allocations: 41.25 MB / 0.4988 GB, free: 3.375 MB / 378.7 MB Notification: Performance of FrontEnd: time 1.122e-06/0.5087, allocations: 0 / 0.4988 GB, free: 3.375 MB / 378.7 MB Notification: Performance of Transformations before backend: time 8.097e-05/0.5088, allocations: 52 kB / 0.4988 GB, free: 3.324 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: 658 * Number of variables: 658 Notification: Performance of Generate backend data structure: time 0.004547/0.5133, allocations: 2.542 MB / 0.5013 GB, free: 0.7031 MB / 378.7 MB Notification: Performance of prepare preOptimizeDAE: time 3.598e-05/0.5134, allocations: 8.031 kB / 0.5013 GB, free: 0.6953 MB / 378.7 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0004087/0.5138, allocations: 288.5 kB / 0.5016 GB, free: 420 kB / 378.7 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.001315/0.5151, allocations: 1.02 MB / 0.5026 GB, free: 15.34 MB / 394.7 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 8.076e-05/0.5152, allocations: 84 kB / 0.5027 GB, free: 15.26 MB / 394.7 MB Notification: Performance of preOpt expandDerOperator (simulation): time 0.0002581/0.5154, allocations: 163.9 kB / 0.5028 GB, free: 15.1 MB / 394.7 MB Notification: Performance of preOpt removeEqualFunctionCalls (simulation): time 0.002802/0.5183, allocations: 1.709 MB / 0.5045 GB, free: 13.39 MB / 394.7 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.003381/0.5217, allocations: 2.202 MB / 0.5067 GB, free: 11.05 MB / 394.7 MB Notification: Performance of preOpt findStateOrder (simulation): time 3.991e-05/0.5217, allocations: 3.938 kB / 0.5067 GB, free: 11.05 MB / 394.7 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 0.0001521/0.5219, allocations: 7.781 kB / 0.5067 GB, free: 11.04 MB / 394.7 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 4.727e-05/0.5219, allocations: 64 kB / 0.5067 GB, free: 10.98 MB / 394.7 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.01294/0.5349, allocations: 9.233 MB / 0.5158 GB, free: 1.547 MB / 394.7 MB Notification: Performance of preOpt comSubExp (simulation): time 0.005357/0.5403, allocations: 2.699 MB / 0.5184 GB, free: 14.84 MB / 410.7 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.001344/0.5416, allocations: 0.9907 MB / 0.5194 GB, free: 13.85 MB / 410.7 MB Notification: Performance of preOpt evalFunc (simulation): time 0.000103/0.5418, allocations: 25.95 kB / 0.5194 GB, free: 13.82 MB / 410.7 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.001401/0.5432, allocations: 0.863 MB / 0.5202 GB, free: 12.95 MB / 410.7 MB Notification: Performance of pre-optimization done (n=218): time 5.18e-06/0.5432, allocations: 7.922 kB / 0.5202 GB, free: 12.94 MB / 410.7 MB Notification: Performance of matching and sorting (n=218): time 0.004551/0.5477, allocations: 2.297 MB / 0.5225 GB, free: 10.59 MB / 410.7 MB Notification: Performance of inlineWhenForInitialization (initialization): time 5.488e-05/0.5478, allocations: 89.38 kB / 0.5226 GB, free: 10.5 MB / 410.7 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.001156/0.549, allocations: 0.8436 MB / 0.5234 GB, free: 9.641 MB / 410.7 MB Notification: Performance of collectPreVariables (initialization): time 0.0001054/0.5491, allocations: 33.7 kB / 0.5234 GB, free: 9.602 MB / 410.7 MB Notification: Performance of collectInitialEqns (initialization): time 0.0006666/0.5498, allocations: 0.932 MB / 0.5243 GB, free: 8.656 MB / 410.7 MB Notification: Performance of collectInitialBindings (initialization): time 0.000515/0.5503, allocations: 0.6621 MB / 0.525 GB, free: 7.984 MB / 410.7 MB Notification: Performance of simplifyInitialFunctions (initialization): time 8.875e-05/0.5504, allocations: 3.938 kB / 0.525 GB, free: 7.98 MB / 410.7 MB Notification: Performance of setup shared object (initialization): time 0.0001567/0.5505, allocations: 407 kB / 0.5254 GB, free: 7.578 MB / 410.7 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0009388/0.5515, allocations: 0.6182 MB / 0.526 GB, free: 6.957 MB / 410.7 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.001244/0.5527, allocations: 1.168 MB / 0.5271 GB, free: 5.555 MB / 410.7 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.001021/0.5538, allocations: 0.7007 MB / 0.5278 GB, free: 4.859 MB / 410.7 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 9.277e-06/0.5538, allocations: 8 kB / 0.5278 GB, free: 4.852 MB / 410.7 MB Notification: Performance of matching and sorting (n=318) (initialization): time 0.004676/0.5585, allocations: 2.711 MB / 0.5305 GB, free: 2.094 MB / 410.7 MB Notification: Performance of prepare postOptimizeDAE: time 2.384e-05/0.5585, allocations: 12 kB / 0.5305 GB, free: 2.082 MB / 410.7 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 2.198e-05/0.5585, allocations: 16 kB / 0.5305 GB, free: 2.066 MB / 410.7 MB Notification: Performance of postOpt tearingSystem (initialization): time 0.002828/0.5614, allocations: 1.101 MB / 0.5316 GB, free: 0.9297 MB / 410.7 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0009211/0.5623, allocations: 291.5 kB / 0.5318 GB, free: 0.6445 MB / 410.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 0.2335/0.7958, allocations: 21.46 MB / 0.5528 GB, free: 106 MB / 426.7 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.002189/0.798, allocations: 270.9 kB / 0.553 GB, free: 106 MB / 426.7 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 0.0004011/0.7984, allocations: 94.5 kB / 0.5531 GB, free: 106 MB / 426.7 MB Notification: Model statistics after passing the back-end for initialization: * Number of independent subsystems: 74 * Number of states: 0 () * Number of discrete variables: 66 ($whenCondition11,$whenCondition10,$whenCondition9,$whenCondition8,$whenCondition7,$whenCondition6,$whenCondition5,$whenCondition4,$whenCondition3,$whenCondition2,$whenCondition1,$PRE.R4.BooleanPulse.pulseStart,R4.BooleanPulse.pulseStart,R4.IdealCommutingSwitch1.control,R4.logicalSwitch.u1,$PRE.R5.BooleanPulse.pulseStart,R5.BooleanPulse.pulseStart,R5.IdealCommutingSwitch1.control,R5.logicalSwitch.u1,$PRE.R8.BooleanPulse.pulseStart,R8.BooleanPulse.pulseStart,R8.IdealCommutingSwitch1.control,R8.logicalSwitch.u1,$PRE.R9.BooleanPulse.pulseStart,R9.BooleanPulse.pulseStart,R9.IdealCommutingSwitch1.control,R9.logicalSwitch.u1,$PRE.R1.BooleanPulse.pulseStart,R1.BooleanPulse.pulseStart,R1.IdealCommutingSwitch1.control,R1.logicalSwitch.u1,$PRE.R2.BooleanPulse.pulseStart,R2.BooleanPulse.pulseStart,R2.IdealCommutingSwitch1.control,R2.logicalSwitch.u1,$PRE.R3.BooleanPulse.pulseStart,R3.BooleanPulse.pulseStart,R3.IdealCommutingSwitch1.control,R3.logicalSwitch.u1,$PRE.Rp1.BooleanPulse.pulseStart,Rp1.BooleanPulse.pulseStart,Rp1.IdealCommutingSwitch1.control,Rp1.logicalSwitch.u1,$PRE.R7.BooleanPulse.pulseStart,R7.BooleanPulse.pulseStart,R7.IdealCommutingSwitch1.control,R7.logicalSwitch.u1,$PRE.R10.BooleanPulse.pulseStart,R10.BooleanPulse.pulseStart,R10.IdealCommutingSwitch1.control,R10.logicalSwitch.u1,$PRE.R11.BooleanPulse.pulseStart,R11.BooleanPulse.pulseStart,R11.IdealCommutingSwitch1.control,R11.logicalSwitch.u1,R11.lessEqualThreshold.y,R10.lessEqualThreshold.y,R7.lessEqualThreshold.y,Rp1.lessEqualThreshold.y,R3.lessEqualThreshold.y,R2.lessEqualThreshold.y,R1.lessEqualThreshold.y,R9.lessEqualThreshold.y,R8.lessEqualThreshold.y,R5.lessEqualThreshold.y,R4.lessEqualThreshold.y) * Number of discrete states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for initialization (199): * Single equations (assignments): 187 * 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: 12 * Mixed (continuous/discrete) equation systems: 0 Notification: Torn system details for strict tearing set: * Linear torn systems: 12 {(4,62.5%) 7,(4,62.5%) 7,(4,62.5%) 7,(4,62.5%) 7,(1,100.0%) 9,(4,62.5%) 7,(4,62.5%) 7,(4,62.5%) 7,(4,62.5%) 7,(4,62.5%) 7,(4,62.5%) 7,(4,62.5%) 7} * Non-linear torn systems: 0 Notification: Performance of prepare postOptimizeDAE: time 0.0006212/0.7991, allocations: 194 kB / 0.5533 GB, free: 105.9 MB / 426.7 MB Notification: Performance of postOpt createAliasVarsForOutputStates (simulation): time 0.005461/0.8046, allocations: 2.301 MB / 0.5556 GB, free: 105.7 MB / 426.7 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.0003861/0.805, allocations: 167.4 kB / 0.5557 GB, free: 105.7 MB / 426.7 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.0004607/0.8054, allocations: 185.6 kB / 0.5559 GB, free: 105.7 MB / 426.7 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 2.003e-05/0.8055, allocations: 21.47 kB / 0.5559 GB, free: 105.7 MB / 426.7 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 9.599e-05/0.8056, allocations: 17.88 kB / 0.5559 GB, free: 105.7 MB / 426.7 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 2.773e-05/0.8056, allocations: 10.78 kB / 0.556 GB, free: 105.7 MB / 426.7 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.002903/0.8085, allocations: 1.779 MB / 0.5577 GB, free: 105.5 MB / 426.7 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 6.823e-06/0.8085, allocations: 4.438 kB / 0.5577 GB, free: 105.5 MB / 426.7 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0007368/0.8093, allocations: 140.3 kB / 0.5578 GB, free: 105.5 MB / 426.7 MB Notification: Performance of postOpt tearingSystem (simulation): time 0.003115/0.8124, allocations: 1.096 MB / 0.5589 GB, free: 105.4 MB / 426.7 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 0.0001797/0.8126, allocations: 14.28 kB / 0.5589 GB, free: 105.4 MB / 426.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 0.01907/0.8317, allocations: 21.44 MB / 0.5799 GB, free: 90.68 MB / 426.7 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 4.198e-06/0.8317, allocations: 0 / 0.5799 GB, free: 90.68 MB / 426.7 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.006171/0.8379, allocations: 3.355 MB / 0.5831 GB, free: 89.43 MB / 426.7 MB Notification: Performance of postOpt removeConstants (simulation): time 0.0007708/0.8387, allocations: 453.8 kB / 0.5836 GB, free: 89.14 MB / 426.7 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 0.0002107/0.8389, allocations: 6.078 kB / 0.5836 GB, free: 89.14 MB / 426.7 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0009508/0.8399, allocations: 101.7 kB / 0.5837 GB, free: 89.13 MB / 426.7 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0006889/0.8406, allocations: 275 kB / 0.5839 GB, free: 89.07 MB / 426.7 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 0.0001044/0.8407, allocations: 54.44 kB / 0.584 GB, free: 89.06 MB / 426.7 MB Notification: Performance of sorting global known variables: time 0.0007416/0.8414, allocations: 0.5771 MB / 0.5845 GB, free: 88.78 MB / 426.7 MB Notification: Performance of sort global known variables: time 1.9e-07/0.8414, allocations: 0 / 0.5845 GB, free: 88.78 MB / 426.7 MB Notification: Performance of remove unused functions: time 0.002394/0.8438, allocations: 0.6993 MB / 0.5852 GB, free: 88.73 MB / 426.7 MB Notification: Model statistics after passing the back-end for simulation: * Number of independent subsystems: 1 * Number of states: 16 (C1.v,C2.v,C3.v,C4.v,C7.v,R4.Capacitor.v,R5.Capacitor.v,R8.Capacitor.v,R9.Capacitor.v,R1.Capacitor.v,R2.Capacitor.v,R3.Capacitor.v,Rp1.Capacitor.v,R7.Capacitor.v,R10.Capacitor.v,R11.Capacitor.v) * Number of discrete variables: 44 ($whenCondition11,$whenCondition10,$whenCondition9,$whenCondition8,$whenCondition7,$whenCondition6,$whenCondition5,$whenCondition4,$whenCondition3,$whenCondition2,$whenCondition1,R4.BooleanPulse.pulseStart,R4.IdealCommutingSwitch1.control,R4.logicalSwitch.u1,R5.BooleanPulse.pulseStart,R5.IdealCommutingSwitch1.control,R5.logicalSwitch.u1,R8.BooleanPulse.pulseStart,R8.IdealCommutingSwitch1.control,R8.logicalSwitch.u1,R9.BooleanPulse.pulseStart,R9.IdealCommutingSwitch1.control,R9.logicalSwitch.u1,R1.BooleanPulse.pulseStart,R1.IdealCommutingSwitch1.control,R1.logicalSwitch.u1,R2.BooleanPulse.pulseStart,R2.IdealCommutingSwitch1.control,R2.logicalSwitch.u1,R3.BooleanPulse.pulseStart,R3.IdealCommutingSwitch1.control,R3.logicalSwitch.u1,Rp1.BooleanPulse.pulseStart,Rp1.IdealCommutingSwitch1.control,Rp1.logicalSwitch.u1,R7.BooleanPulse.pulseStart,R7.IdealCommutingSwitch1.control,R7.logicalSwitch.u1,R10.BooleanPulse.pulseStart,R10.IdealCommutingSwitch1.control,R10.logicalSwitch.u1,R11.BooleanPulse.pulseStart,R11.IdealCommutingSwitch1.control,R11.logicalSwitch.u1) * Number of discrete states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for simulation (99): * Single equations (assignments): 76 * Array equations: 0 * Algorithm blocks: 0 * Record equations: 0 * When equations: 11 * If-equations: 0 * Equation systems (linear and non-linear blocks): 0 * Torn equation systems: 12 * Mixed (continuous/discrete) equation systems: 0 Notification: Torn system details for strict tearing set: * Linear torn systems: 12 {(1,100.0%) 9,(4,62.5%) 7,(4,62.5%) 7,(4,62.5%) 7,(4,62.5%) 7,(4,62.5%) 7,(4,62.5%) 7,(4,62.5%) 7,(4,62.5%) 7,(4,62.5%) 7,(4,62.5%) 7,(4,62.5%) 7} * Non-linear torn systems: 0 Notification: Performance of Backend phase and start with SimCode phase: time 0.005107/0.849, allocations: 3.956 MB / 0.5891 GB, free: 86.68 MB / 426.7 MB Notification: Performance of simCode: created initialization part: time 0.004383/0.8534, allocations: 3.687 MB / 0.5927 GB, free: 84.39 MB / 426.7 MB Notification: Performance of simCode: created event and clocks part: time 2.655e-06/0.8534, allocations: 0 / 0.5927 GB, free: 84.39 MB / 426.7 MB Notification: Performance of simCode: created simulation system equations: time 0.003164/0.8566, allocations: 2.833 MB / 0.5955 GB, free: 82.43 MB / 426.7 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.001259/0.8578, allocations: 260.8 kB / 0.5957 GB, free: 82.36 MB / 426.7 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.006598/0.8644, allocations: 4.065 MB / 0.5997 GB, free: 80.46 MB / 426.7 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0008579/0.8653, allocations: 1.589 MB / 0.6012 GB, free: 79.68 MB / 426.7 MB Notification: Performance of simCode: alias equations: time 0.0005877/0.8659, allocations: 136.3 kB / 0.6014 GB, free: 79.64 MB / 426.7 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0006331/0.8666, allocations: 0.7676 MB / 0.6021 GB, free: 79 MB / 426.7 MB Notification: Performance of SimCode: time 1.132e-06/0.8666, allocations: 0 / 0.6021 GB, free: 79 MB / 426.7 MB Notification: Performance of buildModelFMU: Generate the FMI files: time 0.06626/0.9328, allocations: 43.96 MB / 0.645 GB, free: 53.14 MB / 426.7 MB Notification: Performance of buildModelFMU: configured platform static using cached values: time 0.000129/0.933, allocations: 142.3 kB / 0.6452 GB, free: 52.95 MB / 426.7 MB Notification: Performance of buildModelFMU: Generate platform static: time 3.604/4.537, allocations: 0 / 0.6452 GB, free: 52.95 MB / 426.7 MB (rm -f Modelica_4.0.0_Modelica.Electrical.Analog.Examples.CauerLowPassSC.pipe ; mkfifo Modelica_4.0.0_Modelica.Electrical.Analog.Examples.CauerLowPassSC.pipe ; head -c 1048576 < Modelica_4.0.0_Modelica.Electrical.Analog.Examples.CauerLowPassSC.pipe >> ../files/Modelica_4.0.0_Modelica.Electrical.Analog.Examples.CauerLowPassSC.sim & /home/hudson/saved_omc/OMSimulator/install/linux/bin/OMSimulator -r=Modelica_4.0.0_Modelica.Electrical.Analog.Examples.CauerLowPassSC_res.mat --tempDir=temp_Modelica_4_0_0_Modelica_Electrical_Analog_Examples_CauerLowPassSC_fmu --startTime=0 --stopTime=60 --timeout=50 --tolerance=1e-06 Modelica_4_0_0_Modelica_Electrical_Analog_Examples_CauerLowPassSC.fmu > Modelica_4.0.0_Modelica.Electrical.Analog.Examples.CauerLowPassSC.pipe 2>&1) TODO: How the !@#!# did the simulation report success but simulation result Modelica_4.0.0_Modelica.Electrical.Analog.Examples.CauerLowPassSC_res.mat does not exist to compare? outputFormat=mat