Parallel
Multicore or multithread jobs
If you want to use multiple cores or threads within the same node you need to specify
#SBATCH -p compute-16-64 #Submit to compute-16-64 queue
#SBATCH --ntasks=10 # number of slots up to a maximum of 16
or use an exclusive session.
Parallel Jobs
Parallel jobs are ones that run over more than one node, and pass messages between the processes on the nodes using openmpi.
SLURM requires a number of standard configuration settings such as queue and number of slots.
#!/bin/bash
#SBATCH --mail-type=END,FAIL #Mail events (NONE, BEGIN, END, FAIL, ALL)
#SBATCH --mail-user=<username>@uea.ac.uk # Where to send mail
#SBATCH -p ib- #Submit to ib queue
#SBATCH --qos=ib-24-96
#SBATCH -t 36:00:00 #Set time limit to 36 hours
#SBATCH --ntasks=96 #Set number of slots required
#SBATCH --ntasks-per-node=24
#SBATCH --job-name=parallel_job #Set job name
#SBATCH -o parallel-test-%j.out # Output to MatJob-(job_number).out
#SBATCH -e parallel-test-%j.err # Error to MatJob-(job_number).err
#set up environment
module add mpi/openmpi/4.0.3/gcc/ib
#run the application
echo Hosts are
srun -l hostname
mpirun MyParallelBinary
Submitting Jobs
sbatch JobScriptName.sub
If you need to run a parallel test interactively you will need to specify the number of slots you need.
srun -n24 --qos=ib -p ib -J interactive --time=36:00:00 --mem=30G --pty bash
then on the node run the mpi command