massive-website-banner

Running Simple Batch Jobs

Submitting a job in SLURM is performed by running sbatch command and specifying a job script.   

sbatch job.script

 

You can put optitions (e.g. --account=xxx) with sbatch command. If such option already be defined in job.script file, it will be overriden by the commandline.

sbatch [options] job.script

 

A simple example of a Slurm job submission script:

#!/bin/bash
#SBATCH --job-name=MyJob
#SBATCH --account=monash001
#SBATCH --time=01:00:00
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=1
./helloworld

This script describe the information of the job: it is a serial job with only one process (--ntasks=1). It only need one cpu core to run such process.

 

On MASSIVE, the sample slurm submission scripts have been prepared and can be found here:

/usr/local/training/samples/slurm/

 

To Cancel ONE job

scancel [JOBID]

 

To Cancel all of your jobs

scancel -u [USERID]

 

Copyright © 2016 MASSIVE. All Rights Reserved.