A simple batch script to submit a job is the following #!/bin/bash #SBATCH --nodes=<nodes_no> # number of nodes #SBATCH --ntasks-per-node=<tasks_no> # number of tasks per node #SBATCH --time=01:00:00 # time limits: here 1 hour #SBATCH --mem=<memory>GB # total memory per node requested in GB (optional) #SBATCH --error=myJob.err # standard error file #SBATCH --output=myJob.out # standard output file #SBATCH --account=<account_no> # account name #SBATCH --partition=<partition_name> # partition name #SBATCH --qos=<qos_name> # quality of service (optional) srun ./my_application In the script we tell the scheduler the amount of resources needed (--nodes, --ntasks-per-node and --mem) on which partition (–partition and --qos) and which budget of hours to be used (--account). The session has a walltime (--time) and the outputs of the code are collected in myJob.out and myJob.err (--output and --error respectively). The partition and the resources depend on the machine you are considering. All you need to know to properly fill your batch script can be found in the "UG3.0 System specific guide" page.
To submit the job to the scheduler type > sbatch [opts] job_script You can find a complete list of examples of job scripts here. |