Skip to main content

Submitting Your First Job

Once you have your account and partition from check_my_partitions, you are ready to submit your first job.

A Minimal Job Script

Create a file called first_job.sh:

#!/bin/bash
#SBATCH --job-name=first_job
#SBATCH --account=public-users_v2
#SBATCH --partition=power-general-shared-pool
#SBATCH --qos=public
#SBATCH --time=00:10:00
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=1
#SBATCH --mem-per-cpu=2G
#SBATCH --output=first_job_%j.out
#SBATCH --error=first_job_%j.err

echo "Hello from $(hostname)"
echo "Job ID: $SLURM_JOB_ID"

Submit It

sbatch first_job.sh

Slurm will return a job ID:

Submitted batch job 12345

Monitor It

# Check job status
squeue -u your_username

# View output once the job completes
cat first_job_12345.out

Job States

  • PD — Pending, waiting for resources
  • R — Running
  • CG — Completing
  • CD — Completed
  • F — Failed

Next Steps

Once your first job runs successfully, see Running Jobs for arrays, GPU jobs, interactive sessions, and more.

See Also

  • HPC Helper Toolkit — AI-powered tool to help with QOS configuration, job submission, and more