Slurm ExamplesΒΆ
The following examples demonstrate common CoSTAR job submission patterns, from a basic Slurm job through containerised Python, GPU, checkpointing, and MPI workflows.
New to Slurm? Start here. Learn how to submit a basic serial batch job and understand Slurm output files.
Build a small Apptainer image from a public Docker Python image, create a Conda environment inside it, and run a CPU-only Python calculation.
Train a PyTorch neural network on the MNIST dataset using a GPU and an Apptainer container.
Train a TensorFlow model on CIFAR-10, save checkpoints after each epoch, and resume from the latest checkpoint when resubmitted.
Run a Python mpi4py calculation across multiple Slurm MPI ranks using Apptainer and the host MPI launcher.
Important
Please remember the Golden Rule of High Performance Computing:
Never run heavy calculations, compile massive codebases, or train models directly on the login node! Always use Open OnDemand or the SLURM scheduler to request a dedicated compute node.