Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To submit a job you can either use command line. For example to run the script "test.out", do the following:

srun -nsbatch --ntasks 1 --cpus-per-task 4 --mem-per-cpu 4g -t 24:00:00 -o output.txt -e error.txt test.out

The above will allocate 4 CPUs for a time of 24 hours with 4 GB of memory per CPU to run your script and write the output and errors into the output.txt and error.txt files.
The above options are optional and just listed as an example. 

To submit a batch script you can create first a file (e.g. "submit.slurm").

#!/bin/bash
#SBATCH --mem-per-cpu=4g
#SBATCH --cpus-per-taks=4
#SBATCH --n4ntasks=1
#SBATCH -t 24:00:00
#SBATCH -o output.txt
#SBATCH -e error.txt
test.out

...