Submit

SLURM example script

#!/bin/bash
#SBATCH --job-name=nom_du_job  # job nane
#SBATCH --nodes=4              # ask 4 nodes
#SBATCH --ntasks=32            # ask for 32 MPI tasks
#SBATCH --cpus-per-task=2      # ask for 2 cpus per MPI task (example : for openMP)
#SBATCH --mem-per-cpu=2048     # ask 2GB of RAM per cpu
#SBATCH -t 48:00:00            # ask 2 dqys (wall time et no CPU time)
#SBATCH -p xeonv1              # ask to use a node on the xeonv1 partition

module load openmpi-x86_64
export OMP_NUM_THREADS=2
mpirun ./mon_executable_mpi > out

Other examples are available here : /share/apps/common/Exemples_slurm/

You can fill this directory with your programs/running examples.

More informations

Choose your shell

#!/bin/bash

job name

#SBATCH -J my_job

How many nodes ? 3 ?

#SBATCH -N 3

How many cpus ? 48 ?

#SBATCH -n 48

If I want 10 cores and 2 threads per core (set OMP_NUM_THREADS=2)

#SBATCH -n 10 -c 2

If I want to launch 4 programs per node on 6 nodes, total : 24 process

#SBATCH -N 6 --tasks-per-node=4

How many memory per node (in MB)

#SBATCH --mem 2048

Menory per cpu (still in MB)

#SBATCH --mem-per-cpu=512

How many time to run calculation (2 days here)

#SBATCH -t 48:00:00

To ask 10 minutes

#SBATCH -t 10

To ask 10 minutes and 20 seconds

#SBATCH -t 10:20

To ask 10 hours, 20minutes, 30 seconds

#SBATCH -t 10:20:30

Which paritition use ?

#SBATCH -p my_partition

If I want an entire node for me

#SBATCH --exclusive

If I want to share the node I use

#SBATCH --oversubcribe

To do job dependency (adapt it)

sbatch --dependency=afterok:$SLURM_JOB_ID job2.sh 

More information

man sbatch