MODULE 11 // 20:15

Writing Production Slurm Batch Scripts

Configure resource directives (#SBATCH --nodes, --ntasks-per-node, --time) and manage environment propagation.

// KEY ARCHITECTURAL TAKEAWAYS

  • Define precise memory and CPU cores per task.
  • Target specific compute partitions.
REFERENCE IMPLEMENTATION // SNIPPET
#!/bin/bash
#SBATCH --job-name=hpc_job
#SBATCH --partition=compute
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=16
#SBATCH --time=02:00:00
srun ./my_simulation