Running xp65 analysis on ARE

Hi all.

Has anyone managed to run the xp65 analysis3 environment on ARE yet?

You could load hh5 analysis3 by specifying

as all the environments are present in /g/data/hh5/public/apps/miniconda3/envs/.

The xp65 directory structure is a bit different.

The directory /g/data/xp65/public/apps/med_conda/envs exists but all the links to analysis environment are broken (they point to /opt/conda).

The xp65 python interpreter (when loaded from modules) is located at
/g/data/xp65/public/apps/med_conda_scripts/analysis3-25.03.d/bin/

Can you access xp65 using module commands in ARE? Or do we have to build our own pylab kernel ?

Thanks.

2 Likes

Hi Paul,

I followed the instructions here: conda/analysis3 Python Environment - ACCESS-Hive Docs and I was able to start a session without issues. I’m including a screenshot below just in case.

The only issue is that I’m getting a bunch of warnings when loading zarr files with xarray.

Edit: It seems like selecting analysis3-25.04 as the preferred conda environment gets rid off all the warnings. As I understand, you can use conda/analysis3-25.04 under Modules in ARE (last line in screenshot above) and it will load this environment straight away. Otherwise, you can simply select it from the drop down list on the top right of your Jupyter notebook.

2 Likes

Hi @lidefi87 . Thanks for pointing me to the NRI docs.

The Jupyter session starts as follows.

I select the default kernel

I can import xarray, iris and metpy. But I can’t import ants.

I assume I’m running the xp65 analysis3 environment. What’s the best way to check?

I don’t generate the list of analysis3 kernels inside the notebook.

You should select one of the environments made available by the ACCESS-NRI team. There is no need for you to generate a list of available environments because they’re all available in the dropdown list you show in your screenshot. Simply click on that box where it says Python 3 (ipykernel) and a list of all available environments will appear. If you scroll up, you’ll find the different versions of analysis3. I chose the latest analysis3-25.04. Below, I’m highlighting the boxes I clicked to get this list.

The link I shared above has some information about the different environments, but you can also refer to the release notes here.

The ants package appears to be available on analysis3-25.04 based on this repo. But the docs on the previous paragraph have instructions on how to request a package that is not available in the conda environment.

1 Like

Hi @lidefi87

I can’t select the NRI environments. To recap. I launch the notebook with the following advanced options.

But when Jupyter is launched, it can only see the following.


Which is the contents of my ~/.local/share/jupyter/kernels/ directory

$ ls -lt  ~/.local/share/jupyter/kernels/
total 16
drwxrwxr-x 2 pag548 gb02 4096 Apr 16 14:54 xp65_extras
lrwxrwxrwx 1 pag548 gb02   70 Apr 10 16:52 hackathon_env -> /g/data/gb02/public/hackathon_env/share/jupyter/kernels/hackathon_env/
drwxr-sr-x 2 pag548 gb02 4096 Dec 20 18:23 rmom6_env
drwxr-sr-x 2 pag548 gb02 4096 Oct  7  2024 ipylab_env

So I can see all my local kernels, but none of the standard NRI environments.

What am I doing wrong?

NOTE : gdata/xp65 is added as a storage option

If you have gdata/xp65 in the Storage option, then I suspect this may be one of the potential issues described in the docs when the .bashrc or .bash_profile files call hh5 automatically. I was having some issues too when running PBS jobs, but I realised my .condarc file was calling hh5 and when I changed this to xp65, the issues went away.

I highly recommend you go through the documentation I shared in this thread. It helped me sort out the issues I encountered.

1 Like

I don’t have any conda or hh5 logic in my .bashrc or .bash_profile.

I had some old files ~/.condarc and directories in ~/.conda/ so I purged them.

I’m now able to see all the NRI pylabl kernels!

Looks like my old ~/.conda* files and directories were causing the issue?

Thanks for the tip.

1 Like

Thanks @lidefi87 for helping with this. Let us know if there are any more issues.

1 Like

A possibly related issue is that with a ~/.condarc file defining envs_dirs e.g.

envs_dirs:
  - /scratch/$PROJECT/$USER/conda/envs

kernels don’t get listed - you need to add /g/data/xp65/public/apps/med_conda/envs to this search path if envs_dirs is defined for kernels to be detected. It should be possible to set this centrally.

The command python -m nb_conda_kernels list can be used to show what kernels are available.

2 Likes

Thanks @Scott, I was not aware of this.