Using GPUs with Slurm/fr: Difference between revisions

no edit summary
(Updating to match new version of source page)
No edit summary
Line 123: Line 123:
===Regroupement de tâches pour un seul GPU===
===Regroupement de tâches pour un seul GPU===


<div class="mw-translate-fuzzy">
Pour exécuter pendant '''plus de 24 heures''' quatre programmes qui utilisent un seul GPU ou deux programmes qui utilisent deux GPUs, nous recommandons [https://www.gnu.org/software/parallel/ GNU Parallel]. Voici un exemple simple&nbsp;:
If user needs to run 4 x single GPU codes or 2 x 2-GPU codes in a node for '''longer than 24 hours''', [https://www.gnu.org/software/parallel/ GNU Parallel] is recommended. A simple example is given below:
<pre>
<pre>
cat params.input | parallel -j4 'CUDA_VISIBLE_DEVICES=$(({%} - 1)) python {} &> {#}.out'
cat params.input | parallel -j4 'CUDA_VISIBLE_DEVICES=$(({%} - 1)) python {} &> {#}.out'
</pre>
</pre>
GPU id will be calculated by slot id {%} minus 1. {#} is the job id, starting from 1.
GPU id will be calculated by slot id {%} minus 1. {#} is the job id, starting from 1.
</div>


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
rsnt_translations
56,563

edits