Using GPUs with Slurm: Difference between revisions

Jump to navigation Jump to search
Marked this version for translation
(tweak header levels and TOC)
(Marked this version for translation)
Line 2: Line 2:
<translate>
<translate>


= Introduction =
= Introduction = <!--T:56-->


<!--T:57-->
To request one or more GPUs for a Slurm job, use this form:
To request one or more GPUs for a Slurm job, use this form:
   --gpus-per-node=[type:]number
   --gpus-per-node=[type:]number


<!--T:58-->
The square-bracket notation means that you must specify the number of GPUs, and you may optionally specify the GPU type.  Choose a type from the "Available hardware" table below.  Here are two examples:
The square-bracket notation means that you must specify the number of GPUs, and you may optionally specify the GPU type.  Choose a type from the "Available hardware" table below.  Here are two examples:
   --gpus-per-node=2
   --gpus-per-node=2
   --gpus-per-node=v100:1
   --gpus-per-node=v100:1


<!--T:59-->
The first example requests two GPUs per node, of any type available on the cluster.  The second example requests one GPU per node, with the GPU being of the V100 type.
The first example requests two GPUs per node, of any type available on the cluster.  The second example requests one GPU per node, with the GPU being of the V100 type.


<!--T:60-->
The following form can also be used:
The following form can also be used:
   --gres=gpu[[:type]:number]
   --gres=gpu[[:type]:number]
This is older, and we expect it will no longer be supported in some future release of Slurm.  We recommend that you replace it in your scripts with the above --gpus-per-node form.
This is older, and we expect it will no longer be supported in some future release of Slurm.  We recommend that you replace it in your scripts with the above --gpus-per-node form.


<!--T:61-->
There are a variety of other directives that you can use to request GPUs and related resources: --gpus, --gpus-per-socket, --gpus-per-task, --mem-per-gpu, and --ntasks-per-gpu.  Please see the Slurm documentation for [https://slurm.schedmd.com/sbatch.html sbatch] for more about these.  Alliance staff have not tested many combinations of these, so if you try them and don't get the resources you expect or want, [[Technical support|contact support]].
There are a variety of other directives that you can use to request GPUs and related resources: --gpus, --gpus-per-socket, --gpus-per-task, --mem-per-gpu, and --ntasks-per-gpu.  Please see the Slurm documentation for [https://slurm.schedmd.com/sbatch.html sbatch] for more about these.  Alliance staff have not tested many combinations of these, so if you try them and don't get the resources you expect or want, [[Technical support|contact support]].


Line 81: Line 86:
In such a case, make sure you include a type specifier.
In such a case, make sure you include a type specifier.


= Examples =
= Examples = <!--T:62-->


== Single-core job == <!--T:3-->
== Single-core job == <!--T:3-->
Line 113: Line 118:
}}
}}


<!--T:63-->
For each GPU requested on:
For each GPU requested on:
* Béluga, we recommend no more than 10 CPU cores.
* Béluga, we recommend no more than 10 CPU cores.
rsnt_translations
56,420

edits

Navigation menu