Versions Compared


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




#SBATCH --job-name=YourJobName

Recommended:  Assigns a job name.  The default is the name of SLURM job script.

#SBATCH --partition=PartitionName

Recommended:  Specify the name of the Partition (queue) to use. Use this to specify the default partition or a special partition i.e. non-condo partiton with which you have access.

#SBATCH --ntasks=2

 Required: The maximum number of tasks per job. Usually used for MPI jobs.

#SBATCH --cpus-per-task=16Recommended:  The number processes per task. Usually used for OpenMP or multi-threaded jobs.

#SBATCH --time=08:00:00

Required:  The maximum run time needed for this job to run, in days-hh:mm:ss.

#SBATCH --mem-per-cpu=1024M

Recommended: The maximum amount of physical memory used by any single process of the job ([M]ega|[G]iga|[T]era)Bytes.


The value of mem-per-cpu multiplied by cpus on a node (mem-per-cpu X ntasks X cpus-per-task) should not exceed the amount of memory on a node.

 See our FAQ for more details. 

#SBATCH --mail-user=YourEmailAddressRecommended:  Email address for job status messages.
#SBATCH --mail-type=ALLRecommended:  SLURM will notify the user via email when the job reaches the following states BEGIN, END, FAIL or REQUEUE.
#SBATCH --nodes=1 --exclusiveOptional:  Using both of these options will give your job exclusive access to a node such that no other jobs can share the node. 
This combination of arguments will assign eight tasks to your job and will give it exclusive access to all of the resources
(i.e. memory) of the entire node without interference from other jobs.  Please see our FAQ for more details on exclusive access.

#SBATCH --output=mypath

Optional:  The full path for the standard output (stdout) and standard error (stderr) "slurm-%j.out" file, where the "%j" is replaced by the job ID.  Current working directory is the default.

#SBATCH --error=mypath

Optional:  The full path for the standard error (stderr) "slurm-%j.out" files. Use this only when you want to separate (stderr) from (stdout). Current working directory is the default.

#SBATCH --export=ALL

Optional:  Exports all environment variables to the job.  See our FAQ for details.

#SBATCH --account=AccountName

#SBATCH --partition=PartitionName

You need to specify the name of the condo account to use a condo on the cluster.

Use the command sacctmgr show assoc user=netID to show which accounts and partitions with which you have access.

#SBATCH --constraint=<feature list>Optional: Constrains job to nodes matching a feature list. Currently available features include processor architectures: ivybridge, broadwell, skylake and fabrics: opath. Features can be combined: --contraintconstraint="skylake&opath"
#SBATCH --gres=gpu:1Optional: Request a number of GPUs per node.