Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries --ompython_omhome=/usr Modelica_4.0.0_Modelica.Fluid.Examples.Tanks.ThreeTanks.conf.json loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo", uses=false) 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) 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) Using package ModelicaServices with version 4.0.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo) Running command: translateModel(Modelica.Fluid.Examples.Tanks.ThreeTanks,tolerance=1e-06,outputFormat="mat",numberOfIntervals=5000,variableFilter="time|tank1.level|tank1.medium.T|tank2.level|tank2.medium.T|tank3.level|tank3.medium.T",fileNamePrefix="Modelica_4.0.0_Modelica.Fluid.Examples.Tanks.ThreeTanks") translateModel(Modelica.Fluid.Examples.Tanks.ThreeTanks,tolerance=1e-06,outputFormat="mat",numberOfIntervals=5000,variableFilter="time|tank1.level|tank1.medium.T|tank2.level|tank2.medium.T|tank3.level|tank3.medium.T",fileNamePrefix="Modelica_4.0.0_Modelica.Fluid.Examples.Tanks.ThreeTanks") Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.001086/0.001086, allocations: 113.6 kB / 17.69 MB, free: 5.309 MB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo): time 0.001107/0.001107, allocations: 192 kB / 18.63 MB, free: 4.375 MB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 4.0.0+maint.om/package.mo): time 1.298/1.298, allocations: 222.9 MB / 242.3 MB, free: 15.18 MB / 206.1 MB Notification: Performance of FrontEnd - loaded program: time 0.0009516/0.0009514, allocations: 45.3 kB / 302 MB, free: 5.176 MB / 238.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.08435/0.08532, allocations: 49.45 MB / 351.5 MB, free: 3.699 MB / 286.1 MB Notification: Performance of NFInst.instantiate(Modelica.Fluid.Examples.Tanks.ThreeTanks): time 0.1857/0.2711, allocations: 28.67 MB / 380.2 MB, free: 9.695 MB / 302.1 MB Notification: Performance of NFInst.instExpressions: time 0.01747/0.2886, allocations: 15.01 MB / 395.2 MB, free: 2.383 MB / 302.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.002234/0.2909, allocations: 42.34 kB / 395.2 MB, free: 2.367 MB / 302.1 MB Notification: Performance of NFTyping.typeComponents: time 0.001919/0.2928, allocations: 0.5931 MB / 395.8 MB, free: 2.02 MB / 302.1 MB Notification: Performance of NFTyping.typeBindings: time 0.006112/0.299, allocations: 2.288 MB / 398.1 MB, free: 0.7422 MB / 302.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.01065/0.3096, allocations: 3.743 MB / 401.8 MB, free: 14.2 MB / 318.1 MB Notification: Performance of NFFlatten.flatten: time 0.005994/0.3157, allocations: 4.13 MB / 406 MB, free: 11.87 MB / 318.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.002166/0.3178, allocations: 1.156 MB / 407.1 MB, free: 11.08 MB / 318.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.003385/0.3212, allocations: 1.54 MB / 408.7 MB, free: 10.24 MB / 318.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.003153/0.3244, allocations: 1.666 MB / 410.3 MB, free: 9.258 MB / 318.1 MB Notification: Performance of NFPackage.collectConstants: time 0.0005707/0.325, allocations: 166.9 kB / 410.5 MB, free: 9.254 MB / 318.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.005733/0.3307, allocations: 2.426 MB / 412.9 MB, free: 7.098 MB / 318.1 MB Notification: Performance of NFScalarize.scalarize: time 0.0009645/0.3317, allocations: 0.6155 MB / 413.5 MB, free: 6.48 MB / 318.1 MB Notification: Performance of NFVerifyModel.verify: time 0.001702/0.3334, allocations: 0.8672 MB / 414.4 MB, free: 5.609 MB / 318.1 MB Notification: Performance of NFConvertDAE.convert: time 0.007678/0.3411, allocations: 3.729 MB / 418.1 MB, free: 1.871 MB / 318.1 MB Notification: Performance of FrontEnd - DAE generated: time 4.359e-06/0.3411, allocations: 4 kB / 418.1 MB, free: 1.867 MB / 318.1 MB Notification: Performance of FrontEnd: time 1.142e-06/0.3411, allocations: 0 / 418.1 MB, free: 1.867 MB / 318.1 MB Notification: Performance of Transformations before backend: time 7.458e-05/0.3412, allocations: 0 / 418.1 MB, free: 1.867 MB / 318.1 MB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 261 * Number of variables: 261 Notification: Performance of Generate backend data structure: time 0.006169/0.3474, allocations: 2.208 MB / 420.3 MB, free: 15.6 MB / 334.1 MB Notification: Performance of prepare preOptimizeDAE: time 4.148e-05/0.3475, allocations: 15.89 kB / 420.4 MB, free: 15.59 MB / 334.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.000614/0.3481, allocations: 171.1 kB / 420.5 MB, free: 15.42 MB / 334.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.001958/0.3501, allocations: 1.057 MB / 421.6 MB, free: 14.32 MB / 334.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 0.0001649/0.3502, allocations: 179.1 kB / 421.8 MB, free: 14.12 MB / 334.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 0.0001867/0.3504, allocations: 107.9 kB / 421.9 MB, free: 14.02 MB / 334.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.002791/0.3532, allocations: 1.753 MB / 423.6 MB, free: 12.21 MB / 334.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 2.934e-05/0.3533, allocations: 0 / 423.6 MB, free: 12.21 MB / 334.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 0.0001361/0.3534, allocations: 47.97 kB / 423.7 MB, free: 12.16 MB / 334.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 0.0001544/0.3536, allocations: 109.9 kB / 423.8 MB, free: 12.05 MB / 334.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.002766/0.3563, allocations: 1.784 MB / 425.6 MB, free: 10.26 MB / 334.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.01173/0.3681, allocations: 6.704 MB / 432.3 MB, free: 3.227 MB / 334.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.001916/0.37, allocations: 1.249 MB / 433.5 MB, free: 1.961 MB / 334.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.001101/0.3711, allocations: 0.769 MB / 434.3 MB, free: 1.191 MB / 334.1 MB Notification: Performance of preOpt evalFunc (simulation): time 0.005711/0.3769, allocations: 4.259 MB / 438.5 MB, free: 12.52 MB / 350.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 4.83e-05/0.3769, allocations: 51.56 kB / 438.6 MB, free: 12.46 MB / 350.1 MB Notification: Performance of preOpt simplifyInStream (simulation): time 0.0007019/0.3776, allocations: 170.8 kB / 438.8 MB, free: 12.29 MB / 350.1 MB Notification: Performance of pre-optimization done (n=97): time 5.059e-06/0.3777, allocations: 0 / 438.8 MB, free: 12.29 MB / 350.1 MB Notification: Performance of matching and sorting (n=112): time 0.01947/0.3971, allocations: 5.686 MB / 444.4 MB, free: 6.543 MB / 350.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 0.0001078/0.3973, allocations: 149.4 kB / 444.6 MB, free: 6.367 MB / 350.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.002055/0.3993, allocations: 1.25 MB / 445.8 MB, free: 5.109 MB / 350.1 MB Notification: Performance of collectPreVariables (initialization): time 0.0001508/0.3995, allocations: 45.7 kB / 445.9 MB, free: 5.059 MB / 350.1 MB Notification: Performance of collectInitialEqns (initialization): time 0.000524/0.4, allocations: 0.6129 MB / 446.5 MB, free: 4.438 MB / 350.1 MB Notification: Performance of collectInitialBindings (initialization): time 0.0003783/0.4004, allocations: 390.5 kB / 446.9 MB, free: 4.051 MB / 350.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 0.0005609/0.401, allocations: 287.4 kB / 447.2 MB, free: 3.766 MB / 350.1 MB Notification: Performance of setup shared object (initialization): time 0.0001033/0.4011, allocations: 309.1 kB / 447.5 MB, free: 3.461 MB / 350.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.001254/0.4024, allocations: 0.7231 MB / 448.2 MB, free: 2.734 MB / 350.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.001548/0.404, allocations: 1.06 MB / 449.2 MB, free: 1.531 MB / 350.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.002803/0.4068, allocations: 1.751 MB / 451 MB, free: 15.64 MB / 366.1 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 1.056e-05/0.4068, allocations: 8 kB / 451 MB, free: 15.64 MB / 366.1 MB Notification: Performance of matching and sorting (n=181) (initialization): time 0.004096/0.4109, allocations: 2.281 MB / 453.3 MB, free: 13.34 MB / 366.1 MB Notification: Performance of prepare postOptimizeDAE: time 2.702e-05/0.411, allocations: 15.94 kB / 453.3 MB, free: 13.33 MB / 366.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.568e-05/0.411, allocations: 8 kB / 453.3 MB, free: 13.32 MB / 366.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 0.00737/0.4184, allocations: 1.288 MB / 454.6 MB, free: 12.03 MB / 366.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.001441/0.4198, allocations: 291.5 kB / 454.9 MB, free: 11.74 MB / 366.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 0.002577/0.4224, allocations: 1.61 MB / 456.5 MB, free: 10.1 MB / 366.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.001654/0.4241, allocations: 59.97 kB / 456.5 MB, free: 10.04 MB / 366.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 0.000275/0.4244, allocations: 67.97 kB / 456.6 MB, free: 9.977 MB / 366.1 MB Notification: Performance of preBalanceInitialSystem (initialization_lambda0): time 0.00174/0.4261, allocations: 0.9801 MB / 457.6 MB, free: 8.992 MB / 366.1 MB Notification: Performance of partitionIndependentBlocks (initialization_lambda0): time 0.001483/0.4276, allocations: 1.055 MB / 458.6 MB, free: 7.793 MB / 366.1 MB Notification: Performance of analyzeInitialSystem (initialization_lambda0): time 0.002675/0.4303, allocations: 1.722 MB / 460.4 MB, free: 5.93 MB / 366.1 MB Notification: Performance of solveInitialSystemEqSystem (initialization_lambda0): time 1.066e-05/0.4303, allocations: 3.938 kB / 460.4 MB, free: 5.926 MB / 366.1 MB Notification: Performance of matching and sorting (n=181) (initialization_lambda0): time 0.004125/0.4345, allocations: 2.19 MB / 462.6 MB, free: 3.723 MB / 366.1 MB Notification: Performance of prepare postOptimizeDAE: time 2.08e-05/0.4345, allocations: 16.62 kB / 462.6 MB, free: 3.707 MB / 366.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.894e-05/0.4345, allocations: 11.98 kB / 462.6 MB, free: 3.695 MB / 366.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 0.006628/0.4412, allocations: 1.101 MB / 463.7 MB, free: 2.59 MB / 366.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.001333/0.4425, allocations: 307.5 kB / 464 MB, free: 2.289 MB / 366.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 0.002151/0.4447, allocations: 1.448 MB / 465.4 MB, free: 0.8164 MB / 366.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.001361/0.4461, allocations: 63.97 kB / 465.5 MB, free: 0.7539 MB / 366.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 0.0001997/0.4463, allocations: 75.89 kB / 465.6 MB, free: 0.6797 MB / 366.1 MB Notification: Model statistics after passing the back-end for initialization: * Number of independent subsystems: 43 * Number of states: 0 () * Number of discrete variables: 6 (tank3.inFlow[1],tank3.regularFlow[1],tank2.inFlow[1],tank2.regularFlow[1],tank1.inFlow[1],tank1.regularFlow[1]) * Number of discrete states: 0 () * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for initialization (156): * Single equations (assignments): 155 * Array equations: 0 * Algorithm blocks: 0 * Record equations: 0 * When equations: 0 * If-equations: 0 * Equation systems (not torn): 0 * Torn equation systems: 1 * Mixed (continuous/discrete) equation systems: 0 Notification: Torn system details for strict tearing set: * Linear torn systems (#iteration vars, #inner vars, density): 0 systems * Non-linear torn systems (#iteration vars, #inner vars): 1 system {(8,18)} Notification: Performance of prepare postOptimizeDAE: time 0.0004483/0.4467, allocations: 267.8 kB / 465.8 MB, free: 420 kB / 366.1 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.0003789/0.4471, allocations: 142.3 kB / 466 MB, free: 276 kB / 366.1 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.00453/0.4517, allocations: 2.098 MB / 468.1 MB, free: 14.16 MB / 382.1 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 1.636e-05/0.4517, allocations: 12 kB / 468.1 MB, free: 14.15 MB / 382.1 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 1.064e-05/0.4517, allocations: 3.938 kB / 468.1 MB, free: 14.14 MB / 382.1 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 1.32e-05/0.4517, allocations: 7.969 kB / 468.1 MB, free: 14.14 MB / 382.1 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.006173/0.4579, allocations: 3.581 MB / 471.7 MB, free: 10.5 MB / 382.1 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 5.941e-06/0.4579, allocations: 4 kB / 471.7 MB, free: 10.5 MB / 382.1 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0009626/0.4589, allocations: 199.7 kB / 471.9 MB, free: 10.3 MB / 382.1 MB Notification: Performance of postOpt tearingSystem (simulation): time 0.002574/0.4615, allocations: 0.8641 MB / 472.7 MB, free: 9.438 MB / 382.1 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 0.0001183/0.4616, allocations: 31.98 kB / 472.8 MB, free: 9.406 MB / 382.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 0.002252/0.4639, allocations: 1.603 MB / 474.4 MB, free: 7.777 MB / 382.1 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 2.575e-06/0.4639, allocations: 4 kB / 474.4 MB, free: 7.773 MB / 382.1 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.004828/0.4687, allocations: 2.916 MB / 477.3 MB, free: 4.836 MB / 382.1 MB Notification: Performance of postOpt removeConstants (simulation): time 0.001058/0.4698, allocations: 391.2 kB / 477.7 MB, free: 4.434 MB / 382.1 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 0.0003655/0.4702, allocations: 20 kB / 477.7 MB, free: 4.414 MB / 382.1 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.001201/0.4714, allocations: 63.95 kB / 477.8 MB, free: 4.352 MB / 382.1 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0003211/0.4717, allocations: 97.11 kB / 477.9 MB, free: 4.258 MB / 382.1 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 0.0001445/0.4719, allocations: 51.97 kB / 477.9 MB, free: 4.207 MB / 382.1 MB Notification: Performance of sorting global known variables: time 0.001492/0.4734, allocations: 0.8441 MB / 478.8 MB, free: 3.359 MB / 382.1 MB Notification: Performance of sort global known variables: time 2.71e-07/0.4734, allocations: 0 / 478.8 MB, free: 3.359 MB / 382.1 MB Notification: Performance of remove unused functions: time 0.003451/0.4768, allocations: 1.16 MB / 479.9 MB, free: 2.199 MB / 382.1 MB Notification: Model statistics after passing the back-end for simulation: * Number of independent subsystems: 1 * Number of states: 6 (tank1.level,tank1.medium.T,tank2.level,tank2.medium.T,tank3.level,tank3.medium.T) * Number of discrete variables: 6 (tank1.regularFlow[1],tank1.inFlow[1],tank2.regularFlow[1],tank2.inFlow[1],tank3.regularFlow[1],tank3.inFlow[1]) * Number of discrete states: 0 () * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for simulation (96): * Single equations (assignments): 95 * Array equations: 0 * Algorithm blocks: 0 * Record equations: 0 * When equations: 0 * If-equations: 0 * Equation systems (not torn): 0 * Torn equation systems: 1 * Mixed (continuous/discrete) equation systems: 0 Notification: Torn system details for strict tearing set: * Linear torn systems (#iteration vars, #inner vars, density): 0 systems * Non-linear torn systems (#iteration vars, #inner vars): 1 system {(9,29)} Notification: Performance of Backend phase and start with SimCode phase: time 0.00245/0.4793, allocations: 0.8535 MB / 480.8 MB, free: 1.332 MB / 382.1 MB Notification: Performance of simCode: created initialization part: time 0.006743/0.4861, allocations: 2.855 MB / 483.6 MB, free: 14.48 MB / 398.1 MB Notification: Performance of simCode: created event and clocks part: time 7.073e-06/0.4861, allocations: 4.75 kB / 483.6 MB, free: 14.47 MB / 398.1 MB Notification: Performance of simCode: created simulation system equations: time 0.002013/0.4881, allocations: 0.8751 MB / 484.5 MB, free: 13.6 MB / 398.1 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.003537/0.4917, allocations: 0.657 MB / 485.2 MB, free: 12.95 MB / 398.1 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.006099/0.4978, allocations: 3.07 MB / 488.2 MB, free: 9.867 MB / 398.1 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0009589/0.4988, allocations: 1.292 MB / 489.5 MB, free: 8.551 MB / 398.1 MB Notification: Performance of simCode: alias equations: time 0.002038/0.5009, allocations: 0.59 MB / 490.1 MB, free: 7.953 MB / 398.1 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0004028/0.5013, allocations: 131.4 kB / 490.2 MB, free: 7.824 MB / 398.1 MB Notification: Performance of SimCode: time 8.61e-07/0.5013, allocations: 0 / 490.2 MB, free: 7.824 MB / 398.1 MB Notification: Performance of Templates: time 0.0654/0.5667, allocations: 43.79 MB / 0.5215 GB, free: 12.31 MB / 446.1 MB make -j1 -f Modelica_4.0.0_Modelica.Fluid.Examples.Tanks.ThreeTanks.makefile (rm -f Modelica_4.0.0_Modelica.Fluid.Examples.Tanks.ThreeTanks.pipe ; mkfifo Modelica_4.0.0_Modelica.Fluid.Examples.Tanks.ThreeTanks.pipe ; head -c 1048576 < Modelica_4.0.0_Modelica.Fluid.Examples.Tanks.ThreeTanks.pipe >> ../files/Modelica_4.0.0_Modelica.Fluid.Examples.Tanks.ThreeTanks.sim & ./Modelica_4.0.0_Modelica.Fluid.Examples.Tanks.ThreeTanks -abortSlowSimulation -alarm=480 -s gbode -emit_protected -lv LOG_STATS > Modelica_4.0.0_Modelica.Fluid.Examples.Tanks.ThreeTanks.pipe 2>&1) diffSimulationResults("Modelica_4.0.0_Modelica.Fluid.Examples.Tanks.ThreeTanks_res.mat","/var/lib/jenkins1/ws/OpenModelicaLibraryTestingWork/Reference-modelica.org/ReferenceResults/MAP-LIB_ReferenceResults/v4.0.0/Modelica/Fluid/Examples/Tanks/ThreeTanks/ThreeTanks.csv","/var/lib/jenkins1/ws/OpenModelicaLibraryTestingWork/OpenModelicaLibraryTesting/files/Modelica_4.0.0_Modelica.Fluid.Examples.Tanks.ThreeTanks.diff",relTol=0.003,relTolDiffMinMax=0.003,rangeDelta=0.001) Reference file matches