Dear shwhyshwhy ,
Thanks for sharing this. If you are running on CC systems, you'll likely run spack on top of another module system: Lmod. (module command) You'll have to be careful and perform all steps consistently every time, i.e. load a given environment with the module command and then do you things which spack. This is best done in a bash script you could source. For instance,
module purge
module load CCEnv StdEnv/2020
module load gcc/9.3.0 openmpi/4.0.3 python/3.6
module rm imkl
source /project/h/hongguo/vincentm/spack/share/spack/setup-env.sh
spack env activate /project/h/hongguo/vincentm/rescuf08/rescuf08-709
Since you got this far, I think you're probably good there already.