EarthWorksOrg / EarthWorks

Other
3 stars 2 forks source link

lmod path failure #13

Closed cponder closed 1 year ago

cponder commented 1 year ago

I cloned using this command:

git clone -b develop git@github.com:EarthWorksOrg/EarthWorks.git Source

Running the ./case.setup gave this message:

ERROR: module command /glade/u/apps/gust/default/spack/opt/spack/lmod/8.7.2/gcc/7.5.0/lmod/lmod/libexec/lmod python reset  failed with message:
/bin/sh: /glade/u/apps/gust/default/spack/opt/spack/lmod/8.7.2/gcc/7.5.0/lmod/lmod/libexec/lmod: No such file or directory

It looks like the file ccs_config/machines/config_machines.xml is hard-coding the paths

<       <init_path lang="perl">/glade/u/apps/gust/default/spack/opt/spack/lmod/8.7.2/gcc/7.5.0/lmod/lmod/init/perl</init_path>
<       <init_path lang="python">/glade/u/apps/gust/default/spack/opt/spack/lmod/8.7.2/gcc/7.5.0/lmod/lmod/init/env_modules_python.py</init_path>
<       <init_path lang="sh">/glade/u/apps/gust/default/spack/opt/spack/lmod/8.7.2/gcc/7.5.0/lmod/lmod/init/sh</init_path>
<       <init_path lang="csh">/glade/u/apps/gust/default/spack/opt/spack/lmod/8.7.2/gcc/7.5.0/lmod/lmod/init/csh</init_path>
<       <cmd_path lang="perl">/glade/u/apps/gust/default/spack/opt/spack/lmod/8.7.2/gcc/7.5.0/lmod/lmod/libexec/lmod perl</cmd_path>
<       <cmd_path lang="python">/glade/u/apps/gust/default/spack/opt/spack/lmod/8.7.2/gcc/7.5.0/lmod/lmod/libexec/lmod python</cmd_path>

instead of parameterizing them like in the earlier versions:

>       <init_path lang="python">$ENV{LMOD_ROOT}/lmod/init/env_modules_python.py</init_path>
>       <init_path lang="sh">$ENV{LMOD_ROOT}/lmod/init/sh</init_path>
>       <init_path lang="csh">$ENV{LMOD_ROOT}/lmod/init/csh</init_path>
>       <cmd_path lang="perl">$ENV{LMOD_ROOT}/lmod/libexec/lmod perl</cmd_path>
>       <cmd_path lang="python">$ENV{LMOD_ROOT}/lmod/libexec/lmod python</cmd_path>
gdicker1 commented 1 year ago

This occurred due to ccs_configs PR #3 as part of the 'cesm2_3_beta11' update in EarthWorks PR #12.

When we started EarthWorksOrg/ccs_configs_cesm, it was based on tag 'ccs_config_cesm0.0.38' from ESMCI/ccs_configs_cesm which had no support for NCAR's test machine Gust. ccs_configs PR #1 tried to address this by merging a branch that contained the current porting effort to Gust by Jim Edwards as of Feb 2023. When EarthWorksOrg/ccs_configs_cesm was updated, it advanced from being based on tag 'ccs_config_cesm0.0.38' to tag 'ccs_config_cesm0.0.49' which was made in Nov 2022. This caused the files to "time-travel" and is what caused the apparent reversion from paths that used sensible environment variables to hard-coded paths.

Proposed fix: You can try merging the same branch as was done in EarthWorksOrg/ccs_configs_cesm PR #1 as a one-off fix for Gust. You can find that here (or maybe here in case the branch name disappears).

If this were another system (i.e. not a proxy/test system), I'd be more motivated to fix it myself. We will eventually get these changes since they are in the 'cesm2_3_beta13' externals. That would require a 'cesm2_3_beta12' update first. I was made aware of a science results change in the atmosphere of 'cesm2_3_beta13' based runs, so I'm not in a hurry to catch up to that version until I learn more about that.

gdicker1 commented 1 year ago

I think this has been resolved with PR #14, so I'm closing this. If that's not the case, someone please comment or re-open this.