Quick Reference and Troubleshooting

Common Slurm Commands

Command

Description

sinfo

Show partition and node status.

squeue -u $USER

Show your running or pending jobs.

sbatch script.sh

Submit a batch job script.

scancel <jobid>

Cancel a specific job.

scontrol show job <jobid>

Show detailed job information.

sacct -j <jobid>

Show job accounting information.

Common Resource Requests

Resource Type

Slurm Option

Example

Partition

--partition=NAME

--partition=physical

Time limit

--time=HH:MM:SS

--time=02:30:00

CPUs per task (cores on cloud, hyperthreads on physical)

--cpus-per-task=N

--cpus-per-task=4

Nodes

--nodes=N

--nodes=2

Tasks (MPI ranks)

--ntasks=N or --ntasks-per-node=N

--ntasks-per-node=8

Whole cores only (physical)

--hint=nomultithread

--hint=nomultithread

Memory per node

--mem=XG

--mem=16G

Memory per CPU

--mem-per-cpu=XG

--mem-per-cpu=2G

GPUs

--gres=gpu:N

--gres=gpu:1

Job array

--array=RANGE

--array=1-100%10

Troubleshooting

sbatch: error: Unable to open file
  • You are in the wrong directory. cd ~/hpc_examples and use the path shown in the instructions.

cat: …out: No such file or directory
  • The job hasn’t started yet (check squeue -u $USER), or you replaced <jobid> wrongly. ls -t *.out | head shows the newest output files.

Job stuck in pending state (PD)
  • The last column of squeue gives the reason. Resources and Priority mean it is waiting its turn.

  • Check how busy the partition is with sinfo.

  • Reduce the CPUs, memory or time you request, or use a different partition.

Out of memory errors
  • Increase --mem.

  • Check what a finished job really used with sacct -j <jobid> --format=JobID,MaxRSS.

Module not found
  • Did you run the module unuse / module use lines first? See Loading Software with Modules.

  • Use module spider <software> to search, and include the version number.

Container permission errors
  • Ensure the SIF file has correct permissions.

  • Try pulling the image again.

  • Check whether the container needs specific bind mounts.

Getting Help

Additional Resources