Quick Reference (Cheat Sheet)

Note

This page is a quick reference guide to be used once you are familiar the HEC User Guide. Many entries contain a link to more detailed information on these commands

Login, filestore and data transfer

ssh USERNAME@wayland.hec.lancs.ac.uk

login from a linux desktop

gpfsquota

show usage for for HEC filestores

scp -r /path/to/my/directory USERNAME@wayland.hec.lancs.ac.uk

upload a directory to the HEC from a linux desktop

scp -r /path/to/my/directory USERNAME@wayland.hec.lancs.ac.uk

upload a directory to the HEC from a linux desktop

smbclient -k -D folder-path //luna/faculty-code

connect to a research folder on LUNA. Use put and get to upload/download

Job Submission

sbatch JOBSCRIPT

submit file JOBSCRIPT as a batch job

srun --pty bash -i

submit an interactive job

scancel JOBID

cancel job number JOBID

Job Monitoring

squeue --me

shows all running and pending jobs

qcgtop -u USERNAME

shows CPU and memeory usage summaries for all running jobs

qtop -u USERNAME

shows top-style information on all running jobs

qquota

shows job resource quotas (CPUs, memory and GPUs)

qacct -j JOBID

shows summary of completed job JOBID

qslots

shows available CPU resource on the cluster

qgpuslots

shows available GPU resource on the cluster

Enviroment Modules

module avail

show all modules

module av PATTERN

show available modules matching PATTERN

module add MODULENAME

add MODULENAME to the current shell environment

module rm MODULENAME

remove MODULENAME from the current shell environment

module list

show all modules loaded into the current shell environment

module purge

remove all modules from the current environment

Job Type Templates

#SBATCH -p serial
#SBATCH --mem=SIZE

a serial job requesting SIZE memory (eg. 1G = 1 gigabyte)

#SBATCH -p parallel
#SBATCH --cpus-per-task=N
#SBATCH --mem=SIZE

a single node parallel job with N cores on the same compute node, and SIZE memory

#SBATCH -p parallel
#SBATCH --nodes=N
#SBATCH --exclusive
#SBATCH -C node_type=X

a multi node parallel job requesting N nodes of compute node type X

#SBATCH -p gpu-short
#SBATCH --gres=gpu:1
#SBATCH --mem=SIZE
#SBATCH --cpus-per-task=N

submit a gpu job to the gpu-short queue, requesting N cores, SIZE memory and a single GPU

#SBATCH --mail-type=END,FAIL
#SBATCH --mail-user=youraddress@lancaster.ac.uk

send an email notification when a job finishes or fails

#SBATCH -a x-y:z

tuirn the job into a job array running from task ID x through to y in steps of z