Introduction

The nodes have an Nvidia Tesla P4 gpu installed for gpu-enabled computing. Cuda 12.4 is available by default.

Using Python

Using Nvidia is a real pain. There are two options: When submitting jobs through slurm, you can use computecanada's prebuilt modules via cvmfs. When using jupyterhub locally, just pick the “local” kernel.

CVMFS with slurm

Do this by:

Local Jupyterhub kernel

(If you're just submitting jobs you don't need to worry about this. This was just how I installed the kernel locally).

For some reason torch 2.4.1 does not package the correct version of libnccl2. To get around this, follow the instructions here, except: For reasons, torch is still using cuda12.4 but if you let nvidia auto install, you will end up with cuda 12.6, which is not supported by torch (as of september 2024). Specify:

By this point the libraries for the version of libnccl necessary should be picked up by torch so you wont have the error “undefined symbol: ncclCommRegister”

nvcc

Many versions of nvcc are installed for each version of cuda. Check `/usr/local/cuda*` for the correct one. You may need to symlink /usr/local/cuda/bin/ to point to the right version. Alternatively, change your PATH=/usr/local/cuda-VERSION/bin/:$PATH before you start compiling anything that needs the version of nvcc you need.