I have a copy of config_machines.xml in ~/.cime and also in cime/config/cesm/machines. I had changed the REGEX and beluga in the ~/.cime directory but not in the latter directory that was attached in my last message. I had just tried changing it in the latter directory but still get the same error.
The file /cvmfs/soft.computecanada.ca/easybuild/software/2017/Core/cesm/2.1.1/cime/config/cesm/machines/config_machines.xml appears to be another file that I cannot edit (I do not have permission to edit it it seems). It seems that I was editing a file that was not being read. The content in this file is below. How do I get it to point to the correct config_machines.xml file?
<machine MACH="computecanada">
<DESC>Compute Canada clusters - Intel and openmpi with slurm</DESC> <!-- can be anything -->
<OS>LINUX</OS> <!-- LINUX,Darwin,CNL,AIX,BGL,BGP -->
<COMPILERS>intel</COMPILERS> <!-- intel,ibm,pgi,pathscale,gnu,cray,lahey -->
<MPILIBS>openmpi</MPILIBS> <!-- openmpi, mpich, ibm, mpi-serial -->
<CESMSCRATCHROOT>/home/$CCSMUSER/scratch</CESMSCRATCHROOT> <!-- complete path to the 'scratch' directory -->
<RUNDIR>/home/$CCSMUSER/scratch/$CASE</RUNDIR> <!-- complete path to the run directory -->
<EXEROOT>/home/$CCSMUSER/scratch/ccsm/$CASE</EXEROOT> <!-- complete path to the build directory -->
<DIN_LOC_ROOT>/home/$CCSMUSER/scratch/ccsm/inputdata</DIN_LOC_ROOT> <!-- complete path to the inputdata directory -->
<DIN_LOC_ROOT_CLMFORC></DIN_LOC_ROOT_CLMFORC> <!-- path to the optional forcing data for CLM (for CRUNCEP forcing) -->
<DOUT_S>FALSE</DOUT_S> <!-- logical for short term archiving -->
<DOUT_S_ROOT>/home/$CCSMUSER/scratch/ccsm/archive/$CASE</DOUT_S_ROOT> <!-- complete path to a short term archiving directory -->
<DOUT_L_MSROOT>/home/$CCSMUSER/scratch/ccsm/archive/$CASE</DOUT_L_MSROOT> <!-- complete path to a long term archiving directory -->
<CCSM_BASELINE>/home/$CCSMUSER/scratch/ccsm</CCSM_BASELINE> <!-- where the cesm testing scripts write and read baseline results -->
<CCSM_CPRNC>/cvmfs/soft.computecanada.ca/easybuild/software/2017/Core/ccsm/4_0_a02/models/atm/cam/tools/cprnc/cprnc</CCSM_CPRNC> <!-- path to the cprnc tool used to compare netcdf history files in testing -->
<BATCHQUERY>squeue</BATCHQUERY>
<BATCHSUBMIT>sbatch</BATCHSUBMIT>
<SUPPORTED_BY>USERDEFINED_optional</SUPPORTED_BY>
<GMAKE_J>1</GMAKE_J>
<MAX_TASKS_PER_NODE>48</MAX_TASKS_PER_NODE>
</machine>