Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries --ompython_omhome=/usr ThermofluidStream_dev_ThermofluidStream.FlowControl.Tests.MCV.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/ThermofluidStream 1.1.0-main/package.mo", uses=false) Using package ThermofluidStream with version 1.1.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/ThermofluidStream 1.1.0-main/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: "" <> buildModelFMU(ThermofluidStream.FlowControl.Tests.MCV,fileNamePrefix="ThermofluidStream_dev_ThermofluidStream_FlowControl_Tests_MCV",fmuType="me",version="2.0",platforms={"static"}) "" <> buildModelFMU(ThermofluidStream.FlowControl.Tests.MCV,fileNamePrefix="ThermofluidStream_dev_ThermofluidStream_FlowControl_Tests_MCV",fmuType="me",version="2.0",platforms={"static"}) Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.001848/0.001848, allocations: 108 kB / 15.6 MB, free: 132 kB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo): time 0.002353/0.002353, allocations: 191.3 kB / 16.53 MB, free: 6.391 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.795/1.795, allocations: 222.9 MB / 240.2 MB, free: 4.41 MB / 190.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ThermofluidStream 1.1.0-main/package.mo): time 0.9712/0.9712, allocations: 93.7 MB / 384.1 MB, free: 6.977 MB / 318.1 MB Warning: Ignoring unknown experiment annotation option: __Dymola_NumberOfIntervals = 1500 Warning: Ignoring unknown experiment annotation option: __Dymola_Algorithm = "Dassl" Warning: Ignoring unknown experiment annotation option: __Dymola_NumberOfIntervals = 1500 Warning: Ignoring unknown experiment annotation option: __Dymola_Algorithm = "Dassl" Notification: Performance of FrontEnd - loaded program: time 0.002384/0.002384, allocations: 82.05 kB / 463.5 MB, free: 22 MB / 350.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.1983/0.2007, allocations: 68.27 MB / 0.5193 GB, free: 6.914 MB / 398.1 MB Notification: Performance of NFInst.instantiate(ThermofluidStream.FlowControl.Tests.MCV): time 0.7912/0.992, allocations: 197.6 MB / 0.7122 GB, free: 5.277 MB / 0.5137 GB Notification: Performance of NFInst.instExpressions: time 0.04175/1.034, allocations: 24.35 MB / 0.736 GB, free: 12.85 MB / 0.545 GB Notification: Performance of NFInst.updateImplicitVariability: time 0.004652/1.039, allocations: 107.2 kB / 0.7361 GB, free: 12.75 MB / 0.545 GB Notification: Performance of NFTyping.typeComponents: time 0.005645/1.044, allocations: 1.16 MB / 0.7373 GB, free: 11.58 MB / 0.545 GB Notification: Performance of NFTyping.typeBindings: time 0.01274/1.057, allocations: 2.625 MB / 0.7398 GB, free: 8.938 MB / 0.545 GB Notification: Performance of NFTyping.typeClassSections: time 0.00934/1.066, allocations: 1.873 MB / 0.7417 GB, free: 7.059 MB / 0.545 GB Notification: Performance of NFFlatten.flatten: time 0.00919/1.076, allocations: 3.801 MB / 0.7454 GB, free: 3.242 MB / 0.545 GB Notification: Performance of NFFlatten.resolveConnections: time 0.002283/1.078, allocations: 0.6162 MB / 0.746 GB, free: 2.582 MB / 0.545 GB Notification: Performance of NFEvalConstants.evaluate: time 0.005972/1.084, allocations: 1.68 MB / 0.7476 GB, free: 0.8945 MB / 0.545 GB Notification: Performance of NFSimplifyModel.simplify: time 0.00416/1.088, allocations: 1.634 MB / 0.7492 GB, free: 15.25 MB / 0.5606 GB Notification: Performance of NFPackage.collectConstants: time 0.001647/1.09, allocations: 180 kB / 0.7494 GB, free: 15.07 MB / 0.5606 GB Notification: Performance of NFFlatten.collectFunctions: time 0.01163/1.102, allocations: 3.314 MB / 0.7526 GB, free: 11.76 MB / 0.5606 GB Notification: Performance of NFScalarize.scalarize: time 0.001493/1.103, allocations: 493.7 kB / 0.7531 GB, free: 11.27 MB / 0.5606 GB Notification: Performance of NFVerifyModel.verify: time 0.003795/1.107, allocations: 1.262 MB / 0.7543 GB, free: 10 MB / 0.5606 GB Notification: Performance of NFConvertDAE.convert: time 0.01209/1.119, allocations: 3.785 MB / 0.758 GB, free: 6.207 MB / 0.5606 GB Notification: Performance of FrontEnd - DAE generated: time 6.783e-06/1.119, allocations: 3.938 kB / 0.758 GB, free: 6.203 MB / 0.5606 GB Notification: Performance of FrontEnd: time 1.563e-06/1.119, allocations: 0 / 0.758 GB, free: 6.203 MB / 0.5606 GB Notification: Performance of Transformations before backend: time 0.0001716/1.119, allocations: 0 / 0.758 GB, free: 6.203 MB / 0.5606 GB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 395 * Number of variables: 395 Notification: Performance of Generate backend data structure: time 0.01147/1.131, allocations: 3.455 MB / 0.7614 GB, free: 2.633 MB / 0.5606 GB Notification: Performance of prepare preOptimizeDAE: time 5.883e-05/1.131, allocations: 19.91 kB / 0.7614 GB, free: 2.613 MB / 0.5606 GB Notification: Performance of preOpt introduceOutputAliases (simulation): time 0.0005556/1.132, allocations: 224 kB / 0.7616 GB, free: 2.383 MB / 0.5606 GB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.001011/1.133, allocations: 305.2 kB / 0.7619 GB, free: 2.082 MB / 0.5606 GB Notification: Performance of preOpt evaluateParameters (simulation): time 0.004187/1.137, allocations: 1.611 MB / 0.7635 GB, free: 408 kB / 0.5606 GB Notification: Performance of preOpt simplifyIfEquations (simulation): time 0.0001302/1.137, allocations: 131 kB / 0.7636 GB, free: 276 kB / 0.5606 GB Notification: Performance of preOpt expandDerOperator (simulation): time 0.0005374/1.138, allocations: 171.8 kB / 0.7638 GB, free: 104 kB / 0.5606 GB Notification: Performance of preOpt clockPartitioning (simulation): time 0.004459/1.142, allocations: 1.883 MB / 0.7656 GB, free: 14.12 MB / 0.5762 GB Notification: Performance of preOpt findStateOrder (simulation): time 3.773e-05/1.142, allocations: 0 / 0.7656 GB, free: 14.12 MB / 0.5762 GB Notification: Performance of preOpt replaceEdgeChange (simulation): time 0.000162/1.142, allocations: 64 kB / 0.7657 GB, free: 14.06 MB / 0.5762 GB Notification: Performance of preOpt inlineArrayEqn (simulation): time 6.441e-05/1.142, allocations: 40 kB / 0.7657 GB, free: 14.02 MB / 0.5762 GB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.004762/1.147, allocations: 1.75 MB / 0.7674 GB, free: 12.27 MB / 0.5762 GB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.01529/1.162, allocations: 7.787 MB / 0.775 GB, free: 3.961 MB / 0.5762 GB Notification: Performance of preOpt comSubExp (simulation): time 0.00688/1.169, allocations: 2.028 MB / 0.777 GB, free: 1.879 MB / 0.5762 GB Notification: Performance of preOpt resolveLoops (simulation): time 0.002334/1.172, allocations: 0.92 MB / 0.7779 GB, free: 0.9414 MB / 0.5762 GB Notification: Performance of preOpt evalFunc (simulation): time 0.01099/1.183, allocations: 6.798 MB / 0.7845 GB, free: 9.258 MB / 0.5919 GB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.002796/1.186, allocations: 1.084 MB / 0.7856 GB, free: 8.137 MB / 0.5919 GB Notification: Performance of pre-optimization done (n=191): time 8.055e-06/1.186, allocations: 0 / 0.7856 GB, free: 8.137 MB / 0.5919 GB Notification: Performance of matching and sorting (n=191): time 0.01023/1.196, allocations: 3.373 MB / 0.7889 GB, free: 4.609 MB / 0.5919 GB Notification: Performance of inlineWhenForInitialization (initialization): time 0.000197/1.196, allocations: 241.6 kB / 0.7891 GB, free: 4.324 MB / 0.5919 GB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.004446/1.201, allocations: 1.817 MB / 0.7909 GB, free: 2.488 MB / 0.5919 GB Notification: Performance of collectPreVariables (initialization): time 0.000387/1.201, allocations: 69.62 kB / 0.791 GB, free: 2.414 MB / 0.5919 GB Notification: Performance of collectInitialEqns (initialization): time 0.001278/1.202, allocations: 0.9924 MB / 0.7919 GB, free: 1.41 MB / 0.5919 GB Notification: Performance of collectInitialBindings (initialization): time 0.0008913/1.203, allocations: 0.6276 MB / 0.7926 GB, free: 0.7734 MB / 0.5919 GB Notification: Performance of simplifyInitialFunctions (initialization): time 0.001006/1.204, allocations: 327.5 kB / 0.7929 GB, free: 460 kB / 0.5919 GB Notification: Performance of setup shared object (initialization): time 0.0001915/1.204, allocations: 305.1 kB / 0.7932 GB, free: 152 kB / 0.5919 GB Notification: Performance of preBalanceInitialSystem (initialization): time 0.002141/1.207, allocations: 0.648 MB / 0.7938 GB, free: 15.5 MB / 0.6075 GB Notification: Performance of partitionIndependentBlocks (initialization): time 0.002381/1.209, allocations: 0.9023 MB / 0.7947 GB, free: 14.52 MB / 0.6075 GB Notification: Performance of analyzeInitialSystem (initialization): time 0.004177/1.213, allocations: 1.747 MB / 0.7964 GB, free: 12.66 MB / 0.6075 GB Notification: Performance of solveInitialSystemEqSystem (initialization): time 2.724e-05/1.213, allocations: 8 kB / 0.7964 GB, free: 12.66 MB / 0.6075 GB Notification: Performance of matching and sorting (n=238) (initialization): time 0.007065/1.22, allocations: 2.452 MB / 0.7988 GB, free: 10.14 MB / 0.6075 GB Notification: Performance of prepare postOptimizeDAE: time 0.0001655/1.221, allocations: 178.2 kB / 0.7989 GB, free: 9.926 MB / 0.6075 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 2.094e-05/1.221, allocations: 7.938 kB / 0.799 GB, free: 9.918 MB / 0.6075 GB Notification: Performance of postOpt tearingSystem (initialization): time 0.001126/1.222, allocations: 266 kB / 0.7992 GB, free: 9.637 MB / 0.6075 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.001795/1.224, allocations: 411.4 kB / 0.7996 GB, free: 9.234 MB / 0.6075 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 0.01134/1.235, allocations: 10.57 MB / 0.8099 GB, free: 13.68 MB / 0.6231 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.002475/1.237, allocations: 230.1 kB / 0.8101 GB, free: 13.46 MB / 0.6231 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 0.0004794/1.238, allocations: 83.97 kB / 0.8102 GB, free: 13.38 MB / 0.6231 GB Notification: Model statistics after passing the back-end for initialization: * Number of independent subsystems: 25 * Number of states: 0 () * Number of discrete variables: 30 (trapezoid2.count,$PRE.trapezoid2.count,trapezoid2.T_start,$PRE.trapezoid2.T_start,$whenCondition6,trapezoid1.count,$PRE.trapezoid1.count,trapezoid1.T_start,$PRE.trapezoid1.T_start,$whenCondition4,trapezoid.count,$PRE.trapezoid.count,trapezoid.T_start,$PRE.trapezoid.T_start,$whenCondition2,pulse1.count,$PRE.pulse1.count,pulse1.T_start,$PRE.pulse1.T_start,$whenCondition1,pulse3.count,$PRE.pulse3.count,pulse3.T_start,$PRE.pulse3.T_start,$whenCondition3,pulse5.count,$PRE.pulse5.count,pulse5.T_start,$PRE.pulse5.T_start,$whenCondition5) * Number of discrete states: 0 () * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for initialization (212): * Single equations (assignments): 199 * Array equations: 0 * Algorithm blocks: 6 * Record equations: 0 * When equations: 0 * If-equations: 0 * Equation systems (not torn): 0 * Torn equation systems: 7 * Mixed (continuous/discrete) equation systems: 0 Notification: Torn system details for strict tearing set: * Linear torn systems (#iteration vars, #inner vars, density): 7 systems {(1,2,100.0%), (1,3,100.0%), (1,3,100.0%), (1,3,100.0%), (1,3,100.0%), (1,3,100.0%), (1,3,100.0%)} * Non-linear torn systems (#iteration vars, #inner vars): 0 systems Notification: Performance of prepare postOptimizeDAE: time 0.001334/1.239, allocations: 379.8 kB / 0.8106 GB, free: 13 MB / 0.6231 GB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.0009111/1.24, allocations: 264.6 kB / 0.8108 GB, free: 12.73 MB / 0.6231 GB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.007599/1.248, allocations: 2.635 MB / 0.8134 GB, free: 10.04 MB / 0.6231 GB Notification: Performance of postOpt inlineArrayEqn (simulation): time 3.51e-05/1.248, allocations: 20 kB / 0.8134 GB, free: 10.02 MB / 0.6231 GB Notification: Performance of postOpt constantLinearSystem (simulation): time 3.833e-05/1.248, allocations: 8 kB / 0.8134 GB, free: 10.01 MB / 0.6231 GB Notification: Performance of postOpt simplifysemiLinear (simulation): time 2.869e-05/1.248, allocations: 11.95 kB / 0.8134 GB, free: 10 MB / 0.6231 GB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.01167/1.26, allocations: 4.832 MB / 0.8182 GB, free: 5.051 MB / 0.6231 GB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 1.921e-05/1.26, allocations: 4 kB / 0.8182 GB, free: 5.047 MB / 0.6231 GB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.001755/1.261, allocations: 395.8 kB / 0.8185 GB, free: 4.66 MB / 0.6231 GB Notification: Performance of postOpt tearingSystem (simulation): time 0.0009544/1.262, allocations: 265.6 kB / 0.8188 GB, free: 4.379 MB / 0.6231 GB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 0.0002111/1.263, allocations: 67.95 kB / 0.8189 GB, free: 4.312 MB / 0.6231 GB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 0.3504/1.613, allocations: 10.57 MB / 0.8292 GB, free: 227.9 MB / 0.6231 GB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 8.265e-06/1.613, allocations: 5.078 kB / 0.8292 GB, free: 227.9 MB / 0.6231 GB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.00966/1.623, allocations: 3.677 MB / 0.8328 GB, free: 227.1 MB / 0.6231 GB Notification: Performance of postOpt removeConstants (simulation): time 0.001377/1.624, allocations: 0.5002 MB / 0.8333 GB, free: 226.9 MB / 0.6231 GB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 0.0005528/1.625, allocations: 57.5 kB / 0.8333 GB, free: 226.9 MB / 0.6231 GB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.001878/1.627, allocations: 109 kB / 0.8334 GB, free: 226.9 MB / 0.6231 GB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0006613/1.627, allocations: 220.6 kB / 0.8336 GB, free: 226.8 MB / 0.6231 GB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 0.0001738/1.628, allocations: 78.94 kB / 0.8337 GB, free: 226.8 MB / 0.6231 GB Notification: Performance of sorting global known variables: time 0.002397/1.63, allocations: 1.243 MB / 0.8349 GB, free: 226.3 MB / 0.6231 GB Notification: Performance of sort global known variables: time 2.01e-07/1.63, allocations: 0 / 0.8349 GB, free: 226.3 MB / 0.6231 GB Notification: Performance of remove unused functions: time 0.004885/1.635, allocations: 0.893 MB / 0.8358 GB, free: 226.2 MB / 0.6231 GB Notification: Model statistics after passing the back-end for simulation: * Number of independent subsystems: 17 * Number of states: 14 (mCV1.dp_int,flowResistance1.inlet.m_flow,mCV2.dp_int,flowResistance2.inlet.m_flow,mCV3.dp_int,flowResistance3.inlet.m_flow,mCV4.dp_int,flowResistance4.inlet.m_flow,mCV.dp_int,flowResistance.inlet.m_flow,mCV5.dp_int,flowResistance5.inlet.m_flow,mCV6.inlet.m_flow,mCV6.dp_int) * Number of discrete variables: 18 ($whenCondition1,pulse1.T_start,pulse1.count,$whenCondition2,trapezoid.T_start,trapezoid.count,$whenCondition3,pulse3.T_start,pulse3.count,$whenCondition4,trapezoid1.T_start,trapezoid1.count,$whenCondition5,pulse5.T_start,pulse5.count,$whenCondition6,trapezoid2.T_start,trapezoid2.count) * Number of discrete states: 6 (trapezoid2.count,pulse5.count,trapezoid1.count,pulse3.count,trapezoid.count,pulse1.count) * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for simulation (195): * Single equations (assignments): 176 * Array equations: 0 * Algorithm blocks: 0 * Record equations: 0 * When equations: 12 * If-equations: 0 * Equation systems (not torn): 0 * Torn equation systems: 7 * Mixed (continuous/discrete) equation systems: 0 Notification: Torn system details for strict tearing set: * Linear torn systems (#iteration vars, #inner vars, density): 7 systems {(1,3,100.0%), (1,3,100.0%), (1,3,100.0%), (1,3,100.0%), (1,3,100.0%), (1,3,100.0%), (1,2,100.0%)} * Non-linear torn systems (#iteration vars, #inner vars): 0 systems Notification: Performance of Backend phase and start with SimCode phase: time 0.009375/1.644, allocations: 5.058 MB / 0.8407 GB, free: 223.8 MB / 0.6231 GB Notification: Performance of simCode: created initialization part: time 0.007023/1.651, allocations: 2.999 MB / 0.8437 GB, free: 222 MB / 0.6231 GB Notification: Performance of simCode: created event and clocks part: time 1.186e-05/1.651, allocations: 1.125 kB / 0.8437 GB, free: 222 MB / 0.6231 GB Notification: Performance of simCode: created simulation system equations: time 0.004081/1.655, allocations: 1.99 MB / 0.8456 GB, free: 220.8 MB / 0.6231 GB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.004932/1.66, allocations: 0.7469 MB / 0.8463 GB, free: 220.6 MB / 0.6231 GB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.04409/1.705, allocations: 21.32 MB / 0.8672 GB, free: 207.3 MB / 0.6231 GB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0009862/1.706, allocations: 1.551 MB / 0.8687 GB, free: 206.5 MB / 0.6231 GB Notification: Performance of simCode: alias equations: time 0.002184/1.708, allocations: 418.7 kB / 0.8691 GB, free: 206.4 MB / 0.6231 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.001356/1.709, allocations: 1.073 MB / 0.8701 GB, free: 205.6 MB / 0.6231 GB Notification: Performance of SimCode: time 8.31e-07/1.709, allocations: 4 kB / 0.8701 GB, free: 205.6 MB / 0.6231 GB Notification: Performance of buildModelFMU: Generate the FMI files: time 0.1647/1.874, allocations: 67.37 MB / 0.9359 GB, free: 143.3 MB / 0.6231 GB Notification: Performance of buildModelFMU: Generate platform static: time 14.52/16.4, allocations: 9.219 kB / 0.9359 GB, free: 143.3 MB / 0.6231 GB (rm -f ThermofluidStream_dev_ThermofluidStream.FlowControl.Tests.MCV.pipe ; mkfifo ThermofluidStream_dev_ThermofluidStream.FlowControl.Tests.MCV.pipe ; head -c 1048576 < ThermofluidStream_dev_ThermofluidStream.FlowControl.Tests.MCV.pipe >> ../files/ThermofluidStream_dev_ThermofluidStream.FlowControl.Tests.MCV.sim & python3 -m fmpy simulate --output-file ThermofluidStream_dev_ThermofluidStream.FlowControl.Tests.MCV_res.csv --start-time 0 --stop-time 10 --timeout 1200 --relative-tolerance 1e-06 --interface-type ModelExchange --solver CVode --output-interval 0.004 ThermofluidStream_dev_ThermofluidStream_FlowControl_Tests_MCV.fmu > ThermofluidStream_dev_ThermofluidStream.FlowControl.Tests.MCV.pipe 2>&1) diffSimulationResults("ThermofluidStream_dev_ThermofluidStream.FlowControl.Tests.MCV_res.csv","/mnt/ReferenceFiles/ThermofluidStream-main-regression/ReferenceData/ThermofluidStream.FlowControl.Tests.MCV_ref.mat","/var/lib/jenkins1/ws/OpenModelicaLibraryTestingWork/OpenModelicaLibraryTesting/files/ThermofluidStream_dev_ThermofluidStream.FlowControl.Tests.MCV.diff",relTol=0.003,relTolDiffMinMax=0.003,rangeDelta=0.001) Reference file matches