salloc
salloc reserves resources for a Slurm job, called a job allocation.
It waits until the resources are available, runs a command or starts a shell,
and releases the resources when that command or shell finishes.
For interactive sessions, including CPU, memory and GPU requests, see Interactive Sessions and the quickstart.
Usage
When no command follows its options, salloc starts a shell. The location
of that shell depends on the system configuration. Sheffield’s HPC systems
are configured to open it on a worker node.
An explicitly supplied command runs on the machine where salloc was
invoked. For example, salloc ... bash invoked on a login node starts Bash
on that login node. To run a command on the allocated resources, use srun:
$ salloc --nodes=1 --ntasks=1 --cpus-per-task=1 --mem-per-cpu=1000 --time=00:10:00 srun hostname
Inside an existing session or batch job, use srun to launch tasks with
the existing resources; another salloc requests a separate allocation.
Run exit to finish an interactive shell, or use scancel to cancel
the job. See Interactive Sessions for examples of reusing and
releasing resources and reconnecting to an interactive session.
Documentation
Run man salloc or salloc --help on the system. Further options are
described in the Slurm salloc manual.