Examples of job submission scripts with SLURM

Basic sample submission scripts are listed HERE.

Note that you also can reserve the nodes with command salloc

salloc -N1 -n4 -t 12:00:00 — request 4 CPU-cores (n4) on one node (N1) for 12 hours in default queue (“all”)

salloc -p long -n24 -t 48:00:00 — request 24 CPU-cores for 48 hours in queue “long” (on whatever number of nodes)

salloc -p NGPU --gres=gpu:2 -N1 -n2 -t 12:00:00 — request 2 CPU cores and two GPUs in queue NGPU (we have 2 GPUs/node max) for 12 hours

salloc -p Broadwell -N1 -w zeus300 --exclusive — request particular node (zeus300) in exclusive mode (all resources)

When the node is reserved, you can send e.g. mpi code with mpirun command, or just login to the target node with ssh and work interactively in the command line.

You can also use srun command to run tasks on CPUs, reserved with salloc :

[aa3025@zeus2 ~]$ qstat
             JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)
            538907      NGPU     bash   aa3025  R       0:04      1 zeus405

[aa3025@zeus2 ~]$ srun -n 4 hostname
zeus405
zeus405
zeus405
zeus405

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

css.php