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: The maximum requested time is 5 days (120:00:00); the email address must be a BC email address. See the cpu_test.sl Slurm file as follows.
#!/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=shared # 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-BC-email-address # Where to send mail module load stata cd (path to working directory) stata test.do
And the corresponding stata script:
$ test.do
--------------------------------------
webuse auto
d
regress price mpg foreign