NCAR / spack-gust

Spack production user software stack on the Gust test system
4 stars 0 forks source link

Spack env vars persist in the crayenv environment #10

Closed roryck closed 1 year ago

roryck commented 2 years ago

After doing

module --force purge module crayenv/22.08 module load cray-netcdf/4.8.1.5

Environment variables from the spack environment persist, e.g.

env | grep NETCDF NETCDF=/glade/u/apps/gust/22.08/spack/opt/spack/netcdf/4.8.1/cce/14.0.2/q5m7ztl

All the NCAR_ variables and so on also persist. It would probably make the crayenv cleaner if we restored the environment to a pre-ncarenv state.

vanderwb commented 2 years ago

Hmm. This certainly isn't intentional. Seems like an Lmod bug.

vanderwb commented 1 year ago

@roryck Are you still able to reproduce this behavior? This is what I get:

[00:19] ~$ module reset
Running "module reset". Resetting modules to system default. The following $MODULEPATH directories have been removed: None
[00:19] ~$ echo $NETCDF
/glade/u/apps/gust/22.08b/spack/opt/spack/netcdf/4.8.1/cce/14.0.2
[00:19] ~$ module --force purge
[00:19] ~$ ml crayenv
[00:19] ~$ echo $NETCDF

[00:19] ~$
roryck commented 1 year ago

Seems fixed to me, I don't get the space vars persisting in the crayenv now

vanderwb commented 1 year ago

Excellent - thanks for confirming.