Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries --ompython_omhome=/usr ModelicaTest_trunk_ModelicaTest.Fluid.TestComponents.Pipes.StaticPipe.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: translateModel(ModelicaTest.Fluid.TestComponents.Pipes.StaticPipe,tolerance=1e-06,outputFormat="mat",numberOfIntervals=20000,variableFilter="time|pipe1.port_a.p|pipe1.port_b.p|pipe1.port_b.m_flow|pipe1.port_b.h_outflow",fileNamePrefix="ModelicaTest_trunk_ModelicaTest.Fluid.TestComponents.Pipes.StaticPipe") translateModel(ModelicaTest.Fluid.TestComponents.Pipes.StaticPipe,tolerance=1e-06,outputFormat="mat",numberOfIntervals=20000,variableFilter="time|pipe1.port_a.p|pipe1.port_b.p|pipe1.port_b.m_flow|pipe1.port_b.h_outflow",fileNamePrefix="ModelicaTest_trunk_ModelicaTest.Fluid.TestComponents.Pipes.StaticPipe") Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices trunk/package.mo): time 0.00156/0.00156, allocations: 103.9 kB / 17.63 MB, free: 5.523 MB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex trunk/package.mo): time 0.001582/0.001582, allocations: 210.4 kB / 18.58 MB, free: 4.578 MB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica trunk/package.mo): time 1.421/1.421, allocations: 227.4 MB / 246.8 MB, free: 10.6 MB / 206.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaTest trunk/package.mo): time 0.2401/0.2401, allocations: 46.13 MB / 344.2 MB, free: 11.55 MB / 286.1 MB Notification: Performance of FrontEnd - loaded program: time 0.002238/0.002238, allocations: 79.83 kB / 417.7 MB, free: 19.69 MB / 302.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.1579/0.1601, allocations: 62.46 MB / 480.1 MB, free: 5.227 MB / 350.1 MB Notification: Performance of NFInst.instantiate(ModelicaTest.Fluid.TestComponents.Pipes.StaticPipe): time 0.01573/0.1759, allocations: 12.68 MB / 492.8 MB, free: 8.488 MB / 366.1 MB Notification: Performance of NFInst.instExpressions: time 0.008981/0.185, allocations: 5.484 MB / 498.3 MB, free: 2.988 MB / 366.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.0007302/0.1857, allocations: 19.88 kB / 498.3 MB, free: 2.969 MB / 366.1 MB Notification: Performance of NFTyping.typeComponents: time 0.0008443/0.1867, allocations: 202.7 kB / 498.5 MB, free: 2.77 MB / 366.1 MB Notification: Performance of NFTyping.typeBindings: time 0.002398/0.1891, allocations: 0.692 MB / 499.2 MB, free: 2.074 MB / 366.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.00472/0.1938, allocations: 1.557 MB / 0.489 GB, free: 0.5273 MB / 366.1 MB Notification: Performance of NFFlatten.flatten: time 0.002174/0.196, allocations: 1.235 MB / 0.4902 GB, free: 15.29 MB / 382.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0006448/0.1967, allocations: 317.3 kB / 0.4905 GB, free: 14.98 MB / 382.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.001044/0.1977, allocations: 0.4944 MB / 0.491 GB, free: 14.48 MB / 382.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.000767/0.1985, allocations: 462.4 kB / 0.4915 GB, free: 14.03 MB / 382.1 MB Notification: Performance of NFPackage.collectConstants: time 9.475e-05/0.1986, allocations: 44 kB / 0.4915 GB, free: 13.98 MB / 382.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.002471/0.2011, allocations: 1.088 MB / 0.4926 GB, free: 12.89 MB / 382.1 MB Notification: Performance of NFScalarize.scalarize: time 0.0002248/0.2013, allocations: 167.5 kB / 0.4927 GB, free: 12.73 MB / 382.1 MB Notification: Performance of NFVerifyModel.verify: time 0.0003449/0.2017, allocations: 274.7 kB / 0.493 GB, free: 12.46 MB / 382.1 MB Notification: Performance of NFConvertDAE.convert: time 0.002053/0.2037, allocations: 1.34 MB / 0.4943 GB, free: 11.12 MB / 382.1 MB Notification: Performance of FrontEnd - DAE generated: time 4.638e-06/0.2038, allocations: 0 / 0.4943 GB, free: 11.12 MB / 382.1 MB Notification: Performance of FrontEnd: time 1.793e-06/0.2038, allocations: 0 / 0.4943 GB, free: 11.12 MB / 382.1 MB Notification: Performance of Transformations before backend: time 8.536e-06/0.2038, allocations: 0 / 0.4943 GB, free: 11.12 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: 80 * Number of variables: 80 Notification: Performance of Generate backend data structure: time 0.001918/0.2057, allocations: 0.9559 MB / 0.4952 GB, free: 10.11 MB / 382.1 MB Notification: Performance of prepare preOptimizeDAE: time 4.084e-05/0.2058, allocations: 8.031 kB / 0.4952 GB, free: 10.1 MB / 382.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0002537/0.206, allocations: 60.36 kB / 0.4953 GB, free: 10.04 MB / 382.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0006216/0.2067, allocations: 441.5 kB / 0.4957 GB, free: 9.57 MB / 382.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 3.414e-05/0.2067, allocations: 20.56 kB / 0.4957 GB, free: 9.551 MB / 382.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 5.145e-05/0.2068, allocations: 31.98 kB / 0.4958 GB, free: 9.52 MB / 382.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0008852/0.2076, allocations: 0.5224 MB / 0.4963 GB, free: 8.957 MB / 382.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 1.673e-05/0.2077, allocations: 0 / 0.4963 GB, free: 8.957 MB / 382.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 4.945e-05/0.2077, allocations: 19.92 kB / 0.4963 GB, free: 8.938 MB / 382.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 5.71e-05/0.2078, allocations: 28.55 kB / 0.4963 GB, free: 8.91 MB / 382.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0007269/0.2085, allocations: 465.9 kB / 0.4968 GB, free: 8.453 MB / 382.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.003361/0.2119, allocations: 2.257 MB / 0.499 GB, free: 6.055 MB / 382.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.0004446/0.2124, allocations: 242.6 kB / 0.4992 GB, free: 5.809 MB / 382.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0002123/0.2126, allocations: 136.8 kB / 0.4993 GB, free: 5.672 MB / 382.1 MB Notification: Performance of preOpt evalFunc (simulation): time 0.001268/0.2139, allocations: 1.021 MB / 0.5003 GB, free: 4.531 MB / 382.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0003499/0.2142, allocations: 220.4 kB / 0.5005 GB, free: 4.285 MB / 382.1 MB Notification: Performance of pre-optimization done (n=18): time 1.563e-06/0.2142, allocations: 4 kB / 0.5005 GB, free: 4.281 MB / 382.1 MB Notification: Performance of matching and sorting (n=18): time 0.0007201/0.215, allocations: 378.6 kB / 0.5009 GB, free: 3.898 MB / 382.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 0.0001646/0.2151, allocations: 247.2 kB / 0.5011 GB, free: 3.602 MB / 382.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0006431/0.2158, allocations: 0.5175 MB / 0.5016 GB, free: 3.074 MB / 382.1 MB Notification: Performance of collectPreVariables (initialization): time 3.398e-05/0.2158, allocations: 25.7 kB / 0.5017 GB, free: 3.043 MB / 382.1 MB Notification: Performance of collectInitialEqns (initialization): time 0.0002807/0.2161, allocations: 295.1 kB / 0.5019 GB, free: 2.75 MB / 382.1 MB Notification: Performance of collectInitialBindings (initialization): time 6.401e-05/0.2162, allocations: 51.27 kB / 0.502 GB, free: 2.699 MB / 382.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 0.000161/0.2164, allocations: 97.58 kB / 0.5021 GB, free: 2.598 MB / 382.1 MB Notification: Performance of setup shared object (initialization): time 0.0001967/0.2166, allocations: 358.8 kB / 0.5024 GB, free: 2.238 MB / 382.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0002455/0.2168, allocations: 133.2 kB / 0.5026 GB, free: 2.105 MB / 382.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0003838/0.2172, allocations: 321.8 kB / 0.5029 GB, free: 1.711 MB / 382.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.0005718/0.2178, allocations: 461.2 kB / 0.5033 GB, free: 1.188 MB / 382.1 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 3.627e-06/0.2178, allocations: 4 kB / 0.5033 GB, free: 1.184 MB / 382.1 MB Notification: Performance of matching and sorting (n=49) (initialization): time 0.0008385/0.2187, allocations: 0.5344 MB / 0.5038 GB, free: 0.6367 MB / 382.1 MB Notification: Performance of prepare postOptimizeDAE: time 3.71e-05/0.2187, allocations: 37.7 kB / 0.5039 GB, free: 0.5938 MB / 382.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 7.023e-06/0.2187, allocations: 4 kB / 0.5039 GB, free: 0.5898 MB / 382.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 1.411e-05/0.2187, allocations: 4 kB / 0.5039 GB, free: 0.5859 MB / 382.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0003029/0.219, allocations: 79.89 kB / 0.504 GB, free: 0.5078 MB / 382.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.527e-05/0.2191, allocations: 11.94 kB / 0.504 GB, free: 0.4961 MB / 382.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0003774/0.2194, allocations: 63.36 kB / 0.504 GB, free: 444 kB / 382.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 4.172e-05/0.2195, allocations: 20 kB / 0.504 GB, free: 424 kB / 382.1 MB Notification: Performance of preBalanceInitialSystem (initialization_lambda0): time 0.000347/0.2198, allocations: 264.5 kB / 0.5043 GB, free: 156 kB / 382.1 MB Notification: Performance of partitionIndependentBlocks (initialization_lambda0): time 0.3015/0.5214, allocations: 306.6 kB / 0.5046 GB, free: 42.54 MB / 382.1 MB Notification: Performance of analyzeInitialSystem (initialization_lambda0): time 0.0006622/0.5221, allocations: 463 kB / 0.505 GB, free: 42.31 MB / 382.1 MB Notification: Performance of solveInitialSystemEqSystem (initialization_lambda0): time 6.663e-06/0.5221, allocations: 3.141 kB / 0.505 GB, free: 42.31 MB / 382.1 MB Notification: Performance of matching and sorting (n=49) (initialization_lambda0): time 0.001092/0.5232, allocations: 0.5237 MB / 0.5055 GB, free: 42.22 MB / 382.1 MB Notification: Performance of prepare postOptimizeDAE: time 6.463e-05/0.5233, allocations: 43.34 kB / 0.5056 GB, free: 42.19 MB / 382.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.065e-05/0.5233, allocations: 4.25 kB / 0.5056 GB, free: 42.19 MB / 382.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 1.842e-05/0.5233, allocations: 6.75 kB / 0.5056 GB, free: 42.19 MB / 382.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.000332/0.5236, allocations: 75.14 kB / 0.5057 GB, free: 42.19 MB / 382.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.669e-05/0.5237, allocations: 13.88 kB / 0.5057 GB, free: 42.18 MB / 382.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0005247/0.5242, allocations: 44.55 kB / 0.5057 GB, free: 42.18 MB / 382.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 5.311e-05/0.5243, allocations: 21.17 kB / 0.5057 GB, free: 42.18 MB / 382.1 MB Notification: Model statistics after passing the back-end for initialization: * Number of independent subsystems: 20 * Number of states: 0 () * Number of discrete variables: 7 (p_table.nextEventScaled,p_table.nextEvent,$PRE.p_table.nextEvent,p_table.last,p_table.b,p_table.a,$whenCondition1) * Number of discrete states: 0 () * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for initialization (44): * Single equations (assignments): 43 * Array equations: 0 * Algorithm blocks: 1 * Record equations: 0 * When equations: 0 * If-equations: 0 * Equation systems (not torn): 0 * Torn equation systems: 0 * Mixed (continuous/discrete) equation systems: 0 Notification: Performance of prepare postOptimizeDAE: time 0.0002754/0.5246, allocations: 240.7 kB / 0.506 GB, free: 41.97 MB / 382.1 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 9.814e-05/0.5247, allocations: 52.5 kB / 0.506 GB, free: 41.97 MB / 382.1 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.0007495/0.5254, allocations: 358.7 kB / 0.5064 GB, free: 41.89 MB / 382.1 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 5.69e-06/0.5254, allocations: 3.625 kB / 0.5064 GB, free: 41.89 MB / 382.1 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 6.983e-06/0.5254, allocations: 0 / 0.5064 GB, free: 41.89 MB / 382.1 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 5.59e-06/0.5255, allocations: 2.578 kB / 0.5064 GB, free: 41.89 MB / 382.1 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0005458/0.526, allocations: 423.8 kB / 0.5068 GB, free: 41.7 MB / 382.1 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 3.156e-06/0.526, allocations: 0.7188 kB / 0.5068 GB, free: 41.7 MB / 382.1 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0001288/0.5262, allocations: 23.23 kB / 0.5068 GB, free: 41.7 MB / 382.1 MB Notification: Performance of postOpt tearingSystem (simulation): time 3.346e-06/0.5262, allocations: 1.375 kB / 0.5068 GB, free: 41.7 MB / 382.1 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 2.433e-05/0.5262, allocations: 7.266 kB / 0.5068 GB, free: 41.7 MB / 382.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 4.018e-06/0.5262, allocations: 2.078 kB / 0.5068 GB, free: 41.7 MB / 382.1 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 3.226e-06/0.5262, allocations: 4.406 kB / 0.5068 GB, free: 41.7 MB / 382.1 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.0006446/0.5269, allocations: 371 kB / 0.5072 GB, free: 41.59 MB / 382.1 MB Notification: Performance of postOpt removeConstants (simulation): time 0.0001131/0.527, allocations: 121.4 kB / 0.5073 GB, free: 41.48 MB / 382.1 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 8.783e-05/0.5271, allocations: 12.06 kB / 0.5073 GB, free: 41.47 MB / 382.1 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0002196/0.5273, allocations: 11.77 kB / 0.5073 GB, free: 41.47 MB / 382.1 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 6.007e-05/0.5274, allocations: 16.88 kB / 0.5073 GB, free: 41.47 MB / 382.1 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 2.811e-05/0.5274, allocations: 11.33 kB / 0.5073 GB, free: 41.47 MB / 382.1 MB Notification: Performance of sorting global known variables: time 0.0004831/0.5279, allocations: 371.8 kB / 0.5077 GB, free: 41.35 MB / 382.1 MB Notification: Performance of sort global known variables: time 2.41e-07/0.5279, allocations: 0 / 0.5077 GB, free: 41.35 MB / 382.1 MB Notification: Performance of remove unused functions: time 0.001351/0.5293, allocations: 435.8 kB / 0.5081 GB, free: 41.32 MB / 382.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: 6 ($whenCondition1,p_table.a,p_table.b,p_table.last,p_table.nextEvent,p_table.nextEventScaled) * Number of discrete states: 6 (p_table.nextEvent,p_table.last,p_table.nextEventScaled,p_table.b,p_table.a,$whenCondition1) * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for simulation (16): * Single equations (assignments): 15 * Array equations: 0 * Algorithm blocks: 1 * Record equations: 0 * When equations: 0 * If-equations: 0 * Equation systems (not torn): 0 * Torn equation systems: 0 * Mixed (continuous/discrete) equation systems: 0 Notification: Performance of Backend phase and start with SimCode phase: time 0.001/0.5303, allocations: 416 kB / 0.5085 GB, free: 41.21 MB / 382.1 MB Notification: Performance of simCode: created initialization part: time 0.001136/0.5314, allocations: 0.6868 MB / 0.5092 GB, free: 40.88 MB / 382.1 MB Notification: Performance of simCode: created event and clocks part: time 4.058e-06/0.5314, allocations: 1.062 kB / 0.5092 GB, free: 40.88 MB / 382.1 MB Notification: Performance of simCode: created simulation system equations: time 0.0002065/0.5316, allocations: 185.1 kB / 0.5093 GB, free: 40.77 MB / 382.1 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.000957/0.5326, allocations: 212.8 kB / 0.5095 GB, free: 40.71 MB / 382.1 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.001537/0.5342, allocations: 0.8318 MB / 0.5104 GB, free: 40.3 MB / 382.1 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0003841/0.5346, allocations: 0.8473 MB / 0.5112 GB, free: 39.59 MB / 382.1 MB Notification: Performance of simCode: alias equations: time 0.0005975/0.5352, allocations: 161.6 kB / 0.5113 GB, free: 39.58 MB / 382.1 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0001099/0.5353, allocations: 48.41 kB / 0.5114 GB, free: 39.57 MB / 382.1 MB Notification: Performance of SimCode: time 4e-07/0.5353, allocations: 0 / 0.5114 GB, free: 39.57 MB / 382.1 MB Notification: Performance of Templates: time 0.03181/0.5671, allocations: 12.14 MB / 0.5232 GB, free: 35.71 MB / 382.1 MB make -j1 -f ModelicaTest_trunk_ModelicaTest.Fluid.TestComponents.Pipes.StaticPipe.makefile (rm -f ModelicaTest_trunk_ModelicaTest.Fluid.TestComponents.Pipes.StaticPipe.pipe ; mkfifo ModelicaTest_trunk_ModelicaTest.Fluid.TestComponents.Pipes.StaticPipe.pipe ; head -c 1048576 < ModelicaTest_trunk_ModelicaTest.Fluid.TestComponents.Pipes.StaticPipe.pipe >> ../files/ModelicaTest_trunk_ModelicaTest.Fluid.TestComponents.Pipes.StaticPipe.sim & ./ModelicaTest_trunk_ModelicaTest.Fluid.TestComponents.Pipes.StaticPipe -abortSlowSimulation -alarm=480 -emit_protected -lv LOG_STATS > ModelicaTest_trunk_ModelicaTest.Fluid.TestComponents.Pipes.StaticPipe.pipe 2>&1) diffSimulationResults("ModelicaTest_trunk_ModelicaTest.Fluid.TestComponents.Pipes.StaticPipe_res.mat","/var/lib/jenkins/ws/OpenModelicaLibraryTestingWork/Reference-modelica.org/ReferenceResults/MAP-LIB_ReferenceResults/v4.0.0/ModelicaTest/Fluid/TestComponents/Pipes/StaticPipe/StaticPipe.csv","/var/lib/jenkins/ws/OpenModelicaLibraryTestingWork/OpenModelicaLibraryTesting/files/ModelicaTest_trunk_ModelicaTest.Fluid.TestComponents.Pipes.StaticPipe.diff",relTol=0.003,relTolDiffMinMax=0.003,rangeDelta=0.001) Reference file matches