Hello World

Checks whether SLURM works like expected. sinfo shows us all partitions.

sinfo

Depending on the cluster setup it will show the state of all partitions and accociated nodes.

The example shows two partitions (queues, c5n and g4dn) with some nodes used by the sleep job and some idle.

Hello World

The hello.c example from the MPI verification can also be run via SLURM.

cat > ~/slurm/hello.sbatch << EOF 
#!/bin/bash
#SBATCH --job-name=hello-world
#SBATCH --ntasks-per-node=2
#SBATCH --output=/fsx/logs/%x_%j.out

set -x
module load openmpi
mpirun ${HOME}/hello
sleep 10
EOF
mkdir -p /fsx/logs
sbatch -N2 ~/slurm/hello.sbatch

As we are not using --exclusive to force the job to run without other jobs running on the same node it is able to use the already available nodes blocked by the sleep job.

squeue

The output will show lines from both nodes.

cat /fsx/logs/hello-world_*.out