Difference between revisions of "SLURM Using Features and Constraints"

Line 34: Line 34:
To request a feature/constraint, you must add the following line to your submit script:<br />
To request a feature/constraint, you must add the following line to your submit script:<br />


<div style="background-color: #ddf5eb; border-style: dotted;">#SBATCH --constraint=&lt;feature_name&gt;[,&lt;feature_name&gt;][,...]</div>


{{ codequote | #SBATCH --constraint=&lt;feature_name&gt;[,&lt;feature_name&gt;][,...] }}
<br />
or<br />


<div style="background-color: #ddf5eb; border-style: dotted;">#SBATCH --constraint=&lt;feature_name&gt;</div>
<div style="background-color: #ddf5eb; border-style: dotted;">#SBATCH --constraint=&lt;feature_name&gt;</div>


<nowiki>#SBATCH --constraint=&lt;feature_name&gt;
where &lt;feature_name&gt; is one of the features defined above (or one of the standard features described in the [[SLURMUsers|SLURM User's Guide]] and shown below).
#SBATCH --constraint=&lt;feature_name&gt;
...</nowiki>
<br />
where &lt;feature_name&gt; is one of the features defined above (or one of the standard features described in the [[SLURMUsers|SLURM User's Guide]] and shown below).


An example:
An example:

Revision as of 16:43, 21 June 2016

Using Features/Constraints with SLURM

Features/Constraints allow users to make very specific requests to the scheduler such as what interconnect your application prefers, how much available memory you require, whether you mind running on low priority machines, etc. To get the most out of the queuing environment, it is very useful to have a reasonable understanding of how the features work and which features you should request for your type of application.


Important Features

The following table lists custom defined features/constraints which are necessary for getting your job to run on the right hardware.

Feature Name Value Description Default
--time Wall clock time limit Request and set a certain amount of run-time for your job. Jobs are killed when they reach this limit 1 hour
--mem Memory per node mem (defined in megabytes) will set the amount of memory allocated per node. (For serial jobs) 512MB (0.5GB)
--mem-per-cpu Memory per core mem (defined in megabytes) will set the amount of memory allocated per cpu core. (For multi-core jobs) 512MB (0.5GB)

Requesting Features/Constraints

To request a feature/constraint, you must add the following line to your submit script:

#SBATCH --constraint=<feature_name>[,<feature_name>][,...]


#SBATCH --constraint=<feature_name>
#SBATCH --constraint=<feature_name>

where <feature_name> is one of the features defined above (or one of the standard features described in the SLURM User's Guide and shown below).

An example:

<nowiki>#!/bin/bash

  1. SBATCH --name=my_job_needs_qdr_infiniband
  2. SBATCH --time=02:00:00
  3. SBATCH --ntasks=8
  4. SBATCH --mem-per-cpu=4096
  5. SBATCH --constraint=ib_qdr
  6. SBATCH --output=output.$SLURM_JOB_ID

mpirun /opt/apps/my_app/my_binary

  • Job requests 2 hours of runtime (time=02:00:00)
  • Job requests 32GB of memory (4GB per CPU)
  • Job requests only nodes with Quad Data Rate Infiniband

Feature Table

This is a table of user-addressable SLURM features. You can request machines with a variety of characteristics such as machines with a certain amount of memory or a particular architecture type.

<tbody> </tbody>
Feature Description
cpu_amd Select only nodes with AMD cpus
cpu_xeon Select only nodes with Intel Xeon cpus only
gpu_T10 Select only nodes with T10 GPU (used with --gres. Refer to the GPU Guide for more info)
gpu_M2070 Select only nodes with M2070 GPU (used with --gres. Refer to the GPU Guide for more info)
gpu_K20 Select only nodes with K20 GPU (used with --gres. Refer to the GPU Guide for more info)
ib_sdr Select only nodes with Infiniband Single Data Rate
ib_ddr Select only nodes with Infiniband Double Data Rate
ib_qdr Select only nodes with Infiniband Quad Data Rate
ib_ofa Select only nodes with Mellanox Infiniband cards
ib_psm Select only nodes with QLOGIC Infiniband cards
opteron_2220 Select only nodes with AMD Opteron 2220 CPU chips
opteron_2384 Select only nodes with AMD Opteron 2384 CPU chips
opteron_2427 Select only nodes with AMD Opteron 2427 CPU chips
sse4 Select only nodes with sse4 (and above) CPU instruction set
sse41 Select only nodes with sse41 (and above) CPU instruction set
sse4a Select only nodes with sse4a (and above) CPU instruction set
sse42 Select only nodes with sse4a (and above) CPU instruction set
tpa Select only nodes in Tampa
wh Select only nodes in Winter Haven
xeon_X5355 Select only nodes with Intel Xeon X5355 CPU chips
xeon_X5460 Select only nodes with Intel Xeon X5460 CPU chips
xeon_E5649 Select only nodes with Intel Xeon E5649 CPU chips
xeon_E7330 Select only nodes with Intel Xeon E7330 CPU chips
xeon_E52630 Select only nodes with Intel Xeon E5-2630 CPU chips
xeon_E52650 Select only nodes with Intel Xeon E5-2650 CPU chips
xeon_E52670 Select only nodes with Intel Xeon E5-2670 CPU chips