Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries --ompython_omhome=/usr Buildings_latest_Buildings.Fluid.Examples.Performance.PressureDrop.SeriesDpOptimised.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) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/Buildings 12.0.0-master/package.mo", uses=false) Using package Buildings with version 12.0.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Buildings 12.0.0-master/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) 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(Buildings.Fluid.Examples.Performance.PressureDrop.SeriesDpOptimised,tolerance=1e-06,outputFormat="mat",numberOfIntervals=5000,variableFilter="time|sin.ports.1..m_flow",fileNamePrefix="Buildings_latest_Buildings.Fluid.Examples.Performance.PressureDrop.SeriesDpOptimised") translateModel(Buildings.Fluid.Examples.Performance.PressureDrop.SeriesDpOptimised,tolerance=1e-06,outputFormat="mat",numberOfIntervals=5000,variableFilter="time|sin.ports.1..m_flow",fileNamePrefix="Buildings_latest_Buildings.Fluid.Examples.Performance.PressureDrop.SeriesDpOptimised") Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.001615/0.001615, allocations: 104.8 kB / 16.27 MB, free: 5.98 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.001576/0.001576, allocations: 187.7 kB / 17.19 MB, free: 5.605 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.381/1.381, allocations: 222.9 MB / 240.9 MB, free: 15.2 MB / 206.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Buildings 12.0.0-master/package.mo): time 2.7/2.7, allocations: 482.4 MB / 0.7553 GB, free: 6.992 MB / 0.6231 GB Notification: Performance of FrontEnd - loaded program: time 0.001933/0.001934, allocations: 70.23 kB / 0.9245 GB, free: 12 kB / 0.6856 GB Notification: Performance of FrontEnd - Absyn->SCode: time 0.786/0.7879, allocations: 162.2 MB / 1.083 GB, free: 1.656 MB / 0.8262 GB Notification: Performance of NFInst.instantiate(Buildings.Fluid.Examples.Performance.PressureDrop.SeriesDpOptimised): time 0.197/0.985, allocations: 161.6 MB / 1.241 GB, free: 12.82 MB / 0.9669 GB Notification: Performance of NFInst.instExpressions: time 0.005296/0.9903, allocations: 3.624 MB / 1.244 GB, free: 9.188 MB / 0.9669 GB Notification: Performance of NFInst.updateImplicitVariability: time 0.000291/0.9906, allocations: 7.938 kB / 1.244 GB, free: 9.18 MB / 0.9669 GB Notification: Performance of NFTyping.typeComponents: time 0.0005439/0.9912, allocations: 162.9 kB / 1.244 GB, free: 9.02 MB / 0.9669 GB Notification: Performance of NFTyping.typeBindings: time 0.001269/0.9925, allocations: 0.5327 MB / 1.245 GB, free: 8.484 MB / 0.9669 GB Notification: Performance of NFTyping.typeClassSections: time 0.001207/0.9937, allocations: 433 kB / 1.245 GB, free: 8.066 MB / 0.9669 GB Notification: Performance of NFFlatten.flatten: time 0.002708/0.9964, allocations: 2.508 MB / 1.248 GB, free: 5.547 MB / 0.9669 GB Notification: Performance of NFFlatten.resolveConnections: time 0.001245/0.9977, allocations: 0.9371 MB / 1.249 GB, free: 4.594 MB / 0.9669 GB Notification: Performance of NFEvalConstants.evaluate: time 0.002022/0.9997, allocations: 1.168 MB / 1.25 GB, free: 3.422 MB / 0.9669 GB Notification: Performance of NFSimplifyModel.simplify: time 0.0008971/1.001, allocations: 0.6806 MB / 1.251 GB, free: 2.738 MB / 0.9669 GB Notification: Performance of NFPackage.collectConstants: time 0.0001206/1.001, allocations: 56 kB / 1.251 GB, free: 2.684 MB / 0.9669 GB Notification: Performance of NFFlatten.collectFunctions: time 0.001428/1.002, allocations: 0.7367 MB / 1.251 GB, free: 1.945 MB / 0.9669 GB Notification: Performance of NFScalarize.scalarize: time 0.0003294/1.003, allocations: 294.9 kB / 1.252 GB, free: 1.656 MB / 0.9669 GB Notification: Performance of NFVerifyModel.verify: time 0.0006608/1.003, allocations: 0.5479 MB / 1.252 GB, free: 1.105 MB / 0.9669 GB Notification: Performance of NFConvertDAE.convert: time 0.00163/1.005, allocations: 1.382 MB / 1.253 GB, free: 15.72 MB / 0.9825 GB Notification: Performance of FrontEnd - DAE generated: time 4.679e-06/1.005, allocations: 3.938 kB / 1.253 GB, free: 15.71 MB / 0.9825 GB Notification: Performance of FrontEnd: time 1.102e-06/1.005, allocations: 0 / 1.253 GB, free: 15.71 MB / 0.9825 GB Notification: Performance of Transformations before backend: time 1.361e-05/1.005, allocations: 0 / 1.253 GB, free: 15.71 MB / 0.9825 GB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 125 * Number of variables: 125 Notification: Performance of Generate backend data structure: time 0.002265/1.007, allocations: 1.447 MB / 1.255 GB, free: 14.21 MB / 0.9825 GB Notification: Performance of prepare preOptimizeDAE: time 3.569e-05/1.007, allocations: 8.031 kB / 1.255 GB, free: 14.2 MB / 0.9825 GB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0007704/1.008, allocations: 186.4 kB / 1.255 GB, free: 14.02 MB / 0.9825 GB Notification: Performance of preOpt evaluateParameters (simulation): time 0.001178/1.009, allocations: 0.7946 MB / 1.256 GB, free: 13.16 MB / 0.9825 GB Notification: Performance of preOpt simplifyIfEquations (simulation): time 5.08e-05/1.009, allocations: 52.94 kB / 1.256 GB, free: 13.11 MB / 0.9825 GB Notification: Performance of preOpt expandDerOperator (simulation): time 8.721e-05/1.009, allocations: 59.98 kB / 1.256 GB, free: 13.05 MB / 0.9825 GB Notification: Performance of preOpt clockPartitioning (simulation): time 0.001198/1.011, allocations: 0.7948 MB / 1.257 GB, free: 12.18 MB / 0.9825 GB Notification: Performance of preOpt findStateOrder (simulation): time 1.802e-05/1.011, allocations: 3.938 kB / 1.257 GB, free: 12.18 MB / 0.9825 GB Notification: Performance of preOpt replaceEdgeChange (simulation): time 5.54e-05/1.011, allocations: 24 kB / 1.257 GB, free: 12.16 MB / 0.9825 GB Notification: Performance of preOpt inlineArrayEqn (simulation): time 1.55e-05/1.011, allocations: 15.98 kB / 1.257 GB, free: 12.14 MB / 0.9825 GB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0009357/1.012, allocations: 0.5383 MB / 1.257 GB, free: 11.61 MB / 0.9825 GB 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.004407/1.016, allocations: 4.603 MB / 1.262 GB, free: 6.617 MB / 0.9825 GB Notification: Performance of preOpt comSubExp (simulation): time 0.0007529/1.017, allocations: 422.3 kB / 1.262 GB, free: 6.195 MB / 0.9825 GB Notification: Performance of preOpt resolveLoops (simulation): time 0.0003981/1.017, allocations: 245.6 kB / 1.262 GB, free: 5.953 MB / 0.9825 GB Notification: Performance of preOpt evalFunc (simulation): time 0.0003038/1.017, allocations: 194.2 kB / 1.263 GB, free: 5.727 MB / 0.9825 GB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0005095/1.018, allocations: 301 kB / 1.263 GB, free: 5.414 MB / 0.9825 GB Notification: Performance of pre-optimization done (n=31): time 1.954e-06/1.018, allocations: 0 / 1.263 GB, free: 5.414 MB / 0.9825 GB Notification: Performance of matching and sorting (n=31): time 0.003924/1.022, allocations: 1.319 MB / 1.264 GB, free: 4.066 MB / 0.9825 GB Notification: Performance of inlineWhenForInitialization (initialization): time 5.51e-05/1.022, allocations: 85.11 kB / 1.264 GB, free: 3.965 MB / 0.9825 GB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.001457/1.023, allocations: 1.118 MB / 1.265 GB, free: 2.828 MB / 0.9825 GB Notification: Performance of collectPreVariables (initialization): time 7.528e-05/1.024, allocations: 37.69 kB / 1.265 GB, free: 2.785 MB / 0.9825 GB Notification: Performance of collectInitialEqns (initialization): time 0.0004512/1.024, allocations: 484.2 kB / 1.266 GB, free: 2.309 MB / 0.9825 GB Notification: Performance of collectInitialBindings (initialization): time 0.0001127/1.024, allocations: 110.5 kB / 1.266 GB, free: 2.199 MB / 0.9825 GB Notification: Performance of simplifyInitialFunctions (initialization): time 0.0001728/1.024, allocations: 109.9 kB / 1.266 GB, free: 2.086 MB / 0.9825 GB Notification: Performance of setup shared object (initialization): time 0.0001504/1.024, allocations: 334.2 kB / 1.266 GB, free: 1.754 MB / 0.9825 GB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0003961/1.025, allocations: 214.4 kB / 1.267 GB, free: 1.543 MB / 0.9825 GB Notification: Performance of partitionIndependentBlocks (initialization): time 0.000653/1.026, allocations: 0.5135 MB / 1.267 GB, free: 0.8945 MB / 0.9825 GB Notification: Performance of analyzeInitialSystem (initialization): time 0.000907/1.026, allocations: 0.6364 MB / 1.268 GB, free: 184 kB / 0.9825 GB Notification: Performance of solveInitialSystemEqSystem (initialization): time 3.917e-06/1.026, allocations: 0 / 1.268 GB, free: 184 kB / 0.9825 GB Notification: Performance of matching and sorting (n=54) (initialization): time 0.00242/1.029, allocations: 1.049 MB / 1.269 GB, free: 15.11 MB / 0.9981 GB Notification: Performance of prepare postOptimizeDAE: time 4.651e-05/1.029, allocations: 36.2 kB / 1.269 GB, free: 15.07 MB / 0.9981 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.105e-05/1.029, allocations: 4 kB / 1.269 GB, free: 15.07 MB / 0.9981 GB Notification: Performance of postOpt tearingSystem (initialization): time 0.001382/1.03, allocations: 368.5 kB / 1.269 GB, free: 14.71 MB / 0.9981 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0002245/1.031, allocations: 55.91 kB / 1.269 GB, free: 14.65 MB / 0.9981 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 0.001104/1.032, allocations: 1.018 MB / 1.27 GB, free: 13.61 MB / 0.9981 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0006817/1.032, allocations: 71.55 kB / 1.27 GB, free: 13.54 MB / 0.9981 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 5.352e-05/1.032, allocations: 31.98 kB / 1.27 GB, free: 13.51 MB / 0.9981 GB Notification: Performance of preBalanceInitialSystem (initialization_lambda0): time 0.0007368/1.033, allocations: 0.4921 MB / 1.271 GB, free: 13.02 MB / 0.9981 GB Notification: Performance of partitionIndependentBlocks (initialization_lambda0): time 0.0005903/1.034, allocations: 497.9 kB / 1.271 GB, free: 12.39 MB / 0.9981 GB Notification: Performance of analyzeInitialSystem (initialization_lambda0): time 0.0007804/1.035, allocations: 0.5488 MB / 1.272 GB, free: 11.77 MB / 0.9981 GB Notification: Performance of solveInitialSystemEqSystem (initialization_lambda0): time 2.505e-06/1.035, allocations: 0 / 1.272 GB, free: 11.77 MB / 0.9981 GB Notification: Performance of matching and sorting (n=54) (initialization_lambda0): time 0.001629/1.036, allocations: 0.838 MB / 1.273 GB, free: 10.91 MB / 0.9981 GB Notification: Performance of prepare postOptimizeDAE: time 3.558e-05/1.036, allocations: 37.7 kB / 1.273 GB, free: 10.87 MB / 0.9981 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.23e-05/1.036, allocations: 11.94 kB / 1.273 GB, free: 10.86 MB / 0.9981 GB Notification: Performance of postOpt tearingSystem (initialization): time 0.0005121/1.037, allocations: 197.3 kB / 1.273 GB, free: 10.66 MB / 0.9981 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0002148/1.037, allocations: 67.91 kB / 1.273 GB, free: 10.59 MB / 0.9981 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 0.004028/1.041, allocations: 3.344 MB / 1.276 GB, free: 7.09 MB / 0.9981 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0007685/1.042, allocations: 68.12 kB / 1.276 GB, free: 7.023 MB / 0.9981 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 4.087e-05/1.042, allocations: 20 kB / 1.276 GB, free: 7.004 MB / 0.9981 GB Notification: Model statistics after passing the back-end for initialization: * Number of independent subsystems: 24 * Number of states: 0 () * Number of discrete variables: 5 (pulse_p.count,$PRE.pulse_p.count,pulse_p.T_start,$PRE.pulse_p.T_start,$whenCondition1) * Number of discrete states: 0 () * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for initialization (34): * Single equations (assignments): 32 * Array equations: 0 * Algorithm blocks: 1 * 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 {(1,19)} Notification: Performance of prepare postOptimizeDAE: time 0.0002269/1.042, allocations: 220.1 kB / 1.276 GB, free: 6.781 MB / 0.9981 GB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.0001439/1.042, allocations: 102.7 kB / 1.277 GB, free: 6.68 MB / 0.9981 GB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.001356/1.044, allocations: 0.7141 MB / 1.277 GB, free: 5.957 MB / 0.9981 GB Notification: Performance of postOpt inlineArrayEqn (simulation): time 5.881e-06/1.044, allocations: 4 kB / 1.277 GB, free: 5.953 MB / 0.9981 GB Notification: Performance of postOpt constantLinearSystem (simulation): time 2.765e-06/1.044, allocations: 7.938 kB / 1.277 GB, free: 5.945 MB / 0.9981 GB Notification: Performance of postOpt simplifysemiLinear (simulation): time 4.638e-06/1.044, allocations: 0 / 1.277 GB, free: 5.945 MB / 0.9981 GB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.00246/1.046, allocations: 1.599 MB / 1.279 GB, free: 4.262 MB / 0.9981 GB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 7.514e-06/1.046, allocations: 12.16 kB / 1.279 GB, free: 4.25 MB / 0.9981 GB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.000119/1.046, allocations: 27.91 kB / 1.279 GB, free: 4.223 MB / 0.9981 GB Notification: Performance of postOpt tearingSystem (simulation): time 0.0004772/1.047, allocations: 220.6 kB / 1.279 GB, free: 4.004 MB / 0.9981 GB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 2.51e-05/1.047, allocations: 8 kB / 1.279 GB, free: 3.996 MB / 0.9981 GB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 0.0009812/1.048, allocations: 0.974 MB / 1.28 GB, free: 3 MB / 0.9981 GB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 5.731e-06/1.048, allocations: 4.031 kB / 1.28 GB, free: 2.996 MB / 0.9981 GB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.001312/1.049, allocations: 0.8406 MB / 1.281 GB, free: 2.113 MB / 0.9981 GB Notification: Performance of postOpt removeConstants (simulation): time 0.0003344/1.05, allocations: 215.8 kB / 1.281 GB, free: 1.883 MB / 0.9981 GB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 0.0001105/1.05, allocations: 11.94 kB / 1.281 GB, free: 1.871 MB / 0.9981 GB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0004079/1.05, allocations: 27.91 kB / 1.281 GB, free: 1.844 MB / 0.9981 GB Notification: Performance of postOpt findZeroCrossings (simulation): time 8.242e-05/1.05, allocations: 31.97 kB / 1.281 GB, free: 1.812 MB / 0.9981 GB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 2.281e-05/1.05, allocations: 8 kB / 1.281 GB, free: 1.805 MB / 0.9981 GB Notification: Performance of sorting global known variables: time 0.001033/1.051, allocations: 0.7955 MB / 1.282 GB, free: 1 MB / 0.9981 GB Notification: Performance of sort global known variables: time 2.11e-07/1.051, allocations: 0 / 1.282 GB, free: 1 MB / 0.9981 GB Notification: Performance of remove unused functions: time 0.001247/1.053, allocations: 435.4 kB / 1.282 GB, free: 0.5742 MB / 0.9981 GB Notification: Model statistics after passing the back-end for simulation: * Number of independent subsystems: 8 * Number of states: 0 () * Number of discrete variables: 3 ($whenCondition1,pulse_p.T_start,pulse_p.count) * Number of discrete states: 1 (pulse_p.count) * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for simulation (12): * Single equations (assignments): 9 * Array equations: 0 * Algorithm blocks: 0 * Record equations: 0 * When equations: 2 * 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 {(1,19)} Notification: Performance of Backend phase and start with SimCode phase: time 0.0004605/1.053, allocations: 182.2 kB / 1.283 GB, free: 408 kB / 0.9981 GB Notification: Performance of simCode: created initialization part: time 0.002091/1.055, allocations: 1.073 MB / 1.284 GB, free: 15.29 MB / 1.014 GB Notification: Performance of simCode: created event and clocks part: time 4.529e-06/1.055, allocations: 0 / 1.284 GB, free: 15.29 MB / 1.014 GB Notification: Performance of simCode: created simulation system equations: time 0.0005147/1.056, allocations: 222.6 kB / 1.284 GB, free: 15.07 MB / 1.014 GB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.00205/1.058, allocations: 455.6 kB / 1.284 GB, free: 14.63 MB / 1.014 GB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.00302/1.061, allocations: 1.832 MB / 1.286 GB, free: 12.73 MB / 1.014 GB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.000826/1.062, allocations: 1.188 MB / 1.287 GB, free: 11.52 MB / 1.014 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.000154/1.062, allocations: 63.42 kB / 1.287 GB, free: 11.45 MB / 1.014 GB Notification: Performance of SimCode: time 9.52e-07/1.062, allocations: 0 / 1.287 GB, free: 11.45 MB / 1.014 GB Notification: Performance of Templates: time 0.02912/1.091, allocations: 20.31 MB / 1.307 GB, free: 7.23 MB / 1.029 GB make -j1 -f Buildings_latest_Buildings.Fluid.Examples.Performance.PressureDrop.SeriesDpOptimised.makefile (rm -f Buildings_latest_Buildings.Fluid.Examples.Performance.PressureDrop.SeriesDpOptimised.pipe ; mkfifo Buildings_latest_Buildings.Fluid.Examples.Performance.PressureDrop.SeriesDpOptimised.pipe ; head -c 1048576 < Buildings_latest_Buildings.Fluid.Examples.Performance.PressureDrop.SeriesDpOptimised.pipe >> ../files/Buildings_latest_Buildings.Fluid.Examples.Performance.PressureDrop.SeriesDpOptimised.sim & ./Buildings_latest_Buildings.Fluid.Examples.Performance.PressureDrop.SeriesDpOptimised -abortSlowSimulation -alarm=400 -emit_protected -lv LOG_STATS > Buildings_latest_Buildings.Fluid.Examples.Performance.PressureDrop.SeriesDpOptimised.pipe 2>&1) diffSimulationResults("Buildings_latest_Buildings.Fluid.Examples.Performance.PressureDrop.SeriesDpOptimised_res.mat","/mnt/ReferenceFiles/Buildings/csv/master/Buildings_Fluid_Examples_Performance_PressureDrop_SeriesDpOptimised.csv","/var/lib/jenkins1/ws/OpenModelicaLibraryTestingWork/OpenModelicaLibraryTesting/files/Buildings_latest_Buildings.Fluid.Examples.Performance.PressureDrop.SeriesDpOptimised.diff",relTol=0.003,relTolDiffMinMax=0.003,rangeDelta=0.001) Reference file matches