NCAR / spack-gust

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

The python included with ncarenv/22.12 takes precedent over versions installed via conda #36

Closed roryck closed 1 year ago

roryck commented 1 year ago

Under ncarenv/22.10:

module --force purge
module load ncarenv/22.10 conda
mamba create -n test_2210 python=3.7
conda activate test_2210
which python

/glade/work/rory/conda-envs/test_2210/bin/python

Under ncarenv/22.12:

module --force purge
module load ncarenv/22.12 conda
mamba create -n test_2212 python=3.7
conda activate test_2212
which python

/glade/u/apps/gust/22.12/opt/bin/python

vanderwb commented 1 year ago

Hey @roryck - thanks for reporting. However, I cannot replicate:

(test_2212) [09:28] ~$ which python
/glade/work/vanderwb/conda-envs/test_2212/bin/python

(test_2212) [09:28] ~$ module list

Currently Loaded Modules:
  1) ncarenv/22.12 (S)   2) conda/latest

Any extra environment details you can share? (PBS job?; non-bash?; running in a script?; ...)

roryck commented 1 year ago

I seem to get hit by this sporadically. This morning I couldn't reproduce, but now it's happening again. It's been interactive usage on gust02 (no PBS), and happens both from the command line or a script. Currently my environment is:

Currently Loaded Modules:
  1) ncarenv/22.12 (S)   2) conda/latest   3) oneapi/2022.2.1   4) craype/2.7.19   5) cray-mpich/8.1.21   6) netcdf/4.9.0   7) hdf5/1.12.2

and I see:

(x) rory@gust02:/glade/gust/scratch/rory/WRF/test/em_real> conda env list
# conda environments:
#
base                     /glade/u/apps/opt/conda
npl                      /glade/u/apps/opt/conda/envs/npl
npl-2022b                /glade/u/apps/opt/conda/envs/npl-2022b
test_2210                /glade/work/rory/conda-envs/test_2210
test_2212                /glade/work/rory/conda-envs/test_2212
wrf_validate             /glade/work/rory/conda-envs/wrf_validate
x                     *  /glade/work/rory/conda-envs/x

(x) rory@gust02:/glade/gust/scratch/rory/WRF/test/em_real> which python
/glade/u/apps/gust/22.12/opt/bin/python

I have only seen this with the 22.12 stack though, not 22.10 or earlier

roryck commented 1 year ago

I have a terminal session open where I'm having this issue. I'll leave it open and maybe we can debug sometime tomorrow

vanderwb commented 1 year ago

This issue should be resolved by changes to the ncarenv module to improve precedence.

2141503636c5a60387cc9334004242b9c2b4688e