.. _tutorials-examples-index: Slurm Examples ============== The following examples demonstrate common CoSTAR job submission patterns, from a basic Slurm job through containerised Python, GPU, checkpointing, and MPI workflows. .. raw:: html
.. grid:: 1 2 2 2 :gutter: 3 :margin: 1 .. grid-item-card:: Example 1: Basic Serial Batch Job :link: tutorials-example-01-helloworld :link-type: ref New to Slurm? Start here. Learn how to submit a basic serial batch job and understand Slurm output files. .. grid-item-card:: Example 2: Python/Conda + Apptainer :link: tutorials-example-02-python :link-type: ref Build a small Apptainer image from a public Docker Python image, create a Conda environment inside it, and run a CPU-only Python calculation. .. grid-item-card:: Example 3: PyTorch + MNIST + GPU :link: tutorials-example-03-gpu :link-type: ref Train a PyTorch neural network on the MNIST dataset using a GPU and an Apptainer container. .. grid-item-card:: Example 4: TensorFlow + CIFAR-10 + checkpoint :link: tutorials-example-04-checkpoint :link-type: ref Train a TensorFlow model on CIFAR-10, save checkpoints after each epoch, and resume from the latest checkpoint when resubmitted. .. grid-item-card:: Example 5: Containerized MPI Multi-Process Job :link: tutorials-example-05-mpi :link-type: ref Run a Python mpi4py calculation across multiple Slurm MPI ranks using Apptainer and the host MPI launcher. .. raw:: html .. 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. .. toctree:: :hidden: example-01-helloworld example-02-python example-03-gpu example-04-checkpoint example-05-mpi