Difference between revisions of "SLURM Using Features and Constraints"

(Created page with " = Using Features/Constraints with SLURM¶ = Features/Constraints allow users to make very specific requests to the scheduler suc...")
 
 
(30 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
= Using Features/Constraints with SLURM =
 
= Using Features/Constraints with SLURM[[#Using-FeaturesConstraints-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.
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 ==
 
== Important Features[[#Important-Features|¶]] ==


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


<table>
{| class="wikitable"
<tbody>
|- style="background-color:#f1edbe;"
<tr class="odd">
|'''Feature Name'''
<td align="left">'''Feature Name'''</td>
|'''Value'''
<td align="left">'''Value'''</td>
|'''Description'''
<td align="left">'''Description'''</td>
|'''Default'''
<td align="left">'''Default'''</td>
|-
</tr>
|<code>--time</code>
<tr class="even">
|Wall clock time limit
<td align="left"><tt>--time</tt></td>
|Request and set a certain amount of run-time for your job. Jobs are killed when they reach this limit
<td align="left">Wall clock time limit</td>
|1 hour
<td align="left">Request and set a certain amount of run-time for your job. Jobs are killed when they reach this limit</td>
|-
<td align="left">1 hour</td>
|<code>--mem</code>
</tr>
|Memory per node
<tr class="odd">
|mem (defined in megabytes) will set the amount of memory allocated per node. (For serial jobs)
<td align="left"><tt>--mem</tt></td>
|512MB (0.5GB)
<td align="left">Memory per node</td>
|-
<td align="left">mem (defined in megabytes) will set the amount of memory allocated per node. (For serial jobs)</td>
|<code>--mem-per-cpu</code>
<td align="left">512MB (0.5GB)</td>
|Memory per core
</tr>
|mem (defined in megabytes) will set the amount of memory allocated per cpu core. (For multi-core jobs)
<tr class="even">
|512MB (0.5GB)
<td align="left"><tt>--mem-per-cpu</tt></td>
|}
<td align="left">Memory per core</td>
<td align="left">mem (defined in megabytes) will set the amount of memory allocated per cpu core. (For multi-core jobs)</td>
<td align="left">512MB (0.5GB)</td>
</tr>
</tbody>
</table>


== Requesting Features/Constraints ==


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


== Requesting Features/Constraints[[#Requesting-FeaturesConstraints|¶]] ==
<pre style="white-space:pre-wrap; width:28%; border:1px solid lightgrey; background:#E0E0E0; color:black;">#SBATCH --constraint=&lt;feature_name&gt;</pre>
&nbsp;<BR>
where <feature_name> is one of the features defined above (or one of the standard features described in the [[Guide to SLURM| SLURM User’s Guide]] and shown below).


To request a feature/constraint, you must add the following line to your submit script:<br />
To request multiple features/constraints, you must add the following line to your script using one of the following operators below:
{| class="wikitable"
|- style="background-color:#f1edbe;"
| '''Operator Function'''
| '''Operator Symbol'''
| '''Example'''
|-
|AND
| &amp; (ampersand)
| #SBATCH --constraint=“cpu_xeon&amp;sse4”
|-
|OR
| &#124; (pipe)
| #SBATCH --constraint=“xeon_E52630&#124;xeon_E52650&#124;xeon_E52670”
|}


<pre>#SBATCH --constraint=&lt;feature_name&gt;[,&lt;feature_name&gt;][,...]</pre>
<br />
or<br />
<pre>#SBATCH --constraint=&lt;feature_name&gt;
#SBATCH --constraint=&lt;feature_name&gt;
...</pre>
<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:


<pre>#!/bin/bash
<pre style="white-space:pre-wrap; width:45%; border:1px solid lightgrey; background:#E0E0E0; color:black;">
#!/bin/bash
#SBATCH --name=my_job_needs_qdr_infiniband
#SBATCH --name=my_job_needs_qdr_infiniband
#SBATCH --time=02:00:00
#SBATCH --time=02:00:00
Line 67: Line 65:
#SBATCH --constraint=ib_qdr
#SBATCH --constraint=ib_qdr
#SBATCH --output=output.$SLURM_JOB_ID
#SBATCH --output=output.$SLURM_JOB_ID
mpirun /opt/apps/my_app/my_binary</pre>
mpirun /opt/apps/my_app/my_binary</pre>
* 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


*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[[#Feature-Table|¶]] ==
== 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.
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.


<table>
{|class="wikitable"
<tbody>
|- style="background-color:#f1edbe;"
<tr class="odd">
| '''Feature'''
<td align="left">'''Feature'''</td>
| '''Description'''
<td align="left">'''Description'''</td>
|-
</tr>
|cpu_amd
<tr class="even">
||Select only nodes with AMD cpus
<td align="left">cpu_amd</td>
|-
<td align="left">Select only nodes with AMD cpus</td>
|cpu_xeon
</tr>
|Select only nodes with Intel Xeon cpus only
<tr class="odd">
|-
<td align="left">cpu_xeon</td>
|gpu_T10
<td align="left">Select only nodes with Intel Xeon cpus only</td>
|Select only nodes with T10 GPU (used with --gres. Refer to the [[SLURM_GPU|GPU Guide]] for more info)
</tr>
|-
<tr class="even">
|gpu_M2070
<td align="left">gpu_T10</td>
|Select only nodes with M2070 GPU (used with --gres. Refer to the [[SLURM_GPU|GPU Guide]] for more info)
<td align="left">Select only nodes with T10 GPU (used with --gres. Refer to the [[SLURMGPU|GPU Guide]] for more info)</td>
|-
</tr>
|gpu_K20
<tr class="odd">
|Select only nodes with K20 GPU (used with --gres. Refer to the [[SLURM_GPU|GPU Guide]] for more info)
<td align="left">gpu_M2070</td>
|-
<td align="left">Select only nodes with M2070 GPU (used with --gres. Refer to the [[SLURMGPU|GPU Guide]] for more info)</td>
|ib_sdr
</tr>
|Select only nodes with Infiniband Single Data Rate
<tr class="even">
|-
<td align="left">gpu_K20</td>
|ib_ddr
<td align="left">Select only nodes with K20 GPU (used with --gres. Refer to the [[SLURMGPU|GPU Guide]] for more info)</td>
|Select only nodes with Infiniband Double Data Rate
</tr>
|-
<tr class="odd">
|ib_qdr
<td align="left">ib_sdr</td>
|Select only nodes with Infiniband Quad Data Rate
<td align="left">Select only nodes with Infiniband Single Data Rate</td>
|-
</tr>
|ib_ofa
<tr class="even">
|Select only nodes with Mellanox Infiniband cards
<td align="left">ib_ddr</td>
|-
<td align="left">Select only nodes with Infiniband Double Data Rate</td>
|ib_psm
</tr>
|Select only nodes with QLOGIC Infiniband cards
<tr class="odd">
|-
<td align="left">ib_qdr</td>
|opteron_2220
<td align="left">Select only nodes with Infiniband Quad Data Rate</td>
|Select only nodes with AMD Opteron 2220 CPU chips
</tr>
|-
<tr class="even">
|opteron_2384
<td align="left">ib_ofa</td>
|Select only nodes with AMD Opteron 2384 CPU chips
<td align="left">Select only nodes with Mellanox Infiniband cards</td>
|-
</tr>
|opteron_2427
<tr class="odd">
|Select only nodes with AMD Opteron 2427 CPU chips
<td align="left">ib_psm</td>
|-
<td align="left">Select only nodes with QLOGIC Infiniband cards</td>
|sse4
</tr>
|Select only nodes with sse4 (and above) CPU instruction set
<tr class="even">
|-
<td align="left">opteron_2220</td>
|sse41
<td align="left">Select only nodes with AMD Opteron 2220 CPU chips</td>
|Select only nodes with sse41 (and above) CPU instruction set
</tr>
|-
<tr class="odd">
|sse4a
<td align="left">opteron_2384</td>
|Select only nodes with sse4a (and above) CPU instruction set
<td align="left">Select only nodes with AMD Opteron 2384 CPU chips</td>
|-
</tr>
|sse42
<tr class="even">
|Select only nodes with sse4a (and above) CPU instruction set
<td align="left">opteron_2427</td>
|-
<td align="left">Select only nodes with AMD Opteron 2427 CPU chips</td>
|xeon_X5355
</tr>
|Select only nodes with Intel Xeon X5355 CPU chips
<tr class="odd">
|-
<td align="left">sse4</td>
|xeon_X5460
<td align="left">Select only nodes with sse4 (and above) CPU instruction set</td>
|Select only nodes with Intel Xeon X5460 CPU chips
</tr>
|-
<tr class="even">
|xeon_E5649
<td align="left">sse41</td>
|Select only nodes with Intel Xeon E5649 CPU chips
<td align="left">Select only nodes with sse41 (and above) CPU instruction set</td>
|-
</tr>
|xeon_E7330
<tr class="odd">
|Select only nodes with Intel Xeon E7330 CPU chips
<td align="left">sse4a</td>
|-
<td align="left">Select only nodes with sse4a (and above) CPU instruction set</td>
|xeon_E52630
</tr>
|Select only nodes with Intel Xeon E5-2630 CPU chips
<tr class="even">
|-
<td align="left">sse42</td>
|xeon_E52650
<td align="left">Select only nodes with sse4a (and above) CPU instruction set</td>
|Select only nodes with Intel Xeon E5-2650 CPU chips
</tr>
|-
<tr class="odd">
|xeon_E52670
<td align="left">tpa</td>
|Select only nodes with Intel Xeon E5-2670 CPU chips
<td align="left">Select only nodes in Tampa</td>
|}
</tr>
<tr class="even">
<td align="left">wh</td>
<td align="left">Select only nodes in Winter Haven</td>
</tr>
<tr class="odd">
<td align="left">xeon_X5355</td>
<td align="left">Select only nodes with Intel Xeon X5355 CPU chips</td>
</tr>
<tr class="even">
<td align="left">xeon_X5460</td>
<td align="left">Select only nodes with Intel Xeon X5460 CPU chips</td>
</tr>
<tr class="odd">
<td align="left">xeon_E5649</td>
<td align="left">Select only nodes with Intel Xeon E5649 CPU chips</td>
</tr>
<tr class="even">
<td align="left">xeon_E7330</td>
<td align="left">Select only nodes with Intel Xeon E7330 CPU chips</td>
</tr>
<tr class="odd">
<td align="left">xeon_E52630</td>
<td align="left">Select only nodes with Intel Xeon E5-2630 CPU chips</td>
</tr>
<tr class="even">
<td align="left">xeon_E52650</td>
<td align="left">Select only nodes with Intel Xeon E5-2650 CPU chips</td>
</tr>
<tr class="odd">
<td align="left">xeon_E52670</td>
<td align="left">Select only nodes with Intel Xeon E5-2670 CPU chips</td>
</tr>
</tbody>
</table>

Latest revision as of 15:28, 4 January 2017

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>

 
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).

To request multiple features/constraints, you must add the following line to your script using one of the following operators below:

Operator Function Operator Symbol Example
AND & (ampersand) #SBATCH --constraint=“cpu_xeon&sse4”
OR | (pipe) #SBATCH --constraint=“xeon_E52630|xeon_E52650|xeon_E52670”


An example:

#!/bin/bash
#SBATCH --name=my_job_needs_qdr_infiniband
#SBATCH --time=02:00:00
#SBATCH --ntasks=8
#SBATCH --mem-per-cpu=4096
#SBATCH --constraint=ib_qdr
#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.

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
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