Submit Your First Job¶
This guide walks you through submitting your first job to the cluster.
Step 1: Create a Job Script¶
Create a file called hello.sh:
#!/bin/bash
#SBATCH --job-name=hello
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=1
#SBATCH --time=00:10:00
#SBATCH --output=hello.out
# Load any required modules
module purge
module load python
# Your command here
echo "Hello from the HPC cluster!"
python --version
Step 2: Submit the Job¶
sbatch hello.sh
You’ll see output like:
Submitted batch job 12345
Step 3: Check Job Status¶
# Check if your job is running
squeue -u $USER
# Check if it's completed
sacct -j 12345
Step 4: View Output¶
# View the output file
cat hello.out
Next Steps¶
Writing Job Scripts - Learn about SLURM directives
Common Job Types - CPU, GPU, and interactive jobs
Troubleshooting - What to do if your job fails