Stanford University · Stanford Institute for Human-Centered AIStanford HAI

SLURM on Marlowe

Marlowe uses SLURM, a job scheduling system, to run jobs. There are three partitions: preempt, batch, and hero.

The SLURM commands srun, salloc, and sbatch will take you far!

Marlowe accounts start with marlowe- followed by the project ID. So if your project ID was m223813, your account would be marlowe-m223813. To use the batch or hero partitions, you will need to add a suffix to your account: -pm01 for batch, like marlowe-m223813-pm01, or -pl01 for hero. Read more about it in the Accounts section below.

SRUN:

srun -N 1 -G 4 -A marlowe-[Project ID] -p preempt --pty bash

SALLOC:

salloc -N 1 -A marlowe-[Project ID] -p preempt

SBATCH:

#!/bin/sh

#SBATCH --job-name=test
#SBATCH -p preempt
#SBATCH --nodes=1
#SBATCH -A marlowe-[Project ID]
#SBATCH -G 1
#SBATCH --time=00:30:00
#SBATCH --error=%x-%j.err

module load slurm
module load nvhpc
module load cudnn/cuda12/9.3.0.75
module load mps   # Optional: prevents CUDA_ERROR_MPS_CONNECTION_FAILED

bash ~/test.sh

Tip: If your job crashes with CUDA_ERROR_MPS_CONNECTION_FAILED, load mps as shown above before launching the job. See the FAQ entry for details.

Check GPU allocation usage

Use the suffixed account the hours are tied to: the pm (or -free) account for batch hours, or the pl account for hero hours.

sreport cluster UserUtilizationByAccount -T gres/gpu Start=[start of billing cycle] End=now account=[your project account] -t hours

Accounts

Each allocation is given a project ID. This project ID corresponds to a job account on Marlowe.

One of the requirements (for accounting purposes) is for each job to be credited to a job account. If you don’t add a valid account, you will see the following error message when submitting jobs:

srun: error: ACCOUNT ERROR: Did you remember to set your account?

Project allocations are given GPU hours, tied to a suffix on the main project ID. The suffix is required when using the batch and hero partitions. Users can keep track of their allocation using the sreport command above.

The suffix indicates which project allocation charges will be reflected towards. To list the accounts you can use, run the following (see the FAQ), or check your Marlowe welcome email:

sacctmgr show assoc user=$USER format=Account%30,QOS

PIs new to Marlowe receive 5,000 free GPU-hours for their first cycle, under an account ending in -free, like marlowe-m223813-free. Use it with the batch partition, the same way as a pm suffix.

Note

A -pm or -free account can't run on the preempt partition. A -pl account can, but the job is charged against its GPU hours, so we recommend using your Basic Access account (no suffix) for preempt jobs.

Available Partitions

  1. Basic Access accounts (no suffix) use the preempt partition.
  2. For -pm, -pl, or -free accounts, check which partitions you can submit to with:

    sacctmgr show assoc user=$USER format=Account%30,QOS
    

    The QOS column shows the partitions each account can use:

    • normal: preempt
    • medium: batch
    • large: hero or preempt (preempt jobs are charged to the account’s GPU hours)

Partition Limits

Hero: 31 nodes, 30 days

Batch: 16 nodes, 2 days

Preempt: no fixed per-job node limit; the per-project GPU cap and time limit are adjusted based on demand and are subject to change. Check current values with:

sinfo -p preempt -o "%P %l"                              # time limit
sacctmgr show qos normal format=Name,MaxTRESPerAccount   # GPU cap (per project)
Note

Any job in the preempt queue can be preempted when a job in a higher priority partition (batch or hero) requests the node that the preempt job is running on. A preempted job is requeued and restarts from the beginning, so checkpoint your work periodically.