# First Steps

Your first steps on the cluster — finding your resources and submitting your first job.

# Finding Your Account and Partition

Before submitting jobs, you need to know which account and partition you have access to. These are required parameters for every job submission.

## Check Your Partitions

Run this command on the login node:

```bash
check_my_partitions
```

This lists all partitions and accounts you are authorized to use.

## Key Concepts

- **Account** — your billing/group account (e.g. `public-users_v2`). Required for all job submissions.
- **Partition** — the queue your job runs in (e.g. `power-general-shared-pool`). Determines which nodes are available and what resource limits apply.
- **QOS** — Quality of Service, controls priority and limits (e.g. `public`). Usually matches your partition.

## Useful Commands

```bash
# View all partitions and their status
sinfo

# View partition details including limits
scontrol show partition power-general-shared-pool

# View your running and pending jobs
squeue -u your_username
```

## Need Access?

If `check_my_partitions` returns nothing or you are missing a partition, contact the HPC team at <hpc@tauex.tau.ac.il>.

# 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`:

```bash
#!/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

```bash
sbatch first_job.sh
```

Slurm will return a job ID:

```bash
Submitted batch job 12345
```

## Monitor It

```bash
# 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**](https://dev.hpcguide.tau.ac.il/books/running-jobs "Running Jobs") for arrays, GPU jobs, interactive sessions, and more.

## See Also

- [HPC Helper Toolkit](https://hpctoolkit.tau.ac.il/) — AI-powered tool to help with QOS configuration, job submission, and more

# Useful Tools

External tools and resources to help with TAU HPC usage.

## HPC Helper Toolkit

An AI-powered toolkit to help with common HPC tasks including QOS configuration, job submission, and more.

[HPC Helper Toolkit for TAU](https://hpctoolkit.tau.ac.il/)