Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| infra:howto:slurm_sample [2025/02/27 12:54] – created remi | infra:howto:slurm_sample [2025/05/16 11:55] (current) – [Example using GPUs] remi | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== How-to create a simple SLURM job ====== | ====== How-to create a simple SLURM job ====== | ||
| - | Now that you have your container ready in the Apptainer file format : for example application.sif | + | **Make sure you already |
| - | To run your job via SLURM you need to create a sbatch script : | + | You should have your container ready in the Apptainer file format : for examples here, application.sif |
| + | |||
| + | To run your job via SLURM, it is best to create a **sbatch script** : | ||
| (Note: for now we don't have Modules or LMod installed, we might add it later : hence the module commands commented) | (Note: for now we don't have Modules or LMod installed, we might add it later : hence the module commands commented) | ||
| Line 43: | Line 45: | ||
| - | ==== Example using GPUs ==== | + | ==== Example using a full GPU ==== |
| < | < | ||
| Line 101: | Line 103: | ||
| srun -G 1 --cpus-per-task=12 --time=3: | srun -G 1 --cpus-per-task=12 --time=3: | ||
| </ | </ | ||
| + | |||
| + | ==== Example requesting a specific node ==== | ||
| + | |||
| + | **NOTE : This is to be avoided : SLURM already chooses the best node matching your requirements if you correctly wrote them in your sbatch : you might just wait in the job queue instead of running directly on another node** | ||
| + | |||
| + | If for some specific reasons you want to request a specific node, you can add this parameter to your sbatch : | ||
| + | |||
| + | < | ||
| + | #SBATCH --nodelist=disco | ||
| + | </ | ||
| + | |||
| + | |||
| ==== Execute your batch file ==== | ==== Execute your batch file ==== | ||
