Interactive Sessions
Slurm allow interactive sessions into the workernodes, using ssh, but within a valid job allocation, normal ssh are disabled. The interactive session can be created on the scope of normal partitions but those jobs will have the same priority as a regular job.
The FCT grant users should use the partition fct instead in the examples bellow.
Starting srun Session
The most simple way to start an interactive session is:
[user@cirrus01 ~]$ srun -p hpc -q inter --job-name "my_interactive" --pty bash -i
srun: job 72791 queued and waiting for resources
srun: job 72791 has been allocated resources
[user@hpc059 ~]$
You will have an ssh session on a worker node were other users are running jobs or interactive sessions as well, try not bother them with unsolicitated interactions, and exit the session when you are finished.
The srun command have the same restrictions as a normal job and will be aborted or refused to run when the system limits are axceeded. If you run the squeue you will see your interactive job listed as any other job:
[user@hpc059 ~]$ squeue
JOBID PARTITION NAME USER ST TIME NODES NODELIST(REASON)
72818 hpc my_inter user R 2:03 1 hpc059
Starting salloc Session
The salloc is setup to behave like the srun command, for example:
[user@cirrus01 ~]$ salloc -p hpc -q inter --job-name "my_interactive"
salloc: Pending job allocation 72818
salloc: job 72818 queued and waiting for resources
salloc: job 72818 has been allocated resources
salloc: Granted job allocation 72818
salloc: Waiting for resource configuration
salloc: Nodes hpc059 are ready for job
[user@hpc059 ~]$