Site Tools


howtouseslurm_000

You can use slurm in two 'modes'.

Batch mode

Most computation is done with batch mode. We prepare batch script (job). This script contains declaration of resources we require, and launch of computation we would like to run on them. Then we commit this batch script with sbatch command. Then with command squeue we can track state of our job ( is it waiting for resources, or is already running ).


Interactive mode

Its like login ( with ssh ) to computing node, but we can decide ( with SLURM ) how much resources we require. And unlike with ssh, SLURM makes sure we get resources nobody else is already using.

For example if we need interactive session with resources of 4 cores, and 200GB memory we use command :

srun -N1 -c4 --mem=200G --pty bash -l

Or if we need interactive session with resources of 1 core and 1 GPU card :

srun -N1 -c1 --gres=gpu:1 --pty bash -l

Remember to use exit command to end interactive mode. Unless you do this, resources you allocated starting interactive session will not be free to use by another user.

howtouseslurm_000.txt · Last modified: 2023/08/01 01:08 by 127.0.0.1