Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries/ --ompython_omhome=/usr ModelicaTest_trunk_ModelicaTest.Fluid.TestComponents.Machines.TestWaterPumpDefaultLV.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) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaTest trunk/package.mo", uses=false) Using package ModelicaTest with version trunk (/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaTest trunk/package.mo) 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(ModelicaTest.Fluid.TestComponents.Machines.TestWaterPumpDefaultLV,fileNamePrefix="ModelicaTest_trunk_ModelicaTest_Fluid_TestComponents_Machines_TestWaterPumpDefaultLV",fmuType="me",version="2.0",platforms={"static"}) "" <> buildModelFMU(ModelicaTest.Fluid.TestComponents.Machines.TestWaterPumpDefaultLV,fileNamePrefix="ModelicaTest_trunk_ModelicaTest_Fluid_TestComponents_Machines_TestWaterPumpDefaultLV",fmuType="me",version="2.0",platforms={"static"}) Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices trunk/package.mo): time 0.0009968/0.0009967, allocations: 97.33 kB / 16.99 MB, free: 6.406 MB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex trunk/package.mo): time 0.001095/0.001095, allocations: 193.4 kB / 17.89 MB, free: 5.945 MB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica trunk/package.mo): time 1.304/1.304, allocations: 227.3 MB / 245.9 MB, free: 10.3 MB / 206.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaTest trunk/package.mo): time 0.1933/0.1933, allocations: 45.91 MB / 344 MB, free: 12.11 MB / 286.1 MB Notification: Performance of FrontEnd - loaded program: time 0.0002892/0.0002893, allocations: 8 kB / 418.1 MB, free: 20.75 MB / 302.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.1135/0.1138, allocations: 63.46 MB / 481.5 MB, free: 5.281 MB / 350.1 MB Notification: Performance of NFInst.instantiate(ModelicaTest.Fluid.TestComponents.Machines.TestWaterPumpDefaultLV): time 0.03454/0.1483, allocations: 35.13 MB / 0.5045 GB, free: 2.062 MB / 382.1 MB Notification: Performance of NFInst.instExpressions: time 0.2448/0.3932, allocations: 13.99 MB / 0.5182 GB, free: 11.91 MB / 382.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.0008518/0.3941, allocations: 24.69 kB / 0.5182 GB, free: 11.91 MB / 382.1 MB Notification: Performance of NFTyping.typeComponents: time 0.00117/0.3953, allocations: 372.3 kB / 0.5186 GB, free: 11.91 MB / 382.1 MB Notification: Performance of NFTyping.typeBindings: time 0.01333/0.4086, allocations: 3.876 MB / 0.5224 GB, free: 11.88 MB / 382.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.006887/0.4155, allocations: 1.872 MB / 0.5242 GB, free: 11.86 MB / 382.1 MB Notification: Performance of NFFlatten.flatten: time 0.002022/0.4176, allocations: 0.9484 MB / 0.5251 GB, free: 11.86 MB / 382.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0005226/0.4181, allocations: 346.8 kB / 0.5255 GB, free: 11.81 MB / 382.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.001225/0.4193, allocations: 0.6215 MB / 0.5261 GB, free: 11.81 MB / 382.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.005985/0.4253, allocations: 3.092 MB / 0.5291 GB, free: 11.74 MB / 382.1 MB Notification: Performance of NFPackage.collectConstants: time 0.0001409/0.4255, allocations: 30.19 kB / 0.5291 GB, free: 11.74 MB / 382.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.01667/0.4422, allocations: 7.394 MB / 0.5363 GB, free: 10.7 MB / 382.1 MB Notification: Performance of NFScalarize.scalarize: time 0.0002825/0.4425, allocations: 141.8 kB / 0.5365 GB, free: 10.65 MB / 382.1 MB Notification: Performance of NFVerifyModel.verify: time 0.0004385/0.4429, allocations: 168.3 kB / 0.5366 GB, free: 10.59 MB / 382.1 MB Notification: Performance of NFConvertDAE.convert: time 0.007933/0.4509, allocations: 3.449 MB / 0.54 GB, free: 9.07 MB / 382.1 MB Notification: Performance of FrontEnd - DAE generated: time 3.838e-06/0.4509, allocations: 4 kB / 0.54 GB, free: 9.066 MB / 382.1 MB Notification: Performance of FrontEnd: time 2.044e-06/0.4509, allocations: 3.938 kB / 0.54 GB, free: 9.062 MB / 382.1 MB Notification: Performance of Transformations before backend: time 1.572e-05/0.4509, allocations: 0 / 0.54 GB, free: 9.062 MB / 382.1 MB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 137 * Number of variables: 137 Notification: Performance of Generate backend data structure: time 0.004249/0.4552, allocations: 1.475 MB / 0.5414 GB, free: 8.086 MB / 382.1 MB Notification: Performance of prepare preOptimizeDAE: time 5.091e-05/0.4553, allocations: 7.875 kB / 0.5415 GB, free: 8.086 MB / 382.1 MB Notification: Performance of preOpt introduceOutputAliases (simulation): time 0.0001377/0.4554, allocations: 103.7 kB / 0.5416 GB, free: 8.031 MB / 382.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.002149/0.4576, allocations: 297.2 kB / 0.5418 GB, free: 7.926 MB / 382.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0006885/0.4583, allocations: 490 kB / 0.5423 GB, free: 7.594 MB / 382.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 4.534e-05/0.4583, allocations: 53.66 kB / 0.5424 GB, free: 7.594 MB / 382.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 6.563e-05/0.4584, allocations: 52.97 kB / 0.5424 GB, free: 7.59 MB / 382.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.002088/0.4605, allocations: 0.9642 MB / 0.5433 GB, free: 7.191 MB / 382.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 1.92e-05/0.4605, allocations: 5.125 kB / 0.5433 GB, free: 7.188 MB / 382.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 6.107e-05/0.4606, allocations: 25.81 kB / 0.5434 GB, free: 7.188 MB / 382.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 3.106e-05/0.4606, allocations: 28.27 kB / 0.5434 GB, free: 7.18 MB / 382.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.002114/0.4627, allocations: 0.8699 MB / 0.5443 GB, free: 6.98 MB / 382.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.004137/0.4669, allocations: 4.682 MB / 0.5488 GB, free: 2.434 MB / 382.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.002315/0.4692, allocations: 0.819 MB / 0.5496 GB, free: 1.605 MB / 382.1 MB Notification: Performance of preOpt evalFunc (simulation): time 0.05121/0.5204, allocations: 26.99 MB / 0.576 GB, free: 3.223 MB / 414.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 4.682e-05/0.5205, allocations: 42.5 kB / 0.576 GB, free: 3.172 MB / 414.1 MB Notification: Performance of pre-optimization done (n=43): time 2.315e-06/0.5205, allocations: 4 kB / 0.576 GB, free: 3.168 MB / 414.1 MB Notification: Performance of matching and sorting (n=43): time 0.006534/0.5271, allocations: 1.802 MB / 0.5778 GB, free: 1.336 MB / 414.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 6.764e-05/0.5272, allocations: 106.8 kB / 0.5779 GB, free: 1.207 MB / 414.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0005599/0.5277, allocations: 465.9 kB / 0.5783 GB, free: 0.7422 MB / 414.1 MB Notification: Performance of collectPreVariables (initialization): time 5.124e-05/0.5278, allocations: 33.7 kB / 0.5784 GB, free: 0.7031 MB / 414.1 MB Notification: Performance of collectInitialEqns (initialization): time 0.0002244/0.528, allocations: 319.3 kB / 0.5787 GB, free: 400 kB / 414.1 MB Notification: Performance of collectInitialBindings (initialization): time 0.0001306/0.5282, allocations: 149 kB / 0.5788 GB, free: 252 kB / 414.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 2.907e-05/0.5282, allocations: 8 kB / 0.5788 GB, free: 244 kB / 414.1 MB Notification: Performance of setup shared object (initialization): time 0.0001514/0.5284, allocations: 358.8 kB / 0.5792 GB, free: 15.88 MB / 430.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0005865/0.529, allocations: 257 kB / 0.5794 GB, free: 15.63 MB / 430.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0006654/0.5296, allocations: 426 kB / 0.5798 GB, free: 15.14 MB / 430.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.0006122/0.5303, allocations: 282.9 kB / 0.5801 GB, free: 14.86 MB / 430.1 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 6.893e-06/0.5303, allocations: 4 kB / 0.5801 GB, free: 14.86 MB / 430.1 MB Notification: Performance of matching and sorting (n=65) (initialization): time 0.002064/0.5323, allocations: 0.872 MB / 0.5809 GB, free: 13.98 MB / 430.1 MB Notification: Performance of prepare postOptimizeDAE: time 0.0007288/0.5331, allocations: 1.919 MB / 0.5828 GB, free: 11.91 MB / 430.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.231e-05/0.5331, allocations: 7.984 kB / 0.5828 GB, free: 11.9 MB / 430.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 0.001245/0.5344, allocations: 268.6 kB / 0.5831 GB, free: 11.64 MB / 430.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0004252/0.5348, allocations: 116.7 kB / 0.5832 GB, free: 11.52 MB / 430.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 0.001083/0.5359, allocations: 0.8205 MB / 0.584 GB, free: 10.68 MB / 430.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0006149/0.5365, allocations: 107.4 kB / 0.5841 GB, free: 10.57 MB / 430.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 5.599e-05/0.5366, allocations: 39.92 kB / 0.5841 GB, free: 10.54 MB / 430.1 MB Notification: Performance of prepare postOptimizeDAE: time 1.1e-05/0.5366, allocations: 6.188 kB / 0.5841 GB, free: 10.53 MB / 430.1 MB Notification: Performance of postOpt replaceHomotopyWithSimplified (initialization): time 0.001783/0.5384, allocations: 0.7853 MB / 0.5849 GB, free: 9.742 MB / 430.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 7.785e-06/0.5384, allocations: 4 kB / 0.5849 GB, free: 9.738 MB / 430.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 0.0008697/0.5393, allocations: 217.2 kB / 0.5851 GB, free: 9.523 MB / 430.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0004092/0.5397, allocations: 122 kB / 0.5852 GB, free: 9.406 MB / 430.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 0.001242/0.541, allocations: 0.802 MB / 0.586 GB, free: 8.578 MB / 430.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.000582/0.5416, allocations: 95.53 kB / 0.5861 GB, free: 8.484 MB / 430.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 5.192e-05/0.5416, allocations: 35.98 kB / 0.5861 GB, free: 8.449 MB / 430.1 MB Notification: Model statistics after passing the back-end for initialization: * Number of independent subsystems: 22 * Number of states: 0 () * Number of discrete variables: 6 (Source.medium.phase,Sink.medium.phase,pump.heatTransfer.states[1].phase,Valve.state_b.phase,Valve.state_a.phase,pump.monitoring.state_in.phase) * Number of discrete states: 0 () * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for initialization (53): * Single equations (assignments): 52 * 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: 1 * Mixed (continuous/discrete) equation systems: 0 Notification: Torn system details for strict tearing set: * Linear torn systems: 0 * Non-linear torn systems: 1 {3 10} Notification: Performance of prepare postOptimizeDAE: time 0.0004016/0.542, allocations: 279.3 kB / 0.5864 GB, free: 8.168 MB / 430.1 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.0001017/0.5421, allocations: 55.3 kB / 0.5865 GB, free: 8.113 MB / 430.1 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.00398/0.5461, allocations: 3.006 MB / 0.5894 GB, free: 5.117 MB / 430.1 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 4.811e-05/0.5462, allocations: 47.92 kB / 0.5894 GB, free: 5.07 MB / 430.1 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 6.322e-06/0.5462, allocations: 0 / 0.5894 GB, free: 5.07 MB / 430.1 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 7.354e-06/0.5462, allocations: 0 / 0.5894 GB, free: 5.07 MB / 430.1 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.001572/0.5478, allocations: 1.463 MB / 0.5909 GB, free: 3.566 MB / 430.1 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 4.138e-06/0.5478, allocations: 0 / 0.5909 GB, free: 3.566 MB / 430.1 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0003523/0.5482, allocations: 99.86 kB / 0.591 GB, free: 3.469 MB / 430.1 MB Notification: Performance of postOpt tearingSystem (simulation): time 0.00125/0.5494, allocations: 0.6701 MB / 0.5916 GB, free: 2.801 MB / 430.1 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 3.721e-05/0.5495, allocations: 12 kB / 0.5916 GB, free: 2.789 MB / 430.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 0.001384/0.5509, allocations: 1.249 MB / 0.5928 GB, free: 1.512 MB / 430.1 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 1.542e-06/0.5509, allocations: 0 / 0.5928 GB, free: 1.512 MB / 430.1 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.002855/0.5538, allocations: 1.946 MB / 0.5947 GB, free: 15.55 MB / 446.1 MB Notification: Performance of postOpt removeConstants (simulation): time 0.0005345/0.5543, allocations: 326.7 kB / 0.5951 GB, free: 15.21 MB / 446.1 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 9.44e-05/0.5544, allocations: 15.95 kB / 0.5951 GB, free: 15.19 MB / 446.1 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0005071/0.5549, allocations: 83.72 kB / 0.5951 GB, free: 15.11 MB / 446.1 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0001175/0.5551, allocations: 48.48 kB / 0.5952 GB, free: 15.06 MB / 446.1 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 4.345e-05/0.5551, allocations: 19.98 kB / 0.5952 GB, free: 15.04 MB / 446.1 MB Notification: Performance of sorting global known variables: time 0.0005284/0.5556, allocations: 427 kB / 0.5956 GB, free: 14.62 MB / 446.1 MB Notification: Performance of sort global known variables: time 1.2e-07/0.5556, allocations: 0 / 0.5956 GB, free: 14.62 MB / 446.1 MB Notification: Performance of remove unused functions: time 0.004051/0.5597, allocations: 1.307 MB / 0.5969 GB, free: 13.31 MB / 446.1 MB Notification: Model statistics after passing the back-end for simulation: * Number of independent subsystems: 1 * Number of states: 0 () * Number of discrete variables: 25 ($cse3.phase,$cse3.region,$cse5.region3boundary,$cse6.region3boundary,$cse7.phase,$cse7.region,$cse8.phase,$cse8.region,$cse9.region3boundary,$cse10.region3boundary,$cse11.phase,$cse11.region,$cse12.phase,$cse12.region,$cse14.phase,$cse14.region,$cse15.phase,$cse15.region,$cse17.phase,$cse17.region,$cse18.phase,$cse18.region,Source.medium.phase,Sink.medium.phase,pump.heatTransfer.states[1].phase) * Number of discrete states: 0 () * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for simulation (42): * Single equations (assignments): 31 * Array equations: 0 * Algorithm blocks: 0 * Record equations: 10 * When equations: 0 * If-equations: 0 * Equation systems (linear and non-linear blocks): 0 * Torn equation systems: 1 * Mixed (continuous/discrete) equation systems: 0 Notification: Torn system details for strict tearing set: * Linear torn systems: 0 * Non-linear torn systems: 1 {2 15} Notification: Performance of Backend phase and start with SimCode phase: time 0.008946/0.5687, allocations: 3.592 MB / 0.6004 GB, free: 9.809 MB / 446.1 MB Notification: Performance of simCode: created initialization part: time 0.003147/0.5718, allocations: 1.378 MB / 0.6018 GB, free: 8.434 MB / 446.1 MB Notification: Performance of simCode: created event and clocks part: time 5.269e-06/0.5719, allocations: 0 / 0.6018 GB, free: 8.434 MB / 446.1 MB Notification: Performance of simCode: created simulation system equations: time 0.001139/0.573, allocations: 0.8009 MB / 0.6025 GB, free: 7.633 MB / 446.1 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.00161/0.5746, allocations: 294.6 kB / 0.6028 GB, free: 7.344 MB / 446.1 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.01033/0.585, allocations: 8.818 MB / 0.6114 GB, free: 14.37 MB / 462.1 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0006105/0.5856, allocations: 1.146 MB / 0.6125 GB, free: 13.2 MB / 462.1 MB Notification: Performance of simCode: alias equations: time 0.001126/0.5868, allocations: 0.7897 MB / 0.6133 GB, free: 12.41 MB / 462.1 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.000428/0.5872, allocations: 394.5 kB / 0.6137 GB, free: 12.03 MB / 462.1 MB Notification: Performance of SimCode: time 9.82e-07/0.5872, allocations: 0 / 0.6137 GB, free: 12.03 MB / 462.1 MB Notification: Performance of buildModelFMU: Generate the FMI files: time 0.08812/0.6753, allocations: 57.61 MB / 0.67 GB, free: 2.703 MB / 0.4981 GB Notification: Performance of buildModelFMU: configured platform static using cached values: time 0.0002139/0.6756, allocations: 270.5 kB / 0.6702 GB, free: 2.344 MB / 0.4981 GB Notification: Performance of buildModelFMU: Generate platform static: time 4.675/5.351, allocations: 0 / 0.6702 GB, free: 2.344 MB / 0.4981 GB (rm -f ModelicaTest_trunk_ModelicaTest.Fluid.TestComponents.Machines.TestWaterPumpDefaultLV.pipe ; mkfifo ModelicaTest_trunk_ModelicaTest.Fluid.TestComponents.Machines.TestWaterPumpDefaultLV.pipe ; head -c 1048576 < ModelicaTest_trunk_ModelicaTest.Fluid.TestComponents.Machines.TestWaterPumpDefaultLV.pipe >> ../files/ModelicaTest_trunk_ModelicaTest.Fluid.TestComponents.Machines.TestWaterPumpDefaultLV.sim & /home/hudson/saved_omc/OMSimulator/install/linux/bin/OMSimulator -r=ModelicaTest_trunk_ModelicaTest.Fluid.TestComponents.Machines.TestWaterPumpDefaultLV_res.mat --tempDir=temp_ModelicaTest_trunk_ModelicaTest_Fluid_TestComponents_Machines_TestWaterPumpDefaultLV_fmu --startTime=0 --stopTime=10 --timeout=50 --tolerance=1e-06 ModelicaTest_trunk_ModelicaTest_Fluid_TestComponents_Machines_TestWaterPumpDefaultLV.fmu > ModelicaTest_trunk_ModelicaTest.Fluid.TestComponents.Machines.TestWaterPumpDefaultLV.pipe 2>&1) TODO: How the !@#!# did the simulation report success but simulation result ModelicaTest_trunk_ModelicaTest.Fluid.TestComponents.Machines.TestWaterPumpDefaultLV_res.mat does not exist to compare? outputFormat=mat