Skip to main content
Skip table of contents

Submitting a job

Submitting a job with sbatch

You will be using the sbatch command to submit jobs to the ACTnowHPC system.  The basic syntax is sbatch followed by the script file.

CODE
$ sbatch job-script.sh 

Anatomy of a job submission script

A job submission script is a simple shells script file that lists the commands you want run.  There can be a bunch of comments at the top of the file which gives directives to the scheduler.  These all start with the syntax #SBATCH. While this would normally be a comment in a shell script, it's the equivalent of specifying the argument on the command line.

Example arguments

CODE
#!/bin/bash
 
#SBATCH --job-name=MyJob
#SBATCH --time=00:10:00
#SBATCH --partition=hsw-fdr
 
/path/to/some/binary

In the example above, our job's name is "MyJob", it will run for 10 minutes in the hsw-fdr partition.

 

Common arguments for the sbatch command

ArgumentDefaultDescription
--partition=XXXXhsw-fdrThe name of the partition to run this job in. Make sure you are running in the correct partition. More information about partitions in Running jobs section.
--time=HH:MM:SS00:05:00The time to allocate for your job. If you exceed this time limit your job will be killed. The default is 5 minutes.
--mem-per-cpu=XG3GBIf not specified you will get 3GB of RAM allocated per each task. If you need more, you can specify a larger value here.
--job-name=XXXXXsbatchA descriptive name for your job. This is a useful label for you when looking through the accounting logs or squeue output.
--output=XXXXslurm-%j.outThe filename to write stdout and stderr to. The variable %j will be replaced with the name of the job.
--account=XXXXnoneA text field to store with the job. This is often used to classify jobs by project, group, billing account, etc. You are free to put anything you want in this field.
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.