Slurm Testing Quick Start
Welcome to Slurm testing on Hazel. This page will help you submit your first Slurm job on the test environment. See the deployment status page for the migration timeline, available test hardware, and known limitations.
- Already familiar with LSF? See the LSF to Slurm command mapping.
- Check test environment status for available hardware and known limitations.
- Please report any issues you encounter during testing.
Step 1: Connect to the Cluster
Web browser: Go to https://servood.hpc.ncsu.edu (Open OnDemand) and log in with your Unity credentials.
Terminal: ssh YOUR_UNITY_ID@login.hpc.ncsu.edu
See detailed connection instructions for more options.
Step 2: Navigate to Your Scratch Directory
cd /share/$(groups | awk '{print $1}')/$USER
Your scratch directory is where you run jobs and store working data. See storage documentation for all directory locations and quotas.
Step 3: Create a Batch Script
Create a file called test_slurm.sh with the following contents:
#!/bin/bash #SBATCH --job-name=slurm_test #SBATCH --output=test.out.%j #SBATCH --error=test.err.%j #SBATCH --ntasks=1 #SBATCH --time=00:10:00 echo "Hello from $(hostname)" echo "Job ID: $SLURM_JOB_ID" date
See the batch script template for a full list of #SBATCH options.
Step 4: Submit and Monitor
sbatch test_slurm.sh # Submit the job squeue -u $USER # Check job status (PD=pending, R=running)
When the job completes, check results with: cat test.out.*
Key Slurm Commands
| Command | Purpose |
|---|---|
| sbatch script.sh | Submit a batch job |
| squeue -u $USER | View your queued and running jobs |
| scancel JOBID | Cancel a job |
| sinfo -N -l | Show node availability |
| sacct -j JOBID | View completed job details |
| salloc | Start an interactive session |
See job monitoring documentation for more details.
What's Next?
| I want to... | Go to... |
|---|---|
| Learn all batch script options | Batch Script Template |
| Run a GPU job | GPU Jobs |
| Run parallel (MPI/OpenMP) jobs | Parallel Jobs |
| Run many similar jobs at once | Array Jobs |
| Understand partitions and resources | Partitions and Resources |
| See LSF-to-Slurm command mapping | Migrating from LSF |
| Check test environment status | Deployment Status |
Reporting Issues
If you encounter problems during testing, please email help@ncsu.edu with:
- Job ID (from sbatch output)
- The batch script you used
- Error messages or unexpected behavior
- Output from squeue -j JOBID or sacct -j JOBID