This guide takes you from a brand-new account to your first finished job on SeaWulf in about 30 minutes. You'll connect, load software, write a tiny job script, submit it, and read the result.

On this page: Before you start ยท 1. Connect ยท 2. Load software ยท 3. Your first job ยท 4. Watch it run ยท What next ยท If something goes wrong

Before you start

1. Connect

The easiest start is Open OnDemand in your browser at sn-ood.seawulf.stonybrook.edu. Sign in with your NetID, approve Duo, then open the SeaWulf Cluster Shell Access app for a terminal. See the OnDemand overview.

Prefer a terminal on your own computer? Use SSH:

ssh <netid>@milan.seawulf.stonybrook.edu

Windows users can use MobaXterm or the built-in Windows Terminal. Connecting to the cluster has step-by-step instructions and explains which login address to use.

You're now on a shared login node. It's fine for editing files and submitting jobs, but don't run real computations here. Anything heavy goes in a job. See Login node etiquette.

2. Load software

Software on SeaWulf comes as modules that you load when you need them. Start by loading Slurm, the job scheduler, which you'll need in every session:

module load slurm             # job commands: sbatch, squeue, scancel
module avail                  # see what software is available
module load gcc/12.3.0        # load a specific package and version
module list                   # check what's loaded

More in Using modules and the software catalog.

3. Your first job

  1. Make a folder for it.
    mkdir ~/my_first_job && cd ~/my_first_job
  2. Create a job script called hello.slurm. Open an editor with nano hello.slurm, paste this in, then save with Ctrl+O and exit with Ctrl+X:
    #!/bin/bash
    #SBATCH --job-name=hello_world
    #SBATCH --partition=short-40core-shared   # a small, shared queue
    #SBATCH --nodes=1
    #SBATCH --ntasks=1
    #SBATCH --mem=1G
    #SBATCH --time=00:05:00                   # 5 minutes is plenty
    #SBATCH --output=hello_%j.out             # %j becomes the job ID
    #SBATCH --error=hello_%j.err
    
    echo "Hello from SeaWulf!"
    echo "Job ID: $SLURM_JOB_ID"
    echo "Running on node: $(hostname)"
    echo "Date and time: $(date)"
  3. Submit it.
    sbatch hello.slurm
    Slurm replies with something like Submitted batch job 12345. That number is your job ID.
  4. Read the result once it finishes (use your own job ID):
    cat hello_12345.out

4. Watch it run

squeue -u $USER

The ST column shows where your job is:

StateMeaning
PD PendingWaiting in the queue for resources
R RunningRunning now
CG CompletingFinishing up

When the job disappears from squeue, it's done. Check how it went with sacct -j <jobid>.

What next

If something goes wrong

"sbatch: command not found"

Load Slurm first with module load slurm.

My job stays in PD (pending) for a long time

The queue may be busy, or you may have asked for more than the queue allows. Check the reason in the last column of squeue -u $USER, try a smaller request, or test your script without running it:

sbatch --test-only hello.slurm
"invalid partition specified"

Each set of login nodes reaches different queues. The queues in this guide run from milan.seawulf.stonybrook.edu. See Which SeaWulf login node?

I can't log in

Repeated failed logins can block your address or lock your Duo. See login troubleshooting and Duo troubleshooting.

A graphical program won't open

Connect with ssh -X, or use WolfieHPCDesktop in Open OnDemand. See X11 forwarding.

Still stuck? When to ask for help explains how to reach HPC support and virtual office hours.

Applies to SeaWulf