Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries/ --ompython_omhome=/usr Modelica_3.2.3_cpp_Modelica.Electrical.Digital.Examples.WiredX.conf.json loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 3.2.3+maint.om/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 3.2.3+maint.om/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 3.2.3+maint.om/package.mo", uses=false) Using package ModelicaServices with version 3.2.3 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 3.2.3+maint.om/package.mo) 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 3.2.3 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 3.2.3+maint.om/package.mo) Running command: "" <> buildModelFMU(Modelica.Electrical.Digital.Examples.WiredX,fileNamePrefix="Modelica_3_2_3_cpp_Modelica_Electrical_Digital_Examples_WiredX",fmuType="me",version="2.0",platforms={"static"}) "" <> buildModelFMU(Modelica.Electrical.Digital.Examples.WiredX,fileNamePrefix="Modelica_3_2_3_cpp_Modelica_Electrical_Digital_Examples_WiredX",fmuType="me",version="2.0",platforms={"static"}) Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 3.2.3+maint.om/package.mo): time 0.0008379/0.0008379, allocations: 175.1 kB / 16.72 MB, free: 5.059 MB / 13.93 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 3.2.3+maint.om/package.mo): time 1.285/1.285, allocations: 205.4 MB / 222.9 MB, free: 9.031 MB / 186.7 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 3.2.3+maint.om/package.mo): time 0.0008037/0.0008037, allocations: 96.45 kB / 271.2 MB, free: 8.246 MB / 218.7 MB Notification: Performance of FrontEnd - loaded program: time 0.0002751/0.0002751, allocations: 8 kB / 327.6 MB, free: 15.79 MB / 282.7 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.2249/0.2252, allocations: 47.58 MB / 375.2 MB, free: 45.41 MB / 298.7 MB Notification: Performance of NFInst.instantiate(Modelica.Electrical.Digital.Examples.WiredX): time 0.001813/0.2271, allocations: 1.458 MB / 376.6 MB, free: 44.25 MB / 298.7 MB Notification: Performance of NFInst.instExpressions: time 0.002044/0.2292, allocations: 0.9405 MB / 377.6 MB, free: 43.54 MB / 298.7 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.0001347/0.2293, allocations: 2.406 kB / 377.6 MB, free: 43.54 MB / 298.7 MB Notification: Performance of NFTyping.typeComponents: time 0.0001198/0.2295, allocations: 14.3 kB / 377.6 MB, free: 43.53 MB / 298.7 MB Notification: Performance of NFTyping.typeBindings: time 9.97e-05/0.2296, allocations: 29.66 kB / 377.6 MB, free: 43.51 MB / 298.7 MB Notification: Performance of NFTyping.typeClassSections: time 0.0003301/0.2299, allocations: 80.08 kB / 377.7 MB, free: 43.45 MB / 298.7 MB Notification: Performance of NFFlatten.flatten: time 0.000302/0.2302, allocations: 228.5 kB / 377.9 MB, free: 43.31 MB / 298.7 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0001432/0.2304, allocations: 51.67 kB / 378 MB, free: 43.29 MB / 298.7 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0008347/0.2312, allocations: 0.6293 MB / 378.6 MB, free: 43.04 MB / 298.7 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0002636/0.2315, allocations: 162.3 kB / 378.8 MB, free: 42.97 MB / 298.7 MB Notification: Performance of NFPackage.collectConstants: time 0.0001023/0.2316, allocations: 6.531 kB / 378.8 MB, free: 42.97 MB / 298.7 MB Notification: Performance of NFFlatten.collectFunctions: time 6.726e-05/0.2317, allocations: 8.562 kB / 378.8 MB, free: 42.97 MB / 298.7 MB Notification: Performance of NFScalarize.scalarize: time 0.0001354/0.2318, allocations: 134.8 kB / 378.9 MB, free: 42.91 MB / 298.7 MB Notification: Performance of NFVerifyModel.verify: time 0.00022/0.232, allocations: 246.8 kB / 379.2 MB, free: 42.72 MB / 298.7 MB Notification: Performance of NFConvertDAE.convert: time 0.0004736/0.2325, allocations: 0.5966 MB / 379.8 MB, free: 42.27 MB / 298.7 MB Notification: Performance of FrontEnd - DAE generated: time 4.689e-06/0.2325, allocations: 4 kB / 379.8 MB, free: 42.27 MB / 298.7 MB Notification: Performance of FrontEnd: time 1.543e-06/0.2325, allocations: 0 / 379.8 MB, free: 42.27 MB / 298.7 MB Notification: Performance of Transformations before backend: time 2.788e-05/0.2326, allocations: 1.25 kB / 379.8 MB, free: 42.27 MB / 298.7 MB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 33 * Number of variables: 33 Notification: Performance of Generate backend data structure: time 0.001256/0.2338, allocations: 1.028 MB / 380.8 MB, free: 41.27 MB / 298.7 MB Notification: Performance of prepare preOptimizeDAE: time 4.284e-05/0.2339, allocations: 13.78 kB / 380.8 MB, free: 41.27 MB / 298.7 MB Notification: Performance of preOpt introduceOutputAliases (simulation): time 0.0001046/0.234, allocations: 52.14 kB / 380.9 MB, free: 41.22 MB / 298.7 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0001614/0.2342, allocations: 81.94 kB / 380.9 MB, free: 41.18 MB / 298.7 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.000396/0.2346, allocations: 389.7 kB / 381.3 MB, free: 40.83 MB / 298.7 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 3.27e-05/0.2346, allocations: 10.91 kB / 381.3 MB, free: 40.83 MB / 298.7 MB Notification: Performance of preOpt expandDerOperator (simulation): time 4.902e-05/0.2347, allocations: 25.25 kB / 381.3 MB, free: 40.82 MB / 298.7 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0004867/0.2352, allocations: 251.3 kB / 381.6 MB, free: 40.68 MB / 298.7 MB Notification: Performance of preOpt findStateOrder (simulation): time 9.758e-06/0.2352, allocations: 0 / 381.6 MB, free: 40.68 MB / 298.7 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 4.109e-05/0.2352, allocations: 6.844 kB / 381.6 MB, free: 40.68 MB / 298.7 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 5.219e-06/0.2352, allocations: 6.594 kB / 381.6 MB, free: 40.68 MB / 298.7 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0002783/0.2355, allocations: 134.9 kB / 381.7 MB, free: 40.62 MB / 298.7 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.001124/0.2367, allocations: 0.7389 MB / 382.5 MB, free: 40.03 MB / 298.7 MB Notification: Performance of preOpt comSubExp (simulation): time 0.0003468/0.237, allocations: 203.5 kB / 382.7 MB, free: 39.92 MB / 298.7 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0002816/0.2373, allocations: 176 kB / 382.8 MB, free: 39.83 MB / 298.7 MB Notification: Performance of preOpt evalFunc (simulation): time 2.129e-05/0.2373, allocations: 1.188 kB / 382.8 MB, free: 39.83 MB / 298.7 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0005067/0.2379, allocations: 393.2 kB / 383.2 MB, free: 39.52 MB / 298.7 MB Notification: Performance of pre-optimization done (n=29): time 2.274e-06/0.2379, allocations: 0 / 383.2 MB, free: 39.52 MB / 298.7 MB Notification: Performance of matching and sorting (n=29): time 0.001423/0.2393, allocations: 0.9274 MB / 384.2 MB, free: 38.97 MB / 298.7 MB Notification: Performance of inlineWhenForInitialization (initialization): time 8.357e-05/0.2394, allocations: 282.9 kB / 384.4 MB, free: 38.64 MB / 298.7 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.001175/0.2406, allocations: 0.9467 MB / 385.4 MB, free: 38.05 MB / 298.7 MB Notification: Performance of collectPreVariables (initialization): time 4.335e-05/0.2406, allocations: 41.94 kB / 385.4 MB, free: 38.01 MB / 298.7 MB Notification: Performance of collectInitialEqns (initialization): time 5.886e-05/0.2407, allocations: 122.5 kB / 385.5 MB, free: 37.89 MB / 298.7 MB Notification: Performance of collectInitialBindings (initialization): time 6.423e-05/0.2408, allocations: 70.91 kB / 385.6 MB, free: 37.84 MB / 298.7 MB Notification: Performance of simplifyInitialFunctions (initialization): time 3.476e-05/0.2408, allocations: 9.594 kB / 385.6 MB, free: 37.83 MB / 298.7 MB Notification: Performance of setup shared object (initialization): time 6.041e-05/0.2409, allocations: 337.3 kB / 386 MB, free: 37.5 MB / 298.7 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0002107/0.2411, allocations: 121.5 kB / 386.1 MB, free: 37.4 MB / 298.7 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0002128/0.2413, allocations: 164.6 kB / 386.2 MB, free: 37.23 MB / 298.7 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.0004662/0.2418, allocations: 0.7021 MB / 386.9 MB, free: 36.41 MB / 298.7 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 2.154e-06/0.2418, allocations: 0 / 386.9 MB, free: 36.41 MB / 298.7 MB Notification: Performance of matching and sorting (n=34) (initialization): time 0.0007649/0.2426, allocations: 0.7526 MB / 387.7 MB, free: 35.61 MB / 298.7 MB Notification: Performance of prepare postOptimizeDAE: time 7.942e-05/0.2427, allocations: 241.6 kB / 387.9 MB, free: 35.32 MB / 298.7 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 6.211e-06/0.2427, allocations: 3.984 kB / 387.9 MB, free: 35.32 MB / 298.7 MB Notification: Performance of postOpt tearingSystem (initialization): time 1.203e-05/0.2427, allocations: 0 / 387.9 MB, free: 35.32 MB / 298.7 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 2.902e-05/0.2427, allocations: 15.94 kB / 387.9 MB, free: 35.3 MB / 298.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 5.63e-06/0.2427, allocations: 96 / 387.9 MB, free: 35.3 MB / 298.7 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0002605/0.243, allocations: 31.98 kB / 388 MB, free: 35.27 MB / 298.7 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 9.39e-05/0.2431, allocations: 113 kB / 388.1 MB, free: 35.16 MB / 298.7 MB Notification: Model statistics after passing the back-end for initialization: * Number of independent subsystems: 4 * Number of states: 0 () * Number of discrete variables: 34 ($PRE.bUF3S1.inertialDelaySensitive.y,$PRE.bUF3S2.inertialDelaySensitive.y,$whenCondition1,$whenCondition2,$whenCondition3,$whenCondition4,e_table2.y,x_table2.y,bUF3S2.nextstate,bUF3S2.yy,$PRE.bUF3S2.inertialDelaySensitive.x,bUF3S2.inertialDelaySensitive.x,bUF3S2.inertialDelaySensitive.y,bUF3S2.inertialDelaySensitive.delayTime,bUF3S2.inertialDelaySensitive.y_auxiliary,bUF3S2.inertialDelaySensitive.y_old,bUF3S2.inertialDelaySensitive.lh,bUF3S2.inertialDelaySensitive.t_next,e_table1.y,x_table1.y,bUF3S1.nextstate,bUF3S1.yy,$PRE.bUF3S1.inertialDelaySensitive.x,bUF3S1.inertialDelaySensitive.x,bUF3S1.inertialDelaySensitive.y,bUF3S1.inertialDelaySensitive.delayTime,bUF3S1.inertialDelaySensitive.y_auxiliary,bUF3S1.inertialDelaySensitive.y_old,bUF3S1.inertialDelaySensitive.lh,bUF3S1.inertialDelaySensitive.t_next,wiredX.auxiliary[1],wiredX.auxiliary[2],wiredX.y,$PRE.wiredX.auxiliary[2]) * Number of discrete states: 0 () * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for initialization (18): * Single equations (assignments): 10 * Array equations: 0 * Algorithm blocks: 8 * Record equations: 0 * When equations: 0 * If-equations: 0 * Equation systems (linear and non-linear blocks): 0 * Torn equation systems: 0 * Mixed (continuous/discrete) equation systems: 0 Notification: Performance of prepare postOptimizeDAE: time 0.000428/0.2435, allocations: 0.6161 MB / 388.7 MB, free: 34.48 MB / 298.7 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 7.037e-05/0.2436, allocations: 79.06 kB / 388.8 MB, free: 34.41 MB / 298.7 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.0001452/0.2438, allocations: 130.9 kB / 388.9 MB, free: 34.28 MB / 298.7 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 4.027e-06/0.2438, allocations: 8 kB / 388.9 MB, free: 34.27 MB / 298.7 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 5.46e-06/0.2438, allocations: 4 kB / 388.9 MB, free: 34.27 MB / 298.7 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 3.186e-06/0.2438, allocations: 3.938 kB / 388.9 MB, free: 34.26 MB / 298.7 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.00135/0.2452, allocations: 1.421 MB / 390.3 MB, free: 32.73 MB / 298.7 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 2.424e-06/0.2452, allocations: 3.984 kB / 390.3 MB, free: 32.73 MB / 298.7 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 1.39e-05/0.2452, allocations: 7.938 kB / 390.4 MB, free: 32.72 MB / 298.7 MB Notification: Performance of postOpt tearingSystem (simulation): time 2.064e-06/0.2452, allocations: 0 / 390.4 MB, free: 32.72 MB / 298.7 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 4.233e-05/0.2452, allocations: 27.98 kB / 390.4 MB, free: 32.7 MB / 298.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 1.603e-06/0.2452, allocations: 0 / 390.4 MB, free: 32.7 MB / 298.7 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 1.002e-06/0.2453, allocations: 8 kB / 390.4 MB, free: 32.69 MB / 298.7 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.0008759/0.2461, allocations: 0.9531 MB / 391.3 MB, free: 31.67 MB / 298.7 MB Notification: Performance of postOpt removeConstants (simulation): time 0.0004249/0.2466, allocations: 415.8 kB / 391.7 MB, free: 31.24 MB / 298.7 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 8.943e-05/0.2467, allocations: 23.98 kB / 391.8 MB, free: 31.22 MB / 298.7 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0002178/0.2469, allocations: 27.98 kB / 391.8 MB, free: 31.19 MB / 298.7 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0001447/0.247, allocations: 55.92 kB / 391.9 MB, free: 31.14 MB / 298.7 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 8.748e-05/0.2471, allocations: 115.9 kB / 392 MB, free: 31.02 MB / 298.7 MB Notification: Performance of sorting global known variables: time 0.000662/0.2478, allocations: 0.6976 MB / 392.7 MB, free: 30.33 MB / 298.7 MB Notification: Performance of sort global known variables: time 1.3e-07/0.2478, allocations: 0 / 392.7 MB, free: 30.33 MB / 298.7 MB Notification: Performance of remove unused functions: time 0.0003224/0.2481, allocations: 99.84 kB / 392.8 MB, free: 30.23 MB / 298.7 MB Notification: Model statistics after passing the back-end for simulation: * Number of independent subsystems: 1 * Number of states: 0 () * Number of discrete variables: 29 ($whenCondition1,$whenCondition2,$whenCondition3,$whenCondition4,e_table2.y,x_table2.y,bUF3S2.nextstate,bUF3S2.yy,bUF3S2.inertialDelaySensitive.x,bUF3S2.inertialDelaySensitive.y,bUF3S2.inertialDelaySensitive.delayTime,bUF3S2.inertialDelaySensitive.y_auxiliary,bUF3S2.inertialDelaySensitive.y_old,bUF3S2.inertialDelaySensitive.lh,bUF3S2.inertialDelaySensitive.t_next,e_table1.y,x_table1.y,bUF3S1.nextstate,bUF3S1.yy,bUF3S1.inertialDelaySensitive.x,bUF3S1.inertialDelaySensitive.y,bUF3S1.inertialDelaySensitive.delayTime,bUF3S1.inertialDelaySensitive.y_auxiliary,bUF3S1.inertialDelaySensitive.y_old,bUF3S1.inertialDelaySensitive.lh,bUF3S1.inertialDelaySensitive.t_next,wiredX.y,wiredX.auxiliary[1],wiredX.auxiliary[2]) * Number of discrete states: 27 (e_table2.y,x_table2.y,bUF3S2.yy,bUF3S2.nextstate,bUF3S2.inertialDelaySensitive.y,bUF3S2.inertialDelaySensitive.y_auxiliary,bUF3S2.inertialDelaySensitive.t_next,bUF3S2.inertialDelaySensitive.delayTime,bUF3S2.inertialDelaySensitive.lh,bUF3S2.inertialDelaySensitive.y_old,$whenCondition4,$whenCondition3,bUF3S2.inertialDelaySensitive.x,e_table1.y,x_table1.y,bUF3S1.yy,bUF3S1.nextstate,bUF3S1.inertialDelaySensitive.y,bUF3S1.inertialDelaySensitive.y_auxiliary,bUF3S1.inertialDelaySensitive.t_next,bUF3S1.inertialDelaySensitive.delayTime,bUF3S1.inertialDelaySensitive.lh,bUF3S1.inertialDelaySensitive.y_old,$whenCondition2,$whenCondition1,bUF3S1.inertialDelaySensitive.x,wiredX.auxiliary[2]) * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for simulation (13): * Single equations (assignments): 5 * Array equations: 0 * Algorithm blocks: 8 * Record equations: 0 * When equations: 0 * If-equations: 0 * Equation systems (linear and non-linear blocks): 0 * Torn equation systems: 0 * Mixed (continuous/discrete) equation systems: 0 Notification: Performance of Backend phase and start with SimCode phase: time 0.001118/0.2493, allocations: 1.541 MB / 394.3 MB, free: 28.61 MB / 298.7 MB Notification: Performance of simCode: created initialization part: time 0.000662/0.2499, allocations: 0.8896 MB / 395.2 MB, free: 27.62 MB / 298.7 MB Notification: Performance of simCode: created event and clocks part: time 2.023e-06/0.2499, allocations: 0 / 395.2 MB, free: 27.62 MB / 298.7 MB Notification: Performance of simCode: created simulation system equations: time 0.0004164/0.2504, allocations: 0.7523 MB / 395.9 MB, free: 26.78 MB / 298.7 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0009654/0.2513, allocations: 246.8 kB / 396.2 MB, free: 26.54 MB / 298.7 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.00347/0.2548, allocations: 3.065 MB / 399.2 MB, free: 23.41 MB / 298.7 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0003709/0.2552, allocations: 0.9364 MB / 400.2 MB, free: 22.45 MB / 298.7 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0001355/0.2554, allocations: 103.3 kB / 400.3 MB, free: 22.34 MB / 298.7 MB Notification: Performance of SimCode: time 4.1e-07/0.2554, allocations: 0 / 400.3 MB, free: 22.34 MB / 298.7 MB Notification: Performance of buildModelFMU: Generate C++ for platform static: time 3.975/4.23, allocations: 4.452 MB / 404.7 MB, free: 17.88 MB / 298.7 MB (rm -f Modelica_3.2.3_cpp_Modelica.Electrical.Digital.Examples.WiredX.pipe ; mkfifo Modelica_3.2.3_cpp_Modelica.Electrical.Digital.Examples.WiredX.pipe ; head -c 1048576 < Modelica_3.2.3_cpp_Modelica.Electrical.Digital.Examples.WiredX.pipe >> ../files/Modelica_3.2.3_cpp_Modelica.Electrical.Digital.Examples.WiredX.sim & /home/hudson/saved_omc/OMSimulator/install/linux/bin/OMSimulator -r=Modelica_3.2.3_cpp_Modelica.Electrical.Digital.Examples.WiredX_res.mat --tempDir=temp_Modelica_3_2_3_cpp_Modelica_Electrical_Digital_Examples_WiredX_fmu --startTime=0 --stopTime=12 --timeout=50 --tolerance=1e-06 Modelica_3_2_3_cpp_Modelica_Electrical_Digital_Examples_WiredX.fmu > Modelica_3.2.3_cpp_Modelica.Electrical.Digital.Examples.WiredX.pipe 2>&1) diffSimulationResults("Modelica_3.2.3_cpp_Modelica.Electrical.Digital.Examples.WiredX_res.mat","/var/lib/jenkins1/ws/OpenModelicaLibraryTestingWork/Reference-modelica.org/ReferenceResults/MAP-LIB_ReferenceResults/v3.2.3+build.4/Modelica/Electrical/Digital/Examples/WiredX/WiredX.csv","../files/Modelica_3.2.3_cpp_Modelica.Electrical.Digital.Examples.WiredX.diff",relTol=0.003,relTolDiffMinMax=0.003,rangeDelta=0.001) Reference file matches