Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries/ --ompython_omhome=/usr Modelica_trunk_Modelica.Fluid.Examples.Explanatory.MeasuringTemperature.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.Fluid.Examples.Explanatory.MeasuringTemperature,fileNamePrefix="Modelica_trunk_Modelica_Fluid_Examples_Explanatory_MeasuringTemperature",fmuType="me",version="2.0",platforms={"static"}) "" <> buildModelFMU(Modelica.Fluid.Examples.Explanatory.MeasuringTemperature,fileNamePrefix="Modelica_trunk_Modelica_Fluid_Examples_Explanatory_MeasuringTemperature",fmuType="me",version="2.0",platforms={"static"}) Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices trunk/package.mo): time 0.001159/0.00116, allocations: 98.33 kB / 16.99 MB, free: 5.941 MB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex trunk/package.mo): time 0.001327/0.001328, allocations: 200.6 kB / 17.9 MB, free: 5.598 MB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica trunk/package.mo): time 1.411/1.411, allocations: 227.3 MB / 245.9 MB, free: 10.3 MB / 206.1 MB Notification: Performance of FrontEnd - loaded program: time 0.0002393/0.0002394, allocations: 4 kB / 306.7 MB, free: 1.289 MB / 238.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.1165/0.1168, allocations: 51.5 MB / 358.2 MB, free: 13.8 MB / 302.1 MB Notification: Performance of NFInst.instantiate(Modelica.Fluid.Examples.Explanatory.MeasuringTemperature): time 0.3027/0.4195, allocations: 79.39 MB / 437.6 MB, free: 12.25 MB / 350.1 MB Notification: Performance of NFInst.instExpressions: time 0.03825/0.4578, allocations: 29.54 MB / 467.1 MB, free: 14.66 MB / 382.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.003982/0.4618, allocations: 63.44 kB / 467.2 MB, free: 14.6 MB / 382.1 MB Notification: Performance of NFTyping.typeComponents: time 0.003892/0.4657, allocations: 1.159 MB / 468.3 MB, free: 13.43 MB / 382.1 MB Notification: Performance of NFTyping.typeBindings: time 0.01405/0.4798, allocations: 3.596 MB / 471.9 MB, free: 9.84 MB / 382.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.02355/0.5034, allocations: 7.197 MB / 479.1 MB, free: 2.664 MB / 382.1 MB Notification: Performance of NFFlatten.flatten: time 0.008108/0.5115, allocations: 3.598 MB / 482.7 MB, free: 15.05 MB / 398.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.00316/0.5147, allocations: 1.671 MB / 484.4 MB, free: 13.37 MB / 398.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.01421/0.5289, allocations: 7.577 MB / 492 MB, free: 5.785 MB / 398.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.003351/0.5323, allocations: 1.464 MB / 493.4 MB, free: 4.316 MB / 398.1 MB Notification: Performance of NFPackage.collectConstants: time 0.0006044/0.5329, allocations: 140 kB / 493.6 MB, free: 4.18 MB / 398.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.01789/0.5508, allocations: 8.745 MB / 0.4906 GB, free: 11.43 MB / 414.1 MB Notification: Performance of NFScalarize.scalarize: time 0.001089/0.552, allocations: 0.6778 MB / 0.4912 GB, free: 10.75 MB / 414.1 MB Notification: Performance of NFVerifyModel.verify: time 0.0008765/0.5528, allocations: 472.6 kB / 0.4917 GB, free: 10.28 MB / 414.1 MB Notification: Performance of NFConvertDAE.convert: time 0.0127/0.5656, allocations: 5.889 MB / 0.4974 GB, free: 4.375 MB / 414.1 MB Notification: Performance of FrontEnd - DAE generated: time 3.597e-06/0.5656, allocations: 0 / 0.4974 GB, free: 4.375 MB / 414.1 MB Notification: Performance of FrontEnd: time 2.184e-06/0.5656, allocations: 4 kB / 0.4974 GB, free: 4.371 MB / 414.1 MB Notification: Performance of Transformations before backend: time 8.15e-05/0.5657, allocations: 0 / 0.4974 GB, free: 4.371 MB / 414.1 MB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 462 * Number of variables: 462 Notification: Performance of Generate backend data structure: time 0.00847/0.5742, allocations: 2.985 MB / 0.5003 GB, free: 1.328 MB / 414.1 MB Notification: Performance of prepare preOptimizeDAE: time 6.155e-05/0.5742, allocations: 12.02 kB / 0.5003 GB, free: 1.316 MB / 414.1 MB Notification: Performance of preOpt introduceOutputAliases (simulation): time 0.0006412/0.5749, allocations: 273.7 kB / 0.5006 GB, free: 1.039 MB / 414.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.01027/0.5852, allocations: 1.27 MB / 0.5018 GB, free: 15.76 MB / 430.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.00287/0.5881, allocations: 1.291 MB / 0.5031 GB, free: 14.42 MB / 430.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 0.0003053/0.5884, allocations: 357.7 kB / 0.5035 GB, free: 14.03 MB / 430.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 0.0003447/0.5888, allocations: 187.9 kB / 0.5036 GB, free: 13.85 MB / 430.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.008049/0.5968, allocations: 3.474 MB / 0.507 GB, free: 10.25 MB / 430.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 4.375e-05/0.5969, allocations: 4 kB / 0.507 GB, free: 10.25 MB / 430.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 0.0002561/0.5971, allocations: 79.98 kB / 0.5071 GB, free: 10.17 MB / 430.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 0.0001236/0.5973, allocations: 107.3 kB / 0.5072 GB, free: 10.07 MB / 430.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.008297/0.6056, allocations: 3.51 MB / 0.5106 GB, free: 6.551 MB / 430.1 MB Warning: The model contains alias variables with redundant start and/or conflicting nominal values. It is recommended to resolve the conflicts, because otherwise the system could be hard to solve. To print the conflicting alias sets and the chosen candidates please use -d=aliasConflicts. Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.02095/0.6266, allocations: 14.46 MB / 0.5248 GB, free: 7.203 MB / 446.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.006825/0.6334, allocations: 2.909 MB / 0.5276 GB, free: 4.281 MB / 446.1 MB Notification: Performance of preOpt evalFunc (simulation): time 0.2889/0.9223, allocations: 27.07 MB / 0.554 GB, free: 132.4 MB / 446.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 7.938e-05/0.9225, allocations: 58 kB / 0.5541 GB, free: 132.3 MB / 446.1 MB Notification: Performance of preOpt simplifyInStream (simulation): time 0.002884/0.9254, allocations: 445.6 kB / 0.5545 GB, free: 132.3 MB / 446.1 MB Notification: Performance of pre-optimization done (n=175): time 1.124e-05/0.9254, allocations: 4 kB / 0.5545 GB, free: 132.3 MB / 446.1 MB Notification: Performance of matching and sorting (n=205): time 0.03873/0.9641, allocations: 12.46 MB / 0.5667 GB, free: 127.7 MB / 446.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 7.104e-05/0.9642, allocations: 153.3 kB / 0.5668 GB, free: 127.6 MB / 446.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.001864/0.9661, allocations: 1.396 MB / 0.5682 GB, free: 126.8 MB / 446.1 MB Notification: Performance of collectPreVariables (initialization): time 0.0002538/0.9664, allocations: 65.98 kB / 0.5683 GB, free: 126.8 MB / 446.1 MB Notification: Performance of collectInitialEqns (initialization): time 0.0004829/0.9669, allocations: 0.7861 MB / 0.569 GB, free: 126.1 MB / 446.1 MB Notification: Performance of collectInitialBindings (initialization): time 0.0005221/0.9674, allocations: 0.6688 MB / 0.5697 GB, free: 125.5 MB / 446.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 0.0001345/0.9675, allocations: 43.12 kB / 0.5697 GB, free: 125.5 MB / 446.1 MB Notification: Performance of setup shared object (initialization): time 0.0001138/0.9677, allocations: 387.6 kB / 0.5701 GB, free: 125.1 MB / 446.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.002207/0.9699, allocations: 1.295 MB / 0.5713 GB, free: 124.4 MB / 446.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.002325/0.9722, allocations: 1.729 MB / 0.573 GB, free: 122.8 MB / 446.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.002222/0.9744, allocations: 1.4 MB / 0.5744 GB, free: 121.4 MB / 446.1 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 1.628e-05/0.9745, allocations: 4 kB / 0.5744 GB, free: 121.4 MB / 446.1 MB Notification: Performance of matching and sorting (n=272) (initialization): time 0.006856/0.9813, allocations: 4.032 MB / 0.5783 GB, free: 117.3 MB / 446.1 MB Notification: Performance of prepare postOptimizeDAE: time 2.91e-05/0.9814, allocations: 11.95 kB / 0.5784 GB, free: 117.3 MB / 446.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.945e-05/0.9814, allocations: 13.12 kB / 0.5784 GB, free: 117.3 MB / 446.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 0.004518/0.9859, allocations: 1.587 MB / 0.5799 GB, free: 115.7 MB / 446.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.002226/0.9882, allocations: 475.3 kB / 0.5804 GB, free: 115.3 MB / 446.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 0.00562/0.9938, allocations: 6.694 MB / 0.5869 GB, free: 108.4 MB / 446.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.003225/0.9971, allocations: 223.2 kB / 0.5871 GB, free: 108.1 MB / 446.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 0.0002379/0.9973, allocations: 115.9 kB / 0.5872 GB, free: 108 MB / 446.1 MB Notification: Model statistics after passing the back-end for initialization: * Number of independent subsystems: 50 * Number of states: 0 () * Number of discrete variables: 21 (openTankCold2.heatTransfer.states[1].phase,openTankCold2.regularFlow[1],openTankCold2.inFlow[1],openTankCold1.heatTransfer.states[1].phase,openTankCold1.regularFlow[1],openTankCold1.inFlow[1],openTankHot1.heatTransfer.states[1].phase,openTankHot1.regularFlow[1],openTankHot1.inFlow[1],openTankHot2.heatTransfer.states[1].phase,openTankHot2.regularFlow[1],openTankHot2.inFlow[1],mFlow1.medium.phase,mFlow2.medium.phase,openTankCold3.heatTransfer.states[1].phase,openTankCold3.regularFlow[1],openTankCold3.inFlow[1],openTankHot3.heatTransfer.states[1].phase,openTankHot3.regularFlow[1],openTankHot3.inFlow[1],mFlow3.medium.phase) * Number of discrete states: 0 () * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for initialization (213): * Single equations (assignments): 204 * 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: 9 * Mixed (continuous/discrete) equation systems: 0 Notification: Torn system details for strict tearing set: * Linear torn systems: 0 * Non-linear torn systems: 9 {1 5,1 5,4 6,1 5,1 5,4 6,1 5,1 5,6 6} Notification: Performance of prepare postOptimizeDAE: time 0.001366/0.9987, allocations: 0.5079 MB / 0.5877 GB, free: 107.5 MB / 446.1 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.0004179/0.9991, allocations: 205.6 kB / 0.5879 GB, free: 107.3 MB / 446.1 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.01218/1.011, allocations: 9.979 MB / 0.5977 GB, free: 97.23 MB / 446.1 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 9.004e-05/1.011, allocations: 106.3 kB / 0.5978 GB, free: 97.13 MB / 446.1 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 1.365e-05/1.011, allocations: 0 / 0.5978 GB, free: 97.13 MB / 446.1 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 2.736e-05/1.012, allocations: 11.95 kB / 0.5978 GB, free: 97.12 MB / 446.1 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.01662/1.028, allocations: 13.34 MB / 0.6108 GB, free: 83.68 MB / 446.1 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 1.323e-05/1.028, allocations: 0 / 0.6108 GB, free: 83.68 MB / 446.1 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.001654/1.03, allocations: 419.4 kB / 0.6112 GB, free: 83.27 MB / 446.1 MB Notification: Performance of postOpt tearingSystem (simulation): time 0.005423/1.035, allocations: 4.105 MB / 0.6152 GB, free: 79.16 MB / 446.1 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 0.0003264/1.036, allocations: 63.95 kB / 0.6153 GB, free: 79.1 MB / 446.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 0.006464/1.042, allocations: 8.752 MB / 0.6238 GB, free: 70.11 MB / 446.1 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 2.825e-06/1.042, allocations: 0 / 0.6238 GB, free: 70.11 MB / 446.1 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.01278/1.055, allocations: 10.78 MB / 0.6344 GB, free: 59.21 MB / 446.1 MB Notification: Performance of postOpt removeConstants (simulation): time 0.002039/1.057, allocations: 0.9087 MB / 0.6352 GB, free: 58.28 MB / 446.1 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 0.0003968/1.057, allocations: 44 kB / 0.6353 GB, free: 58.23 MB / 446.1 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.001969/1.059, allocations: 238.2 kB / 0.6355 GB, free: 58 MB / 446.1 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0004304/1.06, allocations: 241.6 kB / 0.6357 GB, free: 57.77 MB / 446.1 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 0.0001617/1.06, allocations: 79.95 kB / 0.6358 GB, free: 57.69 MB / 446.1 MB Notification: Performance of sorting global known variables: time 0.001454/1.061, allocations: 1.258 MB / 0.637 GB, free: 56.41 MB / 446.1 MB Notification: Performance of sort global known variables: time 1.4e-07/1.062, allocations: 0 / 0.637 GB, free: 56.41 MB / 446.1 MB Notification: Performance of remove unused functions: time 0.005908/1.067, allocations: 1.809 MB / 0.6388 GB, free: 54.73 MB / 446.1 MB Notification: Model statistics after passing the back-end for simulation: * Number of independent subsystems: 1 * Number of states: 12 (openTankCold2.level,openTankCold2.medium.h,openTankCold1.level,openTankCold1.medium.h,openTankHot1.level,openTankHot1.medium.h,openTankHot2.level,openTankHot2.medium.h,openTankCold3.level,openTankCold3.medium.h,openTankHot3.level,openTankHot3.medium.h) * Number of discrete variables: 71 ($cse4.phase,$cse4.region,$cse7.phase,$cse7.region,$cse8.phase,$cse8.region,$cse13.phase,$cse13.region,$cse15.phase,$cse15.region,$cse18.phase,$cse18.region,$cse20.phase,$cse20.region,$cse23.phase,$cse23.region,$cse25.phase,$cse25.region,$cse28.phase,$cse28.region,$cse30.phase,$cse30.region,$cse31.region3boundary,$cse32.region3boundary,$cse33.phase,$cse33.region,$cse34.phase,$cse34.region,$cse35.region3boundary,$cse36.region3boundary,$cse37.phase,$cse37.region,$cse38.phase,$cse38.region,$cse39.phase,$cse39.region,$cse43.phase,$cse43.region,$cse45.phase,$cse45.region,$cse48.phase,$cse48.region,$cse50.phase,$cse50.region,$cse51.region3boundary,$cse52.region3boundary,$cse53.phase,$cse53.region,$cse54.phase,$cse54.region,openTankCold2.heatTransfer.states[1].phase,openTankCold2.regularFlow[1],openTankCold2.inFlow[1],openTankCold1.heatTransfer.states[1].phase,openTankCold1.regularFlow[1],openTankCold1.inFlow[1],openTankHot1.heatTransfer.states[1].phase,openTankHot1.regularFlow[1],openTankHot1.inFlow[1],openTankHot2.heatTransfer.states[1].phase,openTankHot2.regularFlow[1],openTankHot2.inFlow[1],mFlow1.medium.phase,mFlow2.medium.phase,openTankCold3.heatTransfer.states[1].phase,openTankCold3.regularFlow[1],openTankCold3.inFlow[1],openTankHot3.heatTransfer.states[1].phase,openTankHot3.regularFlow[1],openTankHot3.inFlow[1],mFlow3.medium.phase) * Number of discrete states: 0 () * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for simulation (173): * Single equations (assignments): 145 * Array equations: 0 * Algorithm blocks: 0 * Record equations: 19 * When equations: 0 * If-equations: 0 * Equation systems (linear and non-linear blocks): 0 * Torn equation systems: 9 * Mixed (continuous/discrete) equation systems: 0 Notification: Torn system details for strict tearing set: * Linear torn systems: 0 * Non-linear torn systems: 9 {2 4,2 4,6 9,2 4,2 4,6 9,2 4,2 4,6 11} Notification: Performance of Backend phase and start with SimCode phase: time 0.01772/1.085, allocations: 11.86 MB / 0.6504 GB, free: 43.04 MB / 446.1 MB Notification: Performance of simCode: created initialization part: time 0.007957/1.093, allocations: 4.277 MB / 0.6546 GB, free: 38.75 MB / 446.1 MB Notification: Performance of simCode: created event and clocks part: time 9.958e-06/1.093, allocations: 5.625 kB / 0.6546 GB, free: 38.74 MB / 446.1 MB Notification: Performance of simCode: created simulation system equations: time 0.004992/1.098, allocations: 3.144 MB / 0.6576 GB, free: 35.59 MB / 446.1 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.005606/1.104, allocations: 1.053 MB / 0.6587 GB, free: 34.55 MB / 446.1 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.03411/1.138, allocations: 28.36 MB / 0.6864 GB, free: 5.289 MB / 446.1 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.00139/1.139, allocations: 2.232 MB / 0.6885 GB, free: 3.023 MB / 446.1 MB Notification: Performance of simCode: alias equations: time 0.003144/1.143, allocations: 1.742 MB / 0.6902 GB, free: 1.289 MB / 446.1 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.00142/1.144, allocations: 1.315 MB / 0.6915 GB, free: 15.97 MB / 462.1 MB Notification: Performance of SimCode: time 1.162e-06/1.144, allocations: 3.938 kB / 0.6915 GB, free: 15.97 MB / 462.1 MB Notification: Performance of buildModelFMU: Generate the FMI files: time 0.8434/1.987, allocations: 119 MB / 0.8077 GB, free: 74.04 MB / 462.1 MB Notification: Performance of buildModelFMU: configured platform static using cached values: time 0.0002052/1.988, allocations: 250.8 kB / 0.8079 GB, free: 73.71 MB / 462.1 MB Notification: Performance of buildModelFMU: Generate platform static: time 7.271/9.258, allocations: 8 kB / 0.8079 GB, free: 73.7 MB / 462.1 MB (rm -f Modelica_trunk_Modelica.Fluid.Examples.Explanatory.MeasuringTemperature.pipe ; mkfifo Modelica_trunk_Modelica.Fluid.Examples.Explanatory.MeasuringTemperature.pipe ; head -c 1048576 < Modelica_trunk_Modelica.Fluid.Examples.Explanatory.MeasuringTemperature.pipe >> ../files/Modelica_trunk_Modelica.Fluid.Examples.Explanatory.MeasuringTemperature.sim & /home/hudson/saved_omc/OMSimulator/install/linux/bin/OMSimulator -r=Modelica_trunk_Modelica.Fluid.Examples.Explanatory.MeasuringTemperature_res.mat --tempDir=temp_Modelica_trunk_Modelica_Fluid_Examples_Explanatory_MeasuringTemperature_fmu --startTime=0 --stopTime=1.1 --timeout=50 --tolerance=1e-06 Modelica_trunk_Modelica_Fluid_Examples_Explanatory_MeasuringTemperature.fmu > Modelica_trunk_Modelica.Fluid.Examples.Explanatory.MeasuringTemperature.pipe 2>&1) TODO: How the !@#!# did the simulation report success but simulation result Modelica_trunk_Modelica.Fluid.Examples.Explanatory.MeasuringTemperature_res.mat does not exist to compare? outputFormat=mat