Deprecation of conda/analysis3-25.05

Hi,

This post is in response to the announcement of the deprecation of older xp65 analysis3 environments.

This suggests conda/analysis3-25.05 will be deprecated which is needed when using cylc7, see some older discussions here and here.

E.g., I load the 25.05 environment in my CM2 suites like so: suite.rc:
[[ocean_ke_check]] inherit = POSTPROC, NCI, SHARE pre-script = """ module use /g/data/xp65/public/modules module unload python module load conda/analysis3-25.05

So my question is whether there are suggested workarounds?

Cheers,
Wilma

1 Like

Hi @wghuneke,

I have re-enabled analysis3-25.05 for now. However, I think it would be worth looking at an alternative way of running your models. In particular, could you consider setting up and using your own conda environment?

It would also be good to check whether updating cylc is feasible on your side.

Cylc7 is old…

@rbeucher
Although I agree on Cylc7 being old, it’s not that easy to switch to Cylc8 straight away.
We will slowly transition all ACCESS models that currently use Cylc7 to Cylc8, but there will definitely be some transition period during which it would be simpler if analysis3-25.05 was available so everything could still work.

Open to discussion and I can leave it available for now, however analysis3 is a massive kitchen sink environment with 100s of packages. I suggest moving to a dedicated environment for Cylc7 if the community wants to have it available.

It would be helpful if the conda environment modules could be made more hygenic - there shouldn’t be a need for them to imitate a ‘conda load’ in the module file to set environment variables outside of the container.

Ideally loading the conda environment shouldn’t be breaking other things - the Cylc setup does make an effort to have its python environment separate from any user environment that might be loaded.

Separately, the Cylc 8 backwards compatibility is normally really good :slight_smile: - Cylc 8 Migration Guide — Cylc 8.6.2 documentation

I just double-checked and the latest analysis3-26-02 module doesn’t seem to export the _CONDA_PYTHON_SYSCONFIGDATA_NAME env variable (that based on the related links in Wilma’s original message seem to be the cause of incompatibility).

@wilma have you tried by chance to use analysis3-26-02 and see if it works?

Thanks all for responding to my message.

I haven’t tried using analysis3-26-02as an older recommendation was that any analysis3-26 and older won’t work.

How would I upgrade to cylc8 - is that model/suite specific? I work with different CM2 configurations and because it is the latest (although old) published ACCESS-CM model, I think it is important that we can still run it.

Hi @Scott, Can you clarify what you mean here. Are you talking about cylc or the analysis3 environment more generally.

The majority of these variables shouldn’t be getting set by the module, as they may cause conflicts with other packages as seen in this thread. Since you’re using a container already, make use of it to isolate the conda environment from the outside environment.

$ module show conda/analysis3 | cat
-------------------------------------------------------------------
/g/data/xp65/public/modules/conda/analysis3-26.01:

module          load singularity
prepend-path    CONTAINER_OVERLAY_PATH /g/data/xp65/public/apps/med_conda/envs/analysis3-26.01.sqsh
prepend-path    SINGULARITYENV_PREPEND_PATH /g/data/xp65/public/apps/med_conda/envs/analysis3-26.01/condabin
setenv          CONDA_SHLVL 1
setenv          GDAL_DATA /opt/conda/analysis3-26.01/share/gdal
setenv          host_alias x86_64-conda-linux-gnu
setenv          GPROF /opt/conda/analysis3-26.01/bin/x86_64-conda-linux-gnu-gprof
setenv          _CONDA_SET_ESMFMKFILE /opt/conda/analysis3-26.01/lib/esmf.mk
setenv          GXX /opt/conda/analysis3-26.01/bin/x86_64-conda-linux-gnu-g++
prepend-path    GDAL_DRIVER_PATH /opt/conda/analysis3-26.01/lib/gdalplugins
setenv          CMAKE_ARGS {-DCMAKE_AR=/opt/conda/analysis3-26.01/bin/x86_64-conda-linux-gnu-ar -DCMAKE_CXX_COMPILER_AR=/opt/conda/analysis3-26.01/bin/x86_64-conda-linux-gnu-gcc-ar -DCMAKE_C_COMPILER_AR=/opt/conda/analysis3-26.01/bin/x86_64-conda-linux-gnu-gcc-ar -DCMAKE_RANLIB=/opt/conda/analysis3-26.01/bin/x86_64-conda-linux-gnu-ranlib -DCMAKE_CXX_COMPILER_RANLIB=/opt/conda/analysis3-26.01/bin/x86_64-conda-linux-gnu-gcc-ranlib -DCMAKE_C_COMPILER_RANLIB=/opt/conda/analysis3-26.01/bin/x86_64-conda-linux-gnu-gcc-ranlib -DCMAKE_LINKER=/opt/conda/analysis3-26.01/bin/x86_64-conda-linux-gnu-ld -DCMAKE_STRIP=/opt/conda/analysis3-26.01/bin/x86_64-conda-linux-gnu-strip -DCMAKE_BUILD_TYPE=Release}
setenv          DEBUG_CPPFLAGS {-D_DEBUG -D_FORTIFY_SOURCE=2 -Og -isystem /opt/conda/analysis3-26.01/include}
setenv          DEBUG_CFLAGS {-march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-all -fno-plt -Og -g -Wall -Wextra -fvar-tracking-assignments -ffunction-sections -pipe -isystem /opt/conda/analysis3-26.01/include}
setenv          GCC_NM /opt/conda/analysis3-26.01/bin/x86_64-conda-linux-gnu-gcc-nm
setenv          GSETTINGS_SCHEMA_DIR_CONDA_BACKUP {}
setenv          CPL_ZIP_ENCODING UTF-8
setenv          CONDA_PREFIX /opt/conda/analysis3-26.01
setenv          CONDA_PYTHONBREAKPOINT {}
setenv          GCC_RANLIB /opt/conda/analysis3-26.01/bin/x86_64-conda-linux-gnu-gcc-ranlib
setenv          CONDA_BUILD_CROSS_COMPILATION {}
setenv          CFLAGS {-march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /opt/conda/analysis3-26.01/include}
setenv          GCC_AR /opt/conda/analysis3-26.01/bin/x86_64-conda-linux-gnu-gcc-ar
setenv          _CONDA_SET_MAGPLUS_HOME {}
setenv          PYTHONBREAKPOINT ipdb.set_trace
setenv          CONDA_TOOLCHAIN_HOST x86_64-conda-linux-gnu
setenv          NCARG_ROOT /opt/conda/analysis3-26.01
setenv          ESMFMKFILE /opt/conda/analysis3-26.01/lib/esmf.mk
setenv          CC /opt/conda/analysis3-26.01/bin/x86_64-conda-linux-gnu-cc
setenv          READELF /opt/conda/analysis3-26.01/bin/x86_64-conda-linux-gnu-readelf
setenv          PROJ_DATA /opt/conda/analysis3-26.01/share/proj
setenv          CONDA_TOOLCHAIN_BUILD x86_64-conda-linux-gnu
setenv          CXXFLAGS {-fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /opt/conda/analysis3-26.01/include}
setenv          STRIP /opt/conda/analysis3-26.01/bin/x86_64-conda-linux-gnu-strip
setenv          OBJCOPY /opt/conda/analysis3-26.01/bin/x86_64-conda-linux-gnu-objcopy
setenv          ADDR2LINE /opt/conda/analysis3-26.01/bin/x86_64-conda-linux-gnu-addr2line
prepend-path    CMAKE_PREFIX_PATH /opt/conda/analysis3-26.01:/opt/conda/analysis3-26.01/x86_64-conda-linux-gnu/sysroot/usr
setenv          HOST x86_64-conda-linux-gnu
setenv          RANLIB /opt/conda/analysis3-26.01/bin/x86_64-conda-linux-gnu-ranlib
setenv          OBJDUMP /opt/conda/analysis3-26.01/bin/x86_64-conda-linux-gnu-objdump
setenv          AS /opt/conda/analysis3-26.01/bin/x86_64-conda-linux-gnu-as
setenv          AR /opt/conda/analysis3-26.01/bin/x86_64-conda-linux-gnu-ar
setenv          GSETTINGS_SCHEMA_DIR /opt/conda/analysis3-26.01/share/glib-2.0/schemas
setenv          CC_FOR_BUILD /opt/conda/analysis3-26.01/bin/x86_64-conda-linux-gnu-cc
setenv          build_alias x86_64-conda-linux-gnu
setenv          CMDSTAN /g/data/xp65/public/./apps/med_conda/envs/analysis3-26.01/bin/cmdstan
setenv          PROJ_NETWORK ON
setenv          BUILD x86_64-conda-linux-gnu
setenv          LDFLAGS_LD {-O2 --sort-common --as-needed -z relro -z now --disable-new-dtags --gc-sections --allow-shlib-undefined -rpath /opt/conda/analysis3-26.01/lib -rpath-link /opt/conda/analysis3-26.01/lib -L/opt/conda/analysis3-26.01/lib}
setenv          NM /opt/conda/analysis3-26.01/bin/x86_64-conda-linux-gnu-nm
setenv          CONDA_PROMPT_MODIFIER (/opt/conda/analysis3-26.01)
setenv          CONDA_BUILD_SYSROOT /opt/conda/analysis3-26.01/x86_64-conda-linux-gnu/sysroot
setenv          DEBUG_CXXFLAGS {-fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-all -fno-plt -Og -g -Wall -Wextra -fvar-tracking-assignments -ffunction-sections -pipe -isystem /opt/conda/analysis3-26.01/include}
setenv          CXX /opt/conda/analysis3-26.01/bin/x86_64-conda-linux-gnu-c++
setenv          CMDSTAN_OLD {}
prepend-path    UDUNITS2_XML_PATH /opt/conda/analysis3-26.01/share/udunits/udunits2.xml
setenv          CXXFILT /opt/conda/analysis3-26.01/bin/x86_64-conda-linux-gnu-c++filt
setenv          CPP_FOR_BUILD /opt/conda/analysis3-26.01/bin/x86_64-conda-linux-gnu-cpp
setenv          ELFEDIT /opt/conda/analysis3-26.01/bin/x86_64-conda-linux-gnu-elfedit
setenv          CPPFLAGS {-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /opt/conda/analysis3-26.01/include}
setenv          STRINGS /opt/conda/analysis3-26.01/bin/x86_64-conda-linux-gnu-strings
setenv          RSTUDIO_WHICH_R /opt/conda/analysis3-26.01/bin/R
setenv          LDFLAGS {-Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,--allow-shlib-undefined -Wl,-rpath,/opt/conda/analysis3-26.01/lib -Wl,-rpath-link,/opt/conda/analysis3-26.01/lib -L/opt/conda/analysis3-26.01/lib}
setenv          CXX_FOR_BUILD /opt/conda/analysis3-26.01/bin/x86_64-conda-linux-gnu-c++
prepend-path    PATH /g/data/xp65/public/apps/med_conda_scripts/analysis3-26.01.d/bin
prepend-path    SINGULARITYENV_PREPEND_PATH /opt/conda/analysis3-26.01/bin
setenv          MESON_ARGS -Dbuildtype=release
setenv          GCC /opt/conda/analysis3-26.01/bin/x86_64-conda-linux-gnu-gcc
setenv          CONDA_DEFAULT_ENV /opt/conda/analysis3-26.01
setenv          MAGPLUS_HOME /opt/conda/analysis3-26.01
setenv          SIZE /opt/conda/analysis3-26.01/bin/x86_64-conda-linux-gnu-size
setenv          CPP /opt/conda/analysis3-26.01/bin/x86_64-conda-linux-gnu-cpp
setenv          XML_CATALOG_FILES {file:///opt/conda/analysis3-26.01/etc/xml/catalog file:///etc/xml/catalog}
setenv          LD /opt/conda/analysis3-26.01/bin/x86_64-conda-linux-gnu-ld
setenv          OMPI_MCA_orte_launch_agent /g/data/xp65/public/apps/med_conda_scripts/analysis3-26.01.d/bin/orted
setenv          MAMBA_ROOT_PREFIX /g/data/xp65/public/apps/med_conda
setenv          CONDA_EXE /g/data/xp65/public/apps/med_conda/bin/micromamba
setenv          DASK_JOBQUEUE__PBS__PYTHON /g/data/xp65/public/apps/med_conda_scripts/analysis3-26.01.d/bin/python
setenv          BENCHCAB_PATH /g/data/xp65/public/apps/med_conda_scripts/analysis3-26.01.d/bin/benchcab
setenv          ENV_LAUNCHER_SCRIPT_PATH /g/data/xp65/public/apps/med_conda_scripts/analysis3-26.01.d/bin/launcher.sh
setenv          CARTOPY_DATA_DIR /g/data/xp65/public/apps/cartopy-data
setenv          REF_DATASET_CACHE_DIR /scratch/xp65/climate-ref-cache
setenv          REF_CONFIGURATION /g/data/xp65/public/apps/climate-ref
prepend-path    PATH /g/data/xp65/public/apps/nci_scripts
setenv          OPAL_PREFIX /g/data/xp65/public/apps/openmpi/4.1.6
prepend-path    PATH /g/data/xp65/public/apps/openmpi/4.1.6/bin
prepend-path    LD_LIBRARY_PATH /g/data/xp65/public/apps/openmpi/4.1.6/lib
prepend-path    MANPATH /g/data/xp65/public/apps/openmpi/4.1.6/share/man
prepend-path    PKG_CONFIG_PATH /g/data/xp65/public/apps/openmpi/4.1.6/lib/pkgconfig
prepend-path    LD_LIBRARY_PATH /half-root/opt/mellanox/hcoll/lib
-------------------------------------------------------------------

You should only need something like this (not tested), set the rest of the variables in the container launch script so they don’t affect outside of the container

module          load singularity
prepend-path    CONTAINER_OVERLAY_PATH /g/data/xp65/public/apps/med_conda/envs/analysis3-26.01.sqsh
prepend-path    SINGULARITYENV_PREPEND_PATH /g/data/xp65/public/apps/med_conda/envs/analysis3-26.01/condabin
prepend-path    PATH /g/data/xp65/public/apps/med_conda_scripts/analysis3-26.01.d/bin
prepend-path    SINGULARITYENV_PREPEND_PATH /opt/conda/analysis3-26.01/bin
prepend-path    PATH /g/data/xp65/public/apps/nci_scripts

I agree on principle but the container we use is a scratch container. Very minimal: ACCESS-Analysis-Conda/container/container.def at 9feff0d02a3f78bacdac96811efb069e67eb60e6 · ACCESS-NRI/ACCESS-Analysis-Conda · GitHub

We let the host environment handle the environment variables, the container approach is only meant to load the squashfs files systems where the conda environments are deployed. The main goal was to solve the issue of the inodes. I was not the one who designed the system so I might be missing some details.

I suppose we could have a hybrid system where minimal essential variables are defined inside the container. I think it is quite low priority though and I would rather investigate solution to replace that monolithic system