The user has requested 1GB of memory and 1 CPU on a single node for 10 minutes. Slurm should send an email to your BC email address for job state changes defined as ‘END,’ ‘BEGIN,’ and ‘FAIL.’ Note:
#!/bin/bash
#SBATCH --job-name=sample # Job name
#SBATCH --output=%x_%j.out # Output file
#SBATCH --error=%x_%j.err # Error file
#SBATCH --nodes=1 # How many nodes to run on
#SBATCH --ntasks=1 --cpus-per-task=4 # 4 cpu on single node
#SBATCH --partition=short # Partition CPU node to run your job on
#SBATCH --mem=1g # Job memory request
#SBATCH --time=00:10:00 # Time limit hrs:min:sec
#SBATCH --mail-type=BEGIN,END,FAIL # Mail events (NONE, BEGIN, END, FAIL, ALL)
#SBATCH --mail-user=your-user-name@bc.edu # Where to send mail
module load stata
cd (path to working directory)
stata test.do
Note: The maximum requested time is 5 days (120:00:00; must set –partition=long). The email address must be a BC email address.
And the corresponding Stata script:
$ test.do
--------------------------------------
webuse auto,clear
describe
regress price mpg foreign