Section outline

  • Four flags matter most of the time:

    • --time=<d-hh:mm:ss> — wallclock. Days part is optional; 30:00 means 30 minutes, 1:00:00 means 1 hour.
    • --mem=<value> — memory per node (1G, 4096M, etc.).
    • --ntasks=<N> — total CPU cores.
    • --nodes=<N> — how many distinct machines.

    Two non-obvious truths:

    1. Requesting more does not make your job faster. Asking for 32 cores when your script uses 1 just wastes the other 31 and makes you wait longer in the queue.
    2. Exceeding what you asked for kills the job. If your job runs longer than --time, Slurm cancels it with "TIME LIMIT" — output up to that point is still in the .out file.

    If you skip the flags entirely, you get the cluster's defaults, which are usually a tiny allocation that's only useful for "hello world" scripts.

    Read the canonical section →

    • Time formats, memory units, and what happens when you exceed them.