Example slurm job scripts

Example slurm scripts for BMBL users.

OSC

  1. Login OSC OnDemand
  2. Navigate tabs and open Slurm shell access:Slurm tab

XSEDE

SSH to XSEDE bridges2 :

ssh username@bridges2.psc.xsede.org

You can check project usage information by:

projects

Submit a job

Clone this GitHub repository at your home directory:

cd ~
git clone https://github.com/Wang-Cankun/example_slurm_bmbl.git
cd example_slurm_bmbl

Submit A slurm job

sbatch example_job_osc_cpu.sh

Check your job status

squeue -u username

Cancel all your jobs

scancel -u username

When the example job finished, there should be a output file named slurm-###.out that prints the following

Wed Dec  2 11:49:50 EST 2020
Running slurm jobs
Wed Dec  2 11:49:50 EST 2020

How to start an interactive job?

OSC-CPU

salloc --nodes=1 --ntasks=8 --mem=64GB --account PCON0022 --time=1:00:00 srun --pty /bin/bash

OSC-GPU

salloc --nodes=1 --ntasks=8 --mem=64GB --account PCON0022 --gpus-per-node=1 --time=1:00:00 srun --pty /bin/bash

XSEDE-CPU

Not supported on XSEDE-CPU: salloc: error: Interactive usage is not permitted in partition EM

XSEDE-GPU

salloc -p GPU --nodes=1 --ntasks=8 --account ccr180012p --gpus=8 --time=1:00:00 srun --pty /bin/bash

Other headers

Send email notification

#SBATCH --mail-type=BEGIN,END,FAIL
#SBATCH --mail-user=cankun.wang@osumc.edu

Set output file format

#SBATCH --output=filemover_%j.log

Reference

Author

Cankun Wang