Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries --ompython_omhome=/usr Modelica_4.0.0_Modelica.Magnetic.QuasiStatic.FluxTubes.Examples.NonLinearInductor.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: "" <> buildModelFMU(Modelica.Magnetic.QuasiStatic.FluxTubes.Examples.NonLinearInductor,fileNamePrefix="Modelica_4_0_0_Modelica_Magnetic_QuasiStatic_FluxTubes_Examples_NonLinearInductor",fmuType="me",version="2.0",platforms={"static"}) "" <> buildModelFMU(Modelica.Magnetic.QuasiStatic.FluxTubes.Examples.NonLinearInductor,fileNamePrefix="Modelica_4_0_0_Modelica_Magnetic_QuasiStatic_FluxTubes_Examples_NonLinearInductor",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.001209/0.001209, allocations: 105.5 kB / 17.06 MB, free: 6.016 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.001237/0.001237, allocations: 188 kB / 18 MB, free: 5.102 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.398/1.398, allocations: 222.9 MB / 241.7 MB, free: 15.18 MB / 206.1 MB Notification: Performance of FrontEnd - loaded program: time 0.001169/0.001169, allocations: 47.92 kB / 350.8 MB, free: 3.777 MB / 286.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.2732/0.2744, allocations: 49.43 MB / 400.2 MB, free: 8.586 MB / 318.1 MB Notification: Performance of NFInst.instantiate(Modelica.Magnetic.QuasiStatic.FluxTubes.Examples.NonLinearInductor): time 0.009494/0.2839, allocations: 7.791 MB / 408 MB, free: 1.141 MB / 318.1 MB Notification: Performance of NFInst.instExpressions: time 0.005666/0.2896, allocations: 2.998 MB / 411 MB, free: 14.13 MB / 334.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.001401/0.2911, allocations: 27.94 kB / 411.1 MB, free: 14.11 MB / 334.1 MB Notification: Performance of NFTyping.typeComponents: time 0.003611/0.2948, allocations: 1.335 MB / 412.4 MB, free: 12.76 MB / 334.1 MB Notification: Performance of NFTyping.typeBindings: time 0.002752/0.2975, allocations: 0.7802 MB / 413.2 MB, free: 11.98 MB / 334.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.002776/0.3003, allocations: 1.316 MB / 414.5 MB, free: 10.66 MB / 334.1 MB Notification: Performance of NFFlatten.flatten: time 0.002251/0.3026, allocations: 1.656 MB / 416.1 MB, free: 8.996 MB / 334.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.00184/0.3044, allocations: 1.304 MB / 417.4 MB, free: 7.672 MB / 334.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0009212/0.3054, allocations: 0.6499 MB / 418.1 MB, free: 7.02 MB / 334.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0008991/0.3063, allocations: 0.7857 MB / 418.9 MB, free: 6.23 MB / 334.1 MB Notification: Performance of NFPackage.collectConstants: time 0.0002317/0.3065, allocations: 172 kB / 419 MB, free: 6.062 MB / 334.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0009791/0.3075, allocations: 471.6 kB / 419.5 MB, free: 5.602 MB / 334.1 MB Notification: Performance of NFScalarize.scalarize: time 0.0002909/0.3078, allocations: 374.7 kB / 419.9 MB, free: 5.234 MB / 334.1 MB Notification: Performance of NFVerifyModel.verify: time 0.0007041/0.3085, allocations: 0.7969 MB / 420.7 MB, free: 4.434 MB / 334.1 MB Notification: Performance of NFConvertDAE.convert: time 0.002597/0.3111, allocations: 2.269 MB / 422.9 MB, free: 2.156 MB / 334.1 MB Notification: Performance of FrontEnd - DAE generated: time 5.249e-06/0.3112, allocations: 0 / 422.9 MB, free: 2.156 MB / 334.1 MB Notification: Performance of FrontEnd: time 1.343e-06/0.3112, allocations: 0 / 422.9 MB, free: 2.156 MB / 334.1 MB Notification: Performance of Transformations before backend: time 2.952e-05/0.3112, allocations: 0 / 422.9 MB, free: 2.156 MB / 334.1 MB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 371 * Number of variables: 371 Notification: Performance of Generate backend data structure: time 0.00543/0.3166, allocations: 2.185 MB / 425.1 MB, free: 15.91 MB / 350.1 MB Notification: Performance of prepare preOptimizeDAE: time 4.643e-05/0.3167, allocations: 8.031 kB / 425.1 MB, free: 15.9 MB / 350.1 MB Notification: Performance of preOpt introduceOutputAliases (simulation): time 0.000316/0.317, allocations: 222.4 kB / 425.3 MB, free: 15.67 MB / 350.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.003162/0.3202, allocations: 0.5307 MB / 425.9 MB, free: 15.14 MB / 350.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.001577/0.3218, allocations: 0.8414 MB / 426.7 MB, free: 14.26 MB / 350.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 0.0001587/0.3219, allocations: 144.6 kB / 426.9 MB, free: 14.11 MB / 350.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 0.0002264/0.3222, allocations: 152 kB / 427 MB, free: 13.96 MB / 350.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.00256/0.3248, allocations: 1.331 MB / 428.3 MB, free: 12.61 MB / 350.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 4.384e-05/0.3248, allocations: 8 kB / 428.3 MB, free: 12.6 MB / 350.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 0.0001303/0.3249, allocations: 56 kB / 428.4 MB, free: 12.55 MB / 350.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 2.943e-05/0.325, allocations: 43.94 kB / 428.4 MB, free: 12.5 MB / 350.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.00261/0.3276, allocations: 1.284 MB / 429.7 MB, free: 11.21 MB / 350.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.008459/0.3361, allocations: 4.819 MB / 434.5 MB, free: 6.176 MB / 350.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.002924/0.3391, allocations: 1.936 MB / 436.5 MB, free: 4.078 MB / 350.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.00107/0.3401, allocations: 0.5705 MB / 437.1 MB, free: 3.504 MB / 350.1 MB Notification: Performance of preOpt evalFunc (simulation): time 0.0001329/0.3403, allocations: 106.1 kB / 437.2 MB, free: 3.383 MB / 350.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.001432/0.3417, allocations: 0.7372 MB / 437.9 MB, free: 2.617 MB / 350.1 MB Notification: Performance of pre-optimization done (n=132): time 3.216e-06/0.3418, allocations: 4 kB / 437.9 MB, free: 2.613 MB / 350.1 MB Notification: Performance of matching and sorting (n=166): time 0.01485/0.3566, allocations: 5.638 MB / 443.5 MB, free: 12.86 MB / 366.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 0.0001096/0.3568, allocations: 149.8 kB / 443.7 MB, free: 12.69 MB / 366.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0007801/0.3575, allocations: 0.6096 MB / 444.3 MB, free: 12.07 MB / 366.1 MB Notification: Performance of collectPreVariables (initialization): time 0.0001021/0.3577, allocations: 57.7 kB / 444.4 MB, free: 12.01 MB / 366.1 MB Notification: Performance of collectInitialEqns (initialization): time 0.0004557/0.3581, allocations: 0.5757 MB / 444.9 MB, free: 11.42 MB / 366.1 MB Notification: Performance of collectInitialBindings (initialization): time 0.0004438/0.3586, allocations: 0.5732 MB / 445.5 MB, free: 10.84 MB / 366.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 0.0004212/0.359, allocations: 283.5 kB / 445.8 MB, free: 10.56 MB / 366.1 MB Notification: Performance of setup shared object (initialization): time 0.0001535/0.3592, allocations: 353.8 kB / 446.1 MB, free: 10.21 MB / 366.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.00114/0.3603, allocations: 0.5037 MB / 446.6 MB, free: 9.703 MB / 366.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.001378/0.3617, allocations: 0.8403 MB / 447.5 MB, free: 8.746 MB / 366.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.002479/0.3642, allocations: 1.416 MB / 448.9 MB, free: 7.215 MB / 366.1 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 7.494e-06/0.3642, allocations: 4 kB / 448.9 MB, free: 7.211 MB / 366.1 MB Notification: Performance of matching and sorting (n=215) (initialization): time 0.004547/0.3688, allocations: 2.02 MB / 450.9 MB, free: 5.172 MB / 366.1 MB Notification: Performance of prepare postOptimizeDAE: time 2.849e-05/0.3688, allocations: 12 kB / 450.9 MB, free: 5.16 MB / 366.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.837e-05/0.3688, allocations: 8 kB / 450.9 MB, free: 5.152 MB / 366.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 0.002061/0.3709, allocations: 0.5224 MB / 451.4 MB, free: 4.617 MB / 366.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.00118/0.3721, allocations: 287.6 kB / 451.7 MB, free: 4.336 MB / 366.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 0.01203/0.3841, allocations: 9.525 MB / 461.3 MB, free: 10.27 MB / 382.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.001638/0.3859, allocations: 76.02 kB / 461.3 MB, free: 10.2 MB / 382.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 0.0002312/0.3861, allocations: 64 kB / 461.4 MB, free: 10.13 MB / 382.1 MB Notification: Model statistics after passing the back-end for initialization: * Number of independent subsystems: 38 * Number of states: 0 () * Number of discrete variables: 18 ($whenCondition6,$whenCondition5,$whenCondition4,$whenCondition3,$whenCondition2,$whenCondition1,fundamentalWavePermabilitySensor.harmonicFlux.mean2.y_last,$PRE.fundamentalWavePermabilitySensor.harmonicFlux.mean2.y_last,fundamentalWavePermabilitySensor.harmonicFlux.mean1.y_last,$PRE.fundamentalWavePermabilitySensor.harmonicFlux.mean1.y_last,fundamentalWavePermabilitySensor.harmonicPotential.mean2.y_last,$PRE.fundamentalWavePermabilitySensor.harmonicPotential.mean2.y_last,fundamentalWavePermabilitySensor.harmonicPotential.mean1.y_last,$PRE.fundamentalWavePermabilitySensor.harmonicPotential.mean1.y_last,rootMeanSquare.mean2.y_last,$PRE.rootMeanSquare.mean2.y_last,rootMeanSquare.mean1.y_last,$PRE.rootMeanSquare.mean1.y_last) * Number of discrete states: 0 () * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for initialization (161): * Single equations (assignments): 157 * Array equations: 0 * Algorithm blocks: 0 * Record equations: 0 * When equations: 0 * If-equations: 0 * Equation systems (not torn): 0 * Torn equation systems: 4 * Mixed (continuous/discrete) equation systems: 0 Notification: Torn system details for strict tearing set: * Linear torn systems (#iteration vars, #inner vars, density): 3 systems {(1,9,100.0%), (1,19,100.0%), (1,19,100.0%)} * Non-linear torn systems (#iteration vars, #inner vars): 1 system {(1,7)} Notification: Performance of prepare postOptimizeDAE: time 0.001021/0.3872, allocations: 357.4 kB / 461.7 MB, free: 9.773 MB / 382.1 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.0002212/0.3874, allocations: 115.3 kB / 461.9 MB, free: 9.66 MB / 382.1 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.004601/0.392, allocations: 1.906 MB / 463.8 MB, free: 7.73 MB / 382.1 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 1.576e-05/0.392, allocations: 16 kB / 463.8 MB, free: 7.715 MB / 382.1 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 1.521e-05/0.392, allocations: 11.94 kB / 463.8 MB, free: 7.703 MB / 382.1 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 1.629e-05/0.3921, allocations: 11.97 kB / 463.8 MB, free: 7.691 MB / 382.1 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0068/0.3989, allocations: 3.522 MB / 467.3 MB, free: 4.078 MB / 382.1 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 7.384e-06/0.3989, allocations: 0 / 467.3 MB, free: 4.078 MB / 382.1 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0009681/0.3999, allocations: 207.8 kB / 467.5 MB, free: 3.875 MB / 382.1 MB Notification: Performance of postOpt tearingSystem (simulation): time 0.001816/0.4017, allocations: 0.5023 MB / 468 MB, free: 3.363 MB / 382.1 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 9.744e-05/0.4018, allocations: 35.98 kB / 468.1 MB, free: 3.328 MB / 382.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 0.01014/0.412, allocations: 9.139 MB / 477.2 MB, free: 9.629 MB / 398.1 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 2.796e-06/0.412, allocations: 0 / 477.2 MB, free: 9.629 MB / 398.1 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.00579/0.4178, allocations: 2.654 MB / 479.9 MB, free: 6.926 MB / 398.1 MB Notification: Performance of postOpt removeConstants (simulation): time 0.0005822/0.4184, allocations: 300.2 kB / 480.1 MB, free: 6.613 MB / 398.1 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 0.0001614/0.4186, allocations: 36 kB / 480.2 MB, free: 6.578 MB / 398.1 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0007531/0.4194, allocations: 59.95 kB / 480.2 MB, free: 6.52 MB / 398.1 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0003135/0.4197, allocations: 141 kB / 480.4 MB, free: 6.379 MB / 398.1 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 9.073e-05/0.4198, allocations: 47.98 kB / 480.4 MB, free: 6.332 MB / 398.1 MB Notification: Performance of sorting global known variables: time 0.0005217/0.4203, allocations: 415.1 kB / 480.8 MB, free: 5.93 MB / 398.1 MB Notification: Performance of sort global known variables: time 1.6e-07/0.4203, allocations: 4 kB / 480.8 MB, free: 5.926 MB / 398.1 MB Notification: Performance of remove unused functions: time 0.001667/0.422, allocations: 412 kB / 481.2 MB, free: 5.523 MB / 398.1 MB Notification: Model statistics after passing the back-end for simulation: * Number of independent subsystems: 8 * Number of states: 8 (coil.i,fundamentalWavePermabilitySensor.harmonicPotential.mean1.x,fundamentalWavePermabilitySensor.harmonicPotential.mean2.x,fundamentalWavePermabilitySensor.harmonicFlux.mean1.x,fundamentalWavePermabilitySensor.harmonicFlux.mean2.x,rootMeanSquare.mean1.x,rootMeanSquare.mean2.x,sourceQS.pin_p.reference.gamma) * Number of discrete variables: 12 ($whenCondition6,$whenCondition5,$whenCondition4,$whenCondition3,$whenCondition2,$whenCondition1,fundamentalWavePermabilitySensor.harmonicPotential.mean1.y_last,fundamentalWavePermabilitySensor.harmonicPotential.mean2.y_last,fundamentalWavePermabilitySensor.harmonicFlux.mean1.y_last,fundamentalWavePermabilitySensor.harmonicFlux.mean2.y_last,rootMeanSquare.mean1.y_last,rootMeanSquare.mean2.y_last) * Number of discrete states: 6 (fundamentalWavePermabilitySensor.harmonicPotential.mean1.x,fundamentalWavePermabilitySensor.harmonicPotential.mean2.x,fundamentalWavePermabilitySensor.harmonicFlux.mean1.x,fundamentalWavePermabilitySensor.harmonicFlux.mean2.x,rootMeanSquare.mean1.x,rootMeanSquare.mean2.x) * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for simulation (116): * Single equations (assignments): 106 * Array equations: 0 * Algorithm blocks: 0 * Record equations: 0 * When equations: 6 * If-equations: 0 * Equation systems (not torn): 0 * Torn equation systems: 4 * Mixed (continuous/discrete) equation systems: 0 Notification: Torn system details for strict tearing set: * Linear torn systems (#iteration vars, #inner vars, density): 3 systems {(1,19,100.0%), (1,9,100.0%), (2,16,100.0%)} * Non-linear torn systems (#iteration vars, #inner vars): 1 system {(1,7)} Notification: Performance of Backend phase and start with SimCode phase: time 0.006083/0.4281, allocations: 3.289 MB / 484.5 MB, free: 2.18 MB / 398.1 MB Notification: Performance of simCode: created initialization part: time 0.003873/0.432, allocations: 2.081 MB / 486.6 MB, free: 48 kB / 398.1 MB Notification: Performance of simCode: created event and clocks part: time 7.554e-06/0.432, allocations: 4.312 kB / 486.6 MB, free: 44 kB / 398.1 MB Notification: Performance of simCode: created simulation system equations: time 0.002364/0.4344, allocations: 1.417 MB / 488 MB, free: 14.57 MB / 414.1 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.000978/0.4354, allocations: 135.9 kB / 488.2 MB, free: 14.45 MB / 414.1 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.02057/0.456, allocations: 10.63 MB / 498.8 MB, free: 3.41 MB / 414.1 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.001137/0.4572, allocations: 1.186 MB / 500 MB, free: 2.195 MB / 414.1 MB Notification: Performance of simCode: alias equations: time 0.0007854/0.458, allocations: 168.9 kB / 0.4884 GB, free: 2.027 MB / 414.1 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0009365/0.4589, allocations: 0.5188 MB / 0.4889 GB, free: 1.508 MB / 414.1 MB Notification: Performance of SimCode: time 1.182e-06/0.4589, allocations: 0 / 0.4889 GB, free: 1.508 MB / 414.1 MB Notification: Performance of buildModelFMU: Generate the FMI files: time 0.07198/0.5309, allocations: 28.19 MB / 0.5165 GB, free: 5.531 MB / 446.1 MB Notification: Performance of buildModelFMU: Generate platform static: time 22.39/22.92, allocations: 13.61 kB / 0.5165 GB, free: 5.527 MB / 446.1 MB (rm -f Modelica_4.0.0_Modelica.Magnetic.QuasiStatic.FluxTubes.Examples.NonLinearInductor.pipe ; mkfifo Modelica_4.0.0_Modelica.Magnetic.QuasiStatic.FluxTubes.Examples.NonLinearInductor.pipe ; head -c 1048576 < Modelica_4.0.0_Modelica.Magnetic.QuasiStatic.FluxTubes.Examples.NonLinearInductor.pipe >> ../files/Modelica_4.0.0_Modelica.Magnetic.QuasiStatic.FluxTubes.Examples.NonLinearInductor.sim & python3 -m fmpy simulate --output-file Modelica_4.0.0_Modelica.Magnetic.QuasiStatic.FluxTubes.Examples.NonLinearInductor_res.csv --start-time 0 --stop-time 0.2 --timeout 50 --relative-tolerance 1e-07 --interface-type ModelExchange --solver CVode --output-interval 8e-05 Modelica_4_0_0_Modelica_Magnetic_QuasiStatic_FluxTubes_Examples_NonLinearInductor.fmu > Modelica_4.0.0_Modelica.Magnetic.QuasiStatic.FluxTubes.Examples.NonLinearInductor.pipe 2>&1) diffSimulationResults("Modelica_4.0.0_Modelica.Magnetic.QuasiStatic.FluxTubes.Examples.NonLinearInductor_res.csv","/var/lib/jenkins1/ws/OpenModelicaLibraryTestingWork/Reference-modelica.org/ReferenceResults/MAP-LIB_ReferenceResults/v4.0.0/Modelica/Magnetic/QuasiStatic/FluxTubes/Examples/NonLinearInductor/NonLinearInductor.csv","/var/lib/jenkins1/ws/OpenModelicaLibraryTestingWork/OpenModelicaLibraryTesting/files/Modelica_4.0.0_Modelica.Magnetic.QuasiStatic.FluxTubes.Examples.NonLinearInductor.diff",relTol=0.003,relTolDiffMinMax=0.003,rangeDelta=0.001) Reference file matches