Slurm_Reference

Quick Reference for using slurm command

By Yuhao ZHANG

GPU Usage in slurm

Write this only for quick reference

Allocate GPU

  • Use the following command to allocate a GPU
    srun --account viscam --partition=viscam-interactive --gres=gpu:a6000:1 --mem=24G --pty bash
    
  • Use the following command to also allocate CPU for long term usage:
    srun --account viscam --partition=viscam-interactive --time=24:00:00 --cpus-per-task=8 --gres=gpu:a40:1 --mem=32G --pty bash
    
  • use mem to allocate memory and use gres=gpu:a6000:1 to choose different gpu.
  • Consider using –exclude=viscam5 if don’t need a40s, especially before deadlines

    Check the free GPU

  • Use the following command to check the free GPU:
    sgpu -p svl,svl-interactive,viscam,viscam-interactive --verbose
    

Track the job

  • Use the following command to track the job submission by specific user:
    squeue -u $USER   
    
  • To view the status of all jobs in the viscam and viscam-interactive partitions:
    squeue -p viscam,viscam-interactive
    
Tags: Notes
Share: Twitter Facebook LinkedIn