SSH connection to a compute node

You can connect in SSH to compute nodes which were assigned to one of your jobs so that you can monitor the execution of your calculations with tools such as top, htop or nvidia-smi (for example).

When one of your jobs is running, the compute nodes assigned to it are visible with the command squeue -j <job_id> or squeue -u $USER:

$ squeue -u $USER
     JOBID  PARTITION         NAME       USER  ST     TIME  NODES  NODELIST(REASON)
   2042259     cpu_p1       my_job   my_login   R    01:42     10  node[1337-1346]

In this example, job n° 2042259 is running on 10 compute nodes named respectively, node1337, node1338, … , node1345 and node1346. You can connect via ssh to one of the nodes of this list (for example, node1337) with the following command:

$ ssh node1337

Note that you will be automatically disconnected from the node when your job is finished.

If you try to connect to a node on which none of your jobs is running, you will obtain the following error message:

Access denied by pam_slurm_adopt: you have no active jobs on this node