Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries --ompython_omhome=/usr Modelica_3.2.3_Modelica.Magnetic.FluxTubes.Examples.SolenoidActuator.ComparisonPullInStroke.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 3.2.3+maint.om/package.mo", uses=false) Using package Modelica with version 3.2.3 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 3.2.3+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.Magnetic.FluxTubes.Examples.SolenoidActuator.ComparisonPullInStroke,tolerance=1e-07,outputFormat="mat",numberOfIntervals=5000,variableFilter="time|advancedSolenoid.armature.stopper_xMax.v_rel|advancedSolenoid.c_par1.v|advancedSolenoid.c_par2.v|advancedSolenoid.coil1.Phi|advancedSolenoid.coil2.Phi|advancedSolenoid.x|simpleSolenoid.armature.stopper_xMax.v_rel|simpleSolenoid.coil.Phi|simpleSolenoid.x",fileNamePrefix="Modelica_3.2.3_Modelica.Magnetic.FluxTubes.Examples.SolenoidActuator.ComparisonPullInStroke") translateModel(Modelica.Magnetic.FluxTubes.Examples.SolenoidActuator.ComparisonPullInStroke,tolerance=1e-07,outputFormat="mat",numberOfIntervals=5000,variableFilter="time|advancedSolenoid.armature.stopper_xMax.v_rel|advancedSolenoid.c_par1.v|advancedSolenoid.c_par2.v|advancedSolenoid.coil1.Phi|advancedSolenoid.coil2.Phi|advancedSolenoid.x|simpleSolenoid.armature.stopper_xMax.v_rel|simpleSolenoid.coil.Phi|simpleSolenoid.x",fileNamePrefix="Modelica_3.2.3_Modelica.Magnetic.FluxTubes.Examples.SolenoidActuator.ComparisonPullInStroke") Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.001476/0.001476, allocations: 108.4 kB / 18.36 MB, free: 4.633 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.001636/0.001636, allocations: 191 kB / 19.29 MB, free: 3.703 MB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 3.2.3+maint.om/package.mo): time 1.489/1.489, allocations: 205.1 MB / 225.2 MB, free: 12.27 MB / 190.1 MB Notification: Modelica requested package Complex of version 3.2.3. Complex 4.0.0 is used instead which states that it is fully compatible without conversion script needed. Notification: Modelica requested package ModelicaServices of version 3.2.3. ModelicaServices 4.0.0 is used instead which states that it is fully compatible without conversion script needed. Notification: Performance of FrontEnd - loaded program: time 0.001192/0.001192, allocations: 47.94 kB / 282.1 MB, free: 2.469 MB / 222.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.1029/0.1041, allocations: 46.63 MB / 328.7 MB, free: 3.766 MB / 270.1 MB Notification: Performance of NFInst.instantiate(Modelica.Magnetic.FluxTubes.Examples.SolenoidActuator.ComparisonPullInStroke): time 0.0115/0.1157, allocations: 10.97 MB / 339.7 MB, free: 8.734 MB / 286.1 MB Notification: Performance of NFInst.instExpressions: time 0.007708/0.1234, allocations: 3.546 MB / 343.3 MB, free: 5.172 MB / 286.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.002669/0.1261, allocations: 39.88 kB / 343.3 MB, free: 5.133 MB / 286.1 MB Notification: Performance of NFTyping.typeComponents: time 0.008125/0.1343, allocations: 8.14 MB / 351.4 MB, free: 12.98 MB / 302.1 MB Notification: Performance of NFTyping.typeBindings: time 0.009831/0.1442, allocations: 4.616 MB / 356 MB, free: 8.348 MB / 302.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.003292/0.1475, allocations: 0.9323 MB / 357 MB, free: 7.414 MB / 302.1 MB Notification: Performance of NFFlatten.flatten: time 0.009261/0.1568, allocations: 5.316 MB / 362.3 MB, free: 2.086 MB / 302.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.002179/0.159, allocations: 0.8865 MB / 363.2 MB, free: 1.168 MB / 302.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.005426/0.1644, allocations: 2.864 MB / 366 MB, free: 14.3 MB / 318.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.008563/0.173, allocations: 5.119 MB / 371.2 MB, free: 9.16 MB / 318.1 MB Notification: Performance of NFPackage.collectConstants: time 0.001175/0.1742, allocations: 352 kB / 371.5 MB, free: 8.816 MB / 318.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.001118/0.1754, allocations: 388 kB / 371.9 MB, free: 8.438 MB / 318.1 MB Notification: Performance of NFScalarize.scalarize: time 0.001705/0.1771, allocations: 1.865 MB / 373.8 MB, free: 6.559 MB / 318.1 MB Notification: Performance of NFVerifyModel.verify: time 0.003262/0.1804, allocations: 2.795 MB / 376.5 MB, free: 3.742 MB / 318.1 MB Notification: Performance of NFConvertDAE.convert: time 0.1538/0.3342, allocations: 7.232 MB / 383.8 MB, free: 36.16 MB / 318.1 MB Notification: Performance of FrontEnd - DAE generated: time 5.59e-06/0.3342, allocations: 0 / 383.8 MB, free: 36.16 MB / 318.1 MB Notification: Performance of FrontEnd: time 1.653e-06/0.3342, allocations: 3.531 kB / 383.8 MB, free: 36.16 MB / 318.1 MB Notification: Performance of Transformations before backend: time 0.0001875/0.3344, allocations: 0 / 383.8 MB, free: 36.16 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: 528 * Number of variables: 528 Notification: Performance of Generate backend data structure: time 0.01255/0.347, allocations: 7.647 MB / 391.4 MB, free: 32.19 MB / 318.1 MB Notification: Performance of prepare preOptimizeDAE: time 3.723e-05/0.347, allocations: 10.56 kB / 391.4 MB, free: 32.19 MB / 318.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.00131/0.3483, allocations: 0.8435 MB / 392.3 MB, free: 31.72 MB / 318.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.004392/0.3527, allocations: 3.174 MB / 395.5 MB, free: 30.2 MB / 318.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 0.0001341/0.3529, allocations: 160.4 kB / 395.6 MB, free: 30.19 MB / 318.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 0.0003041/0.3532, allocations: 207.5 kB / 395.8 MB, free: 30.19 MB / 318.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.003615/0.3568, allocations: 2.114 MB / 397.9 MB, free: 29.73 MB / 318.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 5.159e-05/0.3569, allocations: 2.531 kB / 397.9 MB, free: 29.73 MB / 318.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 0.0001702/0.3571, allocations: 87.41 kB / 398 MB, free: 29.66 MB / 318.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 3.649e-05/0.3571, allocations: 52.84 kB / 398.1 MB, free: 29.66 MB / 318.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.003552/0.3607, allocations: 1.891 MB / 400 MB, free: 28.97 MB / 318.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.01296/0.3736, allocations: 8.896 MB / 408.9 MB, free: 23.11 MB / 318.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.003106/0.3768, allocations: 2.318 MB / 411.2 MB, free: 21.77 MB / 318.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.00212/0.3789, allocations: 1.384 MB / 412.6 MB, free: 20.85 MB / 318.1 MB Notification: Performance of preOpt evalFunc (simulation): time 0.0001317/0.3791, allocations: 43.03 kB / 412.6 MB, free: 20.82 MB / 318.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.001706/0.3808, allocations: 1.161 MB / 413.8 MB, free: 19.62 MB / 318.1 MB Notification: Performance of pre-optimization done (n=242): time 3.887e-06/0.3808, allocations: 0 / 413.8 MB, free: 19.62 MB / 318.1 MB Notification: Performance of matching and sorting (n=367): time 0.05913/0.4399, allocations: 22.79 MB / 436.6 MB, free: 12.67 MB / 334.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 0.02946/0.4694, allocations: 13.62 MB / 450.2 MB, free: 14.79 MB / 350.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.01567/0.4852, allocations: 14.89 MB / 465.1 MB, free: 15.96 MB / 366.1 MB Notification: Performance of collectPreVariables (initialization): time 0.0006664/0.4858, allocations: 89.7 kB / 465.1 MB, free: 15.87 MB / 366.1 MB Notification: Performance of collectInitialEqns (initialization): time 0.003301/0.4892, allocations: 3.725 MB / 468.9 MB, free: 12.14 MB / 366.1 MB Notification: Performance of collectInitialBindings (initialization): time 0.001598/0.4908, allocations: 1.212 MB / 470.1 MB, free: 10.94 MB / 366.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 0.001027/0.4918, allocations: 0.5194 MB / 470.6 MB, free: 10.41 MB / 366.1 MB Notification: Performance of setup shared object (initialization): time 9.638e-05/0.4919, allocations: 305.2 kB / 470.9 MB, free: 10.11 MB / 366.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.002463/0.4944, allocations: 1.248 MB / 472.1 MB, free: 8.863 MB / 366.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.002701/0.4971, allocations: 1.626 MB / 473.8 MB, free: 7.16 MB / 366.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.005251/0.5023, allocations: 2.99 MB / 476.8 MB, free: 4.125 MB / 366.1 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 9.097e-06/0.5024, allocations: 4 kB / 476.8 MB, free: 4.121 MB / 366.1 MB Notification: Performance of matching and sorting (n=431) (initialization): time 0.01176/0.5141, allocations: 5.209 MB / 482 MB, free: 14.95 MB / 382.1 MB Notification: Performance of prepare postOptimizeDAE: time 2.495e-05/0.5142, allocations: 6.078 kB / 482 MB, free: 14.95 MB / 382.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 2.112e-05/0.5142, allocations: 8 kB / 482 MB, free: 14.94 MB / 382.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 0.005549/0.5198, allocations: 1.382 MB / 483.4 MB, free: 13.54 MB / 382.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.002842/0.5226, allocations: 0.5448 MB / 483.9 MB, free: 13.02 MB / 382.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 0.02825/0.5509, allocations: 23.96 MB / 0.496 GB, free: 3.914 MB / 398.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.003796/0.5547, allocations: 131.8 kB / 0.4961 GB, free: 3.785 MB / 398.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 0.0003743/0.5551, allocations: 120 kB / 0.4962 GB, free: 3.668 MB / 398.1 MB Notification: Model statistics after passing the back-end for initialization: * Number of independent subsystems: 22 * Number of states: 0 () * Number of discrete variables: 9 ($PRE.comparisonWithFEA.nextTimeEvent,$whenCondition1,comparisonWithFEA.nextTimeEventScaled,$PRE.comparisonWithFEA.nextTimeEventScaled,comparisonWithFEA.nextTimeEvent,simpleSolenoid.armature.stopper_xMin.contact,simpleSolenoid.armature.stopper_xMax.contact,advancedSolenoid.armature.stopper_xMin.contact,advancedSolenoid.armature.stopper_xMax.contact) * Number of discrete states: 0 () * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for initialization (309): * Single equations (assignments): 300 * Array equations: 0 * Algorithm blocks: 0 * Record equations: 0 * When equations: 0 * If-equations: 0 * Equation systems (not torn): 0 * Torn equation systems: 9 * 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,4,100.0%), (1,4,100.0%), (1,3,100.0%), (1,5,100.0%), (1,4,100.0%)} * Non-linear torn systems (#iteration vars, #inner vars): 2 systems {(2,43), (3,50)} Notification: Performance of prepare postOptimizeDAE: time 0.003385/0.5585, allocations: 2.174 MB / 0.4983 GB, free: 1.512 MB / 398.1 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.001105/0.5596, allocations: 0.8175 MB / 0.4991 GB, free: 0.6836 MB / 398.1 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.01109/0.5707, allocations: 5.224 MB / 0.5042 GB, free: 11.47 MB / 414.1 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 3.261e-05/0.5708, allocations: 36 kB / 0.5043 GB, free: 11.43 MB / 414.1 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 1.788e-05/0.5708, allocations: 4 kB / 0.5043 GB, free: 11.43 MB / 414.1 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 3.393e-05/0.5709, allocations: 21.78 kB / 0.5043 GB, free: 11.41 MB / 414.1 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.02113/0.592, allocations: 11.06 MB / 0.5151 GB, free: 396 kB / 414.1 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 1.632e-05/0.5921, allocations: 0 / 0.5151 GB, free: 396 kB / 414.1 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.002502/0.5946, allocations: 455.4 kB / 0.5155 GB, free: 15.96 MB / 430.1 MB Notification: Performance of postOpt tearingSystem (simulation): time 0.005417/0.6, allocations: 1.333 MB / 0.5168 GB, free: 14.61 MB / 430.1 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 0.0004746/0.6005, allocations: 75.97 kB / 0.5169 GB, free: 14.54 MB / 430.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 0.1974/0.7979, allocations: 21.85 MB / 0.5382 GB, free: 143.6 MB / 430.1 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 0.02316/0.8211, allocations: 11.92 MB / 0.5499 GB, free: 137.4 MB / 430.1 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.01287/0.834, allocations: 6.943 MB / 0.5567 GB, free: 134.6 MB / 430.1 MB Notification: Performance of postOpt removeConstants (simulation): time 0.001645/0.8357, allocations: 0.7555 MB / 0.5574 GB, free: 134.4 MB / 430.1 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 0.0006696/0.8364, allocations: 63.66 kB / 0.5575 GB, free: 134.4 MB / 430.1 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.002068/0.8384, allocations: 118.6 kB / 0.5576 GB, free: 134.3 MB / 430.1 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0006323/0.8391, allocations: 271.2 kB / 0.5578 GB, free: 134.3 MB / 430.1 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 0.0001975/0.8393, allocations: 95 kB / 0.5579 GB, free: 134.3 MB / 430.1 MB Notification: Performance of sorting global known variables: time 0.008965/0.8483, allocations: 11.12 MB / 0.5688 GB, free: 126 MB / 430.1 MB Notification: Performance of sort global known variables: time 5.92e-07/0.8483, allocations: 4 kB / 0.5688 GB, free: 126 MB / 430.1 MB Notification: Performance of remove unused functions: time 0.004138/0.8524, allocations: 1.074 MB / 0.5698 GB, free: 124.9 MB / 430.1 MB Notification: Model statistics after passing the back-end for simulation: * Number of independent subsystems: 6 * Number of states: 9 (advancedSolenoid.x,advancedSolenoid.coil1.i,advancedSolenoid.armature.stopper_xMin.v_rel,advancedSolenoid.coil2.i,advancedSolenoid.c_par1.v,advancedSolenoid.c_par2.v,$STATESET1.x,simpleSolenoid.x,simpleSolenoid.armature.stopper_xMin.v_rel) * Number of discrete variables: 7 (advancedSolenoid.armature.stopper_xMax.contact,advancedSolenoid.armature.stopper_xMin.contact,simpleSolenoid.armature.stopper_xMax.contact,simpleSolenoid.armature.stopper_xMin.contact,$whenCondition1,comparisonWithFEA.nextTimeEvent,comparisonWithFEA.nextTimeEventScaled) * Number of discrete states: 2 (comparisonWithFEA.nextTimeEventScaled,comparisonWithFEA.nextTimeEvent) * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for simulation (253): * Single equations (assignments): 242 * Array equations: 0 * Algorithm blocks: 0 * Record equations: 0 * When equations: 2 * If-equations: 0 * Equation systems (not torn): 0 * Torn equation systems: 9 * 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,2,100.0%), (1,4,100.0%), (1,5,100.0%), (1,3,100.0%), (1,2,100.0%), (1,2,100.0%)} * Non-linear torn systems (#iteration vars, #inner vars): 2 systems {(3,49), (4,42)} Notification: Performance of Backend phase and start with SimCode phase: time 0.0011/0.8535, allocations: 0.5024 MB / 0.5703 GB, free: 124.5 MB / 430.1 MB Notification: Performance of simCode: created initialization part: time 0.006469/0.86, allocations: 4.816 MB / 0.575 GB, free: 119.6 MB / 430.1 MB Notification: Performance of simCode: created event and clocks part: time 4.468e-06/0.86, allocations: 0 / 0.575 GB, free: 119.6 MB / 430.1 MB Notification: Performance of simCode: created simulation system equations: time 0.00431/0.8644, allocations: 3.28 MB / 0.5782 GB, free: 116.2 MB / 430.1 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.00374/0.8681, allocations: 0.5372 MB / 0.5788 GB, free: 115.7 MB / 430.1 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.022/0.8901, allocations: 17.91 MB / 0.5963 GB, free: 97.87 MB / 430.1 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.003102/0.8933, allocations: 4.01 MB / 0.6002 GB, free: 93.81 MB / 430.1 MB Notification: Performance of simCode: alias equations: time 0.001929/0.8952, allocations: 308.9 kB / 0.6005 GB, free: 93.5 MB / 430.1 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0006812/0.8959, allocations: 171.4 kB / 0.6006 GB, free: 93.34 MB / 430.1 MB Notification: Performance of SimCode: time 8.52e-07/0.8959, allocations: 4 kB / 0.6006 GB, free: 93.33 MB / 430.1 MB Notification: Performance of Templates: time 0.1649/1.061, allocations: 65.37 MB / 0.6645 GB, free: 27.86 MB / 430.1 MB make -j1 -f Modelica_3.2.3_Modelica.Magnetic.FluxTubes.Examples.SolenoidActuator.ComparisonPullInStroke.makefile (rm -f Modelica_3.2.3_Modelica.Magnetic.FluxTubes.Examples.SolenoidActuator.ComparisonPullInStroke.pipe ; mkfifo Modelica_3.2.3_Modelica.Magnetic.FluxTubes.Examples.SolenoidActuator.ComparisonPullInStroke.pipe ; head -c 1048576 < Modelica_3.2.3_Modelica.Magnetic.FluxTubes.Examples.SolenoidActuator.ComparisonPullInStroke.pipe >> ../files/Modelica_3.2.3_Modelica.Magnetic.FluxTubes.Examples.SolenoidActuator.ComparisonPullInStroke.sim & ./Modelica_3.2.3_Modelica.Magnetic.FluxTubes.Examples.SolenoidActuator.ComparisonPullInStroke -abortSlowSimulation -alarm=480 -s cvode -emit_protected -lv LOG_STATS > Modelica_3.2.3_Modelica.Magnetic.FluxTubes.Examples.SolenoidActuator.ComparisonPullInStroke.pipe 2>&1) diffSimulationResults("Modelica_3.2.3_Modelica.Magnetic.FluxTubes.Examples.SolenoidActuator.ComparisonPullInStroke_res.mat","/var/lib/jenkins1/ws/OpenModelicaLibraryTestingWork/Reference-modelica.org/ReferenceResults/MAP-LIB_ReferenceResults/v3.2.3+build.4/Modelica/Magnetic/FluxTubes/Examples/SolenoidActuator/ComparisonPullInStroke/ComparisonPullInStroke.csv","/var/lib/jenkins1/ws/OpenModelicaLibraryTestingWork/OpenModelicaLibraryTesting/files/Modelica_3.2.3_Modelica.Magnetic.FluxTubes.Examples.SolenoidActuator.ComparisonPullInStroke.diff",relTol=0.003,relTolDiffMinMax=0.003,rangeDelta=0.001) Reference file matches